diff options
author | steve <steve@FreeBSD.org> | 1997-04-28 03:14:04 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1997-04-28 03:14:04 +0000 |
commit | a503bbc21f92acc727825f200229df41b5866560 (patch) | |
tree | fb5193a3584cc14ed36b6a0415674d5c0a5d175a /bin | |
parent | 6ce1ec6c045fe1db7bf425686506f2f2c227df87 (diff) | |
download | FreeBSD-src-a503bbc21f92acc727825f200229df41b5866560.zip FreeBSD-src-a503bbc21f92acc727825f200229df41b5866560.tar.gz |
Nuke register keyword usage, #if -> #ifdef, and avoid void *
arithmetic.
Obtained from: NetBSD
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/mknodes.c | 16 | ||||
-rw-r--r-- | bin/sh/nodes.c.pat | 10 |
2 files changed, 13 insertions, 13 deletions
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 <stdio.h> #include <stdlib.h> #include <string.h> -#if __STDC__ +#ifdef __STDC__ #include <stdarg.h> #else #include <varargs.h> @@ -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"); diff --git a/bin/sh/nodes.c.pat b/bin/sh/nodes.c.pat index a7645c3..60e5bf5 100644 --- a/bin/sh/nodes.c.pat +++ b/bin/sh/nodes.c.pat @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nodes.c.pat 8.2 (Berkeley) 5/4/95 - * $Id$ + * $Id: nodes.c.pat,v 1.5 1997/02/22 13:58:39 peter Exp $ */ #include <stdlib.h> @@ -79,7 +79,7 @@ copyfunc(n) funcstringsize = 0; calcsize(n); funcblock = ckmalloc(funcblocksize + funcstringsize); - funcstring = funcblock + funcblocksize; + funcstring = (char *)funcblock + funcblocksize; return copynode(n); } @@ -128,7 +128,7 @@ copynodelist(lp) lpp = &start; while (lp) { *lpp = funcblock; - funcblock += ALIGN(sizeof(struct nodelist)); + funcblock = (char *)funcblock + ALIGN(sizeof(struct nodelist)); (*lpp)->n = copynode(lp->n); lp = lp->next; lpp = &(*lpp)->next; @@ -143,8 +143,8 @@ STATIC char * nodesavestr(s) char *s; { - register char *p = s; - register char *q = funcstring; + char *p = s; + char *q = funcstring; char *rtn = funcstring; while ((*q++ = *p++) != '\0') |