mirror of
https://github.com/tmux/tmux.git
synced 2025-04-13 14:58:50 +00:00
Sync OpenBSD patchset 822:
Another table that should be const.
This commit is contained in:
parent
d9c848d3a6
commit
9ad028e8ee
@ -1,4 +1,4 @@
|
|||||||
/* $Id: cmd-server-info.c,v 1.39 2010-12-31 22:12:33 nicm Exp $ */
|
/* $Id: cmd-server-info.c,v 1.40 2011-01-03 23:30:43 tcunha Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -47,24 +47,24 @@ const struct cmd_entry cmd_server_info_entry = {
|
|||||||
int
|
int
|
||||||
cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
|
cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
|
||||||
{
|
{
|
||||||
struct tty_term *term;
|
struct tty_term *term;
|
||||||
struct client *c;
|
struct client *c;
|
||||||
struct session *s;
|
struct session *s;
|
||||||
struct winlink *wl;
|
struct winlink *wl;
|
||||||
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;
|
||||||
struct grid_line *gl;
|
struct grid_line *gl;
|
||||||
u_int i, j, k;
|
u_int i, j, k;
|
||||||
char out[80];
|
char out[80];
|
||||||
char *tim;
|
char *tim;
|
||||||
time_t t;
|
time_t t;
|
||||||
u_int lines, ulines;
|
u_int lines, ulines;
|
||||||
size_t size, usize;
|
size_t size, usize;
|
||||||
|
|
||||||
tim = ctime(&start_time);
|
tim = ctime(&start_time);
|
||||||
*strchr(tim, '\n') = '\0';
|
*strchr(tim, '\n') = '\0';
|
||||||
|
4
tmux.h
4
tmux.h
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tmux.h,v 1.597 2011-01-03 23:27:54 tcunha Exp $ */
|
/* $Id: tmux.h,v 1.598 2011-01-03 23:30:43 tcunha Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -1422,7 +1422,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);
|
||||||
|
33
tty-term.c
33
tty-term.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tty-term.c,v 1.44 2010-12-31 22:12:33 nicm Exp $ */
|
/* $Id: tty-term.c,v 1.45 2011-01-03 23:30:43 tcunha Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -35,7 +35,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" },
|
||||||
@ -217,13 +217,14 @@ 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 *s, *ptr, *val;
|
char *entnext, *entstr;
|
||||||
const char *errstr;
|
char *s, *ptr, *val;
|
||||||
u_int i;
|
const char *errstr;
|
||||||
int n, removeflag;
|
u_int i;
|
||||||
|
int n, removeflag;
|
||||||
|
|
||||||
s = xstrdup(overrides);
|
s = xstrdup(overrides);
|
||||||
|
|
||||||
@ -299,13 +300,13 @@ tty_term_override(struct tty_term *term, const char *overrides)
|
|||||||
struct tty_term *
|
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;
|
||||||
char *s;
|
char *s;
|
||||||
const char *acs;
|
const char *acs;
|
||||||
|
|
||||||
SLIST_FOREACH(term, &tty_terms, entry) {
|
SLIST_FOREACH(term, &tty_terms, entry) {
|
||||||
if (strcmp(term->name, name) == 0) {
|
if (strcmp(term->name, name) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user