aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-13 19:53:28 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-13 19:53:28 +0000
commit76ef8770cd983e7ece581fbcfb3a7ad5e115aae5 (patch)
tree0b0d7847f179c9963b58488f8c1724e64176266e /tmux.h
parentdafa0f022c573513f949c7c66ae83d063fa9a2ab (diff)
downloadrtmux-76ef8770cd983e7ece581fbcfb3a7ad5e115aae5.tar.gz
rtmux-76ef8770cd983e7ece581fbcfb3a7ad5e115aae5.tar.bz2
rtmux-76ef8770cd983e7ece581fbcfb3a7ad5e115aae5.zip
Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
command entry structs and a couple of functions to check/set the flags.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tmux.h b/tmux.h
index f3fd0b3e..7613460e 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1150,10 +1150,7 @@ struct cmd_entry {
#define CMD_ARG12 0x40
int flags;
-#define CMD_CHFLAG(flag) \
- ((flag) >= 'a' && (flag) <= 'z' ? 1ULL << ((flag) - 'a') : \
- (flag) >= 'A' && (flag) <= 'Z' ? 1ULL << (26 + (flag) - 'A') : 0)
- uint64_t chflags;
+ const char *chflags;
void (*init)(struct cmd *, int);
int (*parse)(struct cmd *, int, char **, char **);
@@ -1502,6 +1499,8 @@ int cmd_string_parse(const char *, struct cmd_list **, char **);
/* cmd-generic.c */
size_t cmd_prarg(char *, size_t, const char *, char *);
+int cmd_check_flag(uint64_t, int);
+void cmd_set_flag(uint64_t *, int);
#define CMD_TARGET_PANE_USAGE "[-t target-pane]"
#define CMD_TARGET_WINDOW_USAGE "[-t target-window]"
#define CMD_TARGET_SESSION_USAGE "[-t target-session]"