constify some tables.

This commit is contained in:
mycroft 1998-07-26 11:24:14 +00:00
parent ae170ee9b6
commit 9ad899cc18
6 changed files with 23 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: timezone.c,v 1.11 1998/02/03 18:23:55 perry Exp $ */
/* $NetBSD: timezone.c,v 1.12 1998/07/26 11:30:39 mycroft Exp $ */
/*
* Copyright (c) 1987, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)timezone.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: timezone.c,v 1.11 1998/02/03 18:23:55 perry Exp $");
__RCSID("$NetBSD: timezone.c,v 1.12 1998/07/26 11:30:39 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -89,7 +89,7 @@ timezone(zone, dst)
return(_tztab(zone,dst)); /* default: table or created zone */
}
static struct zone {
static const struct zone {
int offset;
char *stdzone;
char *dlzone;
@ -124,7 +124,7 @@ _tztab(zone,dst)
int zone;
int dst;
{
struct zone *zp;
const struct zone *zp;
char sign;
for (zp = zonetab; zp->offset != -1;++zp) /* static tables */

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_data.c,v 1.6 1998/01/06 05:01:25 perry Exp $ */
/* $NetBSD: res_data.c,v 1.7 1998/07/26 11:32:24 mycroft Exp $ */
/*
* ++Copyright++ 1995
@ -60,7 +60,7 @@
#if 0
static char rcsid[] = "Id: res_data.c,v 8.2 1996/08/05 08:31:35 vixie Exp ";
#else
__RCSID("$NetBSD: res_data.c,v 1.6 1998/01/06 05:01:25 perry Exp $");
__RCSID("$NetBSD: res_data.c,v 1.7 1998/07/26 11:32:24 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -83,7 +83,7 @@ __RCSID("$NetBSD: res_data.c,v 1.6 1998/01/06 05:01:25 perry Exp $");
# include "../conf/portability.h"
#endif
const char *_res_opcodes[] = {
const char *const _res_opcodes[] = {
"QUERY",
"IQUERY",
"CQUERYM",
@ -102,7 +102,7 @@ const char *_res_opcodes[] = {
"ZONEREF",
};
const char *_res_resultcodes[] = {
const char *const _res_resultcodes[] = {
"NOERROR",
"FORMERR",
"SERVFAIL",

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_debug.c,v 1.15 1998/01/06 05:01:26 perry Exp $ */
/* $NetBSD: res_debug.c,v 1.16 1998/07/26 11:32:25 mycroft Exp $ */
/*-
* Copyright (c) 1985, 1990, 1993
@ -81,7 +81,7 @@
static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "Id: res_debug.c,v 8.20 1997/06/01 20:34:37 vixie Exp ";
#else
__RCSID("$NetBSD: res_debug.c,v 1.15 1998/01/06 05:01:26 perry Exp $");
__RCSID("$NetBSD: res_debug.c,v 1.16 1998/07/26 11:32:25 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -100,8 +100,8 @@ __RCSID("$NetBSD: res_debug.c,v 1.15 1998/01/06 05:01:26 perry Exp $");
#include <string.h>
#include <time.h>
extern const char *_res_opcodes[];
extern const char *_res_resultcodes[];
extern const char *const _res_opcodes[];
extern const char *const _res_resultcodes[];
static char *dewks __P((int));
static const char *deproto __P((int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: regerror.c,v 1.8 1998/02/03 18:38:14 perry Exp $ */
/* $NetBSD: regerror.c,v 1.9 1998/07/26 11:26:11 mycroft Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
#else
__RCSID("$NetBSD: regerror.c,v 1.8 1998/02/03 18:38:14 perry Exp $");
__RCSID("$NetBSD: regerror.c,v 1.9 1998/07/26 11:26:11 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -95,7 +95,7 @@ static char *regatoi __P((const regex_t *preg, char *localbuf, int buflen));
= #define REG_ATOI 255 // convert name to number (!)
= #define REG_ITOA 0400 // convert number to name (!)
*/
static struct rerr {
static const struct rerr {
int code;
char *name;
char *explain;
@ -131,7 +131,7 @@ const regex_t *preg;
char *errbuf;
size_t errbuf_size;
{
struct rerr *r;
const struct rerr *r;
size_t len;
int target = errcode &~ REG_ITOA;
char *s;
@ -174,7 +174,7 @@ const regex_t *preg;
char *localbuf;
int buflen;
{
struct rerr *r;
const struct rerr *r;
for (r = rerrs; r->code != 0; r++)
if (strcmp(r->name, preg->re_endp) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: random.c,v 1.11 1998/02/28 00:09:45 perry Exp $ */
/* $NetBSD: random.c,v 1.12 1998/07/26 11:28:40 mycroft Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
#else
__RCSID("$NetBSD: random.c,v 1.11 1998/02/28 00:09:45 perry Exp $");
__RCSID("$NetBSD: random.c,v 1.12 1998/07/26 11:28:40 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -150,8 +150,8 @@ __weak_alias(srandom,_srandom);
*/
#define MAX_TYPES 5 /* max number of types above */
static int degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
static int seps[MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
static const int degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
static const int seps[MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
/*
* Initially, everything is set up as if from:

View File

@ -1,4 +1,4 @@
/* $NetBSD: disklabel.h,v 1.46 1998/07/26 11:22:11 mycroft Exp $ */
/* $NetBSD: disklabel.h,v 1.47 1998/07/26 11:24:14 mycroft Exp $ */
/*
* Copyright (c) 1987, 1988, 1993
@ -266,7 +266,7 @@ static const char *const fstypenames[] = {
};
/* These are the names MOUNT_XXX from <sys/mount.h> */
static char *fscknames[] = {
static const char *const fscknames[] = {
NULL, /* unused */
NULL, /* swap */
NULL, /* Version 6 */