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

  Switch to side-by-side view

--- a
+++ b/src/dbgutils.h
@@ -0,0 +1,71 @@
+/* Panorama_Tools	-	Generate, Edit and Convert Panoramic Images
+   Copyright (C) 2004 - Douglas Wilkins  dwilkins42@users.sourceforge.net
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+/*------------------------------------------------------------*/
+
+#ifndef __DBGUTILS_H__
+#define __DBGUTILS_H__
+
+#ifdef WIN32
+
+#define DPRINTF printf
+
+#define DTRACE printf
+
+#define DTRACE_MSG printf
+
+#else
+
+#ifndef DEBUG
+
+#define DPRINTF(fmt, args...) do{}while(0)
+
+#define DTRACE(fmt, args...) do{}while(0)
+
+#define DTRACE_MSG(msg) do{}while(0)
+
+#else
+
+#define DPRINTF(fmt, args...)           \
+do                      			    \
+{									    \
+    fprintf(stderr, fmt, ##args);	    \
+} while(0)
+
+#define DTRACE(fmt, args...)                        \
+do                       		    			    \
+{									    		    \
+    fprintf (stderr, "[%24s:%-4d] %24s: ",          \
+             __FILE__, __LINE__, __FUNCTION__);	    \
+    fprintf(stderr, fmt, ##args);			        \
+    fprintf(stderr, "\n");      			        \
+} while(0) 
+
+#define DTRACE_MSG(msg) \
+do                      \
+{                       \
+    DTRACE("%s", msg);	\
+} while(0)
+
+#endif /* DEBUG */
+
+#define DENTER DTRACE_MSG("Entering")
+#define DEXIT  DTRACE_MSG("Exiting")
+
+#endif /* WIN32 */
+
+#endif /* __DBGUTILS_H__ */

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

Sign up for the SourceForge newsletter:





No, thanks