summaryrefslogtreecommitdiff
path: root/usr.bin/m4/main.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-09-18 14:55:53 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-09-18 14:55:53 +0000
commit2f9f1701ef2c4c8b9f461073679940844afed60d (patch)
tree4d41737bcfd0b4236255322159484d08ceb3d56e /usr.bin/m4/main.c
parent3c821bc99eea469511d5dfcb7c93617c533650e2 (diff)
Tracing facilities. Same style as gnu-m4, because it's mostly used for
autoconf right now.
Diffstat (limited to 'usr.bin/m4/main.c')
-rw-r--r--usr.bin/m4/main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c
index 1075ef47d26..8d25d714e41 100644
--- a/usr.bin/m4/main.c
+++ b/usr.bin/m4/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.45 2001/09/18 14:05:14 espie Exp $ */
+/* $OpenBSD: main.c,v 1.46 2001/09/18 14:55:52 espie Exp $ */
/* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.45 2001/09/18 14:05:14 espie Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.46 2001/09/18 14:55:52 espie Exp $";
#endif
#endif /* not lint */
@@ -192,7 +192,7 @@ main(argc,argv)
outfile = NULL;
resizedivs(MAXOUT);
- while ((c = getopt(argc, argv, "gtD:U:o:I:")) != -1)
+ while ((c = getopt(argc, argv, "gt:d:D:U:o:I:")) != -1)
switch(c) {
case 'D': /* define something..*/
@@ -212,8 +212,11 @@ main(argc,argv)
case 'g':
mimic_gnu = 1;
break;
+ case 'd':
+ set_trace_flags(optarg);
+ break;
case 'o':
- /* XXX accept -o for compatibility */
+ trace_file(optarg);
break;
case '?':
usage();