make constant arrays a const

This commit is contained in:
jdolecek 2001-01-09 17:31:04 +00:00
parent 6258e0bf60
commit 417c215317
2 changed files with 14 additions and 13 deletions

View File

@ -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
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93";
#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 /* 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 int sighdl[] = {
private const int sighdl[] = {
#define _DO(a) (a),
ALLSIGS
#undef _DO

View File

@ -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
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
#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 /* 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"
typedef struct ttymodes_t {
char *m_name;
const char *m_name;
u_int m_value;
int m_type;
} ttymodes_t;
@ -64,7 +64,7 @@ typedef struct ttymap_t {
} ttymap_t;
private ttyperm_t ttyperm = {
private const ttyperm_t ttyperm = {
{
{"iflag:", ICRNL, (INLCR | IGNCR)},
{"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,
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
{C_ERASE, VERASE,
{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}}
};
private ttymodes_t ttymodes[] = {
private const ttymodes_t ttymodes[] = {
#ifdef IGNBRK
{"ignbrk", IGNBRK, MD_INP},
#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_o = el->el_tty.t_ed.c_cc;
char new[2], old[2];
ttymap_t *tp;
el_action_t *dmap, *dalt, *map, *alt;
const ttymap_t *tp;
el_action_t *map, *alt;
const el_action_t *dmap, *dalt;
new[1] = old[1] = '\0';
map = el->el_map.key;
@ -1043,7 +1044,7 @@ protected int
/*ARGSUSED*/
tty_stty(EditLine *el, int argc, char **argv)
{
ttymodes_t *m;
const ttymodes_t *m;
char x, *d;
int aflag = 0;
char *s;