summaryrefslogtreecommitdiffstats
path: root/cmd-suspend-client.c
authorRaghavendra D Prabhu <[email protected]>2011-01-23 11:59:16 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-01-23 11:59:16 (GMT)
commit0426ab2b383afd38af7274759c3a8d017bc88f00 (patch) (side-by-side diff)
tree2cc4bf1da4062c9ef91f2e94a9625f2423f57102 /cmd-suspend-client.c
parent4e4aed43dc2b40b36f1b31cd3af9f874b78fa454 (diff)
parentb67bfd382d3401de572bb3487b1af3382a9cbeda (diff)
downloadtmux-old-master.zip
tmux-old-master.tar.gz
tmux-old-master.tar.bz2
merged new changesmaster
Diffstat (limited to 'cmd-suspend-client.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-suspend-client.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/cmd-suspend-client.c b/cmd-suspend-client.c
index 1bfadb0..2289607 100644
--- a/cmd-suspend-client.c
+++ b/cmd-suspend-client.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-suspend-client.c,v 1.5 2009/11/14 17:56:39 tcunha Exp $ */
+/* $Id: cmd-suspend-client.c,v 1.7 2011/01/07 14:45:34 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <[email protected]>
@@ -29,29 +29,23 @@
int cmd_suspend_client_exec(struct cmd *, struct cmd_ctx *);
-struct cmd_suspend_client_data {
- char *name;
- char *target;
-};
-
const struct cmd_entry cmd_suspend_client_entry = {
"suspend-client", "suspendc",
- "[-c target-client]",
- 0, "",
- cmd_target_init,
- cmd_target_parse,
- cmd_suspend_client_exec,
- cmd_target_free,
- cmd_target_print
+ "t:", 0, 0,
+ CMD_TARGET_CLIENT_USAGE,
+ 0,
+ NULL,
+ NULL,
+ cmd_suspend_client_exec
};
int
cmd_suspend_client_exec(struct cmd *self, struct cmd_ctx *ctx)
{
- struct cmd_target_data *data = self->data;
- struct client *c;
+ struct args *args = self->args;
+ struct client *c;
- if ((c = cmd_find_client(ctx, data->target)) == NULL)
+ if ((c = cmd_find_client(ctx, args_get(args, 't'))) == NULL)
return (-1);
tty_stop_tty(&c->tty);