modified: nfig1.py
[GalaxyCodeBases.git] / c_cpp / etc / mbuffer / log.h
blobbd9c78de065e75e764da68178de0402bafbaf295
1 /*
2 * Copyright (C) 2000-2009, Thomas Maier-Komor
4 * This is the source code of mbuffer.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef LOG_H
21 #define LOG_H
23 #include "config.h"
25 #if !(defined(__sun) || defined(__linux))
26 #define NEED_IO_INTERLOCK
27 #endif
29 #ifdef NEED_IO_INTERLOCK
30 #include <pthread.h>
31 extern pthread_mutex_t LogMut;
32 #endif
34 extern int Verbose, Log, ErrorOccurred, ErrorsFatal;
36 #ifdef DEBUG
37 void logdebug(const char *msg, ...);
38 #define debugmsg if (Verbose >= 5) logdebug
39 #define debugiomsg if (Verbose >= 6) logdebug
40 #elif __STDC_VERSION__ >= 199901L
41 #define debugmsg(...)
42 #define debugiomsg(...)
43 #else
44 #define debugmsg
45 #define debugiomsg
46 #endif
48 void infomsg(const char *msg, ...);
49 void warningmsg(const char *msg, ...);
50 void errormsg(const char *msg, ...);
51 void fatal(const char *msg, ...);
52 void printmsg(const char *msg, ...);
55 #endif