Codebase list libmawk / a8c8f483-bda4-4dcb-b181-d7b9964ade2c/main scconfig / src / default / log.h
a8c8f483-bda4-4dcb-b181-d7b9964ade2c/main

Tree @a8c8f483-bda4-4dcb-b181-d7b9964ade2c/main (Download .tar.gz)

log.h @a8c8f483-bda4-4dcb-b181-d7b9964ade2c/mainraw · history · blame

#include <stdlib.h>
#include <stdio.h>

#define max_spaces 64
extern char *spaces;

#define logprefix(n) (((n) > max_spaces) ? spaces : (spaces+max_spaces-(n)))

void logprintf(int depth, const char *format, ...);
void error(const char *format, ...);
void report(const char *format, ...);

void log_merge(int logdepth, const char *fn);

extern FILE *logfile;
extern void log_init(void);
void log_uninit(void);

extern char *fn_log;