summaryrefslogtreecommitdiff
path: root/usr.bin/m4/eval.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2006-03-20 20:27:46 +0000
committerMarc Espie <espie@cvs.openbsd.org>2006-03-20 20:27:46 +0000
commit59c4ef87b769c1a36b20f45eab3060bb9dbc0d22 (patch)
tree6d9a63d7a5d65c7f2ca064e8561040d20885aaab /usr.bin/m4/eval.c
parent0f5ef76916936b0c2154ed95cdab6cfd11c8f6a2 (diff)
add limited support for format builtin in gnu-m4 mode, because I'm fed
up of patching it away in various autoconf derivatives. okay miod@
Diffstat (limited to 'usr.bin/m4/eval.c')
-rw-r--r--usr.bin/m4/eval.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
index 8a841a2b2f6..fc2b0ab4448 100644
--- a/usr.bin/m4/eval.c
+++ b/usr.bin/m4/eval.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eval.c,v 1.60 2006/03/20 10:55:19 espie Exp $ */
+/* $OpenBSD: eval.c,v 1.61 2006/03/20 20:27:45 espie Exp $ */
/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */
/*
@@ -283,6 +283,12 @@ expand_builtin(const char *argv[], int argc, int td)
if (argc > 2)
(void) dopaste(argv[2]);
break;
+ case FORMATTYPE:
+ if (mimic_gnu)
+ doformat(argv, argc);
+ else
+ m4errx(1, "format builtin is only available in gnu-m4 mode.");
+ break;
#endif
case CHNQTYPE:
dochq(argv, ac);