diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.c | 2 | ||||
-rw-r--r-- | src/events.c | 2 | ||||
-rw-r--r-- | src/ratpoison.h | 13 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c index 61c785c..2779101 100644 --- a/src/actions.c +++ b/src/actions.c @@ -455,7 +455,7 @@ cmd_bind (int interactive, void *data) keydesc = (char*) xmalloc (strlen (data) + 1); sscanf (data, "%s", keydesc); - cmd = data + strlen (keydesc); + cmd = ((char *)data) + strlen (keydesc); /* Gobble remaining whitespace before command starts */ while (*cmd == ' ') diff --git a/src/events.c b/src/events.c index e9f0db3..4004c61 100644 --- a/src/events.c +++ b/src/events.c @@ -330,7 +330,7 @@ client_msg (XClientMessageEvent *ev) { rp_window *win; - PRINT_DEBUG ("WM_CHANGE_STATE\n") + PRINT_DEBUG ("WM_CHANGE_STATE\n"); win = find_window (ev->window); if (win == NULL) return; 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" |