version 1.529, 2015/07/20 15:50:04 |
version 1.530, 2015/07/28 15:18:10 |
|
|
TTYC_XENL, /* eat_newline_glitch, xn */ |
TTYC_XENL, /* eat_newline_glitch, xn */ |
TTYC_XT, /* xterm(1)-compatible title, XT */ |
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. */ |
/* Message codes. */ |
enum msgtype { |
enum msgtype { |
MSG_VERSION = 12, |
MSG_VERSION = 12, |
|
|
struct tty_key *next; |
struct tty_key *next; |
}; |
}; |
|
|
|
struct tty_code; |
struct tty_term { |
struct tty_term { |
char *name; |
char *name; |
u_int references; |
u_int references; |
|
|
char acs[UCHAR_MAX + 1][2]; |
char acs[UCHAR_MAX + 1][2]; |
|
|
struct tty_code codes[NTTYCODE]; |
struct tty_code *codes; |
|
|
#define TERM_256COLOURS 0x1 |
#define TERM_256COLOURS 0x1 |
#define TERM_EARLYWRAP 0x2 |
#define TERM_EARLYWRAP 0x2 |
|
|
|
|
/* tty-term.c */ |
/* tty-term.c */ |
extern struct tty_terms tty_terms; |
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 **); |
struct tty_term *tty_term_find(char *, int, char **); |
void tty_term_free(struct tty_term *); |
void tty_term_free(struct tty_term *); |
int tty_term_has(struct tty_term *, enum tty_code_code); |
int tty_term_has(struct tty_term *, enum tty_code_code); |
|
|
const void *, const void *); |
const void *, const void *); |
int tty_term_number(struct tty_term *, enum tty_code_code); |
int tty_term_number(struct tty_term *, enum tty_code_code); |
int tty_term_flag(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 */ |
/* tty-acs.c */ |
const char *tty_acs_get(struct tty *, u_char); |
const char *tty_acs_get(struct tty *, u_char); |