more portable debug_print with source filename and linenumber
[claws.git] / src / utils.h
index 8a2e2c4290c337b5a969493e1e77926a29aed838..eaeef6406bb74aa141c24d4f627dfa9d3343bdda 100644 (file)
        perror(func); \
 }
 
-#define debug_print(format, ...) debug_print_real(__FILE__, __LINE__, format , ##__VA_ARGS__)
+#define debug_print \
+       debug_print_real(__FILE__ ":%d:", __LINE__), \
+       debug_print_real
 
 /* for macro expansion */
 #define Str(x) #x
@@ -302,7 +304,7 @@ void get_rfc822_date                (gchar          *buf,
 void set_log_file      (const gchar *filename);
 void close_log_file    (void);
 void log_verbosity_set (gboolean verbose);
-void debug_print_real  (const gchar *file, const guint line, const gchar *format, ...) G_GNUC_PRINTF(3, 4);
+void debug_print_real  (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
 void log_print         (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
 void log_message       (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
 void log_warning       (const gchar *format, ...) G_GNUC_PRINTF(1, 2);