anjuta r4366 - in trunk: . libanjuta



Author: jrliggett
Date: Sat Nov  1 21:40:46 2008
New Revision: 4366
URL: http://svn.gnome.org/viewvc/anjuta?rev=4366&view=rev

Log:
Patch from Ignacio Casal Quinteiro  <nacho resa gmail com>:

* libanjuta/anjuta-debug.h:
Added DEBUG_PRINTF macro.

Fixes bug #558788

Modified:
   trunk/ChangeLog
   trunk/libanjuta/anjuta-debug.h

Modified: trunk/libanjuta/anjuta-debug.h
==============================================================================
--- trunk/libanjuta/anjuta-debug.h	(original)
+++ trunk/libanjuta/anjuta-debug.h	Sat Nov  1 21:40:46 2008
@@ -44,4 +44,16 @@
 #  define DEBUG_PRINT(...)
 #endif
 
+/**
+ * DEBUG_PRINTF:
+ * 
+ * Equivalent to g_debug() showing the FILE, the LINE and the FUNC,
+ * except it has only effect when DEBUG is defined. Used for printing debug messages.
+ */
+#if defined (DEBUG) && defined (__GNUCC__)
+#  define DEBUG_PRINTF(format, ...) g_debug ("%s:%d (%s)" format, __FILE__, __LINE__, G_STRFUNC, __VA_ARGS__)
+#else
+#  define DEBUG_PRINTF(...)
+#endif
+
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]