From ed5e079990d104570d59252ab1581ec5fd6936d2 Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 13 Apr 1997 17:51:32 +0000 Subject: [PATCH] Make the $@ macro behave as described in the man page. This patch has been submitted by Andreas Burmester (i think) on the German Usenet long ago. Andreas told me that our m4 has quite more subtle bugs, so we might consider using NGU m4 instead. --- usr.bin/m4/eval.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index b1b2a391ddcc..be9c1c04c030 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -421,6 +421,16 @@ register int argc; } pbstr(argv[2]); break; + case '@': + for( n = argc - 1; n >= 2; n-- ) + { + putback(rquote); + pbstr(argv[n]); + putback(lquote); + if( n > 2 ) + putback(','); + } + break; default: putback(*p); putback('$');