summaryrefslogtreecommitdiff
path: root/src/ratpoison.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ratpoison.h')
-rw-r--r--src/ratpoison.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ratpoison.h b/src/ratpoison.h
index 8b83866..089fcb9 100644
--- a/src/ratpoison.h
+++ b/src/ratpoison.h
@@ -21,9 +21,22 @@
#define _RATPOISON_H
#ifdef HAVE_CONFIG_H
-# include "config.h"
+# include <config.h>
#endif /* HAVE_CONFIG_H */
+/* Some error reporting macros */
+#define PRE_PRINT_LOCATION fprintf (stderr, "%s:%s():%d: ", __FILE__, __FUNCTION__, __LINE__);
+#define PRINT_ERROR(format, args...) \
+ { fprintf (stderr, PACKAGE ":error -- "); PRE_PRINT_LOCATION; fprintf (stderr, format, ## args); }
+
+/* Some debugging macros */
+#ifdef DEBUG
+# define PRINT_DEBUG(format, args...) \
+ { fprintf (stderr, PACKAGE ":debug -- "); PRE_PRINT_LOCATION; fprintf (stderr, format, ## args); }
+#else
+# define PRINT_DEBUG(format, args...)
+#endif /* DEBUG */
+
#include "conf.h"
#include "data.h"