diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2015-08-07 15:08:26 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2015-08-07 15:08:26 +0100 |
commit | 3c9b8a28c61e88d258060e38d459b05023b525ab (patch) | |
tree | 19dfe2b769fe01698316d9b336cfa9c8be392b49 /cmd-show-messages.c | |
parent | 736d8350e930c37b12b9e78d92def3b701040667 (diff) | |
parent | 73b4d098ce42039e111ef51b64135d8fc0c7a58f (diff) | |
download | rtmux-3c9b8a28c61e88d258060e38d459b05023b525ab.tar.gz rtmux-3c9b8a28c61e88d258060e38d459b05023b525ab.tar.bz2 rtmux-3c9b8a28c61e88d258060e38d459b05023b525ab.zip |
Merge branch 'master' of github.com:tmux/tmux
Diffstat (limited to 'cmd-show-messages.c')
-rw-r--r-- | cmd-show-messages.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/cmd-show-messages.c b/cmd-show-messages.c index 681ff261..d85baba9 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -69,11 +69,8 @@ cmd_show_messages_server(struct cmd_q *cmdq) int cmd_show_messages_terminals(struct cmd_q *cmdq, int blank) { - struct tty_term *term; - const struct tty_term_code_entry *ent; - struct tty_code *code; - u_int i, n; - char out[80]; + struct tty_term *term; + u_int i, n; n = 0; LIST_FOREACH(term, &tty_terms, entry) { @@ -84,31 +81,8 @@ cmd_show_messages_terminals(struct cmd_q *cmdq, int blank) cmdq_print(cmdq, "Terminal %u: %s [references=%u, flags=0x%x]:", n, term->name, term->references, term->flags); n++; - for (i = 0; i < NTTYCODE; i++) { - ent = &tty_term_codes[i]; - code = &term->codes[ent->code]; - switch (code->type) { - case TTYCODE_NONE: - cmdq_print(cmdq, "%4u: %s: [missing]", - ent->code, ent->name); - break; - case TTYCODE_STRING: - strnvis(out, code->value.string, sizeof out, - VIS_OCTAL|VIS_TAB|VIS_NL); - cmdq_print(cmdq, "%4u: %s: (string) %s", - ent->code, ent->name, out); - break; - case TTYCODE_NUMBER: - cmdq_print(cmdq, "%4u: %s: (number) %d", - ent->code, ent->name, code->value.number); - break; - case TTYCODE_FLAG: - cmdq_print(cmdq, "%4u: %s: (flag) %s", - ent->code, ent->name, - code->value.flag ? "true" : "false"); - break; - } - } + for (i = 0; i < tty_term_ncodes(); i++) + cmdq_print(cmdq, "%s", tty_term_describe(term, i)); } return (n != 0); } |