Thu Jun 25 02:54:50 2020 UTC ()
Fix --error-output to be more like GNU m4.  It's a long version of -o.


(uwe)
diff -r1.27 -r1.28 src/usr.bin/m4/m4.1

cvs diff -r1.27 -r1.28 src/usr.bin/m4/m4.1 (expand / switch to unified diff)

--- src/usr.bin/m4/m4.1 2016/01/17 11:24:28 1.27
+++ src/usr.bin/m4/m4.1 2020/06/25 02:54:50 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: m4.1,v 1.27 2016/01/17 11:24:28 wiz Exp $ 1.\" $NetBSD: m4.1,v 1.28 2020/06/25 02:54:50 uwe Exp $
2.\" @(#) $OpenBSD: m4.1,v 1.56 2009/10/14 17:19:47 sthen Exp $ 2.\" @(#) $OpenBSD: m4.1,v 1.56 2009/10/14 17:19:47 sthen Exp $
3.\" 3.\"
4.\" Copyright (c) 1989, 1993 4.\" Copyright (c) 1989, 1993
5.\" The Regents of the University of California. All rights reserved. 5.\" The Regents of the University of California. All rights reserved.
6.\" 6.\"
7.\" This code is derived from software contributed to Berkeley by 7.\" This code is derived from software contributed to Berkeley by
8.\" Ozan Yigit at York University. 8.\" Ozan Yigit at York University.
9.\" 9.\"
10.\" Redistribution and use in source and binary forms, with or without 10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions 11.\" modification, are permitted provided that the following conditions
12.\" are met: 12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright 13.\" 1. Redistributions of source code must retain the above copyright
14.\" notice, this list of conditions and the following disclaimer. 14.\" notice, this list of conditions and the following disclaimer.
@@ -36,27 +36,26 @@ @@ -36,27 +36,26 @@
36.Os 36.Os
37.Sh NAME 37.Sh NAME
38.Nm m4 38.Nm m4
39.Nd macro language processor 39.Nd macro language processor
40.Sh SYNOPSIS 40.Sh SYNOPSIS
41.Nm m4 41.Nm m4
42.Op Fl EGgiPQsv 42.Op Fl EGgiPQsv
43.Oo 43.Oo
44.Sm off 44.Sm off
45.Fl D Ar name Op No = Ar value 45.Fl D Ar name Op No = Ar value
46.Sm on 46.Sm on
47.Oc 47.Oc
48.Op Fl d Ar flags 48.Op Fl d Ar flags
49.Op Fl e Ar filename 
50.Op Fl F Ar filename 49.Op Fl F Ar filename
51.Op Fl I Ar dirname 50.Op Fl I Ar dirname
52.Op Fl L Ar number 51.Op Fl L Ar number
53.Op Fl o Ar filename 52.Op Fl o Ar filename
54.Op Fl R Ar filename 53.Op Fl R Ar filename
55.Op Fl t Ar macro 54.Op Fl t Ar macro
56.Op Fl U Ns Ar name 55.Op Fl U Ns Ar name
57.Op Ar 56.Op Ar
58.Sh DESCRIPTION 57.Sh DESCRIPTION
59The 58The
60.Nm m4 59.Nm m4
61utility is a macro processor that can be used as a front end to any 60utility is a macro processor that can be used as a front end to any
62language (e.g., C, ratfor, fortran, lex, and yacc). 61language (e.g., C, ratfor, fortran, lex, and yacc).
@@ -128,55 +127,53 @@ quote arguments and expansion with the c @@ -128,55 +127,53 @@ quote arguments and expansion with the c
128start with all macros traced. 127start with all macros traced.
129.It Ar x 128.It Ar x
130number macro expansions. 129number macro expansions.
131.It Ar V 130.It Ar V
132turn on all options. 131turn on all options.
133.El 132.El
134.Pp 133.Pp
135By default, trace is set to 134By default, trace is set to
136.Qq eq . 135.Qq eq .
137.It Fl E , Fl Fl fatal-warnings 136.It Fl E , Fl Fl fatal-warnings
138Warnings make 137Warnings make
139.Nm 138.Nm
140exit. 139exit.
141.It Fl e , Fl Fl error-output Ar filename 
142Redirect error output to filename. 
143.It Fl F , Fl Fl freeze-state Ar filename 140.It Fl F , Fl Fl freeze-state Ar filename
144Save the input state to 141Save the input state to
145.Ar filename . 142.Ar filename .
146.It Fl G , Fl Fl traditional 143.It Fl G , Fl Fl traditional
147Disable GNU-m4 extensions. 144Disable GNU-m4 extensions.
148.It Fl g , Fl Fl gnu 145.It Fl g , Fl Fl gnu
149Activate GNU-m4 compatibility mode. 146Activate GNU-m4 compatibility mode.
150In this mode, translit handles simple character 147In this mode, translit handles simple character
151ranges (e.g., a-z), regular expressions mimic emacs behavior, 148ranges (e.g., a-z), regular expressions mimic emacs behavior,
152multiple m4wrap calls are handled as a stack, 149multiple m4wrap calls are handled as a stack,
153the number of diversions is unlimited, 150the number of diversions is unlimited,
154empty names for macro definitions are allowed, 151empty names for macro definitions are allowed,
155and eval understands 152and eval understands
156.Sq 0rbase:value 153.Sq 0rbase:value
157numbers. 154numbers.
158.It Fl Fl help 155.It Fl Fl help
159Print help message and exit. 156Print help message and exit.
160.It Fl I , Fl Fl include Ar "dirname" 157.It Fl I , Fl Fl include Ar "dirname"
161Add directory 158Add directory
162.Ar dirname 159.Ar dirname
163to the include path. 160to the include path.
164.It Fl i , Fl Fl interactive 161.It Fl i , Fl Fl interactive
165Set unbuffered output, disable tty signals. 162Set unbuffered output, disable tty signals.
166.It Fl L , Fl Fl nesting-limit 163.It Fl L , Fl Fl nesting-limit
167Set the nesting limit in macro expansions. 164Set the nesting limit in macro expansions.
168This is unimplemented and unlimited. 165This is unimplemented and unlimited.
169.It Fl o Ar filename 166.It Fl o , Fl Fl error-output Ar filename
170Send trace output to 167Send trace output to
171.Ar filename . 168.Ar filename .
172.It Fl P , Fl Fl prefix-builtins 169.It Fl P , Fl Fl prefix-builtins
173Prefix all built-in macros with 170Prefix all built-in macros with
174.Sq m4_ . 171.Sq m4_ .
175For example, instead of writing 172For example, instead of writing
176.Ic define , 173.Ic define ,
177use 174use
178.Ic m4_define . 175.Ic m4_define .
179.It Fl Q , Fl Fl quiet , Fl Fl silent 176.It Fl Q , Fl Fl quiet , Fl Fl silent
180Don't print warnings. 177Don't print warnings.
181.It Fl R , Fl Fl reload-state Ar filename 178.It Fl R , Fl Fl reload-state Ar filename
182Reload a previously saved state from 179Reload a previously saved state from