=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rpcgen/rpc_util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/rpcgen/rpc_util.c 2001/11/24 19:17:47 1.5 +++ src/usr.bin/rpcgen/rpc_util.c 2001/11/24 19:19:59 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_util.c,v 1.5 2001/11/24 19:17:47 deraadt Exp $ */ +/* $OpenBSD: rpc_util.c,v 1.6 2001/11/24 19:19:59 deraadt Exp $ */ /* $NetBSD: rpc_util.c,v 1.6 1995/08/29 23:05:57 cgd Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -42,7 +42,6 @@ #include #include #include -#include #include "rpc_scan.h" #include "rpc_parse.h" #include "rpc_util.h" @@ -69,7 +68,6 @@ /* * Reinitialize the world */ -void reinitialize() { memset(curline, 0, MAXLINESIZE); @@ -81,7 +79,6 @@ /* * string equality */ -int streq(a, b) char *a; char *b; @@ -119,6 +116,7 @@ list **l; list *lst; + for (l = lstp; *l != NULL; l = (list **) & (*l)->next); lst = ALLOC(list); lst->val = val; @@ -126,7 +124,7 @@ *l = lst; } -static int +static findit(def, type) definition *def; char *type; @@ -195,7 +193,7 @@ } } -static int +static typedefed(def, type) definition *def; char *type; @@ -207,7 +205,6 @@ } } -int isvectordef(type, rel) char *type; relation rel; @@ -241,7 +238,7 @@ static char buf[100]; char *p = buf; - while ((c = *str++)) { + while (c = *str++) { *p++ = (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c; } *p = 0; @@ -281,7 +278,6 @@ * Something went wrong, unlink any files that we may have created and then * die. */ -void crash() { int i; @@ -356,6 +352,7 @@ } } + static token tokstrings[] = { {TOK_IDENT, "identifier"}, {TOK_CONST, "const"}, @@ -403,7 +400,7 @@ return (sp->str); } -static void +static printbuf() { char c; @@ -412,7 +409,7 @@ # define TABSIZE 4 - for (i = 0; (c = curline[i]); i++) { + for (i = 0; c = curline[i]; i++) { if (c == '\t') { cnt = 8 - (i % TABSIZE); c = ' '; @@ -453,7 +450,7 @@ char *vname; { char *name; - + name = (char *)malloc(strlen(pname) + strlen(vname) + strlen(ARGEXT) + 3); if (!name) { fprintf(stderr, "failed in malloc"); @@ -496,7 +493,8 @@ { bas_type * ptr; - ptr = typ_list_h; + ptr=typ_list_h; + while (ptr != NULL) { if (strcmp(ptr->name,type) == 0)