From 2f9f1701ef2c4c8b9f461073679940844afed60d Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Tue, 18 Sep 2001 14:55:53 +0000 Subject: Tracing facilities. Same style as gnu-m4, because it's mostly used for autoconf right now. --- usr.bin/m4/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.bin/m4/main.c') 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(); -- cgit v1.2.3