Debian Codegraph @

src/common/debug.h

raw symbols SCIP
1 /*
2 * Component of the D-ITG 2.8.1 (r1023) platform (http://traffic.comics.unina.it/software/ITG)
3 *
4 * Copyright : (C) 2004-2013 by Alessio Botta, Walter de Donato, Alberto Dainotti,
5 * Stefano Avallone, Antonio Pescape' (PI)
6 * COMICS (COMputer for Interaction and CommunicationS) Group
7 * Department of Electrical Engineering and Information Technologies
8 * University of Napoli "Federico II".
9 * email : [email protected], [email protected], [email protected],
10 * [email protected], [email protected]
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 * For commercial use please refer to D-ITG Professional.
26 */
27
28
29 #ifndef __DEBUG_H__
30 #define __DEBUG_H__
31
32 #include <stdio.h>
33
34 #ifdef DEBUG
35 #define PRINTD(level, ...) if (DEBUG >= level) { printf(__VA_ARGS__); fflush(stdout); }
36 #else
37 #define PRINTD(level, ...)
38 #endif
39
40 #ifdef DEBUG
41 #ifdef UNIX
42 #define PRINTDS(level, ...) if (DEBUG >= level) { usleep(1000); printf(__VA_ARGS__); fflush(stdout); }
43 #endif
44 #ifdef WIN32
45 #define PRINTDS(level, ...) if (DEBUG >= level) { Sleep(1000); printf(__VA_ARGS__); fflush(stdout); }
46 #endif
47 #else
48 #define PRINTDS(level, ...)
49 #endif
50
51 #endif
52