Sprinkle in a little const.

This commit is contained in:
thorpej 2000-06-11 03:38:29 +00:00
parent 1c44e76f57
commit d041b74cf4
3 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkastosc.c,v 1.6 1998/09/06 02:54:48 lukem Exp $ */
/* $NetBSD: mkastosc.c,v 1.7 2000/06/11 03:38:29 thorpej Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@ -62,7 +62,7 @@ static struct tbl {
unsigned char
scancode,
used;
char
const char
*shiftstate;
} tbl[128];
@ -83,7 +83,7 @@ char *argv[];
struct thing *this;
struct thing **attable;
struct tbl *Pt;
static char *shiftof[] =
static const char *shiftof[] =
{ "0", "SHIFT_UPSHIFT", "SHIFT_ALT", "SHIFT_ALT|SHIFT_UPSHIFT" };
char *aidfile = 0, *fcnfile = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dohits.c,v 1.8 2000/06/11 03:36:40 mycroft Exp $ */
/* $NetBSD: dohits.c,v 1.9 2000/06/11 03:38:30 thorpej Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dohits.c 4.2 (Berkeley) 4/26/91";
#else
__RCSID("$NetBSD: dohits.c,v 1.8 2000/06/11 03:36:40 mycroft Exp $");
__RCSID("$NetBSD: dohits.c,v 1.9 2000/06/11 03:38:30 thorpej Exp $");
#endif
#endif /* not lint */
@ -80,16 +80,16 @@ struct Hits Hits[256]; /* one for each of 0x00-0xff */
struct thing *table[100];
static void add __P((char *, char *, int));
static void scanwhite __P((char *, char *));
static void scandefine __P((char *, char *));
static void add __P((const char *, const char *, int));
static void scanwhite __P((const char *, const char *));
static void scandefine __P((const char *, const char *));
static char *savechr __P((unsigned int));
static char *doit __P((struct hit *, unsigned char *, struct Hits *));
unsigned int
dohash(seed, string)
unsigned int seed;
char *string;
const char *string;
{
unsigned int i = seed;
unsigned char c;
@ -107,7 +107,7 @@ char *string;
static void
add(first, second, value)
char *first, *second;
const char *first, *second;
int value;
{
struct thing **item, *this;
@ -124,7 +124,7 @@ int value;
static void
scanwhite(file, prefix)
char *file, /* Name of file to scan for whitespace prefix */
const char *file, /* Name of file to scan for whitespace prefix */
*prefix; /* prefix of what should be picked up */
{
FILE *ourfile;
@ -152,7 +152,7 @@ char *file, /* Name of file to scan for whitespace prefix */
static void
scandefine(file, prefix)
char *file, /* Name of file to scan for #define prefix */
const char *file, /* Name of file to scan for #define prefix */
*prefix; /* prefix of what should be picked up */
{
FILE *ourfile;
@ -236,7 +236,7 @@ struct Hits *hits;
void
dohits(aidfile, fcnfile)
char *aidfile, *fcnfile;
const char *aidfile, *fcnfile;
{
unsigned char plain[100], shifted[100], alted[100], shiftalted[100];
unsigned char line[200];

View File

@ -1,4 +1,4 @@
/* $NetBSD: dohits.h,v 1.4 1998/03/04 13:16:14 christos Exp $ */
/* $NetBSD: dohits.h,v 1.5 2000/06/11 03:38:30 thorpej Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@ -55,5 +55,5 @@ struct thing {
extern struct Hits Hits[256]; /* one for each of 0x00-0xff */
extern struct thing *table[100];
void dohits __P((char *, char *));
unsigned int dohash __P((unsigned int, char *));
void dohits __P((const char *, const char *));
unsigned int dohash __P((unsigned int, const char *));