diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-01-01 03:32:28 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-01-01 03:32:28 +0000 |
commit | 5d0cfe079b5c1309c40fc5bfd76f7786059577d5 (patch) | |
tree | a9c351d830ca940a898a3fd36d873f8b6863c1e7 | |
parent | 1c86713afd3e6d42547f64daa520992c74f3cdcd (diff) | |
download | rtmux-5d0cfe079b5c1309c40fc5bfd76f7786059577d5.tar.gz rtmux-5d0cfe079b5c1309c40fc5bfd76f7786059577d5.tar.bz2 rtmux-5d0cfe079b5c1309c40fc5bfd76f7786059577d5.zip |
Another table that should be const.
-rw-r--r-- | cmd-server-info.c | 36 | ||||
-rw-r--r-- | tmux.h | 2 | ||||
-rw-r--r-- | tty-term.c | 31 |
3 files changed, 35 insertions, 34 deletions
diff --git a/cmd-server-info.c b/cmd-server-info.c index a114bf05..51a42219 100644 --- a/cmd-server-info.c +++ b/cmd-server-info.c @@ -48,24 +48,24 @@ const struct cmd_entry cmd_server_info_entry = { int cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) { - struct tty_term *term; - struct client *c; - struct session *s; - struct winlink *wl; - struct window *w; - struct window_pane *wp; - struct tty_code *code; - struct tty_term_code_entry *ent; - struct utsname un; - struct job *job; - struct grid *gd; - struct grid_line *gl; - u_int i, j, k; - char out[80]; - char *tim; - time_t t; - u_int lines, ulines; - size_t size, usize; + struct tty_term *term; + struct client *c; + struct session *s; + struct winlink *wl; + struct window *w; + struct window_pane *wp; + struct tty_code *code; + const struct tty_term_code_entry *ent; + struct utsname un; + struct job *job; + struct grid *gd; + struct grid_line *gl; + u_int i, j, k; + char out[80]; + char *tim; + time_t t; + u_int lines, ulines; + size_t size, usize; tim = ctime(&start_time); *strchr(tim, '\n') = '\0'; @@ -1426,7 +1426,7 @@ void tty_cmd_reverseindex(struct tty *, const struct tty_ctx *); /* tty-term.c */ 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 **); void tty_term_free(struct tty_term *); int tty_term_has(struct tty_term *, enum tty_code_code); @@ -32,7 +32,7 @@ char *tty_term_strip(const char *); 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_AX, TTYCODE_FLAG, "AX" }, { TTYC_BEL, TTYCODE_STRING, "bel" }, @@ -214,13 +214,14 @@ tty_term_strip(const char *s) void tty_term_override(struct tty_term *term, const char *overrides) { - struct tty_term_code_entry *ent; - struct tty_code *code; - char *termnext, *termstr, *entnext, *entstr; - char *s, *ptr, *val; - const char *errstr; - u_int i; - int n, removeflag; + const struct tty_term_code_entry *ent; + struct tty_code *code; + char *termnext, *termstr; + char *entnext, *entstr; + char *s, *ptr, *val; + const char *errstr; + u_int i; + int n, removeflag; s = xstrdup(overrides); @@ -296,13 +297,13 @@ tty_term_override(struct tty_term *term, const char *overrides) struct tty_term * tty_term_find(char *name, int fd, const char *overrides, char **cause) { - struct tty_term *term; - struct tty_term_code_entry *ent; - struct tty_code *code; - u_int i; - int n, error; - char *s; - const char *acs; + struct tty_term *term; + const struct tty_term_code_entry *ent; + struct tty_code *code; + u_int i; + int n, error; + char *s; + const char *acs; SLIST_FOREACH(term, &tty_terms, entry) { if (strcmp(term->name, name) == 0) { |