1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Another table that should be const.

This commit is contained in:
Nicholas Marriott 2011-01-01 03:32:28 +00:00
parent 1c86713afd
commit 5d0cfe079b
3 changed files with 35 additions and 34 deletions

View File

@ -55,7 +55,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
struct window *w; struct window *w;
struct window_pane *wp; struct window_pane *wp;
struct tty_code *code; struct tty_code *code;
struct tty_term_code_entry *ent; const struct tty_term_code_entry *ent;
struct utsname un; struct utsname un;
struct job *job; struct job *job;
struct grid *gd; struct grid *gd;

2
tmux.h
View File

@ -1426,7 +1426,7 @@ void tty_cmd_reverseindex(struct tty *, const struct tty_ctx *);
/* tty-term.c */ /* tty-term.c */
extern struct tty_terms tty_terms; extern struct tty_terms tty_terms;
extern struct tty_term_code_entry tty_term_codes[NTTYCODE]; extern const struct tty_term_code_entry tty_term_codes[NTTYCODE];
struct tty_term *tty_term_find(char *, int, const char *, char **); struct tty_term *tty_term_find(char *, int, const char *, 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);

View File

@ -32,7 +32,7 @@ char *tty_term_strip(const char *);
struct tty_terms tty_terms = SLIST_HEAD_INITIALIZER(tty_terms); struct tty_terms tty_terms = SLIST_HEAD_INITIALIZER(tty_terms);
struct tty_term_code_entry tty_term_codes[NTTYCODE] = { const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
{ TTYC_ACSC, TTYCODE_STRING, "acsc" }, { TTYC_ACSC, TTYCODE_STRING, "acsc" },
{ TTYC_AX, TTYCODE_FLAG, "AX" }, { TTYC_AX, TTYCODE_FLAG, "AX" },
{ TTYC_BEL, TTYCODE_STRING, "bel" }, { TTYC_BEL, TTYCODE_STRING, "bel" },
@ -214,9 +214,10 @@ tty_term_strip(const char *s)
void void
tty_term_override(struct tty_term *term, const char *overrides) tty_term_override(struct tty_term *term, const char *overrides)
{ {
struct tty_term_code_entry *ent; const struct tty_term_code_entry *ent;
struct tty_code *code; struct tty_code *code;
char *termnext, *termstr, *entnext, *entstr; char *termnext, *termstr;
char *entnext, *entstr;
char *s, *ptr, *val; char *s, *ptr, *val;
const char *errstr; const char *errstr;
u_int i; u_int i;
@ -297,7 +298,7 @@ struct tty_term *
tty_term_find(char *name, int fd, const char *overrides, char **cause) tty_term_find(char *name, int fd, const char *overrides, char **cause)
{ {
struct tty_term *term; struct tty_term *term;
struct tty_term_code_entry *ent; const struct tty_term_code_entry *ent;
struct tty_code *code; struct tty_code *code;
u_int i; u_int i;
int n, error; int n, error;