aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-08-11 14:42:59 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-08-11 14:42:59 +0000
commit304296972b40951061a5dc53a106a68e8e77659c (patch)
treeb24095539c90334fc82b7ee13969b51518066217 /tmux.h
parentd0eae2cbfdc7253fd3bb23a83b1b0d1387f1b283 (diff)
downloadrtmux-304296972b40951061a5dc53a106a68e8e77659c.tar.gz
rtmux-304296972b40951061a5dc53a106a68e8e77659c.tar.bz2
rtmux-304296972b40951061a5dc53a106a68e8e77659c.zip
Sync from OpenBSD:
Add flags for 1+2 and 2 arguments to the generic target code, use it for cmd-set-environment/option/window-option and remove the generic options parsing.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/tmux.h b/tmux.h
index 7d2518b2..f0676749 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.408 2009-08-09 17:48:55 tcunha Exp $ */
+/* $Id: tmux.h,v 1.409 2009-08-11 14:42:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1009,9 +1009,11 @@ struct cmd_entry {
#define CMD_STARTSERVER 0x1
#define CMD_CANTNEST 0x2
-#define CMD_ARG1 0x4
-#define CMD_ARG01 0x8
-#define CMD_SENDENVIRON 0x10
+#define CMD_SENDENVIRON 0x4
+#define CMD_ARG1 0x8
+#define CMD_ARG01 0x10
+#define CMD_ARG2 0x20
+#define CMD_ARG12 0x40
int flags;
#define CMD_CHFLAG(flag) \
@@ -1031,6 +1033,7 @@ struct cmd_target_data {
uint64_t chflags;
char *target;
char *arg;
+ char *arg2;
};
struct cmd_srcdst_data {
@@ -1038,6 +1041,7 @@ struct cmd_srcdst_data {
char *src;
char *dst;
char *arg;
+ char *arg2;
};
struct cmd_buffer_data {
@@ -1045,13 +1049,7 @@ struct cmd_buffer_data {
char *target;
int buffer;
char *arg;
-};
-
-struct cmd_option_data {
- uint64_t chflags;
- char *target;
- char *option;
- char *value;
+ char *arg2;
};
/* Key binding. */
@@ -1372,14 +1370,6 @@ void cmd_buffer_init(struct cmd *, int);
int cmd_buffer_parse(struct cmd *, int, char **, char **);
void cmd_buffer_free(struct cmd *);
size_t cmd_buffer_print(struct cmd *, char *, size_t);
-#define CMD_OPTION_PANE_USAGE "[-t target-pane] option [value]"
-#define CMD_OPTION_WINDOW_USAGE "[-t target-window] option [value]"
-#define CMD_OPTION_SESSION_USAGE "[-t target-session] option [value]"
-#define CMD_OPTION_CLIENT_USAGE "[-t target-client] option [value]"
-void cmd_option_init(struct cmd *, int);
-int cmd_option_parse(struct cmd *, int, char **, char **);
-void cmd_option_free(struct cmd *);
-size_t cmd_option_print(struct cmd *, char *, size_t);
/* client.c */
int client_init(char *, struct client_ctx *, int, int);