summaryrefslogtreecommitdiffstats
path: root/bin/sh/mknodes.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1997-04-28 03:14:04 +0000
committersteve <steve@FreeBSD.org>1997-04-28 03:14:04 +0000
commita503bbc21f92acc727825f200229df41b5866560 (patch)
treefb5193a3584cc14ed36b6a0415674d5c0a5d175a /bin/sh/mknodes.c
parent6ce1ec6c045fe1db7bf425686506f2f2c227df87 (diff)
downloadFreeBSD-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/sh/mknodes.c')
-rw-r--r--bin/sh/mknodes.c16
1 files changed, 8 insertions, 8 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");
OpenPOWER on IntegriCloud