summaryrefslogtreecommitdiff
path: root/usr.bin/m4/look.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-11-17 15:34:14 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-11-17 15:34:14 +0000
commit1fc3369f16cdd0efcc06045d57bf5618b3a34c55 (patch)
tree6a16794edd660c6d0d2bce0cd249e109b817c255 /usr.bin/m4/look.c
parentcda382a72443d3ba44721531afdb06fd4bb7e958 (diff)
Turn warnings on,
Add missing prototypes, Make local functions static, Sort extern.h by file, Constify all char * that can be, Copy temp file name so that eval does not modify its arguments.
Diffstat (limited to 'usr.bin/m4/look.c')
-rw-r--r--usr.bin/m4/look.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/m4/look.c b/usr.bin/m4/look.c
index 1df52e6417f..ccc18410620 100644
--- a/usr.bin/m4/look.c
+++ b/usr.bin/m4/look.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: look.c,v 1.4 1999/09/14 08:35:16 espie Exp $ */
+/* $OpenBSD: look.c,v 1.5 1999/11/17 15:34:13 espie Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -55,9 +55,11 @@ static char sccsid[] = "@(#)look.c 8.1 (Berkeley) 6/6/93";
#include "stdd.h"
#include "extern.h"
+static void freent __P((ndptr));
+
int
hash(name)
- char *name;
+ const char *name;
{
unsigned long h = 0;
while (*name)
@@ -70,7 +72,7 @@ hash(name)
*/
ndptr
lookup(name)
- char *name;
+ const char *name;
{
ndptr p;
@@ -86,7 +88,7 @@ lookup(name)
*/
ndptr
addent(name)
- char *name;
+ const char *name;
{
int h;
ndptr p;
@@ -116,7 +118,7 @@ freent(p)
*/
void
remhash(name, all)
- char *name;
+ const char *name;
int all;
{
int h;