output.c

changeset 52
0228b3741a42
parent 36
63cd573ffbcf
child 53
f8f9366b359c
equal deleted inserted replaced
51:2d95d77aa954 52:0228b3741a42
18 #if !defined(HAS_SYSTEM_ASPRINTF) 18 #if !defined(HAS_SYSTEM_ASPRINTF)
19 #include "../snprintf_2.2/snprintf.h" 19 #include "../snprintf_2.2/snprintf.h"
20 #endif 20 #endif
21 21
22 22
23 /* verbose 23 static void default_warn_handler(const char *message);
24 */ 24
25 25
26 static bool verbose_mode=FALSE; 26 static bool verbose_mode=FALSE;
27 static int verbose_indent_lvl=0; 27 static int verbose_indent_lvl=0;
28 static bool progname_enable=TRUE; 28 static bool progname_enable=TRUE;
29 static WarnHandler *current_warn_handler=NULL; 29 static WarnHandler *current_warn_handler=default_warn_handler;
30 30
31 #define INDENTATOR_LENGTH 4 31 #define INDENTATOR_LENGTH 4
32 32
33 static char indentator[]={' ', ' ', ' ', ' '}; 33 static char indentator[]={' ', ' ', ' ', ' '};
34 34
385 385
386 386
387 WarnHandler *set_warn_handler(WarnHandler *handler) 387 WarnHandler *set_warn_handler(WarnHandler *handler)
388 { 388 {
389 WarnHandler *old=current_warn_handler; 389 WarnHandler *old=current_warn_handler;
390 current_warn_handler=handler; 390 current_warn_handler=(handler!=NULL ? handler : default_warn_handler);
391 return old; 391 return old;
392 } 392 }

mercurial