From a503bbc21f92acc727825f200229df41b5866560 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 28 Apr 1997 03:14:04 +0000 Subject: Nuke register keyword usage, #if -> #ifdef, and avoid void * arithmetic. Obtained from: NetBSD --- bin/sh/mknodes.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'bin/sh/mknodes.c') diff --git a/bin/sh/mknodes.c b/bin/sh/mknodes.c index 7f1c3f1..672b801 100644 --- a/bin/sh/mknodes.c +++ b/bin/sh/mknodes.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: mknodes.c,v 1.7 1997/02/22 13:58:36 peter Exp $ */ #ifndef lint @@ -54,7 +54,7 @@ static char const sccsid[] = "@(#)mknodes.c 8.2 (Berkeley) 5/4/95"; #include #include #include -#if __STDC__ +#ifdef __STDC__ #include #else #include @@ -312,7 +312,7 @@ outfunc(cfile, calcsize) fputs(" funcblocksize += nodesize[n->type];\n", cfile); else { fputs(" new = funcblock;\n", cfile); - fputs(" funcblock += nodesize[n->type];\n", cfile); + fputs(" funcblock = (char *)funcblock + nodesize[n->type];\n", cfile); } fputs(" switch (n->type) {\n", cfile); for (sp = str ; sp < &str[nstr] ; sp++) { @@ -394,7 +394,7 @@ static int nextfield(buf) char *buf; { - register char *p, *q; + char *p, *q; p = linep; while (*p == ' ' || *p == '\t') @@ -419,7 +419,7 @@ skipbl() static int readline() { - register char *p; + char *p; if (fgets(line, 1024, infp) == NULL) return 0; @@ -437,7 +437,7 @@ readline() static void -#if __STDC__ +#ifdef __STDC__ error(const char *msg, ...) #else error(va_alist) @@ -445,7 +445,7 @@ error(va_alist) #endif { va_list va; -#if __STDC__ +#ifdef __STDC__ va_start(va, msg); #else char *msg; @@ -468,7 +468,7 @@ static char * savestr(s) const char *s; { - register char *p; + char *p; if ((p = malloc(strlen(s) + 1)) == NULL) error("Out of space"); -- cgit v1.1