Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tn3270/tools Sprinkle in a little const.
details: https://anonhg.NetBSD.org/src/rev/70ce3f815b8e
branches: trunk
changeset: 487672:70ce3f815b8e
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Jun 11 03:38:29 2000 +0000
description:
Sprinkle in a little const.
diffstat:
usr.bin/tn3270/tools/mkastosc/mkastosc.c | 6 +++---
usr.bin/tn3270/tools/mkhits/dohits.c | 20 ++++++++++----------
usr.bin/tn3270/tools/mkhits/dohits.h | 6 +++---
3 files changed, 16 insertions(+), 16 deletions(-)
diffs (119 lines):
diff -r f8fe1f845af3 -r 70ce3f815b8e usr.bin/tn3270/tools/mkastosc/mkastosc.c
--- a/usr.bin/tn3270/tools/mkastosc/mkastosc.c Sun Jun 11 03:36:40 2000 +0000
+++ b/usr.bin/tn3270/tools/mkastosc/mkastosc.c Sun Jun 11 03:38:29 2000 +0000
@@ -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 @@
unsigned char
scancode,
used;
- char
+ const char
*shiftstate;
} tbl[128];
@@ -83,7 +83,7 @@
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;
diff -r f8fe1f845af3 -r 70ce3f815b8e usr.bin/tn3270/tools/mkhits/dohits.c
--- a/usr.bin/tn3270/tools/mkhits/dohits.c Sun Jun 11 03:36:40 2000 +0000
+++ b/usr.bin/tn3270/tools/mkhits/dohits.c Sun Jun 11 03:38:29 2000 +0000
@@ -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 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 @@
static void
add(first, second, value)
-char *first, *second;
+const char *first, *second;
int value;
{
struct thing **item, *this;
@@ -124,7 +124,7 @@
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 @@
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 @@
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];
diff -r f8fe1f845af3 -r 70ce3f815b8e usr.bin/tn3270/tools/mkhits/dohits.h
--- a/usr.bin/tn3270/tools/mkhits/dohits.h Sun Jun 11 03:36:40 2000 +0000
+++ b/usr.bin/tn3270/tools/mkhits/dohits.h Sun Jun 11 03:38:29 2000 +0000
@@ -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 @@
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 *));
Home |
Main Index |
Thread Index |
Old Index