diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 21:48:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 21:48:11 +0000 |
commit | 75e1e4b91e083c82f48de5f426b3cfc6c7c5a7df (patch) | |
tree | 66f7cb600434ebfd34166f3e4ebf4257ee3cb986 /cmd-new-window.c | |
parent | 5a3b92c2dfd9fbcf8bda10742cea1fb47927536d (diff) |
Lose usage and move it into the struct.
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r-- | cmd-new-window.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c index 641a6c86..8ac21737 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -1,4 +1,4 @@ -/* $Id: cmd-new-window.c,v 1.5 2007-10-04 12:40:56 mxey Exp $ */ +/* $Id: cmd-new-window.c,v 1.6 2007-10-04 21:48:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -27,7 +27,6 @@ */ int cmd_new_window_parse(void **, int, char **, char **); -const char *cmd_new_window_usage(void); void cmd_new_window_exec(void *, struct cmd_ctx *); void cmd_new_window_send(void *, struct buffer *); void cmd_new_window_recv(void **, struct buffer *); @@ -40,9 +39,9 @@ struct cmd_new_window_data { }; const struct cmd_entry cmd_new_window_entry = { - CMD_NEWWINDOW, "new-window", "neww", 0, + CMD_NEWWINDOW, "new-window", "neww", "[-d] [-n name] [command]", + 0, cmd_new_window_parse, - cmd_new_window_usage, cmd_new_window_exec, cmd_new_window_send, cmd_new_window_recv, @@ -83,18 +82,13 @@ cmd_new_window_parse(void **ptr, int argc, char **argv, char **cause) return (0); usage: - usage(cause, "%s", cmd_new_window_usage()); + usage(cause, "%s %s", + cmd_new_window_entry.name, cmd_new_window_entry.usage); cmd_new_window_free(data); return (-1); } -const char * -cmd_new_window_usage(void) -{ - return ("new-window [-d] [-n name] [command]"); -} - void cmd_new_window_exec(void *ptr, struct cmd_ctx *ctx) { |