Module Name:    src
Committed By:   christos
Date:           Sat Jan 23 14:24:43 UTC 2016

Modified Files:
        src/usr.bin/m4: main.c

Log Message:
Explain what REDIRECT is for.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/m4/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/m4/main.c
diff -u src/usr.bin/m4/main.c:1.45 src/usr.bin/m4/main.c:1.46
--- src/usr.bin/m4/main.c:1.45	Sat Jan 16 16:12:27 2016
+++ src/usr.bin/m4/main.c	Sat Jan 23 09:24:43 2016
@@ -1,5 +1,5 @@
 /*	$OpenBSD: main.c,v 1.77 2009/10/14 17:19:47 sthen Exp $	*/
-/*	$NetBSD: main.c,v 1.45 2016/01/16 21:12:27 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.46 2016/01/23 14:24:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
 #include "nbtool_config.h"
 #endif
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.45 2016/01/16 21:12:27 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.46 2016/01/23 14:24:43 christos Exp $");
 #include <assert.h>
 #include <signal.h>
 #include <getopt.h>
@@ -325,6 +325,11 @@ main(int argc, char *argv[])
 		}
 
 #ifdef REDIRECT
+	/*
+	 * This is meant only for debugging; it makes all output
+	 * go to a known file, even if the command line options
+	 * send it elsewhere. It should not be turned of in production code.
+	 */
 	if (freopen("/tmp/m4", "w+", stderr) == NULL)
 		err(EXIT_FAILURE, "Can't redirect errors to `%s'",
 		    "/tmp/m4");

Reply via email to