/normxcorr/trunk

To get this branch, use:
bzr branch http://suren.me/webbzr/normxcorr/trunk

« back to all changes in this revision

Viewing changes to dict_hw/src/normxcorr_hw_msg.h

  • Committer: Suren A. Chilingaryan
  • Date: 2009-12-12 01:38:41 UTC
  • Revision ID: csa@dside.dyndns.org-20091212013841-feih3qa4i28x75j4
Provide stand-alone library

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <stdio.h>
2
2
#include <stdarg.h>
3
3
 
4
 
static void reportError(const char *msg, ...) {
5
 
    char res[1024];
6
 
    
7
 
    va_list ap;
8
 
    
9
 
    va_start(ap, msg);
10
 
    vsnprintf(res, 1024, msg, ap);
11
 
    va_end(ap);
12
 
    
13
 
    printf("%s\n", res);
14
 
}
15
 
 
16
 
static void reportMessage(const char *msg, ...) {
17
 
    char res[1024];
18
 
 
19
 
    va_list ap;
20
 
    
21
 
    va_start(ap, msg);
22
 
    vsnprintf(res, 1024, msg, ap);
23
 
    va_end(ap);
24
 
    
25
 
    printf("%s\n", res);
26
 
}
 
4
static void reportErrorDefault(const char *msg, ...) {
 
5
    char res[1024];
 
6
    
 
7
    va_list ap;
 
8
    
 
9
    va_start(ap, msg);
 
10
    vsnprintf(res, 1024, msg, ap);
 
11
    va_end(ap);
 
12
    
 
13
    printf("%s\n", res);
 
14
}
 
15
 
 
16
static void reportMessageDefault(const char *msg, ...) {
 
17
    char res[1024];
 
18
 
 
19
    va_list ap;
 
20
    
 
21
    va_start(ap, msg);
 
22
    vsnprintf(res, 1024, msg, ap);
 
23
    va_end(ap);
 
24
    
 
25
    printf("%s\n", res);
 
26
}
 
27
 
 
28
static void (*reportError)(const char *msg, ...) = reportErrorDefault;
 
29
static void (*reportMessage)(const char *msg, ...) = reportMessageDefault;