* doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
[m4.git] / NEWS
blob03b97f187da33dc5f8efaaa9a917dffb3d2fb63c
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.6 - ?? 2006, by ??  (CVS version 1.4.5a)
7 * Fix buffer overrun in regexp and patsubst macros when handed a trailing
8   backslash in the replacement text.
9 * The format macro now understands %F, %g, and %G.
10 * When loading frozen files, m4 now exits with status 63 if version
11   mismatch is detected.
12 * Fix bugs that occurred when invoked with stdout or stderr closed.  Detect
13   write failures to stdout.
14 * The m4exit macro now converts values outside the range 0-255 to 1.
15 * It is now an error if a command-line input file ends in the middle of a
16   comment, matching the behavior of mid-string and mid-argument
17   collection.
18 * The dnl macro now warns if end of file is encountered instead of a
19   newline.
21 Version 1.4.5 - 15 July 2006, by Eric Blake  (CVS version 1.4.4c)
23 * Fix sysval on BeOS, OS/2, and other systems that store exit status
24   in the low-order byte.  Additionally, on Unix platforms, if syscmd was
25   terminated by a signal, sysval now displays the signal number shifted
26   left by eight bits, to match traditional m4 implementations.
27 * The maketemp macro is no longer subject to platform limitations (such as
28   26 or 32 max files from a given template).
29 * Frozen files now require that the first directive be V (version), to
30   better diagnose version mismatch.  Additionally, if the F directive
31   (builtin function) names an unknown builtin that existed in the m4 that
32   froze the file but not in the current m4 (for example, changeword), the
33   warning is deferred until an attempt is made to actually use the
34   builtin.  This allows downgrading from beta m4-1.4o to stable m4-1.4.5
35   without breaking autoconf.
36 * The format and indir macros are now recognized only with arguments.
37 * The eval macro no longer crashes on x86 architectures when dividing the
38   minimum integer by -1.
39 * On systems with ecvt and fcvt, format no longer truncates trailing
40   zeroes on integers printed with %.0f.  On systems without these
41   functions, format is no longer subject to a buffer overflow that
42   permitted arbitrary code execution.
43 * On native Windows builds, the macro __windows__ is provided instead of
44   __unix__.  Likewise, on OS/2 builds, the macro __os2__ is provided.  This
45   allows input files to determine when syscmd might behave differently.
46 * Fix bug in 1.4.3 patch to use \n line-endings that did not work for
47   cygwin.
48 * When given the empty string or 0, undivert is now documented as a no-op
49   rather than closing stdout, warning about a non-existent file, or trying
50   to read a directory as a file.
51 * Many documentation improvements.  Also, the manual is now distributed
52   under FDL 1.2, rather than a stricter verbatim-only license.
53 * Raise the -L (--nesting-limit) command line option limit from 250 to
54   1024.
55 * The decr, incr, divert, m4exit, and substr macros treat an empty number
56   as 0, issue a warning, and expand as normal; rather than issuing an error
57   and expanding to the empty string.
58 * The eval macro now treats an empty radix argument as 10, handles radix 1,
59   and treats the width argument as number of digits excluding the sign,
60   for compatibility with other m4 implementations.
61 * The ifdef, divert, m4exit, substr, and translit macros now correctly
62   ignore extra arguments.
63 * The popdef and undefine macros now correctly accept multiple arguments.
64 * Although changeword is on its last leg, if enabled, it now reverts to the
65   default (faster) regexp when passed the empty string.
66 * The regexp and substr macros now warn and ignore a trailing backslash in
67   the replacement, and warn on \n for n larger than the number of
68   sub-expressions in the regexp.
70 Version 1.4.4b - 17 June 2006, by Eric Blake  (CVS version 1.4.4a)
72 * Fix a recursive push_string crashing bug, which affected changequote of
73   three or more characters on some compilers.
74 * Use automake to fix build portability issues.
75 * Fix a recursive m4wrap crashing bug.
76 * Fix a 1 in 2**32 hash crashing bug.
77 * Tracing a macro by name is now persistent, even if the macro is
78   subsequently undefined or redefined.  The traceon and traceoff macros no
79   longer warn about undefined symbols.  This solves a crash when using
80   indir on an undefined macro traced with the -t option, as well as an
81   incorrect result of ifdef.  Furthermore, tracing is no longer transferred
82   with builtins, solving the bug of "m4 -tm4_eval" failing to give trace
83   output on the input "define(`m4_eval',defn(`eval'))m4_eval(1)".
84 * Fix a crash when a macro is undefined while collecting its arguments, by
85   always using the definition that was in effect before argument
86   collection.  This behavior matches the C pre-processor, and means that
87   the sequence "define(`f',`1')f(define(`f',`2'))f" is now documented to
88   result in "12", rather than the previously undocumented "22".
89 * Update the regex engine to fix several bugs.
90 * Fix a potential crash on machines where char is signed.
92 Version 1.4.4 - October 2005, by Gary V. Vaughan
94 * ./configure --infodir=/usr/share/info now works correctly.
95 * When any file named on the command line is missing exit with status 1.
97 Version 1.4.3 - March 2005, by Gary V. Vaughan
99 * DESTDIR installs now work correctly.
100 * Don't segfault with uncompilable regexps to changeword().
101 * Always use \n line-endings for frozen files (fixes a Windows bug).
102 * Portability fix for systems lacking mkstemp(3).
103 * Approximately 20% speed up in the common case of usage with autoconf.
104 * Supported on QNX 6.3.
106 Version 1.4.2 - August 2004, by Paul Eggert
108 * No user visible changes; portability bug fixes only.
110 Version 1.4.1 - June 2004, by Paul Eggert
112 * maketemp now creates an empty file with the given name, instead of merely
113   returning the name of a nonexistent file.  This closes a security hole.
115 Version 1.4 - October 1994, by Franc,ois Pinard
117 (No user visible changes)
119 Version 1.3 - September 1994, by Franc,ois Pinard
121 * Diversions are created as needed.  Option `-N' is still accepted, but
122 otherwise ignored.  Users should use only negative diversion numbers,
123 instead of high positive numbers, for diverting to nowhere.
125 * Diversions should also work faster.  No temporary files will be needed
126 at all if all diversions taken altogether do not use more than 512K.
128 * Frozen state files may be produced with the `--freeze-state' (-F)
129 option and later brought back through the `--reload-state' (-R) option.
131 Version 1.2 - July 1994, by Franc,ois Pinard
133 * In patsubst(STRING, REGEXP, REPLACEMENT), \& in REPLACEMENT has been
134 changed to represent this part of STRING matched by the whole REGEXP,
135 instead of the whole STRING as before.  \0 does the same, but emits a
136 diagnostic saying it will disappear in some subsequent release.
138 * eval(EXPR) emits a diagnostic if EXPR has suffixed crumb.  The same for
139 other numeric conversions in incr(), decr(), divert(), etc.
141 * `--fatal-warnings' (-E) stops execution at first warning.
143 * `--nesting-limit=LEVEL' (-L LEVEL) sets a limit to macro nesting.
144 It is initially fixed at 250.
146 * `--word-regexp=REGEXP' (-W REGEXP) modifies macro name syntax, like
147 does the new `changeword(REGEXP)' macro.  This feature is experimental,
148 tell me your opinions about it.  You do need --enable-changeword at
149 configure time to get these things.  Do *not* depend on them yet.
151 * Trace output format is scannable by GNU Emacs' next-error function.
153 * Stack overflow is detected and diagnosed on some capable systems.
155 * Various bugs have been corrected, m4 should be more portable.  See the
156 ChangeLog for details.
158 Version 1.1 - November 1993, by Franc,ois Pinard
160 Changes which might affect existing GNU m4 scripts:
162 * Option `-V' has been removed, use `--version' instead.  `--version'
163 writes on standard output instead of standard error, and inhibits any
164 script execution.
166 * `--no-gnu-extensions' has been renamed `--traditional'.
168 * In `eval', `^' used to indicate exponentiation, use `**' instead.
170 * The automatic undiversion which takes place at end of all input is
171 forced into the main output stream.
173 Changes which are unlikely to affect existing scripts:
175 * `--help' prints an usage summary on standard output.  Script execution
176 is then inhibited.
178 * `--prefix-builtins' (-P) prefixes all builtin macros by `m4_'.
180 * Most builtin macros for which arguments are mandatory, called without
181 any arguments, are no more recognized as builtin macros: they are
182 consequently copied verbatim to the output stream.
184 * `define' and `pushdef' are usable with only one argument, they give
185 this argument an empty definition.
187 * `eval' new operators for binary representation handling: `^' for
188 exclusive-or, `~' for the bitwise negation, `<<' and `>>' for shifts.
190 * `eval' recognizes the notation 0bDIGITS for binary numbers and the
191 notation 0rRADIX:DIGITS for numbers in any radix from 1 to 36.
193 Version 1.0.3 - December 1992, by Franc,ois Pinard
195 Changes for the user:
197 * `dnl' outputs a diagnostic if immediately followed by `('.  Usually,
198 `dnl' is followed by newline or whitespace.
200 * `ifelse' accepts without complaining the common idiom of having only
201 one argument.  This is useful for introducing long comments.
203 * `eval' always expresses values as signed, whatever the radix.
205 * M4OPTS environment variable is no longer obeyed.
207 * `--no-warnings' option is renamed `--silent'.
209 * Debug lines use a new format more compatible with GNU standards.
211 * Various bugs have been corrected.  See the ChangeLog for details.
213 Changes for the installer:
215 * GNU m4 now uses an Autoconf-generated configure script, and should be
216 more easily portable in many ways.  (Cray is not supported yet).
218 * `make check' has been made more portable, expect no errors.
220 Changes for the programmer:
222 * Sources have been fully reindented to comply with GNU standards, and
223 cleaned up in many ways.
225 * Sources have been protoized.  Non-ANSI compilers are automatically
226 detected, then sources are unprotoized on the fly before compilation.
228 * GNU m4 uses newer versions of obstack, regex, getopt, etc.
230 Version 1.0 - October 1991, by Rene' Seindal
232 * Uses GNU configure, taken from the gdb distribution.
234 * Uses GNU getopt(), with long option names.
236 * The -Q/+quiet option is added, which suppresses warnings about missing
237 or superflous arguments to built-in macros.
239 * Added default options via the M4OPTS environment variable.
241 * Several minor bugs have been fixed.
243 Version 0.99 - July 1991, by Rene' Seindal
245 * The builtins `incr' and `decr' are now implemented without use of
246 `eval'.
248 * The builtin `indir' is added, to allow for indirect macro calls
249 (allows use of "illegal" macro names).
251 * The debugging and tracing facilities has been enhanced considerably.
252 See the manual for details.
254 * The -tMACRO option is added, marks MACRO for tracing as soon as it
255 is defined.
257 * Builtins are traced after renaming iff they were before.
259 * Named files can now be undiverted.
261 * The -Nnum option can be used to increase the number of divertions
262 available.
264 * Calling changecom without arguments now disables all comment handling.
266 * A bug in `dnl' is fixed.
268 * A bug in the multi-character quoting code is fixed.
270 * Several typos in the manual has been corrected.  More probably persist.
272 Version 0.75 - November 1990, by Rene' Seindal
274 * Implemented search path for include files (-I option and M4PATH
275 environment variable).
277 * Implemented builtin `format' for printf-like formatting.
279 * Implemented builtin `regexp' for searching for regular expressions.
281 * Implemented builtin `patsubst' for substitution with regular
282 expressions.
284 * Implemented builtin `esyscmd', which expands to a shell commands output.
286 * Implemented `__file__' and `__line__' for use in error messages.
288 * Implemented character ranges in `translit'.
290 * Implemented control over debugging output.
292 * Implemented multi-character quotes.
294 * Implemented multi-character comment delimiters.
296 * Changed predefined macro `gnu' to `__gnu__'.
298 * Changed predefined macro `unix' to `__unix__', when the -G option is
299 not used.  With -G, `unix' is still defined.
301 * Added program name to error messages.
303 * Fixed two missing null bytes bugs.
305 Version 0.50 - January 1990, by Rene' Seindal
307 * Initial beta release.
309 Local Variables:
310 fill-column: 75
311 End: