+#include "imconfig.h"
#include "log.h"
+#include <stdlib.h>
#define DTBUFF 50
#define DATABUFF DTBUFF+3+10+1+5+1+1
*/
void
-init_log(const char* name,int level) {
+i_init_log(const char* name,int level) {
log_level = level;
if (level < 0) {
lg_file = NULL;
}
}
}
+ setvbuf(lg_file, NULL, _IONBF, BUFSIZ);
mm_log((0,"Imager - log started (level = %d)\n", level));
}
void
-m_fatal(int exitcode,const char *fmt, ... ) {
+i_fatal(int exitcode,const char *fmt, ... ) {
va_list ap;
time_t timi;
struct tm *str_tm;
/*
* Logging is inactive - insert dummy functions
+ */
+void i_init_log(const char* name,int onoff) {}
+void i_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
void
-m_loog(int level,const char *fmt, ... ) {
+i_loog(int level,const char *fmt, ... ) {
va_list ap;
if (level > log_level) return;
if (lg_file != NULL) {
void
-m_lhead(const char *file, int line) {
+i_lhead(const char *file, int line) {
time_t timi;
struct tm *str_tm;