diff options
author | 1998-08-24 22:26:23 +0000 | |
---|---|---|
committer | 1998-08-24 22:26:23 +0000 | |
commit | bef8f7c3aec4ed6171f8556971ab2db22014529f (patch) | |
tree | a463dabca1d8adf1dd19bdf4e1b36cc897c5b59e /adventure/vocab.c | |
parent | c250b38eecd6008a0ff88680314da5f4c40d456c (diff) | |
download | bsdgames-darwin-bef8f7c3aec4ed6171f8556971ab2db22014529f.tar.gz bsdgames-darwin-bef8f7c3aec4ed6171f8556971ab2db22014529f.tar.zst bsdgames-darwin-bef8f7c3aec4ed6171f8556971ab2db22014529f.zip |
Replace some homegrown string-functions with standard-<string.h>-macros.
Reported by Joseph Myers <jsm28@cam.ac.uk> in PR 6028.
Diffstat (limited to 'adventure/vocab.c')
-rw-r--r-- | adventure/vocab.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/adventure/vocab.c b/adventure/vocab.c index 2090b470..8b12e51b 100644 --- a/adventure/vocab.c +++ b/adventure/vocab.c @@ -1,4 +1,4 @@ -/* $NetBSD: vocab.c,v 1.5 1997/10/11 01:53:38 lukem Exp $ */ +/* $NetBSD: vocab.c,v 1.6 1998/08/24 22:26:23 hubertf Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)vocab.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: vocab.c,v 1.5 1997/10/11 01:53:38 lukem Exp $"); +__RCSID("$NetBSD: vocab.c,v 1.6 1998/08/24 22:26:23 hubertf Exp $"); #endif #endif /* not lint */ @@ -202,44 +202,6 @@ exitloop2: /* hashed entry does not match */ } void -copystr(w1, w2) /* copy one string to another */ - char *w1, *w2; -{ - char *s, *t; - for (s = w1, t = w2; *s;) - *t++ = *s++; - *t = 0; -} - -int -weq(w1, w2) /* compare words */ - char *w1, *w2; /* w1 is user, w2 is system */ -{ - char *s, *t; - int i; - s = w1; - t = w2; - for (i = 0; i < 5; i++) { /* compare at most 5 chars */ - if (*t == 0 && *s == 0) - return (TRUE); - if (*s++ != *t++) - return (FALSE); - } - return (TRUE); -} - -int -length(str) /* includes 0 at end */ - char *str; -{ - char *s; - int n; - for (n = 0, s = str; *s++;) - n++; - return (n + 1); -} - -void prht() { /* print hash table */ int i, j, l; |