Diff of /src/dbgutils.h [000000] .. [24dce1]  Maximize  Restore

Switch to unified view

a b/src/dbgutils.h
1
/* Panorama_Tools -   Generate, Edit and Convert Panoramic Images
2
   Copyright (C) 2004 - Douglas Wilkins  dwilkins42@users.sourceforge.net
3
4
   This program is free software; you can redistribute it and/or modify
5
   it under the terms of the GNU General Public License as published by
6
   the Free Software Foundation; either version 2, or (at your option)
7
   any later version.
8
9
   This program is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
   GNU General Public License for more details.
13
14
   You should have received a copy of the GNU General Public License
15
   along with this program; if not, write to the Free Software
16
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
17
18
/*------------------------------------------------------------*/
19
20
#ifndef __DBGUTILS_H__
21
#define __DBGUTILS_H__
22
23
#ifdef WIN32
24
25
#define DPRINTF printf
26
27
#define DTRACE printf
28
29
#define DTRACE_MSG printf
30
31
#else
32
33
#ifndef DEBUG
34
35
#define DPRINTF(fmt, args...) do{}while(0)
36
37
#define DTRACE(fmt, args...) do{}while(0)
38
39
#define DTRACE_MSG(msg) do{}while(0)
40
41
#else
42
43
#define DPRINTF(fmt, args...)           \
44
do                                    \
45
{                                     \
46
    fprintf(stderr, fmt, ##args);     \
47
} while(0)
48
49
#define DTRACE(fmt, args...)                        \
50
do                                                \
51
{                                                 \
52
    fprintf (stderr, "[%24s:%-4d] %24s: ",          \
53
             __FILE__, __LINE__, __FUNCTION__);       \
54
    fprintf(stderr, fmt, ##args);                 \
55
    fprintf(stderr, "\n");                        \
56
} while(0) 
57
58
#define DTRACE_MSG(msg) \
59
do                      \
60
{                       \
61
    DTRACE("%s", msg);    \
62
} while(0)
63
64
#endif /* DEBUG */
65
66
#define DENTER DTRACE_MSG("Entering")
67
#define DEXIT  DTRACE_MSG("Exiting")
68
69
#endif /* WIN32 */
70
71
#endif /* __DBGUTILS_H__ */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks