=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.529 retrieving revision 1.530 diff -u -r1.529 -r1.530 --- src/usr.bin/tmux/tmux.h 2015/07/20 15:50:04 1.529 +++ src/usr.bin/tmux/tmux.h 2015/07/28 15:18:10 1.530 @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.529 2015/07/20 15:50:04 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.530 2015/07/28 15:18:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -387,33 +387,7 @@ TTYC_XENL, /* eat_newline_glitch, xn */ TTYC_XT, /* xterm(1)-compatible title, XT */ }; -#define NTTYCODE (TTYC_XT + 1) -/* Termcap types. */ -enum tty_code_type { - TTYCODE_NONE = 0, - TTYCODE_STRING, - TTYCODE_NUMBER, - TTYCODE_FLAG, -}; - -/* Termcap code. */ -struct tty_code { - enum tty_code_type type; - union { - char *string; - int number; - int flag; - } value; -}; - -/* Entry in terminal code table. */ -struct tty_term_code_entry { - enum tty_code_code code; - enum tty_code_type type; - const char *name; -}; - /* Message codes. */ enum msgtype { MSG_VERSION = 12, @@ -1096,13 +1070,14 @@ struct tty_key *next; }; +struct tty_code; struct tty_term { char *name; u_int references; char acs[UCHAR_MAX + 1][2]; - struct tty_code codes[NTTYCODE]; + struct tty_code *codes; #define TERM_256COLOURS 0x1 #define TERM_EARLYWRAP 0x2 @@ -1643,7 +1618,7 @@ /* tty-term.c */ extern struct tty_terms tty_terms; -extern const struct tty_term_code_entry tty_term_codes[NTTYCODE]; +u_int tty_term_ncodes(void); struct tty_term *tty_term_find(char *, int, char **); void tty_term_free(struct tty_term *); int tty_term_has(struct tty_term *, enum tty_code_code); @@ -1657,6 +1632,7 @@ const void *, const void *); int tty_term_number(struct tty_term *, enum tty_code_code); int tty_term_flag(struct tty_term *, enum tty_code_code); +const char *tty_term_describe(struct tty_term *, enum tty_code_code); /* tty-acs.c */ const char *tty_acs_get(struct tty *, u_char);