* src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
[m4/ericb.git] / NEWS
blob95cb387bcc1b3caf93f6a91b10411ef951f6d353
1 GNU M4 NEWS - User visible changes.
2 Copyright (C) 1992, 1993, 1994, 2004, 2005, 2006 Free Software
3 Foundation, Inc.
5 Version 1.4.7 - ?? ??? 2006, by ??  (CVS version 1.4.6a)
7 * Fix regression from 1.4.5 in handling a file that ends in a macro
8   expansion without arguments instead of a newline.
9 * The define and pushdef macros now warn when the first argument is not
10   a string, rather than silently doing nothing.
11 * Standard input can now be read more than once, as in 'm4 - file -', and
12   is not closed until all wrapped text is handled.  This makes a
13   difference when stdin is not a regular file, and also fixes bugs when
14   using the syscmd or esyscmd macros from wrapped text.
15 * When standard input is a seekable file, the m4exit, syscmd, and esyscmd
16   macros now restore the current position to the next unread byte rather
17   than discarding an arbitrary amount of buffered data.
18 * The no-op compatibility command line options -B, -N, -S, -T, and
19   --diversions may be withdrawn or assigned new meanings in future
20   releases, so they now issue a warning if used.
21 * A new command line option --debugfile replaces the options -o and
22   --error-output as the preferred spelling.  The old options were
23   misleading in their names and inconsistent with other GNU tools; they are
24   still silently accepted, but no longer documented in --help, and may
25   assigned new meanings in future releases.
27 Version 1.4.6 - 25 August 2006, by Eric Blake  (CVS version 1.4.5a)
29 * Fix buffer overruns in regexp and patsubst macros when handed a trailing
30   backslash in the replacement text, or when handling \n substitutions
31   beyond the number of \(\) groups.
32 * Fix memory leak in regexp, patsubst, and changeword macros.
33 * The format macro now understands %F, %g, and %G.
34 * When loading frozen files, m4 now exits with status 63 if version
35   mismatch is detected.
36 * Fix bugs that occurred when invoked with stdout or stderr closed,
37   and detect write failures to stdout or to the target of the
38   debugfile macro.  In particular, the syscmd and esyscmd macros can
39   no longer interfere with the debug stream or diversions.
40 * The m4exit macro now converts values outside the range 0-255 to 1.
41 * It is now an error if a command-line input file ends in the middle of a
42   comment, matching the behavior of mid-string and mid-argument
43   collection.
44 * The dnl macro now warns if end of file is encountered instead of a
45   newline.
46 * The error message when end of file is encountered now uses the file and
47   line where the dangling construct started, rather than `NONE:0:'.
48 * The debugmode and __file__ macros, and the -s/--synclines option, now
49   show what directory a file was found in when the -I/--include option or
50   M4PATH variable had an effect.
51 * The changequote and changecom macros now work with 8-bit characters, and
52   quotes and comments that begin with `(' are properly recognized
53   following a word.
54 * The new macro __program__ is added, which allows the input file to issue
55   an error message that resembles messages from m4.  Warning and error
56   messages have been reformatted to comply with GNU Coding Standards.
57 * The errprint, m4wrap, and shift macros are now recognized only with
58   arguments.
59 * The index, substr, translit, regexp, and patsubst macros now produce
60   output when given only one argument, but still warn about a missing
61   second argument.
62 * The patsubst macro now reliably finds zero-length matches at the end
63   of a string.
65 Version 1.4.5 - 15 July 2006, by Eric Blake  (CVS version 1.4.4c)
67 * Fix sysval on BeOS, OS/2, and other systems that store exit status
68   in the low-order byte.  Additionally, on Unix platforms, if syscmd was
69   terminated by a signal, sysval now displays the signal number shifted
70   left by eight bits, to match traditional m4 implementations.
71 * The maketemp macro is no longer subject to platform limitations (such as
72   26 or 32 max files from a given template).
73 * Frozen files now require that the first directive be V (version), to
74   better diagnose version mismatch.  Additionally, if the F directive
75   (builtin function) names an unknown builtin that existed in the m4 that
76   froze the file but not in the current m4 (for example, changeword), the
77   warning is deferred until an attempt is made to actually use the
78   builtin.  This allows downgrading from beta m4-1.4o to stable m4-1.4.5
79   without breaking autoconf.
80 * The format and indir macros are now recognized only with arguments.
81 * The eval macro no longer crashes on x86 architectures when dividing the
82   minimum integer by -1.
83 * On systems with ecvt and fcvt, format no longer truncates trailing
84   zeroes on integers printed with %.0f.  On systems without these
85   functions, format is no longer subject to a buffer overflow that
86   permitted arbitrary code execution.
87 * On native Windows builds, the macro __windows__ is provided instead of
88   __unix__.  Likewise, on OS/2 builds, the macro __os2__ is provided.  This
89   allows input files to determine when syscmd might behave differently.
90 * Fix bug in 1.4.3 patch to use \n line-endings that did not work for
91   cygwin.
92 * When given the empty string or 0, undivert is now documented as a no-op
93   rather than closing stdout, warning about a non-existent file, or trying
94   to read a directory as a file.
95 * Many documentation improvements.  Also, the manual is now distributed
96   under FDL 1.2, rather than a stricter verbatim-only license.
97 * Raise the -L (--nesting-limit) command line option limit from 250 to
98   1024.
99 * The decr, incr, divert, m4exit, and substr macros treat an empty number
100   as 0, issue a warning, and expand as normal; rather than issuing an error
101   and expanding to the empty string.
102 * The eval macro now treats an empty radix argument as 10, handles radix 1,
103   and treats the width argument as number of digits excluding the sign,
104   for compatibility with other m4 implementations.
105 * The ifdef, divert, m4exit, substr, and translit macros now correctly
106   ignore extra arguments.
107 * The popdef and undefine macros now correctly accept multiple arguments.
108 * Although changeword is on its last leg, if enabled, it now reverts to the
109   default (faster) regexp when passed the empty string.
110 * The regexp and substr macros now warn and ignore a trailing backslash in
111   the replacement, and warn on \n for n larger than the number of
112   sub-expressions in the regexp.
114 Version 1.4.4b - 17 June 2006, by Eric Blake  (CVS version 1.4.4a)
116 * Fix a recursive push_string crashing bug, which affected changequote of
117   three or more characters on some compilers.
118 * Use automake to fix build portability issues.
119 * Fix a recursive m4wrap crashing bug.
120 * Fix a 1 in 2**32 hash crashing bug.
121 * Tracing a macro by name is now persistent, even if the macro is
122   subsequently undefined or redefined.  The traceon and traceoff macros no
123   longer warn about undefined symbols.  This solves a crash when using
124   indir on an undefined macro traced with the -t option, as well as an
125   incorrect result of ifdef.  Furthermore, tracing is no longer transferred
126   with builtins, solving the bug of "m4 -tm4_eval" failing to give trace
127   output on the input "define(`m4_eval',defn(`eval'))m4_eval(1)".
128 * Fix a crash when a macro is undefined while collecting its arguments, by
129   always using the definition that was in effect before argument
130   collection.  This behavior matches the C pre-processor, and means that
131   the sequence "define(`f',`1')f(define(`f',`2'))f" is now documented to
132   result in "12", rather than the previously undocumented "22".
133 * Update the regex engine to fix several bugs.
134 * Fix a potential crash on machines where char is signed.
136 Version 1.4.4 - October 2005, by Gary V. Vaughan
138 * ./configure --infodir=/usr/share/info now works correctly.
139 * When any file named on the command line is missing exit with status 1.
141 Version 1.4.3 - March 2005, by Gary V. Vaughan
143 * DESTDIR installs now work correctly.
144 * Don't segfault with uncompilable regexps to changeword().
145 * Always use \n line-endings for frozen files (fixes a Windows bug).
146 * Portability fix for systems lacking mkstemp(3).
147 * Approximately 20% speed up in the common case of usage with autoconf.
148 * Supported on QNX 6.3.
150 Version 1.4.2 - August 2004, by Paul Eggert
152 * No user visible changes; portability bug fixes only.
154 Version 1.4.1 - June 2004, by Paul Eggert
156 * maketemp now creates an empty file with the given name, instead of merely
157   returning the name of a nonexistent file.  This closes a security hole.
159 Version 1.4 - October 1994, by Franc,ois Pinard
161 (No user visible changes)
163 Version 1.3 - September 1994, by Franc,ois Pinard
165 * Diversions are created as needed.  Option `-N' is still accepted, but
166 otherwise ignored.  Users should use only negative diversion numbers,
167 instead of high positive numbers, for diverting to nowhere.
169 * Diversions should also work faster.  No temporary files will be needed
170 at all if all diversions taken altogether do not use more than 512K.
172 * Frozen state files may be produced with the `--freeze-state' (-F)
173 option and later brought back through the `--reload-state' (-R) option.
175 Version 1.2 - July 1994, by Franc,ois Pinard
177 * In patsubst(STRING, REGEXP, REPLACEMENT), \& in REPLACEMENT has been
178 changed to represent this part of STRING matched by the whole REGEXP,
179 instead of the whole STRING as before.  \0 does the same, but emits a
180 diagnostic saying it will disappear in some subsequent release.
182 * eval(EXPR) emits a diagnostic if EXPR has suffixed crumb.  The same for
183 other numeric conversions in incr(), decr(), divert(), etc.
185 * `--fatal-warnings' (-E) stops execution at first warning.
187 * `--nesting-limit=LEVEL' (-L LEVEL) sets a limit to macro nesting.
188 It is initially fixed at 250.
190 * `--word-regexp=REGEXP' (-W REGEXP) modifies macro name syntax, like
191 does the new `changeword(REGEXP)' macro.  This feature is experimental,
192 tell me your opinions about it.  You do need --enable-changeword at
193 configure time to get these things.  Do *not* depend on them yet.
195 * Trace output format is scannable by GNU Emacs' next-error function.
197 * Stack overflow is detected and diagnosed on some capable systems.
199 * Various bugs have been corrected, m4 should be more portable.  See the
200 ChangeLog for details.
202 Version 1.1 - November 1993, by Franc,ois Pinard
204 Changes which might affect existing GNU m4 scripts:
206 * Option `-V' has been removed, use `--version' instead.  `--version'
207 writes on standard output instead of standard error, and inhibits any
208 script execution.
210 * `--no-gnu-extensions' has been renamed `--traditional'.
212 * In `eval', `^' used to indicate exponentiation, use `**' instead.
214 * The automatic undiversion which takes place at end of all input is
215 forced into the main output stream.
217 Changes which are unlikely to affect existing scripts:
219 * `--help' prints an usage summary on standard output.  Script execution
220 is then inhibited.
222 * `--prefix-builtins' (-P) prefixes all builtin macros by `m4_'.
224 * Most builtin macros for which arguments are mandatory, called without
225 any arguments, are no more recognized as builtin macros: they are
226 consequently copied verbatim to the output stream.
228 * `define' and `pushdef' are usable with only one argument, they give
229 this argument an empty definition.
231 * `eval' new operators for binary representation handling: `^' for
232 exclusive-or, `~' for the bitwise negation, `<<' and `>>' for shifts.
234 * `eval' recognizes the notation 0bDIGITS for binary numbers and the
235 notation 0rRADIX:DIGITS for numbers in any radix from 1 to 36.
237 Version 1.0.3 - December 1992, by Franc,ois Pinard
239 Changes for the user:
241 * `dnl' outputs a diagnostic if immediately followed by `('.  Usually,
242 `dnl' is followed by newline or whitespace.
244 * `ifelse' accepts without complaining the common idiom of having only
245 one argument.  This is useful for introducing long comments.
247 * `eval' always expresses values as signed, whatever the radix.
249 * M4OPTS environment variable is no longer obeyed.
251 * `--no-warnings' option is renamed `--silent'.
253 * Debug lines use a new format more compatible with GNU standards.
255 * Various bugs have been corrected.  See the ChangeLog for details.
257 Changes for the installer:
259 * GNU m4 now uses an Autoconf-generated configure script, and should be
260 more easily portable in many ways.  (Cray is not supported yet).
262 * `make check' has been made more portable, expect no errors.
264 Changes for the programmer:
266 * Sources have been fully reindented to comply with GNU standards, and
267 cleaned up in many ways.
269 * Sources have been protoized.  Non-ANSI compilers are automatically
270 detected, then sources are unprotoized on the fly before compilation.
272 * GNU m4 uses newer versions of obstack, regex, getopt, etc.
274 Version 1.0 - October 1991, by Rene' Seindal
276 * Uses GNU configure, taken from the gdb distribution.
278 * Uses GNU getopt(), with long option names.
280 * The -Q/+quiet option is added, which suppresses warnings about missing
281 or superflous arguments to built-in macros.
283 * Added default options via the M4OPTS environment variable.
285 * Several minor bugs have been fixed.
287 Version 0.99 - July 1991, by Rene' Seindal
289 * The builtins `incr' and `decr' are now implemented without use of
290 `eval'.
292 * The builtin `indir' is added, to allow for indirect macro calls
293 (allows use of "illegal" macro names).
295 * The debugging and tracing facilities has been enhanced considerably.
296 See the manual for details.
298 * The -tMACRO option is added, marks MACRO for tracing as soon as it
299 is defined.
301 * Builtins are traced after renaming iff they were before.
303 * Named files can now be undiverted.
305 * The -Nnum option can be used to increase the number of divertions
306 available.
308 * Calling changecom without arguments now disables all comment handling.
310 * A bug in `dnl' is fixed.
312 * A bug in the multi-character quoting code is fixed.
314 * Several typos in the manual has been corrected.  More probably persist.
316 Version 0.75 - November 1990, by Rene' Seindal
318 * Implemented search path for include files (-I option and M4PATH
319 environment variable).
321 * Implemented builtin `format' for printf-like formatting.
323 * Implemented builtin `regexp' for searching for regular expressions.
325 * Implemented builtin `patsubst' for substitution with regular
326 expressions.
328 * Implemented builtin `esyscmd', which expands to a shell commands output.
330 * Implemented `__file__' and `__line__' for use in error messages.
332 * Implemented character ranges in `translit'.
334 * Implemented control over debugging output.
336 * Implemented multi-character quotes.
338 * Implemented multi-character comment delimiters.
340 * Changed predefined macro `gnu' to `__gnu__'.
342 * Changed predefined macro `unix' to `__unix__', when the -G option is
343 not used.  With -G, `unix' is still defined.
345 * Added program name to error messages.
347 * Fixed two missing null bytes bugs.
349 Version 0.50 - January 1990, by Rene' Seindal
351 * Initial beta release.
353 Local Variables:
354 mode: outline
355 fill-column: 75
356 End: