diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/actions.c | 2 | ||||
-rw-r--r-- | src/actions.h | 1 | ||||
-rw-r--r-- | src/events.c | 6 |
4 files changed, 13 insertions, 5 deletions
@@ -1,3 +1,12 @@ +2006-11-23 Shawn Betts <sabetts@vcn.bc.ca> + + * src/events.c (execute_remote_command): return a cmdred instead + of NULL when RP_COMMAND isn't present. + + * src/actions.h (cmdred_new): new prototype + + * src/actions.c (cmdret_new): no longer static function + 2006-11-23 Bernhard R. Link <brlink@debian.org> * doc/ratpoison.texi (set winfmt): document number between % and format. diff --git a/src/actions.c b/src/actions.c index da01aba..969fa95 100644 --- a/src/actions.c +++ b/src/actions.c @@ -762,7 +762,7 @@ initialize_default_keybindings (void) add_alias ("split", "vsplit"); } -static cmdret * +cmdret * cmdret_new (int success, char *fmt, ...) { cmdret *ret = xmalloc (sizeof (cmdret)); diff --git a/src/actions.h b/src/actions.h index 8567805..84a1b0f 100644 --- a/src/actions.h +++ b/src/actions.h @@ -219,6 +219,7 @@ void del_frame_undo (rp_frame_undo *u); rp_keymap *find_keymap (char *name); void init_user_commands(void); void initialize_default_keybindings (void); +cmdret *cmdret_new (int success, char *fmt, ...); void cmdret_free (cmdret *ret); void keymap_free (rp_keymap *map); void free_aliases (void); diff --git a/src/events.c b/src/events.c index 257f141..f09f9d1 100644 --- a/src/events.c +++ b/src/events.c @@ -476,8 +476,7 @@ execute_remote_command (Window w) if (status != Success || req == NULL) { - PRINT_DEBUG (("Couldn't get RP_COMMAND Property\n")); - return NULL; + return cmdret_new (RET_FAILURE, "Couldn't get RP_COMMAND Property"); } /* XGetWindowProperty always allocates one extra byte even if @@ -491,8 +490,7 @@ execute_remote_command (Window w) if (status != Success || req == NULL) { - PRINT_DEBUG (("Couldn't get RP_COMMAND Property\n")); - return NULL; + return cmdret_new (RET_FAILURE, "Couldn't get RP_COMMAND Property"); } PRINT_DEBUG (("command: %s\n", req)); |