diff -r a4033700e35c -r fc585645ad05 errorlog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/errorlog.h Mon Feb 16 18:09:03 2004 +0100 @@ -0,0 +1,38 @@ +/* + * libtu/errorlog.h + * + * Copyright (c) Tuomo Valkonen 1999-2004. + * + * You may distribute and modify this library under the terms of either + * the Clarified Artistic License or the GNU LGPL, version 2.1 or later. + */ + +#ifndef LIBTU_ERRORLOG_H +#define LIBTU_ERRORLOG_H + +#include + +#include "types.h" +#include "obj.h" +#include "output.h" + +#define ERRORLOG_MAX_SIZE (1024*4) + +INTRSTRUCT(ErrorLog); +DECLSTRUCT(ErrorLog){ + char *msgs; + int msgs_len; + FILE *file; + bool errors; + ErrorLog *prev; + WarnHandler *old_handler; +}; + +/* el is assumed to be uninitialised */ +extern void errorlog_begin(ErrorLog *el); +extern void errorlog_begin_file(ErrorLog *el, FILE *file); +/* For errorlog_end el Must be the one errorlog_begin was last called with */ +extern bool errorlog_end(ErrorLog *el); +extern void errorlog_deinit(ErrorLog *el); + +#endif /* LIBTU_ERRORLOG_H */