aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-05 16:35:32 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-05 16:35:32 +0000
commit642c0b00ab43079cd251ec9616963b8a806b3464 (patch)
tree40f2bcf2f39d93feb21481a8547f267166f627f0 /cmd.c
parent7325fea37dd75ac89828c6cfdfbcbd8d54548241 (diff)
downloadrtmux-642c0b00ab43079cd251ec9616963b8a806b3464.tar.gz
rtmux-642c0b00ab43079cd251ec9616963b8a806b3464.tar.bz2
rtmux-642c0b00ab43079cd251ec9616963b8a806b3464.zip
Easy bits of arg printing for list-keys.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd.c b/cmd.c
index b88322c3..295f453e 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.41 2008-06-04 17:54:26 nicm Exp $ */
+/* $Id: cmd.c,v 1.42 2008-06-05 16:35:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -114,7 +114,7 @@ cmd_parse(int argc, char **argv, char **cause)
cmd = xmalloc(sizeof *cmd);
cmd->entry = entry;
if (entry->parse != NULL) {
- if (entry->parse(cmd, &cmd->data, argc, argv, cause) != 0) {
+ if (entry->parse(cmd, argc, argv, cause) != 0) {
xfree(cmd);
return (NULL);
}
@@ -143,7 +143,7 @@ usage:
void
cmd_exec(struct cmd *cmd, struct cmd_ctx *ctx)
{
- cmd->entry->exec(cmd->data, ctx);
+ cmd->entry->exec(cmd, ctx);
}
void
@@ -164,7 +164,7 @@ cmd_send(struct cmd *cmd, struct buffer *b)
buffer_write(b, &n, sizeof n);
if (cmd->entry->send != NULL)
- cmd->entry->send(cmd->data, b);
+ cmd->entry->send(cmd, b);
}
struct cmd *
@@ -189,7 +189,7 @@ cmd_recv(struct buffer *b)
cmd->entry = *entryp;
if (cmd->entry->recv != NULL)
- cmd->entry->recv(&cmd->data, b);
+ cmd->entry->recv(cmd, b);
return (cmd);
}
@@ -197,7 +197,7 @@ void
cmd_free(struct cmd *cmd)
{
if (cmd->data != NULL && cmd->entry->free != NULL)
- cmd->entry->free(cmd->data);
+ cmd->entry->free(cmd);
xfree(cmd);
}