summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-11-25 00:19:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-11-25 00:19:29 +0000
commit12f60400d3ddcae17737f95d7ab0ab495631de89 (patch)
tree8b0a9929cff914176d9f8471a77e256513c902e9 /usr.bin
parent55822bc600173fabd3e8c1b51dfa50c89dc76686 (diff)
Sync with NetBSD.
Implement `$@' macro, as promised by the manual page (NetBSD PR#2914).
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/m4/eval.c21
-rw-r--r--usr.bin/m4/serv.c19
2 files changed, 31 insertions, 9 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
index 636e113076c..2d37ebe8fb8 100644
--- a/usr.bin/m4/eval.c
+++ b/usr.bin/m4/eval.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: eval.c,v 1.6 1996/09/15 18:59:07 millert Exp $ */
-/* $NetBSD: eval.c,v 1.5 1996/01/13 23:25:23 pk Exp $ */
+/* $OpenBSD: eval.c,v 1.7 1996/11/25 00:19:27 millert Exp $ */
+/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -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.6 1996/09/15 18:59:07 millert Exp $";
+static char rcsid[] = "$OpenBSD: eval.c,v 1.7 1996/11/25 00:19:27 millert Exp $";
#endif
#endif /* not lint */
@@ -247,7 +247,7 @@ register int td;
k = strlen(lquote);
while (k--)
putback(lquote[k]);
- putback(',');
+ putback(COMMA);
}
k = strlen(rquote);
while (k--)
@@ -431,10 +431,21 @@ register int argc;
case '*':
for (n = argc - 1; n > 2; n--) {
pbstr(argv[n]);
- putback(',');
+ putback(COMMA);
}
pbstr(argv[2]);
break;
+ case '@':
+ for (n = argc - 1; n > 2; n--) {
+ pbstr(rquote);
+ pbstr(argv[n]);
+ pbstr(lquote);
+ putback(COMMA);
+ }
+ pbstr(rquote);
+ pbstr(argv[2]);
+ pbstr(lquote);
+ break;
default:
putback(*p);
putback('$');
diff --git a/usr.bin/m4/serv.c b/usr.bin/m4/serv.c
index 6658e6fda79..f826be15060 100644
--- a/usr.bin/m4/serv.c
+++ b/usr.bin/m4/serv.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: serv.c,v 1.5 1996/09/15 19:05:09 millert Exp $ */
-/* $NetBSD: serv.c,v 1.7 1995/09/28 05:37:47 tls Exp $ */
+/* $OpenBSD: serv.c,v 1.6 1996/11/25 00:19:28 millert Exp $ */
+/* $NetBSD: serv.c,v 1.9 1996/11/10 21:23:53 pk Exp $ */
/*
* Copyright (c) 1989
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)serv.c 5.4 (Berkeley) 1/21/94";
#else
-static char rcsid[] = "$OpenBSD: serv.c,v 1.5 1996/09/15 19:05:09 millert Exp $";
+static char rcsid[] = "$OpenBSD: serv.c,v 1.6 1996/11/25 00:19:28 millert Exp $";
#endif
#endif /* not lint */
@@ -112,10 +112,21 @@ register int argc;
case '*':
for (n = argc - 1; n > 2; n--) {
pbstr(argv[n]);
- putback(',');
+ putback(COMMA);
}
pbstr(argv[2]);
break;
+ case '@':
+ for (n = argc - 1; n > 2; n--) {
+ pbstr(lquote);
+ pbstr(argv[n]);
+ pbstr(rquote);
+ putback(COMMA);
+ }
+ pbstr(lquote);
+ pbstr(argv[2]);
+ pbstr(rquote);
+ break;
default :
putback(*p);
break;