]> git.imager.perl.org - imager.git/blobdiff - log.c
- set i_format to gif when reading gif files and test for it
[imager.git] / log.c
diff --git a/log.c b/log.c
index 979c3a9bc872e65c34b98b4de31a600b8673a0f7..04e225a7d97f2e397323f02cdc01ca9ca91fb4ba 100644 (file)
--- a/log.c
+++ b/log.c
@@ -17,7 +17,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 +31,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 +57,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