ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/slog.h
(Generate patch)

Comparing gvpe/src/slog.h (file contents):
Revision 1.1 by pcg, Sat Mar 1 15:53:03 2003 UTC vs.
Revision 1.5 by pcg, Thu Jan 29 18:55:10 2004 UTC

1/* 1/*
2 slog.h -- logging 2 slog.h -- logging
3 Copyright (C) 2003 Marc Lehmannn <pcg@goof.com> 3 Copyright (C) 2003 Marc Lehmann <pcg@goof.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
65 65
66extern void log_to (int mask); 66extern void log_to (int mask);
67 67
68extern void slog_ (const loglevel l, const char *m, ...); 68extern void slog_ (const loglevel l, const char *m, ...);
69 69
70#ifdef __GNUC__ 70#if __GNUC__ > 2
71# define slog(l, ...) do { if ((l) >= log_level) slog_ (l, __VA_ARGS__); } while (0) 71# define slog(l, ...) do { if ((l) >= log_level) slog_ (l, __VA_ARGS__); } while (0)
72#else 72#else
73# define slog slog_ 73# define slog slog_
74#endif 74#endif
75 75
76extern void fatal (const char *m); 76extern void fatal (const char *m);
77extern void require_failed (const char *file, int line, const char *info);
78
79#define require(expr) if (!(expr)) require_failed (__FILE__, __LINE__, #expr)
77 80
78#endif 81#endif
79 82

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines