aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/tmux.h b/tmux.h
index e8a46ca0..1437b2f9 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1358,7 +1358,7 @@ TAILQ_HEAD(message_list, message_entry);
/* Argument value. */
struct args_value {
- char *value;
+ char *string;
TAILQ_ENTRY(args_value) entry;
};
@@ -1366,6 +1366,15 @@ struct args_value {
struct args_entry;
RB_HEAD(args_tree, args_entry);
+/* Arguments parsing state. */
+typedef enum args_type (*args_parse_cb)(struct args *, u_int);
+struct args_parse {
+ const char *template;
+ int lower;
+ int upper;
+ args_parse_cb cb;
+};
+
/* Command find structures. */
enum cmd_find_type {
CMD_FIND_PANE,
@@ -1454,11 +1463,7 @@ struct cmd_entry {
const char *name;
const char *alias;
- struct {
- const char *template;
- int lower;
- int upper;
- } args;
+ struct args_parse args;
const char *usage;
struct cmd_entry_flag source;
@@ -2184,7 +2189,7 @@ int tty_keys_next(struct tty *);
/* arguments.c */
void args_set(struct args *, u_char, const char *);
struct args *args_create(void);
-struct args *args_parse(const char *, int, char **, int, int);
+struct args *args_parse(const struct args_parse *, int, char **);
void args_vector(struct args *, int *, char ***);
void args_free(struct args *);
char *args_print(struct args *);