diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-12-28 13:03:06 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-12-28 13:03:06 +0000 |
commit | dbc31a4836c17141c13ad707affe4fdad2638811 (patch) | |
tree | f69d0d099c73fb14cc451141547a06ddd5972075 /usr.bin/m4 | |
parent | 0e123ba3ffef859b994237fb0b808126ffb389c3 (diff) |
Kill yet another hardcoded size. Ok fries@
and flush(stdout) on debugging mode, as a vicious coredump can leave you
without info otherwise.
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/eval.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 37a7f148ba2..1ee3d1ff244 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.41 2001/10/10 23:25:31 espie Exp $ */ +/* $OpenBSD: eval.c,v 1.42 2001/12/28 13:03:05 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.2 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: eval.c,v 1.41 2001/10/10 23:25:31 espie Exp $"; +static char rcsid[] = "$OpenBSD: eval.c,v 1.42 2001/12/28 13:03:05 espie Exp $"; #endif #endif /* not lint */ @@ -147,6 +147,7 @@ expand_builtin(argv, argc, td) printf("argc = %d\n", argc); for (n = 0; n < argc; n++) printf("argv[%d] = %s\n", n, argv[n]); + fflush(stdout); #endif /* @@ -395,12 +396,15 @@ expand_builtin(argv, argc, td) * characters in the "to" string. */ if (argc > 3) { - char temp[STRSPMAX+1]; + char *temp; + + temp = xalloc(strlen(argv[2])+1); if (argc > 4) map(temp, argv[2], argv[3], argv[4]); else map(temp, argv[2], argv[3], null); pbstr(temp); + free(temp); } else if (argc > 2) pbstr(argv[2]); break; |