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