mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-19 01:46:33 +02:00
Sync OpenBSD patchset 539:
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.
This commit is contained in:
9
tmux.h
9
tmux.h
@@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.h,v 1.515 2009-11-14 17:48:39 tcunha Exp $ */
|
||||
/* $Id: tmux.h,v 1.516 2009-11-14 17:56:39 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@@ -1149,10 +1149,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 **);
|
||||
@@ -1501,6 +1498,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]"
|
||||
|
Reference in New Issue
Block a user