X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/02d1d62827cef86398edc2013f7d2ff04bf21c63..50c4902821f1aa9ec161c7722ff7ab81ddc601b8:/log.c diff --git a/log.c b/log.c index 979c3a9b..c2b23e62 100644 --- a/log.c +++ b/log.c @@ -1,3 +1,4 @@ +#include "imconfig.h" #include "log.h" #define DTBUFF 50 @@ -17,7 +18,7 @@ static char data_buffer[DATABUFF]; */ void -init_log(const char* name,int level) { +m_init_log(const char* name,int level) { log_level = level; if (level < 0) { lg_file = NULL; @@ -31,6 +32,7 @@ init_log(const char* name,int level) { } } } + setvbuf(lg_file, NULL, _IONBF, BUFSIZ); mm_log((0,"Imager - log started (level = %d)\n", level)); } @@ -56,12 +58,11 @@ m_fatal(int exitcode,const char *fmt, ... ) { /* * Logging is inactive - insert dummy functions + */ +void m_init_log(const char* name,int onoff) {} +void m_fatal(int exitcode,const char *fmt, ... ) { exit(exitcode); } -void init_log(const char* name,int onoff) {} -void m_fatal(int exitcode,const char *fmt, ... ) { return(exitcode); } - -*/ #endif