Commit 42fe075e authored by Paolo Borelli's avatar Paolo Borelli

better fix

parent 80ded42f
......@@ -31,15 +31,7 @@
#ifndef __GEDIT_DEBUG_H__
#define __GEDIT_DEBUG_H__
/* G_GNUC_FUNCTION works only with gcc < 3 at the moment... */
#if defined (__GNUC__) && (__GNUC__ < 3)
#define GEDIT_FUNCTION __FUNCTION__
#elif defined (__GNUC__)
#define GEDIT_FUNCTION __func__
#else /* !__GNUC__ */
#define GEDIT_FUNCTION ""
#endif /* !__GNUC__ */
#include <glib.h>
/*
* Set an environmental var of the same name to turn on
......@@ -65,24 +57,27 @@ typedef enum {
} GeditDebugSection;
#define DEBUG_VIEW GEDIT_DEBUG_VIEW, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_UNDO GEDIT_DEBUG_UNDO, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_SEARCH GEDIT_DEBUG_SEARCH, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_PRINT GEDIT_DEBUG_PRINT, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_PREFS GEDIT_DEBUG_PREFS, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_PLUGINS GEDIT_DEBUG_PLUGINS, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_FILE GEDIT_DEBUG_FILE, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_DOCUMENT GEDIT_DEBUG_DOCUMENT,__FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_RECENT GEDIT_DEBUG_RECENT, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_COMMANDS GEDIT_DEBUG_COMMANDS,__FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_MDI GEDIT_DEBUG_MDI, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_SESSION GEDIT_DEBUG_SESSION, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_UTILS GEDIT_DEBUG_UTILS, __FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_METADATA GEDIT_DEBUG_METADATA,__FILE__, __LINE__, GEDIT_FUNCTION
#define DEBUG_VIEW GEDIT_DEBUG_VIEW, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_UNDO GEDIT_DEBUG_UNDO, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_SEARCH GEDIT_DEBUG_SEARCH, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_PRINT GEDIT_DEBUG_PRINT, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_PREFS GEDIT_DEBUG_PREFS, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_PLUGINS GEDIT_DEBUG_PLUGINS, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_FILE GEDIT_DEBUG_FILE, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_DOCUMENT GEDIT_DEBUG_DOCUMENT,__FILE__, __LINE__, G_STRFUNC
#define DEBUG_RECENT GEDIT_DEBUG_RECENT, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_COMMANDS GEDIT_DEBUG_COMMANDS,__FILE__, __LINE__, G_STRFUNC
#define DEBUG_MDI GEDIT_DEBUG_MDI, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_SESSION GEDIT_DEBUG_SESSION, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_UTILS GEDIT_DEBUG_UTILS, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_METADATA GEDIT_DEBUG_METADATA,__FILE__, __LINE__, G_STRFUNC
void gedit_debug_init (void);
void gedit_debug (GeditDebugSection section, const gchar *file,
gint line, const gchar* function, const gchar* format, ...);
void gedit_debug (GeditDebugSection section,
const gchar *file,
gint line,
const gchar *function,
const gchar *format, ...);
#endif /* __GEDIT_DEBUG_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment