Releasing version 3-2014010504
[notion/jeffpc.git] / libtu / errorlog.h
blob93da8baafa4b40f61410fde04a92252c3fd701e3
1 /*
2 * libtu/errorlog.h
4 * Copyright (c) Tuomo Valkonen 1999-2004.
6 * You may distribute and modify this library under the terms of either
7 * the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
8 */
10 #ifndef LIBTU_ERRORLOG_H
11 #define LIBTU_ERRORLOG_H
13 #include <stdio.h>
15 #include "types.h"
16 #include "obj.h"
17 #include "output.h"
19 #define ERRORLOG_MAX_SIZE (1024*4)
21 INTRSTRUCT(ErrorLog);
22 DECLSTRUCT(ErrorLog){
23 char *msgs;
24 int msgs_len;
25 FILE *file;
26 bool errors;
27 ErrorLog *prev;
28 WarnHandler *old_handler;
31 /* el is assumed to be uninitialised */
32 extern void errorlog_begin(ErrorLog *el);
33 extern void errorlog_begin_file(ErrorLog *el, FILE *file);
34 /* For errorlog_end el Must be the one errorlog_begin was last called with */
35 extern bool errorlog_end(ErrorLog *el);
36 extern void errorlog_deinit(ErrorLog *el);
38 #endif /* LIBTU_ERRORLOG_H */