/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.cpp

  • Committer: Suren A. Chilingaryan
  • Date: 2009-12-13 02:20:05 UTC
  • Revision ID: csa@dside.dyndns.org-20091213022005-m932to8hhihwuw5r
Support for TIFF images in C code and stand-alone console application

Show diffs side-by-side

added added

removed removed

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