libdballe
7.7
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
dballe
core
core/trace.h
1
/*
2
* core/trace - Debugging trace functions
3
*
4
* Copyright (C) 2005--2013 ARPA-SIM <urpsim@smr.arpa.emr.it>
5
*
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 2 of the License.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
* Author: Enrico Zini <enrico@enricozini.com>
20
*/
21
#ifndef DBALLE_CORE_TRACE_H
22
#define DBALLE_CORE_TRACE_H
23
30
#ifdef TRACE_SOURCE
31
#include <cstdio>
32
// Output a trace message
33
#define TRACE(...) fprintf(stderr, __VA_ARGS__)
34
// Prefix a block of code to compile only if trace is enabled
35
#define IFTRACE if (1)
36
#else
37
#define TRACE(...) do { } while (0)
38
#define IFTRACE if (0)
39
#endif
40
41
#endif
Generated by
1.8.11