Debian Codegraph @

src/fcml_trace.h

raw
1 /*
2 * FCML - Free Code Manipulation Library.
3 * Copyright (C) 2010-2020 Slawomir Wojtasiak
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library 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 GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #ifndef FCML_TRACE_H_
21 #define FCML_TRACE_H_
22
23 #include "stdio.h"
24
25 #ifdef FCML_DEBUG
26 #define FCML_TRACE(pattern, ...) { printf("%s:%d ", __FILE__, __LINE__); printf(pattern, ##__VA_ARGS__); printf("\n");}
27 #define FCML_TRACE_MSG(msg) { printf("%s:%d ", __FILE__, __LINE__); printf("%s\n", msg); }
28 #else
29 #define FCML_TRACE(pattern, ...)
30 #define FCML_TRACE_MSG(msg)
31 #endif
32
33 #endif /* FCML_TRACE_H_ */