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