]> git.imager.perl.org - imager.git/blobdiff - log.h
PNG re-work: read 16-bit PNG as 16-bit
[imager.git] / log.h
diff --git a/log.h b/log.h
index 7c9cc97c483c63360cd20cce47c980bcddd1dd47..16b5831039e340f233f82f7b6c86efb500cbc09d 100644 (file)
--- a/log.h
+++ b/log.h
@@ -4,20 +4,33 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <time.h>
+#include "imdatatypes.h"
 /* 
    input:  name of file to log too
    input:  onoff, 0 means no logging
    global: creates a global variable FILE* lg_file
 */
 
-void m_lhead ( const char *file, int line  );
-void m_init_log( const char *name, int onoff );
-void m_loog(int level,const char *msg, ... );
-void m_fatal ( int exitcode,const char *fmt, ... );
+int i_init_log( const char *name, int onoff );
+void i_fatal ( int exitcode,const char *fmt, ... );
+void i_lhead ( const char *file, int line  );
+void i_loog(int level,const char *msg, ... ) I_FORMAT_ATTR(2,3);
 
+/*
+=item mm_log((level, format, ...))
+=category Logging
+
+This is the main entry point to logging. Note that the extra set of
+parentheses are required due to limitations in C89 macros.
+
+This will format a string with the current file and line number to the
+log file if logging is enabled.
+
+=cut
+*/
 
 #ifdef IMAGER_LOG
-#define mm_log(x) { m_lhead(__FILE__,__LINE__); m_loog x; } 
+#define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; } 
 #else
 #define mm_log(x)
 #endif