summaryrefslogtreecommitdiff
path: root/src/ratpoison.h
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-11-20 09:29:37 +0000
committersabetts <sabetts>2002-11-20 09:29:37 +0000
commitd8b1104be304c1c67db4f16389696ea82a3e6699 (patch)
tree09e160a1339b2cccc700884419265234f2155f4b /src/ratpoison.h
parent34703b2c03d6f5eb15b9357d9ba6fc707944aa98 (diff)
downloadratpoison-d8b1104be304c1c67db4f16389696ea82a3e6699.zip
* src/ratpoison.h[!HAVE_VARARG_MACROS]: PRINT_ERROR and
PRINT_DEBUG are defined as void macros. * src/events.c (client_msg): Add semicolon to the end of a PRINT_DEBUG line. * src/actions.c (cmd_bind): typecast data as a (char *) before using it in (char *) pointer arithmetic. * configure.in: Add check to see if the preprocessor has variable argument macro capabilities.
Diffstat (limited to 'src/ratpoison.h')
-rw-r--r--src/ratpoison.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ratpoison.h b/src/ratpoison.h
index 293e868..99b6409 100644
--- a/src/ratpoison.h
+++ b/src/ratpoison.h
@@ -33,6 +33,11 @@
/* Some error reporting macros */
#define PRE_PRINT_LOCATION fprintf (stderr, "%s:%s():%d: ", __FILE__, __FUNCTION__, __LINE__);
+
+/* FIXME: Some preprocessors don't have variable args. In that case
+ they don't get error or debugging output. */
+#ifdef HAVE_VARARG_MACROS
+
#define PRINT_ERROR(format, args...) \
{ fprintf (stderr, PACKAGE ":error -- "); PRE_PRINT_LOCATION; fprintf (stderr, format, ## args); }
@@ -44,6 +49,14 @@
# define PRINT_DEBUG(format, args...)
#endif /* DEBUG */
+#else /* !HAVE_VARARG_MACROS */
+
+#define PRINT_ERROR (void)
+#define PRINT_DEBUG (void)
+
+#endif /* HAVE_VARARG_MACROS */
+
+
extern XGCValues gv;
#include "conf.h"