make constant arrays a const
This commit is contained in:
parent
6258e0bf60
commit
417c215317
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: sig.c,v 1.7 2001/01/04 15:55:03 christos Exp $ */
|
/* $NetBSD: sig.c,v 1.8 2001/01/09 17:31:04 jdolecek Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
@ -41,7 +41,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: sig.c,v 1.7 2001/01/04 15:55:03 christos Exp $");
|
__RCSID("$NetBSD: sig.c,v 1.8 2001/01/09 17:31:04 jdolecek Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint && not SCCSID */
|
#endif /* not lint && not SCCSID */
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ __RCSID("$NetBSD: sig.c,v 1.7 2001/01/04 15:55:03 christos Exp $");
|
|||||||
|
|
||||||
private EditLine *sel = NULL;
|
private EditLine *sel = NULL;
|
||||||
|
|
||||||
private int sighdl[] = {
|
private const int sighdl[] = {
|
||||||
#define _DO(a) (a),
|
#define _DO(a) (a),
|
||||||
ALLSIGS
|
ALLSIGS
|
||||||
#undef _DO
|
#undef _DO
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tty.c,v 1.13 2000/09/04 22:06:33 lukem Exp $ */
|
/* $NetBSD: tty.c,v 1.14 2001/01/09 17:31:04 jdolecek Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
@ -41,7 +41,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: tty.c,v 1.13 2000/09/04 22:06:33 lukem Exp $");
|
__RCSID("$NetBSD: tty.c,v 1.14 2001/01/09 17:31:04 jdolecek Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint && not SCCSID */
|
#endif /* not lint && not SCCSID */
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ __RCSID("$NetBSD: tty.c,v 1.13 2000/09/04 22:06:33 lukem Exp $");
|
|||||||
#include "el.h"
|
#include "el.h"
|
||||||
|
|
||||||
typedef struct ttymodes_t {
|
typedef struct ttymodes_t {
|
||||||
char *m_name;
|
const char *m_name;
|
||||||
u_int m_value;
|
u_int m_value;
|
||||||
int m_type;
|
int m_type;
|
||||||
} ttymodes_t;
|
} ttymodes_t;
|
||||||
@ -64,7 +64,7 @@ typedef struct ttymap_t {
|
|||||||
} ttymap_t;
|
} ttymap_t;
|
||||||
|
|
||||||
|
|
||||||
private ttyperm_t ttyperm = {
|
private const ttyperm_t ttyperm = {
|
||||||
{
|
{
|
||||||
{"iflag:", ICRNL, (INLCR | IGNCR)},
|
{"iflag:", ICRNL, (INLCR | IGNCR)},
|
||||||
{"oflag:", (OPOST | ONLCR), ONLRET},
|
{"oflag:", (OPOST | ONLCR), ONLRET},
|
||||||
@ -92,7 +92,7 @@ private ttyperm_t ttyperm = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private ttychar_t ttychar = {
|
private const ttychar_t ttychar = {
|
||||||
{
|
{
|
||||||
CINTR, CQUIT, CERASE, CKILL,
|
CINTR, CQUIT, CERASE, CKILL,
|
||||||
CEOF, CEOL, CEOL2, CSWTCH,
|
CEOF, CEOL, CEOL2, CSWTCH,
|
||||||
@ -122,7 +122,7 @@ private ttychar_t ttychar = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private ttymap_t tty_map[] = {
|
private const ttymap_t tty_map[] = {
|
||||||
#ifdef VERASE
|
#ifdef VERASE
|
||||||
{C_ERASE, VERASE,
|
{C_ERASE, VERASE,
|
||||||
{ED_DELETE_PREV_CHAR, VI_DELETE_PREV_CHAR, ED_PREV_CHAR}},
|
{ED_DELETE_PREV_CHAR, VI_DELETE_PREV_CHAR, ED_PREV_CHAR}},
|
||||||
@ -159,7 +159,7 @@ private ttymap_t tty_map[] = {
|
|||||||
{ED_UNASSIGNED, ED_UNASSIGNED, ED_UNASSIGNED}}
|
{ED_UNASSIGNED, ED_UNASSIGNED, ED_UNASSIGNED}}
|
||||||
};
|
};
|
||||||
|
|
||||||
private ttymodes_t ttymodes[] = {
|
private const ttymodes_t ttymodes[] = {
|
||||||
#ifdef IGNBRK
|
#ifdef IGNBRK
|
||||||
{"ignbrk", IGNBRK, MD_INP},
|
{"ignbrk", IGNBRK, MD_INP},
|
||||||
#endif /* IGNBRK */
|
#endif /* IGNBRK */
|
||||||
@ -764,8 +764,9 @@ tty_bind_char(EditLine *el, int force)
|
|||||||
unsigned char *t_n = el->el_tty.t_c[ED_IO];
|
unsigned char *t_n = el->el_tty.t_c[ED_IO];
|
||||||
unsigned char *t_o = el->el_tty.t_ed.c_cc;
|
unsigned char *t_o = el->el_tty.t_ed.c_cc;
|
||||||
char new[2], old[2];
|
char new[2], old[2];
|
||||||
ttymap_t *tp;
|
const ttymap_t *tp;
|
||||||
el_action_t *dmap, *dalt, *map, *alt;
|
el_action_t *map, *alt;
|
||||||
|
const el_action_t *dmap, *dalt;
|
||||||
new[1] = old[1] = '\0';
|
new[1] = old[1] = '\0';
|
||||||
|
|
||||||
map = el->el_map.key;
|
map = el->el_map.key;
|
||||||
@ -1043,7 +1044,7 @@ protected int
|
|||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
tty_stty(EditLine *el, int argc, char **argv)
|
tty_stty(EditLine *el, int argc, char **argv)
|
||||||
{
|
{
|
||||||
ttymodes_t *m;
|
const ttymodes_t *m;
|
||||||
char x, *d;
|
char x, *d;
|
||||||
int aflag = 0;
|
int aflag = 0;
|
||||||
char *s;
|
char *s;
|
||||||
|
Loading…
Reference in New Issue
Block a user