diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-10-20 00:55:12 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-10-20 00:55:12 +0000 |
commit | 8414ed88be8de5352141730c176d30301d6700b4 (patch) | |
tree | 44a7f767c70131fb1d09f8a151860fee4e22ae5f /bin/sh/mknodes.c | |
parent | 78d30b21a3fa6e2f7d7fb077246e1e015a2dafdf (diff) |
Sync with NetBSD. Adds better POSIX compliance amongst others.
Diffstat (limited to 'bin/sh/mknodes.c')
-rw-r--r-- | bin/sh/mknodes.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/sh/mknodes.c b/bin/sh/mknodes.c index ef4cc33c706..3ab7df2002d 100644 --- a/bin/sh/mknodes.c +++ b/bin/sh/mknodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknodes.c,v 1.3 1996/09/15 22:58:09 millert Exp $ */ +/* $OpenBSD: mknodes.c,v 1.4 1996/10/20 00:54:54 millert Exp $ */ /* $NetBSD: mknodes.c,v 1.11 1995/05/11 21:29:36 christos Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mknodes.c 8.2 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: mknodes.c,v 1.3 1996/09/15 22:58:09 millert Exp $"; +static char rcsid[] = "$OpenBSD: mknodes.c,v 1.4 1996/10/20 00:54:54 millert Exp $"; #endif #endif /* not lint */ @@ -124,7 +124,7 @@ main(argc, argv) char **argv; { if (argc != 3) - error("usage: mknodes file\n"); + error("usage: mknodes file"); if ((infp = fopen(argv[1], "r")) == NULL) error("Can't open %s", argv[1]); while (readline()) { @@ -187,16 +187,16 @@ parsefield() fp->name = savestr(name); if (strcmp(type, "nodeptr") == 0) { fp->type = T_NODE; - snprintf(decl, sizeof(decl), "union node *%s", name); + sprintf(decl, "union node *%s", name); } else if (strcmp(type, "nodelist") == 0) { fp->type = T_NODELIST; - snprintf(decl, sizeof(decl), "struct nodelist *%s", name); + sprintf(decl, "struct nodelist *%s", name); } else if (strcmp(type, "string") == 0) { fp->type = T_STRING; - snprintf(decl, sizeof(decl), "char *%s", name); + sprintf(decl, "char *%s", name); } else if (strcmp(type, "int") == 0) { fp->type = T_INT; - snprintf(decl, sizeof(decl), "int %s", name); + sprintf(decl, "int %s", name); } else if (strcmp(type, "other") == 0) { fp->type = T_OTHER; } else if (strcmp(type, "temp") == 0) { |