From: nicm Date: Fri, 8 May 2015 16:33:29 +0000 (+0000) Subject: mode_key_entry can go into mode-key.c; also a few spaces->tabs. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=637c43d99830cb6edcb2ce72c9763eaccc074f8a;p=openbsd mode_key_entry can go into mode-key.c; also a few spaces->tabs. --- diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c index e62ff52ea19..d00e2281f58 100644 --- a/usr.bin/tmux/mode-key.c +++ b/usr.bin/tmux/mode-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mode-key.c,v 1.62 2015/04/19 21:34:21 nicm Exp $ */ +/* $OpenBSD: mode-key.c,v 1.63 2015/05/08 16:33:29 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -38,6 +38,20 @@ * (any matching MODEKEYEDIT_SWITCHMODE*) are special-cased to do this. */ +/* Entry in the default mode key tables. */ +struct mode_key_entry { + int key; + + /* + * Editing mode for vi: 0 is edit mode, keys not in the table are + * returned as MODEKEY_OTHER; 1 is command mode, keys not in the table + * are returned as MODEKEY_NONE. This is also matched on, allowing some + * keys to be bound in edit mode. + */ + int mode; + enum mode_key_cmd cmd; +}; + /* Edit keys command strings. */ const struct mode_key_cmdstr mode_key_cmdstr_edit[] = { { MODEKEYEDIT_BACKSPACE, "backspace" }, diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index f2855411ede..a59f83bd03d 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.508 2015/05/08 16:23:34 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.509 2015/05/08 16:33:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -566,20 +566,6 @@ enum mode_key_cmd { MODEKEYCOPY_UP, }; -/* Entry in the default mode key tables. */ -struct mode_key_entry { - int key; - - /* - * Editing mode for vi: 0 is edit mode, keys not in the table are - * returned as MODEKEY_OTHER; 1 is command mode, keys not in the table - * are returned as MODEKEY_NONE. This is also matched on, allowing some - * keys to be bound in edit mode. - */ - int mode; - enum mode_key_cmd cmd; -}; - /* Data required while mode keys are in use. */ struct mode_key_data { struct mode_key_tree *tree; @@ -607,6 +593,7 @@ struct mode_key_cmdstr { }; /* Named mode key table description. */ +struct mode_key_entry; struct mode_key_table { const char *name; const struct mode_key_cmdstr *cmdstr; @@ -1192,16 +1179,16 @@ struct tty_ctx { /* Saved message entry. */ struct message_entry { - char *msg; - u_int msg_num; - time_t msg_time; + char *msg; + u_int msg_num; + time_t msg_time; TAILQ_ENTRY(message_entry) entry; }; /* Status output data from a job. */ struct status_out { - char *cmd; - char *out; + char *cmd; + char *out; RB_ENTRY(status_out) entry; }; @@ -1322,6 +1309,7 @@ struct cmd { TAILQ_ENTRY(cmd) qentry; }; + struct cmd_list { int references; TAILQ_HEAD(, cmd) list; @@ -1394,6 +1382,7 @@ struct key_binding { RB_ENTRY(key_binding) entry; }; RB_HEAD(key_bindings, key_binding); + struct key_table { const char *name; struct key_bindings key_bindings;