Fix --warn-macro-sequence regression from 2007-11-29.
[m4/ericb.git] / ChangeLog
blob4a20b005ba58c227c003e382e68976bbd261b8ee
1 2008-01-14  Eric Blake  <ebb9@byu.net>
3         Fix --warn-macro-sequence regression from 2007-11-29.
4         * src/builtin.c (define_user_macro): Use correct length.
5         * doc/m4.texinfo (Arguments): Test the fix.
6         (History): Reword to account for new year and eventual result of
7         the argv_ref branch.
9 2008-01-08  Eric Blake  <ebb9@byu.net>
11         Bump copyright year.
12         * NEWS: Update year.  Mention effect of my recent memmem
13         contributions to gnulib.
15 2007-12-21  Eric Blake  <ebb9@byu.net>
17         Stage 9: share rather than copy single-arg refs.
18         Use hooks of previous patch to create back-references to arguments
19         in the input engine, and inline short text rather than always
20         creating a FIFO link.  Also start testing embedded NUL behavior.
21         Until the argument collection engine also shares references, the
22         memory usage increases.
23         Memory impact: noticeable penalty, due to longer life of argv.
24         Speed impact: slight improvement, due less data copying.
25         * m4/gnulib-cache.m4: Import quote and memmem modules.
26         * src/m4.h (arg_scratch): New prototype.
27         * src/input.c (INPUT_INLINE_THRESHOLD): New define.
28         (push_token): Use it to inline short text, and save references to
29         longer text.
30         (input_init, next_token): Simplify obstack handling.
31         * src/macro.c (expand_argument): Likewise.
32         (expand_macro): Track scratch space.
33         (arg_scratch): New function.
34         (make_argv_ref): Use it.
35         (push_args): Likewise, and simplify comma handling, since most
36         separators are short enough to be inlined.
37         * src/builtin.c (builtin_init): Avoid cast.
38         (m4_errprint, m4_index): Transparently support NUL.
39         (m4_translit): Use scratch space, rather than leaking memory on
40         expansion stack.
41         * doc/m4.texinfo (Syntax): Add new test of embedded NUL.
42         * checks/get-them: Extract test that uses external files.
43         * checks/check-them: Run the new test.  Use unified diff if
44         possible, and force text mode when debugging NUL handling.
45         * examples/null.m4: New file.
46         * examples/null.out: Likewise.
47         * examples/null.err: Likewise.
48         * examples/Makefile.am (EXTRA_FILES): Distribute these files.
49         * .gitattributes: Treat new files as text, in spite of embedded
50         NUL.
52 2007-12-18  Eric Blake  <ebb9@byu.net>
54         Stage 8: extend life of references into argv.
55         Add hooks to lengthen the lifetime of arguments reused in a macro
56         expansion, rather than always discarding arguments at the end of
57         expand_macro.  Rework the expand_macro obstacks to handle longer
58         lifetimes.  For now, the hooks remain unused.
59         Memory impact: slight penalty, due to larger structs.
60         Speed impact: slight penalty, due to more bookkeeping.
61         * src/m4.h (obstack_regrow): Delete, now that it is unused.
62         (struct token_chain): Add level field.
63         (push_token): Adjust prototype.
64         (adjust_refcount): New prototype.
65         * src/macro.c [DEBUG_MACRO]: Add debugging hooks for $@ reference
66         counting.
67         (argc_stack, argv_stack): Delete, replaced by...
68         (struct macro_arg_stacks, stacks, stacks_count): ...these new
69         structure for tracking $@ references.
70         (expand_input): Initialize new structure.
71         (collect_arguments): Alter signature.
72         (expand_macro): Rework obstack handling, in order to keep $@
73         references alive until they have been rescanned.
74         (adjust_refcount, arg_mark): New functions.
75         (make_argv_ref): Use new field.
76         (push_arg, push_args): Update callers.
77         * src/input.c (make_text_link): Use new field.
78         (push_token): Change signature.
79         (pop_input, next_char_1): Call new function.
80         * doc/m4.texinfo: Clean up some examples of -d option usage.
81         (Ifelse): Add some stress tests.
83 2007-12-13  Eric Blake  <ebb9@byu.net>
85         Yet more rewording.
86         * doc/m4.texinfo (Inhibiting Invocation): Missed one instance in
87         the previous patch.
89         * THANKS: Update.
91 2007-12-13  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
93         * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
94         example.
95         Reported by Giovanni Toffetti.
97 2007-12-11  Eric Blake  <ebb9@byu.net>
99         Stage 7: add chained token support to input parser.
100         Allow the LIFO input engine to rescan a macro expansion composed
101         of smaller chunks of FIFO data, rather than the old approach of a
102         monolithic string.  For now, all chunks are still copied.
103         Memory impact: slight penalty, due to FIFO chain overhead.
104         Speed impact: noticeable penalty, due to extra bookkeeping.
105         * src/m4.h (struct token_chain): Add const safety.
106         (push_token): New prototype.
107         * src/input.c (INPUT_CHAIN): New enumerator.
108         (struct input_block): Add new input type u_c, and change u_s to
109         length-based processing.
110         (make_text_link): New helper function.
111         (push_token): New function.
112         (push_string_finish): Use it.
113         (pop_input, input_print, peek_input, next_char, next_char_1):
114         Adjust to handle new input type.
115         * src/macro.c (push_arg, push_args): Use new function.
117 2007-12-10  Eric Blake  <ebb9@byu.net>
119         Stage 6: convert builtins to push arg at a time.
120         Add new methods to factor all builtins whose expansion includes an
121         argument, making back-reference creation easier in future patches.
122         Factor out length-limited printing to obstacks, and use -1 rather
123         than 0 for unlimited length.
124         Memory impact: none.
125         Speed impact: slight improvement, due to better code sharing.
126         * src/m4.h (includes): Include <limits.h> here, instead of in
127         individual files.
128         (input_block): New typedef.
129         (trace_pre, trace_post, push_string_finish): Update prototypes.
130         (obstack_print, input_print, push_arg, push_args): New
131         prototypes.
132         * src/input.c (push_string_finish): Change return type.
133         (input_print): New function.
134         * src/debug.c (trace_format): Add %B specifier, and use new
135         function.
136         (trace_pre): Remove redundant argc parameter.
137         (trace_post): Likewise, and change signature.
138         (obstack_print): New function.
139         * src/macro.c (expand_macro): Update caller.
140         (push_arg, push_args): New functions.
141         * src/builtin.c (m4_ifdef, m4_ifelse, m4_shift, m4_substr)
142         (m4_patsubst, expand_user_macro): Use new functions.
143         (mkstemp_helper, m4_maketemp): Avoid extra trailing NULs.
144         * src/m4.c (max_debug_argument_length, main): Set to INT_MAX, not
145         0, for unlimited.
146         * src/output.c: Update includes.
147         * src/symtab.c: Likewise.
149 2007-12-07  Eric Blake  <ebb9@byu.net>
151         Minor security fix: Quote output of mkstemp.
152         * src/builtin.c (mkstemp_helper): Produce quoted output.
153         * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
154         * NEWS: Document this change.
156         Stage 5: add notion of quote age.
157         Cache the quoting rules that were in effect when a string was
158         parsed, to avoid reparsing that string if no changequote or other
159         quote age change took place in the meantime.  A quote_age of 0 is
160         always safe, but does not benefit from caching.
161         Memory impact: slight penalty, due to larger struct.
162         Speed impact: slight penalty, due to more bookkeeping.
163         * src/input.c: Comment cleanups.
164         (current_quote_age): New global variable.
165         (set_quote_age): New helper function.
166         (input_init, set_word_regexp): Use it.
167         (set_quotes, set_comment): Likewise, and detect no-op changes.
168         (quote_age, safe_quotes): New functions.
169         (next_token): Track quote age.
170         * src/m4.h (struct token_data): Add quote_age member.
171         (TOKEN_DATA_QUOTE_AGE, quote_age, safe_quotes): New prototypes.
172         * src/macro.c (struct macro_arguments): Add quote_age member.
173         (expand_token): Alter signature and track quote age.
174         (expand_input, expand_argument): All callers changed.
175         (collect_arguments, make_argv_ref): Track quote age.
176         (arg_text, arg_len, arg_func): Detect type mismatch.
177         * doc/m4.texinfo (Ifelse, Changequote): Add more tests.
178         (Incompatibilities): Fix typo.
179         * examples/wraplifo.m4: New file.
180         * examples/Makefile.am (EXTRA_DIST): Distribute it.
182 2007-12-04  Eric Blake  <ebb9@byu.net>
184         Fix builds with OpenBSD make.
185         * doc/Makefile.am (HELP2MAN): New macro.
186         (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
187         * README: Update copyright.
188         * HACKING: Mention help2man and makeinfo dependencies.
190 2007-11-29  Eric Blake  <ebb9@byu.net>
192         Stage 4: route indir, builtin through ref; make argv opaque.
193         Finish making struct opaque to all but the input engine, by
194         reworking obstack usage in expand_macro to better support creation
195         of a $@ reference.  Canonicalize the empty argument, to allow
196         pointer comparison optimizations.
197         Memory impact: slight penalty, due to larger struct.
198         Speed impact: slight improvement, due to fewer function calls.
199         * src/m4.h (obstack_regrow): Borrow definition from head.
200         (struct token_chain): Add flatten and len members.
201         (arg_equal, arg_empty, make_argv_ref): New prototypes.
202         (struct macro_arguments): Move...
203         * src/macro.c (struct macro_arguments): ...here, making it
204         opaque.  Add has_ref member.
205         (empty_token): New placeholder, for optimizing comparison with
206         empty string.
207         (collect_arguments): Change signature, and populate new fields.
208         (expand_macro): Alter handling of obstacks.
209         (arg_token): New helper method.
210         (arg_equal, arg_empty, make_argv_ref): New methods.
211         (arg_type, arg_text, arg_len, arg_func): Use new methods.
212         * src/builtin.c (m4_ifelse, m4_builtin, m4_indir, m4_eval):
213         Likewise.
214         * src/format.c (format): Likewise.
216         Stage 3: cache length, rather than computing it.
217         Cache the length of a token, to avoid repeating lots of strlen
218         calls.  Additionally, by using obstack length rather than strlen,
219         the input engine can now support embedded NUL.
220         Memory impact: slight penalty, due to larger struct.
221         Speed impact: noticeable improvement, due to fewer function
222         calls.
223         * src/input.c (next_token): Grab length from obstack rather than
224         calling strlen.
225         * src/m4.h (token_data, macro_arguments): Add length field.
226         (TOKEN_DATA_LEN): New accessor.
227         (define_user_macro): Add parameter.
228         * src/builtin.c (define_user_macro, mkstemp_helper): Use
229         pre-computed length.
230         (builtin_init, define_macro, m4_maketemp, m4_mkstemp): Adjust
231         callers.
232         (dump_args, m4_ifdef, m4_ifelse, m4_builtin, m4_indir, m4_eval)
233         (m4_len, m4_substr, m4_translit, m4_regexp, m4_patsubst)
234         (expand_user_macro): Use cached lengths.
235         * src/freeze.c (reload_frozen_state): Adjust callers.
236         * src/m4.c (main): Likewise.
237         * src/macro.c (expand_token, expand_argument, collect_arguments)
238         (arg_len): Use cached length.
239         * doc/m4.texinfo (Mkstemp): Ensure mkstemp does not produce NUL.
241 2007-11-27  Eric Blake  <ebb9@byu.net>
243         Stage 2: use accessors, not direct reference, into argv.
244         Outside of macro.c, use accessor methods rather than direct access
245         into the argv struct.
246         Memory impact: none.
247         Speed impact: slight penalty, due to increased function calls.
248         * src/m4.h (TOKEN_EOF): Alter value, to ease debugging.
249         (arg_argc, arg_type, arg_text, arg_len, arg_func): New
250         prototypes.
251         * src/macro.c (arg_argc, arg_type, arg_text, arg_len, arg_func):
252         New accessor functions.
253         * src/builtin.c (ARG, dump_args, define_macro, m4_builtin)
254         (m4_indir): Use new accessors.
255         * src/debug.c (trace_pre): Likewise.
256         * src/format.c (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE):
257         Likewise.
259 2007-11-24  Eric Blake  <ebb9@byu.net>
261         Stage 1: convert token_data** into new object.
262         Pass a variable-size wrapper structure instead of an array to
263         builtins, so that subsequent optimizations in the structure need
264         not impact every builtin client.
265         Memory impact: slight penalty, since struct is larger than array.
266         Speed impact: slight penalty, due to increased bookkeeping.
267         * m4/gnulib-cache.m4: Import flexmember module.
268         * src/m4.h (struct macro_arguments, struct token_chain): New
269         structs.
270         (builtin_func): Alter signature.
271         (token_data): Add new TOKEN_COMP alternative.
272         * src/builtin.c: All builtins changed.
273         (ARG, dump_args, define_macro, expand_user_macro): Update to use
274         struct.
275         * src/debug.c (trace_pre, trace_post): Likewise.
276         * src/format.c (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE, format):
277         Likewise.
278         * src/macro.c (collect_arguments): Build new struct.
279         (call_macro, expand_macro): Update to use new struct.
281 2007-11-22  Eric Blake  <ebb9@byu.net>
283         More error messages tied to macro names.
284         * src/input.c (set_word_regexp): Take additional parameter.
285         (input_init): Adjust caller.
286         * src/debug.c (debug_set_file, debug_set_output): Take additional
287         parameter.
288         (debug_init): Adjust caller.
289         (expansion_level): Move declaration...
290         * src/m4.h (expansion_level): ...here.
291         (debug_set_output, set_word_regexp): Adjust prototypes.
292         * src/builtin.c (m4_changeword, m4_m4exit, m4_debugfile): Adjust
293         callers.
294         * src/m4.c (main): Likewise.
296         Refactor error messages to avoid macros.
297         * src/m4.h (_): Define, as a placeholder for now.
298         (M4ERROR, M4ERROR_AT_LINE): Delete.
299         (m4_error, m4_error_at_line): Change prototype.
300         (m4_warn, m4_warn_at_line): New prototypes.
301         * src/m4.c (m4_verror_at_line): New helper function.
302         (m4_error, m4_error_at_line): Use new function, and properly call
303         va_end.
304         (m4_warn, m4_warn_at_line): New functions.
305         (stackovf_handler, main): All callers changed.
306         * src/builtin.c: Likewise.
307         * src/debug.c: Likewise.
308         * src/eval.c: Likewise.
309         * src/format.c: Likewise.
310         * src/freeze.c: Likewise.
311         * src/input.c: Likewise.
312         * src/macro.c: Likewise.
313         * doc/m4.texinfo (Indir, Builtin, Dumpdef, Incr, Eval, Substr)
314         (Improved forloop): Adjust tests accordingly.
316         Security fix: avoid arbitrary code execution with 'm4 -F'.
317         * src/freeze.c (produce_frozen_state): Never pass raw file name as
318         printf format.
319         * NEWS: Document this fix.
321 2007-11-21  Eric Blake  <ebb9@byu.net>
323         Consistently report macro name first in messages.
324         * src/m4.h (evaluate): Adjust prototype.
325         * src/builtin.c (bad_argc, numeric_arg, m4_placeholder): Alter
326         wording to match head.
327         (mkstemp_helper, substitute): Adjust signature.  All callers
328         changed.
329         (m4_dumpdef, m4_builtin, m4_indir, m4_defn, m4_esyscmd, m4_eval)
330         (m4_undivert, m4_maketemp, m4_m4exit, m4_debugmode)
331         (m4_debugfile, m4_regexp, m4_patsubst): Mention macro name in
332         message.
333         (m4_format): Adjust call.
334         * src/format.c (format): No longer skip argv[0].
335         * src/eval.c (evaluate): Mention macro name in message.
336         (logical_or_term, logical_and_term, or_term, xor_term, and_term)
337         (equality_term, cmp_term, shift_term, add_term, mult_term)
338         (exp_term, unary_term, simple_term): Adjust signature.
339         * src/macro.c (warn_builtin_concat): Likewise.
340         (expand_argument): Adjust caller.
341         * doc/m4.texinfo (Macro Arguments, Ifdef, Ifelse, Debug Output)
342         (Dnl, Improved fatal_error, Defn, Builtin, Index macro, Regexp)
343         (Substr, Translit, Patsubst, Format, Eval, Dumpdef, Include)
344         (Improved forloop, Indir, Trace, Incr): Adjust tests to match.
346         Make argument checking a bit more sane.
347         * src/builtin.c (bad_argc): Adjust signature, and don't force
348         callers to add 1.  Adjust all callers.
349         (numeric_arg): Adjust signature.  Adjust all callers.
351         Make dnl diagnostic print macro name.
352         * src/m4.h (skip_line): Adjust prototype.
353         * src/input.c (skip_line): Report error on behalf of caller.
354         * src/builtin.c (m4_dnl): Adjust caller.
355         (dump_args, m4_dumpdef, m4_changequote, m4_changecom)
356         (m4_changeword, m4_traceon, m4_traceoff, expand_user_macro): Use
357         ARG macro instead of open-coding.
358         * doc/m4.texinfo (Dnl): Adjust test.
360 2007-11-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
362         * Makefile.am (EXTRA_DIST): gendocs.sh is gone here.
364 2007-11-14  Eric Blake  <ebb9@byu.net>
366         Avoid builtin concatenation in macro arguments.
367         * doc/m4.texinfo (Defn): Add tests.
368         * src/macro.c (warn_builtin_concat): New function.
369         (expand_argument): Use it to warn on more corner cases.
370         * NEWS: Mention new warning.
372 2007-11-13  Eric Blake  <ebb9@byu.net>
374         Simplify previous patch.
375         * src/input.c (pop_input): Change signature.
376         (push_string_init, next_char_1): Adjust callers.
378         Note: Patches titled Stage 0 through N form a series of patches
379         which decreases the algorithmic complexity of tail recursion in
380         macro expansions from O(n^2) to O(n) in both time and memory, then
381         performs cleanups, such as handling of embedded NUL, made easier
382         by the code refactoring.
384         Stage 0: Fix memory leak in tail recursion.
385         Free expansion text in the input engine as soon as it is parsed,
386         rather than when the recursive expansion completes.
387         Memory impact: noticeable improvement, due to reduction from
388         O(n^2) to O(n) on recursion.
389         Speed impact: minor improvement, due to better memory usage.
390         * src/input.c (push_string_init): Let go of memory earlier.
391         (next_char_1): Make end of string detection reliable.
392         (match_input): Simplify use of push_string_init.
393         * NEWS: Document this fix.
395 2007-11-07  Eric Blake  <ebb9@byu.net>
397         * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
399 2007-11-05  Eric Blake  <ebb9@byu.net>
401         Use assert, rather than INTERNAL ERROR.
402         * src/m4.h: Include <assert.h>.
403         * src/builtin.c (m4_dumpdef, define_macro, m4_defn): Use assert.
404         * src/debug.c (trace_pre): Likewise.
405         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
406         Likewise.
407         * src/freeze.c (produce_frozen_state): Likewise.
408         * src/input.c (push_string_init, pop_input, init_macro_token)
409         (peek_input, next_char_1, set_word_regexp): Likewise.
410         * src/m4.c (main): Likewise.
411         * src/macro.c (expand_token, expand_argument, call_macro):
412         Likewise.
413         * src/output.c (make_diversion): Likewise.
414         * src/symtab.c (symtab_init): Likewise.
416         Use build-aux directory.
417         * configure.ac (PACKAGE, VERSION): Delete, since Automake does
418         this now.
419         (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
420         instead of the top level.
421         * bootstrap: Adjust accordingly.
422         * m4/gnulib-cache.m4: Add --aux-dir option.
423         * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
425 2007-11-02  Eric Blake  <ebb9@byu.net>
427         Update some documentation about version control.
428         * NEWS: M4 is now stored in git.
429         * HACKING: Likewise.
430         * README: Likewise.
431         * bootstrap: Likewise.
432         * commit: Delete, now that CVS commits are no longer necessary.
434         Adjust to recent gnulib change.
435         * m4/gnulib-cache.m4: Drop vasprintf-posix and xvasprintf, and use
436         xvasprintf-posix instead.
438 2007-11-01  Eric Blake  <ebb9@byu.net>
440         Improve error message when early end of file occurs.
441         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
442         (M4wrap): Adjust to new messages.
443         (Improved capitalize): Enhance test.
444         * src/m4.h (next_token): Adjust prototype.
445         * src/input.c (next_token): Add new parameter, and improve error
446         message.
447         (lex_debug): Adjust callers.
448         * src/symtab.c (symtab_debug): Likewise.
449         * src/macro.c (expand_input, collect_arguments): Likewise.
450         (expand_argument): Likewise, and add parameter.
452 2007-10-31  Eric Blake  <ebb9@byu.net>
454         Test more corner cases.
455         * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
456         (Improved foreach): Document alternate foreachq style.
457         * examples/foreachq3.m4: New file.
458         * examples/loop.m4: New file.
459         * examples/Makefile.am (EXTRA_DIST): Distribute them.
461 2007-10-28  Eric Blake  <ebb9@byu.net>
463         More test coverage for autoconf usage patterns.
464         * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
465         (Builtin): Add new undocumented tests.
466         (Shift): Document cond macro, and add new test.
468 2007-10-27  Eric Blake  <ebb9@byu.net>
470         Document one use of changequote(`(',`)').
471         * doc/m4.texinfo (Changequote): Add new test, based on recent
472         autoconf addition of m4_expand.
474 2007-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
476         * examples/Makefile.am (EXTRA_DIST): Add capitalize2.m4.
478 2007-10-24  Eric Blake  <ebb9@byu.net>
480         Reduce number of mingw testsuite failures.
481         * doc/m4.texinfo (Using frozen files): Skip test on mingw.
483 2007-10-22  Eric Blake  <ebb9@byu.net>
485         Add DEBUG_REGEX debugging information.
486         * src/m4.h (DEBUG_REGEX): New debug macro.
487         * src/m4.c (main) [DEBUG_REGEX]: Open regex trace file when
488         requested.
489         * src/builtin.c (m4_patsubst, m4_regexp, compile_pattern)
490         [DEBUG_REGEX]: Trace regex usage.
492         Never let printf failures go undetected.
493         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
494         xprintf'.
495         * src/m4.h: Include xprintf.h.
496         * src/format.c (format): Warn on format failures.
497         * src/builtin.c (ntoa): Export.
498         (m4_errprint): Adjust all *printf callers.
499         * src/debug.c (debug_message_prefix, trace_format): Likewise.
500         * src/freeze.c (produce_frozen_state): Likewise.
501         * src/input.c [DEBUG_INPUT]: Likewise.
502         * src/m4.c (usage): Likewise.
503         * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
504         (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
505         * src/output.c (m4_tmpname, shipout_text, freeze_diversione):
506         Likewise.
507         * src/path.c [DEBUG_INCL]: Likewise.
508         * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
509         * src/symtab.c [DEBUG_SYM]: Likewise.
511 2007-10-17  Eric Blake  <ebb9@byu.net>
513         Fix 'm4 -F file -t undefined'.
514         * src/freeze.c (produce_frozen_state): Avoid core dump.
515         * doc/m4.texinfo (Using frozen files): Test for the bug.
516         * NEWS: Mention the fix.
518 2007-10-09  Eric Blake  <ebb9@byu.net>
520         * NEWS: Document recent speedups.
522         Fix regexp regression of 2007-09-29.
523         * src/builtin.c (substitute): Allow NULL regs when no
524         subexpressions were present.
525         (m4_regexp): Handle \ escapes even with empty regex.
526         * doc/m4.texinfo (Regexp, Patsubst): Catch this bug.
528         Cache regex compilation for another autoconf speedup.
529         * src/m4.h (free_macro_sequence): Rename...
530         (free_regex): ...to this.
531         * src/m4.c (main): Update caller.
532         * src/builtin.c (REGEX_CACHE_SIZE, m4_regex, regex_cache): New
533         declarations.
534         (compile_pattern): New function; cache recent regexes.
535         (free_regex): Rename, and clean up additional memory.
536         (m4_regexp, m4_patsubst): Use new function.
538 2007-10-02  Eric Blake  <ebb9@byu.net>
540         Document quoting pitfalls in capitalize.
541         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
542         document shortfall.
543         (Improved capitalize): New node.
544         * examples/capitalize.m4: Update to match manual.
545         * examples/capitalize2.m4: New file.
547 2007-10-01  Eric Blake  <ebb9@byu.net>
549         Another Autoconf usage pattern optimization.
550         * src/builtin.c (m4_index): Optimize search for one byte.
551         * doc/m4.texinfo (Index macro, Regexp, Patsubst): Test the new
552         code paths.
554 2007-09-29  Eric Blake  <ebb9@byu.net>
556         Optimize for Autoconf usage pattern.
557         * src/builtin.c (m4_regexp, m4_patsubst): Handle empty regex
558         faster.
560 2007-09-24  Eric Blake  <ebb9@byu.net>
562         Create .gitignore alongside .cvsignore.
563         * bootstrap (LC_ALL): Set up front.
564         (version control) Borrow idea from head, to avoid churn in
565         m4/.*ignore files modified by gnulib-tool.
567 2007-09-13  Eric Blake  <ebb9@byu.net>
569         * AUTHORS: Fix typo.
571 2007-09-07  Eric Blake  <ebb9@byu.net>
573         * AUTHORS: Simplify, to match libtool and autoconf layout.
574         * THANKS: Sync with head.
576 2007-08-10  Eric Blake  <ebb9@byu.net>
578         * doc/m4.texinfo (Compatibility): Sync with head.
580 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
581         and Eric Blake  <ebb9@byu.net>
583         * doc/m4.texinfo (Defn): Update wording.
585 2007-08-09  Eric Blake  <ebb9@byu.net>
587         POSIX requires defn(`a',`b') to concatenate definitions.
588         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
589         trying to mix a builtin with anything else.
590         * doc/m4.texinfo (Defn): Document a use for this POSIX
591         requirement.
592         (Incompatibilities): Update to match current status.
593         * NEWS: Document this change.
594         * THANKS: Update.
595         Reported by Konrad Schwarz.
597 2007-08-04  Eric Blake  <ebb9@byu.net>
599         Normalize all GPL license notices.
600         * GNUmakefile: Update license wording.
601         * Makefile.am: Likewise.
602         * Makefile.maint: Likewise.
603         * bootstrap: Likewise.
604         * commit: Likewise.
605         * configure.ac: Likewise.
606         * checks/Makefile.in: Likewise.
607         * doc/Makefile.am: Likewise.
608         * examples/Makefile.am: Likewise.
609         * src/Makefile.am: Likewise.
610         * src/builtin.c: Likewise.
611         * src/debug.c: Likewise.
612         * src/eval.c: Likewise.
613         * src/format.c: Likewise.
614         * src/freeze.c: Likewise.
615         * src/input.c: Likewise.
616         * src/m4.c: Likewise.
617         * src/m4.h: Likewise.
618         * src/macro.c: Likewise.
619         * src/output.c: Likewise.
620         * src/path.c: Likewise.
621         * src/stackovf.c: Likewise.
622         * src/symtab.c: Likewise.
624 2007-07-21  Eric Blake  <ebb9@byu.net>
626         Fix regression on NetBSD from 2007-05-28.
627         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
628         position to byte 0.
629         * NEWS: Document this fix.
630         * THANKS: Update.
631         Reported by Thomas Klausner.
633 2007-07-20  Eric Blake  <ebb9@byu.net>
635         Fix 'make distcheck' issues.
636         * Makefile.am (EXTRA_DIST): No need to distribute
637         gpl-3.0.texi.diff anymore.
638         * m4/gnulib-cache.m4: Update to latest gnulib.
640 2007-07-14  Eric Blake  <ebb9@byu.net>
642         Reflect upstream license .texi changes.
643         * doc/m4.texinfo (Copying): Rename node...
644         (GNU General Public License): ...to this.
645         (GNU Free Documentation License): Adjust node location.
646         * local/doc/gpl-3.0.texi.diff: Remove file.
648 2007-07-10  Eric Blake  <ebb9@byu.net>
650         Start 1.4.10a.
651         * configure.ac (AC_INIT): Bump version number.
652         * NEWS: Start changes since 1.4.10.
653         * doc/m4.texinfo (History): Mention 1.4.11.
654         (Copying This Package, Copying This Manual): Add index entries.
655         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
656         updated.
657         * Makefile.am (EXTRA_DIST): Remove dead file.
659 2007-07-09  Eric Blake  <ebb9@byu.net>
661         Release 1.4.10:
662         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
663         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
664         * configure.ac (AC_INIT): Bump version number.
665         * NEWS: Describe changes since 1.4.9.
667         * src/format.c: Missed a GPLv3 conversion.
669         Avoid undefined behavior of %.*c in printf.
670         * src/format.c (format): Special case %c.
671         * TODO: Document that more remains to be done.
672         * NEWS: Document the fix.
674 2007-07-05  Eric Blake  <ebb9@byu.net>
676         Fix up gnulib-tool usage.
677         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
678         * version-etc.c.diff: Move to...
679         * local/lib/version-etc.c.diff: ...here.
680         * gpl-3.0.texi.diff: Move to...
681         * local/doc/gpl-3.0.texi.diff: ...here.
683 2007-07-04  Eric Blake  <ebb9@byu.net>
685         Upgrade to GPL version 3 or later.
686         * bootstrap: Pick up GPLv3.
687         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
688         --local-dir=. --import gpl-3.0'.
689         * doc/m4.texinfo (Copying This Package): New appendix.
690         * NEWS: Mention this change.
691         * README: Mention why some files still claim to be version 2.
692         * version-etc.c.diff: New file, to make sure --version claims
693         correct GPL version.  Temporary until gnulib makes move.
694         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
695         appendix, rather than section, of the manual.
696         * GNUmakefile: Update to new license.
697         * Makefile.am: Likewise.
698         * Makefile.maint: Likewise.
699         * commit: Likewise.
700         * configure.ac: Likewise.
701         * checks/Makefile.in: Likewise.
702         * doc/Makefile.am: Likewise.
703         * examples/Makefile.am: Likewise.
704         * src/Makefile.am: Likewise.
705         * src/builtin.c: Likewise.
706         * src/debug.c: Likewise.
707         * src/eval.c: Likewise.
708         * src/freeze.c: Likewise.
709         * src/input.c: Likewise.
710         * src/m4.c: Likewise.
711         * src/m4.h: Likewise.
712         * src/macro.c: Likewise.
713         * src/output.c: Likewise.
714         * src/path.c: Likewise.
715         * src/stackovf.c: Likewise.
716         * src/symtab.c: Likewise.
718 2007-06-26  Eric Blake  <ebb9@byu.net>
720         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
722 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
724         Match Free Software Directory categories.
725         * doc/m4.texinfo (dircategory): Update.
727 2007-05-31  Eric Blake  <ebb9@byu.net>
729         * src/output.c (output_text): Fix regression from 2007-05-28.
730         * doc/m4.texinfo (History): Mention 1.4.10.
731         (Format): Make testsuite output easier to debug.
733 2007-05-29  Eric Blake  <ebb9@byu.net>
735         Start 1.4.9c.
736         * configure.ac (AC_INIT): Bump version number.
737         * NEWS: Start changes since 1.4.9b, and fix typo.
739         Beta Release 1.4.9b:
740         * configure.ac (AC_INIT): Bump version number.
741         * NEWS: Describe changes since 1.4.9.
743         Improve format support.
744         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
745         vasprintf-posix'.
746         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
747         printf with too few arguments, as in format(%*.*d,-1,-1,1).
748         * doc/m4.texinfo (Format): Expand tests, and improve
749         documentation.
750         * NEWS: Document this change.
752 2007-05-28  Eric Blake  <ebb9@byu.net>
754         Fix large diversion corner cases, including 1.4.8 regression.
755         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
756         (make_room_for): Use NULL, not 0, for pointers.
757         (insert_diversion_helper): Avoid using rewind.
758         (freeze_diversions): Allow freezing large diversions.
759         * NEWS: Document this fix.
761         Also run gnulib unit tests during make check.
762         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
763         --tests-base=tests --with-tests'.
764         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
765         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
767 2007-05-25  Eric Blake  <ebb9@byu.net>
769         Backport prompts in examples from head.
770         * src/macro.c (expand_macro): Shorten message.
771         * doc/m4.texinfo (Manual, Command line files, Comments)
772         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
773         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
774         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
775         (Using frozen files, Improved forloop, Improved foreach): Add
776         prompts to examples.
777         * checks/get-them: Ignore prompts in examples.
779         Fix sync line interaction with multiline comments.
780         * doc/m4.texinfo (Other Incompatibilities): Add example, and
781         document bug in --syncline/divert interaction.
782         (Preprocessor features): Augment test.
783         * src/m4.h (output_text): Export.
784         (shipout_text, next_token): Add parameter.
785         * src/freeze.c (reload_frozen_state): Don't interfere with
786         synclines when reloading state.
787         * src/output.c (output_text): Export.
788         (shipout_text): Take new parameter for start line of token.
789         Output at most one syncline per token.
790         * src/input.c (next_token): Report line where multiline tokens
791         start.
792         * src/macro.c (expand_input, expand_token, expand_argument):
793         Adjust callers so that line is passed from input to output.
794         * NEWS: Document this fix.
795         Reported by Sergey Poznyakoff.
797         Test -s in testsuite.
798         * doc/m4.texinfo (Preprocessor features): Add a test.
799         * checks/get-them: Support extra options in testsuite.
800         * checks/check-them (examples): Use extra options.
801         * THANKS: Update.
802         Reported by Sergey Poznyakoff.
804 2007-05-24  Eric Blake  <ebb9@byu.net>
806         Support POSIX flush semantics on all platforms.
807         * m4/gnulib-cache.m4: Remove closeout, and augment with
808         'gnulib-tool --import closein fflush'.
809         * src/m4.h (includes): Use closein, not closeout.
810         * src/m4.c (main): Ensure stdin is flushed when not all input is
811         consumed.
812         (process_file): No return needed.
813         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
814         than excluding mingw.
815         * NEWS: Document this change.
817         Work around cygwin and mingw fseeko bugs.
818         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
819         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
821 2007-04-25  Eric Blake  <ebb9@byu.net>
823         Fix negative division within eval, regression of 2007-01-06.
824         * doc/m4.texinfo (Eval): Catch this bug.
825         * src/eval.c (mult_term): Fix it.
826         * NEWS: Document this.
827         * THANKS: Update.
828         Reported by Cesar Strauss.
830 2007-04-23  Eric Blake  <ebb9@byu.net>
832         Start 1.4.9a.
833         * configure.ac (AC_INIT): Bump version number.
834         * NEWS: Start changes since 1.4.9.
836 2007-03-23  Eric Blake  <ebb9@byu.net>
838         Release 1.4.9:
839         * configure.ac (AC_INIT): Bump version number.
840         * NEWS: Describe changes since 1.4.8b.
842 2007-03-16  Eric Blake  <ebb9@byu.net>
844         * doc/m4.texinfo (Mkstemp): Tweak wording.
845         * src/output.c (output_init): Adjust to latest gnulib.
847 2007-03-15  Eric Blake  <ebb9@byu.net>
849         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
850         long long, it confuses gnulib).
851         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
852         if unsigned long long doesn't work.
853         * THANKS: Update.
854         Reported by Matthew Woehlke.
856 2007-03-07  Eric Blake  <ebb9@byu.net>
858         * AUTHORS: Update.
859         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
861 2007-03-01  Eric Blake  <ebb9@byu.net>
863         * doc/m4.texinfo: Pick up more index entries from head.  Follow
864         more texinfo recommendations.
865         (Sysval): Improve tests.
867         Avoid overfull \vbox warning from texinfo, due to indices that
868         weren't quite big enough to split across page boundaries.
869         * doc/m4.texinfo: Add lots of concept index entries.
870         (Concept Index): Move to be last, as recommended by texinfo
871         manual.
872         (Define, Arguments, Pseudo Arguments): Add more function entries.
874 2007-02-28  Eric Blake  <ebb9@byu.net>
876         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
877         137.
878         (Pseudo Arguments): Add useful example.
880         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
881         reflect POSIX XCU ERN 118.
883         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
884         * src/m4.c (usage): ...here,...
885         * src/builtin.c (set_macro_sequence): ...and here.
886         (define_user_macro): Fix typo.
887         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
888         inaccuracies.
889         (Shift): Document composite macro argn for portably getting at
890         positional parameters beyond 9.
891         * configure.ac (AC_INIT): Bump version number.
892         * NEWS: Start changes of 1.4.8c.
894 2007-02-24  Eric Blake  <ebb9@byu.net>
896         Beta Release 1.4.8b:
897         * configure.ac (AC_INIT): Bump version number.
898         * NEWS: Describe changes since 1.4.8.
900         Reserve all uses of raw ${} in macro definitions, not just
901         ${<digit>}.
902         * src/builtin.c (set_macro_sequence): Change default macro
903         sequence.
904         * doc/m4.texinfo (Operation modes): Update to match.
905         * src/m4.c (usage): Likewise.
906         * NEWS: Likewise.
908 2007-02-23  Eric Blake  <ebb9@byu.net>
910         * src/m4.h (includes): Update to latest gnulib.
912 2007-02-08  Eric Blake  <ebb9@byu.net>
914         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
915         more flexible, and so that autoconf can use it.
916         * src/m4.h (set_macro_sequence, free_macro_sequence): New
917         prototypes.
918         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
919         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
920         New variables and functions.
921         (define_user_macro): Allow flexibility in regular expression used
922         to trigger warning.
923         * src/m4.c (warn_syntax): Delete.
924         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
925         spelling of option, along with optional argument.
926         * doc/m4.texinfo (Operation modes, Arguments): Document this
927         change.
928         * NEWS: Document this change.
930 2007-02-05  Eric Blake  <ebb9@byu.net>
932         * m4/gnulib-cache.m4: Module strstr no longer exists.
934         Avoid bool bitfields, as they don't work on AIX.
935         * src/m4.h (bool_bitfield): New typedef.
936         (struct symbol, struct builtin): Use it.
937         * src/input.c (struct input_block): Likewise.
938         Reported by Albert Chin.
940         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
941         Reported by Albert Chin.
942         * THANKS: Update.
944 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
946         * doc/m4.texinfo (Input processing): Further clarifications.
948 2007-02-03  Eric Blake  <ebb9@byu.net>
950         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
951         the examples.
952         Reported by Bruno Haible.
954 2007-02-01  Eric Blake  <ebb9@byu.net>
956         * src/m4.c (fatal_warnings): New variable.
957         (usage): Document new -E behavior.
958         (main): Make -E an additive option.
959         (m4_error, m4_error_at_line): Change exit status when required.
960         * NEWS: Document this change.
961         * doc/m4.texinfo (Operation modes): Likewise.
962         Reported by Ralf Wildenhues.
964 2007-01-27  Eric Blake  <ebb9@byu.net>
966         * src/m4.h (warn_syntax): Declare.
967         (init_pattern_buffer): Export.
968         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
969         (long_options, main): Implement new option.
970         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
971         (define_user_macro): Warn on $11 and ${1} if requested.
972         * src/input.c (init_pattern_buffer): Delete duplicate method.
973         * doc/m4.texinfo (Operation modes): Document it.
974         (Arguments): Document future direction of ${11} vs. $11.
975         (Incompatibilities): Fix wording on POSIX limitations.
976         * checks/get-them: Parse @{ and @} correctly.
977         * NEWS: Document this change.
979 2007-01-26  Eric Blake  <ebb9@byu.net>
981         * src/builtin.c (includes): Adjust to gnulib changes.
983 2007-01-15  Eric Blake  <ebb9@byu.net>
985         * doc/m4.texinfo: Pull in various improvements from head.
986         * src/builtin.c (include): Alter exit status on failure.
987         * NEWS: Document this fix.
989 2007-01-13  Eric Blake  <ebb9@byu.net>
991         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
992         assume the fallback of ss_base for BSDI 4.0.1.
993         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
994         ! HAVE_STACK_T_SS_SP]: Use this check.
995         Reported by Chris McGuire.
996         * THANKS: Update.
997         * NEWS: Document the improvement.
999 2007-01-09  Eric Blake  <ebb9@byu.net>
1001         * src/eval.c (ASSIGN): New enumerator.
1002         (eval_lex): Recognize '='.
1003         (equality_term): Treat '=' like '==', but warn that it is
1004         deprecated.
1005         * doc/m4.texinfo (Eval): Document and test this.
1006         (Incompatibilities): Document the POSIX incompatibility.
1007         * NEWS: Document this change.
1009 2007-01-06  Eric Blake  <ebb9@byu.net>
1011         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
1012         * checks/check-them: Record expected exit status.
1013         * checks/get-them: Check exit status.
1014         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
1015         instead.
1016         * src/builtin.c: All users changed.
1017         * src/eval.c: Likewise.  Also document where we are triggering
1018         undefined or implementation-defined behavior.
1019         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
1020         (logical_or_term, logical_and_term, logical_not_term, not_term)
1021         (equality_term, unary_term): Port from head to follow POSIX
1022         semantics.
1023         (exp_term): Reject 0**0 as undefined.
1024         * doc/m4.texinfo (History): Mention 1.4.9.
1025         (Format, Incompatibilities): Update to document POSIX compliance.
1026         * NEWS: Document this change.
1028 2007-01-04  Eric Blake  <ebb9@byu.net>
1030         * NEWS: Document previous fix.
1031         * THANKS: Update.
1033 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
1035         Fix Debian bug 405594, introduced 2006-11-01 from a bad
1036         copy-n-paste from head.
1037         * src/m4.c (main): Use correct file name after --.
1039 2007-01-04  Eric Blake  <ebb9@byu.net>
1041         Fix regression from 1.4.7 in large file handling on some
1042         platforms, introduced on 2006-10-13.
1043         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
1044         will be handled.
1045         * NEWS: Document this fix.
1047 2007-01-03  Eric Blake  <ebb9@byu.net>
1049         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1050         version-etc-fsf'.
1051         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
1052         it bumps the copyright year).
1054 2006-12-27  Eric Blake  <ebb9@byu.net>
1056         * doc/m4.texinfo (Patsubst): Fix typo.
1058 2006-12-16  Eric Blake  <ebb9@byu.net>
1060         * src/m4.c (main): Check for errors when closing stdin.
1062 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1064         * doc/m4.texinfo: Fix some typos.
1066 2006-12-09  Eric Blake  <ebb9@byu.net>
1068         * configure.ac (AC_INIT): Bump version number.
1069         * NEWS: Start changes of 1.4.8a.
1071 2006-11-20  Eric Blake  <ebb9@byu.net>
1073         Release 1.4.8:
1074         * configure.ac (AC_INIT): Bump version number.
1075         * NEWS: Describe changes since 1.4.7.
1077 2006-11-16  Eric Blake  <ebb9@byu.net>
1079         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
1080         Minor tweaks noticed while porting to head.
1082 2006-11-14  Eric Blake  <ebb9@byu.net>
1084         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
1085         spent iterators.
1086         (m4_tmpname): Avoid memory leak.
1088 2006-11-13  Eric Blake  <ebb9@byu.net>
1090         * src/output.c (cleanup_tmpfile): Avoid double error message when
1091         umask is prohibitive.
1092         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
1093         functions.
1094         (m4_tmpfile): Add parameter, move cloexec action here.
1095         (make_room_for): Adjust caller.  Don't keep too many files open.
1096         (insert_diversion_helper): Unlink emptied temp files.
1097         (make_diversion): Don't keep too many files open.
1098         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
1099         descriptors are no longer a limiting factor.
1100         * NEWS: Document this change.
1102         Backport sparse diversion handling from head.
1103         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1104         avltree-oset'.
1105         * src/output.c (struct m4_diversion): Rename from struct
1106         diversion, and update members.  All users changed.
1107         (diversion_table): Change to an ordered set, instead of an array.
1108         (div0): New storage for diversion 0.
1109         (diversions): No longer needed.
1110         (free_list): New list to allow recycling diversion storage.
1111         (diversion_storage): New storage to reduce malloc overhead.
1112         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
1113         (output_init, output_exit, cleanup_tmpfile, make_room_for)
1114         (make_diversion): Handle new diversion storage scheme.
1115         (insert_diversion_helper): New function.
1116         (insert_diversion, undivert_all, freeze_diversions): Use it.
1117         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
1118         exhaustion to visible test of large diversion numbers.
1119         * NEWS: Document this fix.
1121 2006-11-11  Eric Blake  <ebb9@byu.net>
1123         * src/builtin.c (m4_translit): Slight optimization.
1125         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
1127         * src/builtin.c: Remove unnecessary casts.
1128         (expand_ranges): Make 8-bit clean.
1129         * doc/m4.texinfo (Translit): Add tests and wording.
1130         * NEWS: Document this fix.
1132 2006-11-07  Eric Blake  <ebb9@byu.net>
1134         * src/m4.h (output_exit): New prototype.
1135         * src/m4.c (main): Use it.
1136         * src/output.c (cleanup_tmpfile): Close files before removing
1137         directory.
1138         (insert_diversion): Check for failure.
1139         (output_exit): Avoid memory leak.
1140         * doc/m4.texinfo (Diversions): Test this bug.
1142         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
1144 2006-11-01  Eric Blake  <ebb9@byu.net>
1146         Allow C++ compilation on Linux, as a safety measure in type
1147         checking.
1148         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1149         stdbool'.
1150         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
1151         (boolean): Kill this, and use stdbool.h instead.
1152         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
1153         * src/output.c, src/symtab.c: All users changed.
1154         * src/symtab.c (hack_all_symbols): Update prototype.
1155         * src/builtin.c (dump_symbol, set_trace): Update signature.
1156         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
1157         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
1158         C++ compilation.
1159         * src/debug.c (trace_flush): Likewise.
1160         * src/freeze.c (reload_frozen_state): Likewise.
1161         * src/input.c (push_file, push_string_finish, push_wrapup):
1162         (token_bottom, next_token): Likewise.
1163         * src/m4.c (main): Likewise.
1165         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
1166         draft wording.
1167         * src/m4.h (m4_path_search): Tweak signature.
1168         * src/path.c (m4_path_search): Likewise.
1169         * src/builtin.c (include): Update caller.
1170         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
1171         with file names.  Don't write to **argv.
1172         (process_file): New helper method.
1173         * NEWS: Document this fix.
1175 2006-10-31  Eric Blake  <ebb9@byu.net>
1177         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
1178         * doc/m4.texinfo (Translit): Improve the documentation.
1179         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
1180         algorithm.
1181         (m4_index): Simplify, and speed up slightly.
1182         * NEWS: Document this fix.
1184 2006-10-28  Eric Blake  <ebb9@byu.net>
1186         * src/input.c (set_quotes): Don't allow empty end-quote with
1187         non-empty start-quote.
1188         (set_comment): Likewise for end-comment.
1189         * src/builtin.c (m4_changecom): Adjust caller.
1190         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
1191         match behavior.
1192         (Incompatibilities): Document another POSIX bug.
1193         * NEWS: Mention this change.
1195 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1197         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
1198         files.
1200 2006-10-26  Eric Blake  <ebb9@byu.net>
1202         Silence -Wwrite-strings -Wpointer-arith warnings.
1203         * src/builtin.c (define_user_macro): Allow NULL argument.
1204         (m4_builtin, m4_indir): Cast away const of "".
1205         * src/format.c (format): Likewise.
1206         * src/macro.c (collect_arguments): Likewise.
1207         (expand_macro): Avoid math on void*.
1208         * src/m4.c (main): Adjust caller.
1209         * src/output.c (freeze_diversions): Detect off_t overflow.
1211         * src/input.c (pop_input): Remove unnecessary code.
1213 2006-10-25  Eric Blake  <ebb9@byu.net>
1215         * src/symtab.c (symtab_init): Avoid size_t overflow.
1216         * src/output.c (make_diversion): Avoid size_t overflow.
1217         * doc/m4.texinfo (Diversions): Test this fix.
1218         * src/input.c (input_block): Remove unused member.  Reduce size
1219         of struct.
1220         (push_file, pop_input): Avoid useless assignment.
1221         * NEWS: Document the bug fix.
1223         Redo location tracking.  Instead of having just files track the
1224         line to return to when popping input, now all input blocks track
1225         their current line.
1226         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
1227         needed.
1228         (input_block): Have line and file storage for all input types, and
1229         rename some members.
1230         (input_change): New global flag.
1231         (push_file, push_macro, push_string_init, push_wrapup): Store
1232         location.
1233         (push_string_finish, pop_input, pop_wrapup): Notice changes in
1234         input blocks.
1235         (peek_input): Adjust to new member names.
1236         (next_char, next_char1): Adjust location if needed.
1237         (skip_line): Simplify restoring location.
1238         * doc/m4.texinfo (Location): Augment the test to catch line
1239         location of expansion of multi-line arguments.
1240         Reported by Stepan Kasal.
1242 2006-10-23  Eric Blake  <ebb9@byu.net>
1244         * doc/m4.texinfo (Macro Arguments): Document that leading space
1245         in argument collection stops at macro expansion.
1246         (Incompatibilities): Document POSIX whitespace wording issue.
1248 2006-10-20  Eric Blake  <ebb9@byu.net>
1250         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
1251         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
1252         end of a TeX line splits incorrectly.
1253         (Foreach, Improved foreach): Write these sections, borrowing ideas
1254         from CVS head and from m4sugar.
1255         * checks/get-them: Accomodate new way to show trailing space in
1256         examples.
1257         * examples/foreach.m4: Make usable in documentation.
1258         * examples/foreachq.m4: New file.
1259         * examples/foreachq2.m4: New file.
1260         * examples/foreach2.m4: New file.
1261         * NEWS: Document the documentation updates.
1263 2006-10-19  Eric Blake  <ebb9@byu.net>
1265         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
1266         (m4_maketemp): Provide traditional behavior.
1267         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
1268         new `mkstemp' macro and the flaws of the old `maketemp'.
1269         (Incompatibilities): Move maketemp discussion to...
1270         (Extensions): ...here, since -G now supresses the GNU extension.
1271         * NEWS: Document this.
1273         * examples/forloop.m4: Simplify.
1274         * examples/forloop2.m4: New file.
1275         * examples/quote.m4: New file.
1276         * doc/m4.texinfo (Loops): Rename to...
1277         (Shift): ...this node.
1278         (Forloop, Foreach, Improved forloop, Improved foreach): New
1279         nodes.
1281 2006-10-17  Eric Blake  <ebb9@byu.net>
1283         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
1284         config-h'.
1285         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
1286         gnulib headers, rather than in top directory.
1287         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
1288         output clutter.
1290 2006-10-16  Eric Blake  <ebb9@byu.net>
1292         * doc/m4.texinfo: Backport some minor cleanups from head.
1293         (Cleardivert): Rename from cleardiv.
1295         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
1296         a section of Preliminaries.
1297         (Operation modes, Preprocessor features, Limits control)
1298         (Frozen state, Debugging options, Command line files): Subdivide
1299         into new sections.
1300         (Input processing, Quoting Arguments, Define, Arguments)
1301         (Cleardiv, Format, M4exit): Fix grammar of references.
1302         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
1303         (Debug Levels, Debug Output, Include, Search Path, Divert)
1304         (Platform macros, Syscmd, Location, Extensions): Point to new
1305         sections.
1306         (Top, Loops, Include, Undivert, Location, Incompatibilities):
1307         Improve file references.
1309 2006-10-14  Eric Blake  <ebb9@byu.net>
1311         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
1312         is not portable.
1313         Reported by Ralf Wildenhues.
1315         * src/builtin.c (m4_undivert): Check for read error.
1317 2006-10-13  Eric Blake  <ebb9@byu.net>
1319         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
1320         header files are included, since <unistd.h> can affect the tests.
1321         * THANKS: Updated.
1322         Reported by Martin Koeppe.
1324         Backport head's usage of clean-temp module, as it is cleaner than
1325         using tmpfile-safer.
1326         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1327         clean-temp closeout', and remove tmpfile-safer.
1328         * src/m4.h (includes): Adjust.
1329         (m4_path_search): Rename from path_search, to avoid collision
1330         with gnulib.
1331         * src/m4.c (main): Install closeout handler.  Adjust caller.
1332         (usage): Now done by closeout module.
1333         * src/builtin.c (m4_m4exit): Likewise.
1334         (m4_undivert, include): Adjust callers.
1335         * src/freeze.c (reload_frozen_state): Likewise.
1336         * src/path.c (m4_path_search): Rename from path_search.
1337         * src/output.c (output_temp_dir): New variable.
1338         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
1339         (insert_diversion, make_room_for): Use them.
1340         * doc/m4.texinfo (Diversions): Document this, and add a test.
1341         (Improved fatal_error): Fix typo.
1342         (Maketemp): Port test to mingw, and no longer hide from
1343         documentation.
1344         * NEWS: Document the change in TMPDIR behavior.
1346         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
1347         macros, to work with recent gnulib-tool update.
1349         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
1350         handling of defn results.
1351         * doc/m4.texinfo (Builtin, Indir): Add test cases.
1352         * NEWS: Document this.
1354 2006-10-12  Eric Blake  <ebb9@byu.net>
1356         * doc/m4.texinfo (Location): Fix typo in previous commit.
1357         (Changeword): Catch one more case.
1358         * src/input.c (skip_line): Fix case when outer file used macro to
1359         supply the \n.
1361 2006-10-11  Eric Blake  <ebb9@byu.net>
1363         * src/input.c (enum input_type): Add additional types, to shave
1364         time off the common case.
1365         (push_wrapup): Wrapped strings remember location.
1366         (push_string_finish): Normal strings carry no location.
1367         (push_file): Start new files uninitialized.
1368         (peek_input, next_char_1): Optimize common cases by updating
1369         location only on new input types.
1370         (pop_input): Update to honor new input types.
1371         (skip_line, push_string_finish): Fix regression in previous patch
1372         when dnl is not followed by newline in included file.
1373         (push_string_init): Initialize all fields of INPUT_STRING sooner.
1374         (peek_token): Simplify.
1375         (peek_input): Don't pop input files on peek, so that __file__ and
1376         __line__ as last token of include file work correctly.
1377         * doc/m4.texinfo (History): Mention 1.4.8.
1378         (Answers): Split into sections, one per answer.
1379         (Improved exch, Improved cleardivert, Improved fatal_error): New
1380         nodes.
1381         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
1382         new m4wrap location semantics.
1383         (Changeword): Add test that caught the regression.
1384         * NEWS: Document this.
1386         * src/macro.c (expand_macro): In macro expansion errors, report
1387         line number at open parenthesis.
1388         * src/input.c (next_token): Fix off-by-one bug in reporting end
1389         of file in unterminated comment and string.
1390         (file_names): New obstack, necessary since expand_macro now hangs
1391         on to file names longer than the files remain open.
1392         (input_init): Initialize new obstack.
1393         (push_file): Use new obstack.  Delay updates to current_file
1394         until after expand_macro has restored state.
1395         (peek_input, next_char_1): Update current_file if necessary.
1396         (pop_wrapup): Release memory.
1397         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
1398         the off-by-one bug.
1399         (Dnl): Update to the new location reporting rules.
1400         * NEWS: Document these changes.
1402 2006-10-10  Eric Blake  <ebb9@byu.net>
1404         * src/macro.c (argc_stack, argv_stack): New variables for sharing
1405         obstacks across multiple macro calls.
1406         (expand_input): Initialize and tear down stack once per input
1407         file, instead of once per macro.
1408         (expand_macro): Reuse existing stacks when possible.
1409         (collect_arguments): Simplify slightly.
1411         * src/path.c (include_env_init): Fix botched patch application.
1412         Reported by Ralf Wildenhues.
1414 2006-10-09  Eric Blake  <ebb9@byu.net>
1416         * src/m4.c (usage, main): Detect write failures to stderr.
1417         * src/builtin.c (m4_m4exit): Likewise.
1418         * NEWS: Document this.
1420         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
1421         the limit.
1422         * NEWS: Document this.
1423         * doc/m4.texinfo (Invoking m4): Likewise.
1425 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1427         * src/path.c (include_env_init): Copy the string returned
1428         by getenv before overwriting it; POSIX disallows this.
1430 2006-10-09  Eric Blake  <ebb9@byu.net>
1432         * src/m4.c (main): Defer debugfile until after --help.
1433         * configure.ac (AC_INIT): Bump version number.
1434         * NEWS: Start changes of 1.4.7a.
1436 2006-09-25  Eric Blake  <ebb9@byu.net>
1438         Release 1.4.7:
1439         * configure.ac (AC_INIT): Bump version number.
1440         * NEWS: Describe changes since 1.4.6.
1442 2006-09-21  Eric Blake  <ebb9@byu.net>
1444         * doc/m4.texinfo (Invoking m4): Add clarification on option
1445         processing behavior.
1446         * THANKS: Update.
1447         Reported by Mikhail Teterin.
1449         * bootstrap: Add --force option, based on idea from coreutils.
1450         * README: Document that ./bootstrap and autoreconf are for
1451         developers, and not lightly done in tarballs.
1453 2006-09-20  Eric Blake  <ebb9@byu.net>
1455         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
1456         deprecation warning on -e.
1457         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
1458         * NEWS: Document this.
1460 2006-09-19  Eric Blake  <ebb9@byu.net>
1462         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
1463         -o/--error-output to --debugfile, and deprecate the former.  This
1464         will allow a future release to be more consistent with other GNU
1465         tools, with -o/--output affecting stdout, not debug.
1466         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
1467         * NEWS: Document this.
1469 2006-09-14  Eric Blake  <ebb9@byu.net>
1471         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
1472         --diversions. `m4 --help --version' now displays help, not
1473         version.
1474         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
1475         smaller scope.
1476         (show_help, show_version): No longer needed.
1477         (long_options, DIVERSIONS_OPTION): Backport patch from head to
1478         distinguish between -N and --diversions in warning.
1479         * doc/m4.texinfo (Invoking m4): Document this.
1480         * NEWS: Likewise.
1482 2006-09-11  Eric Blake  <ebb9@byu.net>
1484         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
1485         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
1486         seekable.
1487         (debug_set_file): Use STDOUT_FILENO.
1488         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
1489         with POSIX in regards to unread input.
1490         * NEWS: Document this fix.
1491         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
1493 2006-09-07  Eric Blake  <ebb9@byu.net>
1495         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
1496         * src/m4.h (push_file): Change prototype.
1497         * src/input.c (push_file, peek_input, next_char_1): Only call getc
1498         once at EOF, to avoid double ^D on terminal stdin; regression from
1499         2006-09-04.
1500         (push_file, pop_file): Allow reading stdin twice.
1501         * src/m4.c (main): Likewise.
1502         * src/builtin.c (include): Update caller.
1503         * NEWS: Document this change.
1504         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
1505         (Syscmd): Add a test that failed before this patch.
1507 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1509         * checks/check-them: Quote $pwd.
1511 2006-09-05  Eric Blake  <ebb9@byu.net>
1513         * src/builtin.c (define_macro): Warn on invalid macro name.
1514         * NEWS: Document this change.
1515         * doc/m4.texinfo: Fix typos.
1516         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
1517         (Ifelse): Backport some improvements from head.
1519 2006-09-04  Eric Blake  <ebb9@byu.net>
1521         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
1522         native echo is braindead.
1523         * checks/check-them (strip_needed): Ignore \r in output.  Now the
1524         testsuite will pass when cross-compiling from cygwin to mingw.
1526         * src/input.c (peek_input): Fix regression in handling macro
1527         without arguments as last token in file; debian bug 385720.
1528         (next_token): Always consume an input character.
1529         Reported by Andreas Schultz.
1530         * configure.ac (AC_INIT): Bump version number.
1531         * NEWS: Document this fix.
1532         * doc/m4.texinfo (History): Mention next version.
1533         (Changeword): Add example that exposes this bug.
1534         * THANKS: Update.
1536 2006-08-25  Eric Blake  <ebb9@byu.net>
1538         Release 1.4.6:
1539         * configure.ac (AC_INIT): Bump version number.
1540         * NEWS: Describe changes since 1.4.5.
1542         * Makefile.maint (web-manual): Give up on VPATH build during
1543         distribution.  But distributions are made so infrequently that
1544         this is not too much of a hardship.
1545         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1546         exists.
1548 2006-08-24  Eric Blake  <ebb9@byu.net>
1550         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1551         Solaris, produce output on just one argument.
1552         (m4_regexp, m4_patsubst): For consistency, do likewise.
1553         (m4_patsubst): Allow zero-length match at end of string.
1554         * doc/m4.texinfo (Sysval): Fix overfull hbox.
1555         (Bugs, Macro Arguments): Minor fixes.
1556         (Other tokens): Rearrange node order.
1557         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1558         * NEWS: Document these fixes.
1560 2006-08-22  Eric Blake  <ebb9@byu.net>
1562         * src/input.c (pop_input): Avoid empty filename with -di option.
1563         * src/debug.c (debug_message_prefix): Put space before message.
1565         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1567         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1568         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1570         * checks/check-them: State why a test is skipped.
1571         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1573         * ChangeLog: Add copyright.
1574         * AUTHORS: Likewise.
1575         * BACKLOG: Likewise.
1576         * README: Likewise.
1577         * THANKS: Likewise.
1578         * TODO: Likewise.
1579         * examples/COPYING: New file, add copyright for all the examples.
1580         * checks/get-them: Put copyright on testsuite files.
1582 2006-08-18  Eric Blake  <ebb9@byu.net>
1584         Don't let unrelated child processes see too many files.
1585         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1586         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1587         spelling in error message.
1588         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1589         (debug_set_output): Close debug file on exec.
1590         * src/m4.h (includes): Add cloexec.h.
1591         * src/output.c (make_room_for): Close diversions on exec.
1592         * src/path.c (path_search): Close include files on exec.
1593         * NEWS: Document this.
1595         Regular expressions were leaking memory.
1596         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1597         helper methods.
1598         (m4_regexp, m4_patsubst): Avoid memory leak.
1599         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1600         static.
1601         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
1602         from O(n^2) to O(n) for calculating word_start.
1603         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1604         O(1) bitmap, not O(n) search string.
1605         * NEWS: Document this fix.
1607 2006-08-17  Eric Blake  <ebb9@byu.net>
1609         * NEWS: Document previous checkin.
1611         * src/builtin.c (substitute): Avoid core dump when accessing
1612         beyond bound of regular expression.
1613         Reported by Karl Nelson.
1614         * doc/m4.texinfo (Regexp): Add example that causes core dump on
1615         some architectures prior to this patch.
1616         * THANKS: Updated.
1618 2006-08-16  Eric Blake  <ebb9@byu.net>
1620         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1621         clear that dumpdef does not always go to stderr.
1623         * src/builtin.c (m4_errprint): Flush buffers before printing to
1624         stderr.
1625         * THANKS: Updated.
1627 2006-08-15  Eric Blake  <ebb9@byu.net>
1629         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1630         per debian bug 96075.
1631         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1632         (Changeword): Don't use shift as an example of a swallowed word.
1633         (Divert): Discuss fact that divert is an English word.
1634         Reported by Richard A Nelson.
1636 2006-08-14  Eric Blake  <ebb9@byu.net>
1638         * doc/m4.texinfo (Invoking m4): Minor fixes.
1640 2006-08-12  Eric Blake  <ebb9@byu.net>
1642         * doc/m4.texinfo (Arguments): Hint at better exch macro.
1643         (Answers): Provide a better definition.
1645 2006-08-09  Eric Blake  <ebb9@byu.net>
1647         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1648         yet understand locales.
1649         * NEWS: Fix wording of a few items.
1651 2006-08-08  Eric Blake  <ebb9@byu.net>
1653         Avoid printing `NONE:0:' in error messages.
1654         * src/m4.h (m4_error_at_line): New function.
1655         * src/m4.c (m4_error_at_line): Implement.
1656         * src/input.c (skip_line, input_init, next_token): Use "", not
1657         "NONE", for no file, since NONE can be a real file name.
1658         * src/macro.c (expand_argument): Likewise.
1659         * src/debug.c (debug_message_prefix, trace_header): Check for
1660         current file.
1661         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1662         (Location): Document that synclines and internal message format
1663         are not impacted by redefining these macros.
1664         (M4exit): Hint at bug in fatal_error.
1665         (Answers): Provide workaround to match m4 output.
1667         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1668         * src/m4.h (m4_error): New function.
1669         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1670         error module deficiencies.
1671         (reference_error, suppress_line): No longer needed.
1672         * src/m4.c (m4_error): Implement.
1673         (main): No longer need to install error callback.
1675 2006-08-04  Eric Blake  <ebb9@byu.net>
1677         * src/m4.h (program_name): Declare.
1678         (suppress_line): New variable.
1679         (M4ERROR_AT_LINE): New macro.
1680         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1681         for error message format.
1682         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1683         * src/macro.c (expand_argument): Likewise.
1684         * checks/check-them (examples): Adjust to new message format.
1685         * src/builtin.c (m4___program__): New builtin.
1686         * doc/m4.texinfo (Location): Split from Errprint into new node,
1687         and document __program__.
1688         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1689         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1690         format.
1691         (Extensions): Document __program__.
1692         * NEWS: Document this change.
1694 2006-08-03  Eric Blake  <ebb9@byu.net>
1696         Don't confuse leading `(' in comment or quote with start of
1697         argument collection.
1698         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1699         TOKEN_CLOSE.
1700         (peek_input): Make private to input.c.
1701         (peek_token): New prototype.
1702         * src/input.c (default_word_regexp): Reduce ifdefs.
1703         (peek_input): Make static.
1704         (next_token): Return new token types.
1705         (match_input, MATCH): Add argument consume, which controls
1706         whether match should be pushed back.
1707         (peek_token): New function.
1708         (token_type_string) [DEBUG_INPUT]: New function.
1709         * src/macro.c (expand_token, expand_argument, collect_arguments):
1710         Handle new token types.
1711         * doc/m4.texinfo (Changequote, Changecom): Document this.
1712         * NEWS: Document this.
1714         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1716         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1717         overflow detection when sigstack exists but is not implemented.
1718         Fixes debian bug 154053.
1719         * THANKS: Updated.
1720         Reported by David Perlin.
1722 2006-08-02  Eric Blake  <ebb9@byu.net>
1724         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1725         close.
1727 2006-08-01  Eric Blake  <ebb9@byu.net>
1729         * src/input.c (skip_line, next_token): Remember current file in
1730         case input file ends abruptly.  Addresses debian bug 175365.
1731         (pop_input): Defer freeing storage that holds previous file
1732         name...
1733         (pop_wrapup): to here, after error message is issued.
1734         * src/macro.c (expand_argument): Remember current file in case
1735         input file ends abruptly.
1736         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1737         (M4wrap): Adjust testsuite accordingly.
1738         (Errprint): Document line number limitation of m4wrap.
1739         * NEWS: Document this fix.
1740         * THANKS: Update.
1742 2006-07-31  Eric Blake  <ebb9@byu.net>
1744         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1745         clean; fixes debian bug 311378.
1746         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1747         (Changequote, Changecom): Add examples to test this.
1748         * NEWS: Document this fix.
1749         * THANKS: Update.
1750         Reported by Steven Augart.
1752         * doc/m4.texinfo: Whitespace fix.
1753         * checks/get-them: Avoid exceeding 14-char file name limit.
1754         * THANKS: Update.
1756 2006-07-30  Eric Blake  <ebb9@byu.net>
1758         * src/path.c (path_search): Detect allocation failure.
1760         Use native free when it is good enough.
1761         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1762         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1763         Adjust calls.
1764         * src/symtab.c (free_symbol): Likewise.
1765         * src/m4.c (xfree, main): Likewise.
1766         * src/m4.h (obstack_chunk_free): Likewise.
1767         * src/path.c (path_search): Likewise.
1768         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1770         * doc/m4.texinfo (Errprint): Add example for last patch.
1771         * checks/check-them: Account for VPATH in latest example.
1773 2006-07-29  Eric Blake  <ebb9@byu.net>
1775         * src/path.c (path_search): Add result parameter, so that
1776         -I can be accounted for.  Debian bug 53685.
1777         * src/m4.h (path_search): Update prototype.
1778         * src/m4.c (main): Adjust callers.
1779         * src/freeze.c (reload_frozen_state): Likewise.
1780         * src/builtin.c (include, m4_undivert): Likewise.
1781         * NEWS: Document this change.
1782         Reported by Nicolas Lichtmaier.
1784 2006-07-28  Eric Blake  <ebb9@byu.net>
1786         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1787         several non-GNU makes.
1788         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1789         * src/m4.h: Likewise.
1790         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1791         /usr/ccs/bin/ucbcc.
1793 2006-07-27  Eric Blake  <ebb9@byu.net>
1795         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1796         (History): Update for 1.4.6.
1798         * src/m4.h (_): Remove K&R cruft.
1799         * src/builtin.c: Likewise.
1800         * src/debug.c: Likewise.
1801         * src/eval.c: Likewise.
1802         * src/macro.c: Likewise.
1803         * src/stackovf.c: Likewise.
1805         * doc/Makefile.am (m4.1): Improve man page.
1806         * src/m4.c (usage): Improve --help output, including adding the
1807         bug reporting address.
1808         (main): Follow GNU Coding Standards for --version output.
1810 2006-07-26  Eric Blake  <ebb9@byu.net>
1812         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1813         end-comment consistently, to match POSIX.
1815         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1816         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1817         (Incompatibilities): Document incompatibility of changecom
1818         vs. macro names, and of EOF in include.
1819         * src/input.c (next_token): Reject unterminated comments at EOF.
1820         (skip_line): Warn on unterminated dnl at EOF.
1821         * NEWS: Document these changes.
1823 2006-07-25  Eric Blake  <ebb9@byu.net>
1825         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1826         stdio-safer into fopen-safer and tmpfile-safer.
1827         * src/m4.c: Remove redundant include.
1829 2006-07-24  Eric Blake  <ebb9@byu.net>
1831         Fix bugs related to stream handling.
1832         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1833         unlocked-io stdio-safer stdlib-safer close-stream.
1834         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1835         provided by gnulib if needed.
1836         * src/output.c [! HAVE_TMPFILE]: Likewise.
1837         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1838         their safer counterparts.
1839         (retcode): New global variable.
1840         * src/input.c (pop_input): Check for read failure.
1841         * src/freeze.c (reload_frozen_state): Likewise.
1842         (produce_frozen_state): Check for write failure.
1843         * src/debug.c (debug_set_file): Likewise.
1844         * src/m4.c (usage, main): Likewise.
1845         (retcode): Make global.
1846         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1847         status is non-zero except when everything succeeds.
1848         * doc/m4.texinfo (M4exit): Document these changes.
1849         (Incompatibilities): Remove documentation of bug now fixed.
1850         * NEWS: Document these fixes.
1852 2006-07-22  Eric Blake  <ebb9@byu.net>
1854         * src/format.c (format): Avoid compiler warning that str may be
1855         used uninitialized.
1857 2006-07-21  Eric Blake  <ebb9@byu.net>
1859         * src/m4.h [UNIX]: Add more platforms that are close enough to
1860         categorize as UNIX, but which don't predefine __unix__.
1861         Reported by Nelson H. F. Beebe.
1863 2006-07-20  Eric Blake  <ebb9@byu.net>
1865         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1866         to explicitly ask for --assume-autoconf=2.60.
1868 2006-07-19  Eric Blake  <ebb9@byu.net>
1870         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1871         and exits normally with 129.
1872         Reported by Nelson H. F. Beebe.
1873         * THANKS: Update.
1875         * src/m4.h (EXIT_MISMATCH): Define.
1876         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1877         exiting with status 63.
1878         * src/m4.c (usage): Document this.
1879         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1880         * NEWS: Likewise.
1882         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1883         back-cover texts.
1885 2006-07-17  Eric Blake  <ebb9@byu.net>
1887         * src/format.c (format): Support F, g, and G specifiers.
1888         * doc/m4.texinfo (Format): Document this.
1889         * NEWS: Document this addition.
1891         * doc/m4.texinfo (Builtin): Delete redundant text.
1893         * configure.ac (AC_INIT): Bump version number.
1894         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1895         * NEWS: Document this fix.
1897 2006-07-15  Eric Blake  <ebb9@byu.net>
1899         Release 1.4.5:
1900         * configure.ac (AC_INIT): Bump version number.
1901         * NEWS: Describe changes since 1.4.4.
1903         * src/m4.c (usage): Document exit status.
1904         * doc/m4.texinfo: Use `exit status', not `exit code'.
1905         (Invoking m4): Document exit status.
1907         * bootstrap: Backport --help, --version from head.
1908         (func_update): New function, for easily grabbing up-to-date files
1909         from gnulib.
1910         * Makefile.maint (web-manual): Fix for VPATH builds.
1912 2006-07-14  Eric Blake  <ebb9@byu.net>
1914         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1915         looks bad in info.  Use @deffn rather than @example for
1916         describing prototypes.  Fix awkward wording and grammar.
1918         * src/builtin.c (substitute): Warn on bad escape sequences.
1919         Ignore trailing backslash.
1920         * doc/m4.texinfo (Regexp): Add documentation for this.
1921         * NEWS: Document this change.
1923         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1924         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1925         more examples.
1926         (Dnl): Update example to show side effects.
1927         * checks/get-them: Generate three digit test names.
1928         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1930 2006-07-13  Eric Blake  <ebb9@byu.net>
1932         * src/input.c (input_init): Simplify.
1933         (set_word_regexp): Treat empty string as default, since empty
1934         regexp would disable word parsing.
1935         * src/m4.c (user_word_regexp): Default to empty string.
1936         * src/builtin.c (builtin_tab): Make changeword blind.
1937         * doc/m4.texinfo (Changeword): Document this.
1938         * NEWS: Document this.
1939         * TODO: Knock off completed items.
1941         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1942         just the first.
1943         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1944         * NEWS: Document this change.
1946         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1947         warning.  Detect quoted leading space and overflow as warnings.
1948         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1949         Treat width as minimum number of digits, as required by POSIX.
1950         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1951         arguments.
1952         (m4_substr): Likewise.  Silently treat empty start as 0.
1953         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1954         * src/eval.c (eval_lex): Parse radix 1 numbers.
1955         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1956         one type of warning.
1957         (Manual): Document behavior of numeric parsing of empty string.
1958         (Divert, Incr): Document error handling.
1959         (Eval): Document radices better.
1960         (Incompatibilities): Document translit incompatibility.
1961         * NEWS: Document these changes.
1963         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1964         (web-manual): Simplify.
1965         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1966         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1967         (MAINTAINERCLEANFILES): Clean it as well.
1968         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1969         (MAINTAINERCLEANFILES): Clean it as well.
1971 2006-07-12  Eric Blake  <ebb9@byu.net>
1973         * doc/m4.texinfo (Extensions): Document how to overcome
1974         implementation difference in > 9 positional parameters.
1976         * src/m4.c (usage): Sort within sections.
1977         (nesting_limit): Raise default from 250 to 1024.
1978         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1979         standard.  Use @option where appropriate.
1980         (Invoking m4): Sort to match --help output.
1981         (Debug Levels): Sort.
1982         (Frozen files): Sort and break into two nodes.
1984         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1985         * NEWS: Document raised -L limit.
1987 2006-07-11  Eric Blake  <ebb9@byu.net>
1989         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1990         stress-test changeword before a release.
1991         * doc/m4.texinfo: More doc cleanups.
1992         (Copying This Manual): New node; actually include the FDL in the
1993         documentation.
1994         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1995         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1996         * NEWS: Mention documentation improvements.
1998         * src/m4.h (OS2): New platform macro.
1999         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
2000         platform macro.
2001         * doc/m4.texinfo (Platform macros): Document it.
2002         (Sysval): Remove non-portable test of system("").
2003         * NEWS: Document this change.
2004         Reported by Andreas Buening.
2006 2006-07-09  Eric Blake  <ebb9@byu.net>
2008         * doc/m4.texinfo (Undivert): Fix typo in last commit.
2009         * src/m4.c (usage): Document M4PATH.
2010         * src/path.c (path_search): Reject empty string.
2011         * src/output.c (insert_diversion): Ignore diversion 0.
2012         * src/builtin.c (m4_undivert): Ignore empty string.
2013         * NEWS: Document this fix.
2015 2006-07-08  Eric Blake  <ebb9@byu.net>
2017         * checks/get-them: Make filtering easier.
2018         * checks/check-them: Filter non-input lines, so line counts are
2019         more realistic in the documentation, and so changeword tests work
2020         even when dnl is disabled.
2021         * doc/m4.texinfo: Adjust example line numbers.  Clean up
2022         front-matter, following autoconf's example.
2023         (Changeword): Enable tests, skipping if changeword not supported.
2024         (Define, Defn, Ifelse): Backport more examples from head.
2025         (Input processing, Answers): New nodes, backported from head.
2026         (Include): Expand test to cover empty filename.
2027         (Undivert): Add test of undivert(0).
2029 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2031         * doc/m4.texinfo: Fix spelling errors.
2033 2006-07-07  Eric Blake  <ebb9@byu.net>
2035         * THANKS: Update.
2037         * doc/Makefile.am (m4.1): No need to go through a temporary file;
2038         this also ensures timestamps are updated.
2039         * src/m4.h (includes): Require config.h.  Assume string.h,
2040         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
2041         than prototyping ourselves.
2042         (builtin_func): Add parameter type-checking.
2043         (voidstar): Delete, now that we assume C89.
2044         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
2045         voidstar changed.
2046         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
2047         xfree.
2049 2006-07-06  Eric Blake  <ebb9@byu.net>
2051         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2052         binary-io.
2053         * src/m4.h (includes): Add binary-io.h for O_BINARY.
2054         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
2055         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
2056         * NEWS: Mention this fix.
2058         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
2059         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
2061         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
2062         runs first when needed.
2063         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
2064         once in srcdir rather than multiple times in VPATH builds.
2066 2006-07-03  Eric Blake  <ebb9@byu.net>
2068         * checks/check-them: Use portable = in test.
2069         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
2070         directory, as required by Solaris cc.  Include built headers, as
2071         required by Solaris make in VPATH build.
2072         * checks/Makefile.in: Use $(srcdir) where needed.
2073         (CHECKS): Factor $(srcdir) into macro.
2074         (DISTFILES): Likewise.  Automake takes care of distributing
2075         Makefile.in.
2076         (dist): Simplify.
2077         (Makefile): Use modern syntax of config.status.
2078         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
2079         Avoid overfull and underfull hboxes in dvi.
2081         Fix 'make check' in VPATH build.  All files included by testsuite
2082         now live in a single directory.  Use forloop.m4 in testsuite.
2083         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
2084         here...
2085         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
2086         here.
2087         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
2088         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
2089         * checks/check-them: Avoid s/// when filename is in pattern.
2090         * examples/forloop.m4: Fix to match documentation.
2091         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
2092         new locations.
2093         (Loops, Format): Actually use forloop.m4 in tests.
2095 2006-07-02  Eric Blake  <ebb9@byu.net>
2097         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
2098         $(bindir) works in installcheck.
2099         (check, installcheck): No longer change directory, so that
2100         distcheck works with a read-only builddir.
2101         * checks/check-them: Work when pwd is no longer builddir.
2103 2006-07-01  Eric Blake  <ebb9@byu.net>
2105         * GNUmakefile: New file, borrowed from coreutils.
2106         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
2107         * Makefile.maint (Makefile): Delete this rule, now that
2108         GNUmakefile includes Makefile.
2110 2006-06-30  Eric Blake  <ebb9@byu.net>
2112         For compatibility with other m4 implementations, sysval returns
2113         signal<<8 rather than 0 if syscmd is terminated by a signal.
2114         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
2115         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
2116         not provide wait macros.
2117         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
2118         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
2119         (m4_esyscmd): Set sysval to -1 on failure.
2120         (m4_sysval): Print 127 on failure, and accomodate signals if they
2121         are detectable.
2122         * NEWS: Document this change.
2123         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
2124         last commit.
2125         * checks/check-them: Likewise.
2126         * src/debug.c (debug_set_file): Work around mingw fstat bug.
2128         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
2129         * src/freeze.c (produce_frozen_state): Use new spelling of
2130         platform macro.
2131         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
2132         platforms.
2133         (m4_syscmd, m4_esyscmd): The empty command is successful.
2134         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
2135         Document platform-dependence of system().
2136         (Syscmd): Add example.
2137         (Esyscmd): Make example more robust, and actually demonstrate
2138         rescanning.
2139         (Sysval): Expand test to cover esyscmd code path, and to check
2140         that empty command is successful.  Add conditional check for
2141         signal behavior.
2142         (Other Incompatibilities): Move platform macros from here...
2143         (Platform macros): ...to this new node.  Add windows macro.
2144         Check that exactly one platform macro is provided.
2145         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
2146         .exe in error messages.  Allow for skipping checks.
2147         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
2148         * NEWS: Document platform macros.
2150 2006-06-29  Eric Blake  <ebb9@byu.net>
2152         Fix buffer overrun bug.
2153         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2154         xvasprintf.
2155         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
2156         variant instead, since [efg]cvt are obsolete and our use of them
2157         was buggy (savannah sr #104303).
2158         (format): Fix buffer overflow by using xasprintf.
2159         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
2160         * NEWS: Document this fix.
2162         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
2163         cross-compilation.
2164         (AC_CACHE_CHECK): Cache search for ecvt.
2166 2006-06-27  Eric Blake  <ebb9@byu.net>
2168         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
2169         required by POSIX, and add example that exposed core dump on x86
2170         architectures.
2171         (Incompatibilities): Document incompatibility in eval precedence.
2172         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
2173         behavior.
2174         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
2175         * NEWS: Document this change.
2177         * doc/m4.texinfo: Use @noindent consistently.
2178         (Quoting Arguments): Document that unquoted parentheses group
2179         arguments.
2180         (Pseudo Arguments): Expand tests to show this.
2181         (Incompatibilities): Contrast traditional behavior of
2182         changequote.
2184 2006-06-24  Eric Blake  <ebb9@byu.net>
2186         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
2187         (AC_CHECK_HEADERS_ONCE): Use this new feature.
2188         (AC_CHECK_FUNCS_ONCE): Likewise.
2190 2006-06-23  Eric Blake  <ebb9@byu.net>
2192         * doc/m4.texinfo: Quoting cleanup throughout - follow
2193         autoconf-recommended style of one level of quote per parenthesis
2194         in the normal case.  Adjust error messages to match GNU coding
2195         standards (and to allow 'make check' to pass again).
2196         (Quoted strings, Inhibiting Invocation): Turn more examples into
2197         tests.
2198         (Comments): Resolve FIXME by adding example.
2199         (Define): Add example about underquoting.
2200         (Defn): Add example about use of $0.
2201         (Indir, Format): Resolve FIXME done in last commit.
2202         (Ifelse): Add example about creating blind macro.
2203         (Debugging): Fix grammar.
2204         (Dnl): Add example about dnl with arguments.
2205         (M4wrap): Be explicit that LIFO order is non compliant, and will
2206         change in m4 2.0.
2207         (Undivert): Resolve FIXME by adding example.
2208         (Frozen files): Document that m4wrap and sysval will not work
2209         consistently until m4 2.0.
2210         (Incompatibilities): Document another POSIX compliance bug, this
2211         time with changequote.  Document a traditional incompatibility
2212         with partial input spanning file boundaries.
2214         Make error messages more consistent with GNU coding standards -
2215         start with lower case, and don't end sentence with punctuation.
2216         * src/debug.c (trace_pre): Update message wording.
2217         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
2218         Likewise.
2219         * src/freeze.c (produce_frozen_state, issue_expect_message),
2220         (reload_frozen_state): Likewise.
2221         * src/input.c (push_string_init, pop_init, init_macro_token),
2222         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
2223         * src/m4.c (stackovf_handler, main): Likewise.
2224         * src/macro.c (expand_token, expand_argument, call_macro),
2225         (expand_macro): Likewise.
2226         * src/output.c (make_room_for, output_text, insert_file),
2227         (freeze_diversions): Likewise.
2228         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
2230         * src/builtin.c (builtin_tab): Make format and indir blind.
2231         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
2232         * NEWS: Mention the change to builtins.
2234 2006-06-22  Eric Blake  <ebb9@byu.net>
2236         Robustify frozen file format.
2237         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
2238         macro.  Require V first, and only accept it once.  For F, use
2239         placeholder if builtin is not found, rather than warning.
2240         * src/m4.h (m4_placeholder): New prototype.
2241         * src/builtin.c: Unify error message style.
2242         (m4_placeholder): New function, warn if invoked.
2243         (builtin_tab): Add m4_placeholder.
2244         (m4_defn): Warn if placeholder is encountered.
2245         (find_builtin_by_addr): Handle placeholder.
2246         (find_builtin_by_name): Return placeholder on failure.
2247         (m4_builtin): Treat placeholder as undefined.
2248         * doc/m4.texinfo (Frozen files): Document changes in V and F.
2249         * NEWS: Document this change.
2250         Reported by Bruno Haible.
2252         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
2253         (tabchar): New macro, so that 'make check' still works.
2254         (Invoking m4): Document that ignored compatibility options -B, -S,
2255         and -T each consume an argument.
2256         * checks/get-them: Honor @tabchar{}.
2258         Avoid compiler warnings during -DDEBUG.
2259         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
2260         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
2261         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
2262         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
2263         (next_token) [DEBUG_INPUT]: Print before returning.
2264         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
2265         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
2267         Avoid mkstemp bugs on various platforms.
2268         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
2269         * src/output.c [! HAVE_MKSTEMP]: Delete.
2270         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
2271         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
2272         * NEWS: Document this.
2274         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
2275         Reported by Bruno Haible.
2277 2006-06-21  Eric Blake  <ebb9@byu.net>
2279         Avoid obsolete sigstack when POSIX sigaltstack is available.
2280         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
2281         do likewise.
2282         * configure.ac (AC_CHECK_HEADERS): Likewise.
2283         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
2284         obsolete and most hosts now have it in signal.h.
2285         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
2286         (AC_CACHE_CHECK): Cache decision to use stackovf.
2287         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
2288         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
2289         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
2290         simplify later code.
2291         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
2292         in case of dereferencing a member of a NULL pointer.
2293         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
2294         POSIX handler.
2295         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
2296         EXIT_FAILURE in error, indent preprocessor directives.
2297         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
2298         siginfo.h.
2299         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
2300         Reported by Santiago Vila.
2302 2006-06-19  Eric Blake  <ebb9@byu.net>
2304         * THANKS: Update.
2306 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
2308         * checks/Makefile.in (PATH_SEPARATOR): New macro.
2309         (check, installcheck): Use it, for OS/2.
2311 2006-06-18  Eric Blake  <ebb9@byu.net>
2313         Consistently use "GNU M4" as package name, "m4" as executable
2314         name.
2315         * NEWS: Document previous fix.
2316         * THANKS: Update.
2317         * README: Fix grammar.  Document that --enable-changeword is on
2318         its last leg.
2319         * doc/m4.texinfo (Top, Changeword): Likewise.
2320         (Sysval): Enhance this test.
2321         (History): Backport this section from CVS head, and update.
2323 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
2324             Eric Blake  <ebb9@byu.net>
2326         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
2327         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
2328         big-endian and little-endian wait status definitions.
2329         (m4_sysval): Use WEXITSTATUS.
2330         Reported by Andreas Buening.
2332 2006-06-18  Eric Blake  <ebb9@byu.net>
2334         * configure.ac (AC_INIT): Bump version number.
2335         * NEWS: Describe changes in 1.4.4c.
2337 2006-06-17  Eric Blake  <ebb9@byu.net>
2339         Beta Release 1.4.4b:
2340         * configure.ac (AC_INIT): Bump version number.
2341         * NEWS: Describe changes since 1.4.4.
2342         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
2344         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
2345         bootstrap.
2346         * checks/Makefile.in (maintainer-clean): Add missing target.
2347         * COPYING: Remove generated file from CVS.
2349 2006-06-16  Eric Blake  <ebb9@byu.net>
2351         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
2353 2006-06-15  Eric Blake  <ebb9@byu.net>
2355         * checks/wrapfifo.m4: New file.  Use it...
2356         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
2357         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
2359         * src/m4.h (to_uchar): New function.
2360         * src/eval.c (eval_lex): Use it to avoid passing signed char to
2361         isdigit, isalpha, isupper, islower, isspace, isalnum.
2362         * src/builtin.c (expand_user_macro): Likewise.
2363         * src/format.c (format): Likewise.
2364         * src/macro.c (expand_argument): Likewise.
2365         * NEWS: Document this security fix.
2367         Message cleanup.
2368         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
2369         * src/freeze.c (reload_frozen_state): Fix typo in message.
2370         (produce_frozen_state): Standardize on builtin, not built-in.
2371         * src/builtin.c (numeric_arg, bad_argc): Likewise.
2373         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
2374         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
2375         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
2376         gnulib.
2377         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
2378         * m4/gnulib-cache.m4: New file, from gnulib.
2379         * bootstrap: Invoke gnulib-tool --update.
2380         * src/m4.c (main): Cast away const.
2381         * NEWS: Document that regex is updated.
2382         * THANKS: Update.
2384 2006-06-08  Eric Blake  <ebb9@byu.net>
2386         * configure.ac (changeword): Work even when changeword is not a
2387         macro.
2388         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
2389         Delete; now done by automake.
2390         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
2392 2006-06-07  Eric Blake  <ebb9@byu.net>
2394         * lib/regex.c (bcmp_translate): Canonicalize type name.
2395         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
2396         * configure.ac (changeword): Disable changeword for the creation
2397         of configure, in case of bootstrapping with an m4 configured with
2398         --enable-changeword.
2400         Distribute a rudimentary man page.
2401         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
2402         can feed help2man.
2403         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
2404         (SUFFIXES, m4.1): New macros and rules to build m4.1.
2406 2006-06-06  Eric Blake  <ebb9@byu.net>
2408         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
2409         compiler warnings at -O2.
2410         * lib/getopt.c (_getopt_internal): Likewise.
2412         Cleanup of previous patches.
2413         * src/input.c (struct input_block): Remove traced member.
2414         (push_macro, init_macro_token): Don't pass trace status around.
2415         * src/m4.h (struct token_data): Remove traced member.
2416         (struct symbol, struct builtin): Reduce unused space.
2417         (TOKEN_DATA_FUNC): Simplify.
2418         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
2419         (push_macro, define_builtin): Remove unused parameter.
2420         * src/builtin.c (define_builtin, builtin_init, define_macro),
2421         (m4_defn): Don't pass trace status around.
2422         * src/macro.c (expand_argument): Likewise.
2423         * src/freeze.c (reload_frozen_state): Likewise.
2424         * src/symtab.c: Whitespace cleanup.
2425         * NEWS: Clean up wording.
2426         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
2427         ensure tests actually expose bugs prior to today's patches.
2429         Trace status of builtins is no longer inherited across
2430         define(...,defn(...)).  Fixes bug that autom4te had been working
2431         around.
2432         * src/builtin.c (define_builtin): Don't override trace status.
2433         * doc/m4.texinfo (Trace): Add test for this.
2434         * NEWS: Document this.
2436         When changing macro definitions inside the arguments to the macro,
2437         consistently preserve the old definition that was in effect before
2438         argument collection, similar to the C pre-processor.
2439         Reported by John Brzustowski.
2440         * NEWS: Document this change.
2441         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
2442         this policy, and add tests that expose core dumps prior to this
2443         patch.
2444         * src/m4.h (struct symbol): New members to track when a symbol is
2445         still in use after removal from the symbol table.
2446         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
2447         (free_symbol): Prototype.
2448         * src/macro.c (expand_macro): Track pending expansions of a
2449         symbol.  On completion, if a symbol is deleted and no longer
2450         pending, free its memory.
2451         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
2452         is still in use.
2453         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
2454         is still in use.
2455         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
2456         in use as deleted and remove from the table without freeing
2457         memory.
2458         (symtab_print_list) [DEBUG_SYM]: More debug output.
2460         * src/symtab.c (hack_all_symbols): Allow certain modifications of
2461         the symbol table during traversal.
2462         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
2463         SYMBOL_POPDEF, since only the latter is safe with
2464         hack_all_symbols.
2466         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
2467         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
2468         Preserve placeholder when macro is being traced.
2469         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
2470         symbol is not defined.
2471         (set_trace): Remove placeholder when no longer traced.
2472         (m4_traceon): On named traces, always reserve a slot in the
2473         symbol table.
2474         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
2475         * NEWS: Document new trace behavior.
2476         * doc/m4.texinfo (Trace): Tracing by name now consistently works
2477         no matter whether that macro is currently defined.
2478         (Incompatibilities): Document differences between traditional and
2479         GNU trace.
2481 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2482             Eric Blake  <ebb9@byu.net>
2484         * src/m4.h (hash_table_size): Now size_t instead of int.
2485         * src/m4.c (hash_table_size): Likewise.
2486         (main): Adjust to this; use atol rather than atoi.
2487         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
2488         (symtab_init, lookup_symbol, hack_all_symbols):
2489         Use size_t for sizes and indexes, not int.
2490         (symtab_print_list) [DEBUG_SYM]: Likewise.
2491         (hash): Likewise.  Don't case-fold in the hash function.
2492         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
2493         Don't assume hash word is 32 bits.
2494         * NEWS: Document this change.
2496 2006-06-04  Eric Blake  <ebb9@byu.net>
2498         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
2499         to allow compilation, for use in debugger.
2500         (profiles, current_mode) [DEBUG_SYM]: New variables.
2501         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
2502         determining hash table performance.
2504 2006-05-31  Eric Blake  <ebb9@byu.net>
2505             John Brzustowski  <jbrzusto@fastmail.fm>
2507         * src/input.c (input_stack): Delete; use current_input instead.
2508         (wrapup_stack): Dynamically allocate, so that recursion is handled
2509         properly.
2510         (push_wrapup): Use current wrapup stack.
2511         (pop_wrapup): Rotate wrapup stack to current, and create new
2512         wrapup stack.
2513         (input_init): Dynamically allocate stacks.
2514         * NEWS: Update, now that recursive m4wrap can no longer cause
2515         core dump.
2517 2006-05-31  Eric Blake  <ebb9@byu.net>
2519         * lib/getopt.c: Fix copyright year.
2520         * lib/obstack.c: Ditto.
2521         * src/builtin.c: Ditto.
2523 2006-05-30  Eric Blake  <ebb9@byu.net>
2525         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2526         Reported by John Brzustowski.
2527         (Incompatibilities): Document known POSIX incompatibilities.
2528         * THANKS: Update.
2530 2006-05-29  Eric Blake  <ebb9@byu.net>
2532         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2533         in read-only dir.
2535         Use automake.
2536         * Makefile.am: New file.
2537         * doc/Makefile.am: Ditto.
2538         * examples/Makefile.am: Ditto.
2539         * lib/Makefile.am: Ditto.
2540         * src/Makefile.am: Ditto.
2541         * acinclude.m4: New file, renamed from aclocal.m4.
2542         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2543         (AC_ARG_PROGRAM): Now redundant.
2544         (STACKOVF): Turn into automake conditional.
2545         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2546         * checks/Makefile.in: Converting this dir to automake was not
2547         trivial; for now, just add missing targets demanded by top-level.
2548         * INSTALL: Remove files that are now generated from CVS.
2549         * Makefile.in: Ditto.
2550         * aclocal.m4: Ditto.
2551         * install-sh: Ditto.
2552         * mkinstalldirs: Ditto.
2553         * doc/Makefile.in: Ditto.
2554         * doc/texinfo.tex: Ditto.
2555         * examples/Makefile.in: Ditto.
2556         * lib/Makefile.in: Ditto.
2557         * src/Makefile.in: Ditto.
2559         * AUTHORS: Backport from CVS head, and update.
2560         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2562 2006-05-27  Eric Blake  <ebb9@byu.net>
2564         * lib/regex.c (regex_compile): Kill compiler warnings.
2565         * lib/getopt.c: Likewise.
2566         * lib/obstack.c: Likewise.
2567         * src/builtin.c (builtin_init): Likewise.
2568         * src/path.c (path_search): Likewise.
2570         * doc/m4.texinfo: Fix usage of a vs. an.
2571         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2572         overfull hbox warnings.
2573         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2575         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
2576         quoting.
2577         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2578         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2579         assume C89.
2580         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2581         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2582         * src/Makefile.in: Delete remains of ansi2knr.
2583         * src/ansi2knr.1: Delete.
2584         * src/ansi2knr.c: Delete.
2586 2006-05-25  Eric Blake  <ebb9@byu.net>
2588         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
2589         `illegal'.
2591         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2592         Reported by Karl Berry.
2594 2006-05-24  Eric Blake  <ebb9@byu.net>
2596         * Makefile.in (html): New target.
2597         * doc/Makefile.in (html, m4.html): Likewise.
2598         (MAKEINFOHTML): New macro.
2599         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2600         rendering.
2601         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2602         absolute URL.
2603         Reported by Bob Badour.
2605         * THANKS: Update.  Move reporter's email addresses here, instead
2606         of in ChangeLog.
2608 2006-05-11  Eric Blake  <ebb9@byu.net>
2610         * THANKS: Update.
2611         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2612         patched on 2005-12-04.
2613         Reported by Ilya N. Golubev.
2615         * bootstrap: New file, so that generated files need not be stored
2616         in CVS.
2617         * Makefile.in (DISTFILES): Add bootstrap.
2619         Make testsuite less sensitive to doc changes.
2620         * doc/m4.texinfo: Use m4.input instead of filename.
2621         * checks/check-them (xerr): Turn m4.input into filename.
2622         * checks/Makefile.in (dist): Depend on stamp-checks.
2624         Portability updates for OS/2.
2625         * src/Makefile.in (EXEEXT, OBJEXT): Define.
2626         (LINK): Use CFLAGS.
2627         (.c.obj): Define.
2628         * lib/Makefile.in (OBJEXT): Define.
2629         (.c.obj): Define.
2630         * doc/Makefile.in (install, uninstall): Install info files into
2631         the dir listing.
2632         Reported by Andreas Buening.
2634 2006-05-09  Eric Blake  <ebb9@byu.net>
2636         * install-sh: Update to newer upstream version.
2637         * mkinstalldirs: Likewise.
2638         Reported by Andreas Buening.
2640         * src/m4.c (main): Bump copyright year.
2641         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2642         * doc/Makefile.in (datarootdir): Likewise.
2644 2006-05-08  Eric Blake  <ebb9@byu.net>
2646         * THANKS: Update.
2647         * doc/m4.texinfo (Bugs): Backport bug email address from head.
2648         Reported by Stepan Kasal.
2650 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
2652         * input.c (match_input): Do not pass expression with side effect
2653         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
2654         * NEWS: Updated.
2656 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2658         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2659         Reported by Damian Menscher.
2661 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2663         * configure.ac (AC_INIT): Bump to 1.4.4a.
2665 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2667         Release 1.4.4:
2668         * configure.ac (AC_INIT): Bump to 1.4.4.
2669         * NEWS: Describe 1.4.4's changes.
2670         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2672 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2674         * src/m4.c: fix return code when non-existent files are processed
2676 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2678         * README: update email address for bug reports.
2680 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2682         * doc/m4.info: Generated files are not kept in the repository.
2684 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2686         The FSF are moving offices today.  Changed their contact address
2687         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2688         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2690         Also, some of the files here were never updated from the previous
2691         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2692         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2694 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2696         * Makefile.in (bindir, infodir): Substitute from configure rather
2697         than hardcode.
2698         * doc/Makefile.in (infodir): Ditto.
2699         * src/Makefile.in (bindir): Ditto.
2700         * NEWS: Updated.
2702 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2704         Changes needed to automate the release process for 1.4.3:
2706         * Makefile.in (dist): Make .tar.bz2 tarball too.
2707         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2708         (cvs-news): Look 1 line further down for NEWS release number.
2709         (cvs-dist): We don't use automake, so make dist is fine.
2710         Remove double . before suffixes.
2711         (cvs-release): Don't mention manual.html.
2712         (fetch): Get latest gendocs files.
2713         (web-manual): Rewritten to use gendoc for multiformat manuals.
2714         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2715         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2716         preserving, but case insensitive, so generating html docs per node
2717         clashes between Index.html, the node file, and index.html, the
2718         top-level of the document tree...
2719         (Index macro): ...so renamed to this.  Changed all references.
2721 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2723         * configure.ac (AC_INIT): Bump to 1.4.3a.
2725 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2727         Release 1.4.3:
2728         * configure.in (AC_INIT): Bump to 1.4.3.
2729         * NEWS: Describe 1.4.3's changes.
2731 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2733         * Makefile.maint: New file with release rules, from CVS libtool.
2734         * Makefile.in (DISTFILES): Add Makefile.maint.
2735         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2736         canonical versions.
2738 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2740         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2741         checks/47.patsubst, with a redundant @comment to prevent emacs
2742         from removing it accidentally again.
2743         * checks/get-them: Allow for trailing spaces tucked behind
2744         @comment marks.
2746 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2748         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2749         * src/Makefile.in (install, uninstall): Likewise.
2751 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2753         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2754         on Cygwin.
2755         Reported by Eric Blake.
2757 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2759         * lib/regex.c, lib/regex.h: Updated from gnulib.
2760         * src/input.c (set_word_regexp):  Don't change the word_regexp
2761         unless it compiles correctly.
2762         * NEWS: Updated.
2763         Reported by Frank Schwidom.
2765         * Makefile.in (stamp-h): Regenerate config.h properly.
2767 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2769         * configure.ac (AC_DEFINE): Fix overquoting of description
2770         argument.
2772         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2773         recognition macros.
2774         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2775         on Windows, so that the frozen file reader will work.
2776         Reported by Josef T. Burger.
2778         * src/m4.c (main): Modernise the --version output.
2780 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2782         Modernise the configury a little to prevent spurious errors from
2783         Autoconf-2.59's autoreconf:
2785         * config.h.in: Renamed to...
2786         * config-h.in: ...this to better support DOS 8.3 file systems.
2787         * acconfig.h: Removed.
2788         * configure.in: Renamed to...
2789         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2790         entry comments.  Slight reorganisation and reformatting.
2791         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2792         entry comments.
2793         (AC_INIT): Use a modern 3 argument call.
2794         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2795         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2796         s/PRODUCT/PACKAGE/g.
2797         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2798         config.h.in.  Added configure.ac, config-h.in.
2799         (stamp-h.in): Removed acconfig.h from dependencies.
2800         (configure): Depends on configure.ac, not configure.in.
2801         * doc/Makefile.in (stamp-vti): Ditto.
2802         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2803         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2804         * configure: Regenerated.
2806 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2808         * src/output.c (mkstemp): Make non-static, and build regardless of
2809         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2810         * NEWS: Update.
2812 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2814         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2815         changes from your editor buffer first.
2817         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2818         * src/m4.c: And include them as appropriate.
2819         * NEWS: Updated.
2821 2004-09-09  Andreas Schwab  <schwab@suse.de>
2823         Refactoring of the string read case in next_char provides about a
2824         20% speedup of M4 as typically used by autoconf:
2826         * src/input.c (next_char_1): Renamed from next_char.
2827         (next_char): New macro.
2828         * NEWS: Updated.
2830 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2832         * configure.in (VERSION): Bump to 1.4.2a.
2834 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2836         Release 1.4.2.
2837         * configure.in (VERSION): Bump to 1.4.2.
2838         * News: Describe 1.4.2's changes.
2840         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2841         relies on this.
2842         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2843         (m4_maketemp): Clear errno before calling mkstemp.
2844         * src/path.c (path_search): Don't let "free" trash errno when
2845         returning NULL.
2846         * src/output.c (insert_file): Don't assume errno has a valid
2847         value simply because fread returns zero.  This fixes a
2848         portability bug reported by Marion Hakanson in
2849         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2851 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2853         * configure.in (VERSION): Bump to 1.4.1a.
2854         * NEWS: Place holder for next stable release.
2856 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2858         Release 1.4.1.
2859         * configure.in (VERSION): Bump to 1.4.1.
2860         * NEWS: Describe 1.4.1's changes.
2862         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2863         pacify Autoconf 2.59.
2865         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2866         to pacify Texinfo 4.7.
2867         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2869         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2870         pacify Sun C compilers.
2872 2003-09-28  Akim Demaille  <akim@epita.fr>
2874         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2875         botch.
2877 2003-09-03  Santiago Vila  <sanvila@debian.org>
2879         * examples/stackovf.sh: Use tempfile if available.
2881 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2883         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2884         * src/output.c (m4_insert_file): Do not mix buffered and
2885         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2887 2001-02-01  Santiago Vila  <sanvila@debian.org>
2889         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2890         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2892 2001-02-01  Matt Kraai  <kraai@debian.org>
2894         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2895         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2896         empty file rather than to a nonexistent file.  This closes a common
2897         security hole.
2898         * src/builtin.c (m4_maketemp): Implement the above, by using
2899         mkstemp rather than mktemp.  (trivial change)
2901 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2903         * src/builtin.c (expand_ranges): Added break after trailing dash.
2904         This caused misbehaviors on some systems.
2906 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2908         Release 1.4.
2909         * doc/Makefile.in (realclean): Also remove stamp-vti.
2910         Reported by Eric Backus.
2912 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2914         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2915         be opened, return immediately after producing the error message.
2916         Reported by Andreas Schwab.
2918         * configure.in: Check for const only after having found possible
2919         ANSIfying compiler flags, this is of no use to check it before.
2920         Reported by Alexander Lehmann.
2922 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2924         * src/macro.c (collect_arguments): Cast obstack arguments to
2925         (voidstar), so avoiding compiler warnings.
2926         Reported by Joseph E. Sacco.
2928         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2929         (int) so they correspond to %d format items.
2930         Reported by Joseph E. Sacco.
2932         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2933         * src/symtab.c (free_symbol): Idem.
2934         Reported by Karl Vogel.
2936 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2938         * Makefile.in (DISTFILES): Distribute BACKLOG.
2940         * configure.in: Define PRODUCT and VERSION.
2941         * acconfig.h: Document PRODUCT and VERSION.
2942         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2943         constant string m4 and variable or parameter named version.
2945 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2947         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2948         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2949         defines __STDC__ to 0, for indicating it is *not* ANSI!
2950         Reported by Kaveh R. Ghazi.
2952         * configure.in: Added obsolescent tests for AIX and Minix.
2954         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2955         which texclean does not exist anymore.
2956         Reported by Eric Backus, Jim Meyering, John David Anglin and
2957         Joseph E. Sacco.
2959 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2961         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2962         Reported by John David Anglin.
2964         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2965         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2966         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2967         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2968         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2969         of $U, put underline in extensions rather than in basenames.  Use
2970         implicit rules, now that regularity makes this possible.
2971         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2972         of ansi2knr whenever it is needed.
2973         * configure.in: Adjusted for correct STACKOVF substitution.
2974         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2975         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2976         Reported by David MacKenzie.
2978         * Makefile.in: Remove binprefix.  Use transform_name instead.
2979         Reported by David MacKenzie.
2981         * doc/Makefile.in: Create version.texi, use it, clean it.
2982         Reported by Jim Meyering.
2984 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2986         * Makefile.in (all, install, uninstall): Depend on Makefile.
2988         * Makefile.in: For actions invoking $(MAKE) from within compound
2989         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2990         the top-level make may exit successfully when it should fail.
2991         Reported by Jim Kingdon.
2993         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2995         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2996         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2997         * configure.in: Substitute PRODUCT and VERSION.
2999         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
3001 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
3003         * Makefile.in (mostlyclean-local): Do not remove *~.
3004         * */Makefile.in (mostlyclean): Idem.
3005         Reported by Robert E. Brown and Richard Stallman.
3007 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
3009         * src/m4.h: Get rid of CONFIG_BROKETS.
3011 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
3013         * configure.in: Use AC_ARG_PROGRAM.
3014         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
3015         Reported by David MacKenzie.
3017 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
3019         * configure.in: Do not add -O to CFLAGS for GNU C, now that
3020         configure does it automatically.
3021         Reported by Jim Meyering.
3023 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
3025         * src/stackovf.c: Declare the handler_t typedef earlier in the
3026         code, use it for stackovf_handler.
3027         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
3028         casting sigsegv_handler.
3029         Reported by Robert Bernstein.
3031         * src/m4.c (main): Initialize program_name to argv[0] without
3032         basename'ing it.
3033         Reported by Karl Berry.
3035 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
3037         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
3038         Reported by Karl Berry.
3040 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
3042         * lib/Makefile.in (mostlyclean): Added.
3043         (TAGS): Make in $(srcdir).
3045         * configure.in: Use `choke me' in test, like everywhere!
3047         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
3048         unreacheable and useless.
3050         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
3052         * lib/Makefile.in (DISTFILES): Distribute TAGS.
3053         (distclean): Do not remove TAGS.
3054         (realclean): Remove it.
3055         * Makefile.in: Make TAGS in lib also, not just in src.
3056         Reported by Karl Berry.
3058         * Makefile.in (distclean, realclean): Instead of recursively
3059         calling $(MAKE) for the -local part, allow parallel execution of
3060         -recursive and -local, only delay the removal of config.status,
3061         which is repeated in both goals.
3063 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
3065         Release 1.3.
3066         * Makefile.in: Group all *clean-recursive goals in one, using sed
3067         to remove `-recursive' while calling make recursively.  Also, use
3068         a subshell for each recursive $(MAKE).
3069         Reported by Jim Meyering.
3071         * src/m4.h (memcpy): Define with bcopy for BSD systems.
3072         Reported by Kaveh R. Ghazi.
3074         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
3075         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
3076         specify it.
3078         * configure.in: Use date instead of touch for stamp-h.
3079         * Makefile.in (stamp-h.in): Idem.
3081         * Makefile.in (distclean, realclean): Force serial execution of
3082         both goals, in case parallel makes are being used.
3083         Reported by Jim Meyering.
3085         * src/Makefile.in (DISTFILES): Distribute TAGS.
3086         (distclean): Do not remove TAGS.
3087         (realclean): Remove it.
3088         Reported by Karl Berry.
3090 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
3092         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
3093         to old names, for following Autoconf.
3095 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
3097         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
3098         ./install.sh will not be correctly referred to in sub-Makefiles.
3099         Reported by John David Anglin.
3101         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
3102         Reported by Eric Backus.
3104         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3105         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
3106         config.status into remaking this directory's Makefile only.
3107         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
3108         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
3109         Reported by Jim Meyering.
3111 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
3113         * configure.in: Correct stack overflow detection logic, taking
3114         care of systems having only incomplete implementations (like for
3115         Pyramid 9820 OSx 5.0d).
3116         Reported by Kaveh R. Ghazi.
3118         * src/Makefile.in (TAGS): Remote -t from etags call.
3120 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
3122         * lib/Makefile.in (install): Depend on all.
3124 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
3126         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
3127         Reported by Jim Meyering and John David Anglin.
3129         * Makefile.in (distclean-local): Delete config.log.
3130         Reported by Jim Meyering.
3132         Solidify frozen files with respect to -P:
3133         * src/m4.c: Have -P set prefix_all_buitins variable instead of
3134         calling a function by that name.  Declare the variable.
3135         * src/m4.h: Adjust declaration for prefix_all_buitins.
3136         * src/builtin.c (builtin_init): Merge in functionality from
3137         previous prefix_all_buitins function, while making entries in the
3138         symbol table, but not modifying the builtin description itself.
3140         * src/freeze.c (reload_frozen_state): Add a useless `break;',
3141         because *many* compilers do not accept an empty `default:'.
3142         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
3143         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
3145         * configure.in: Use AC_TYPE_SIGNAL.
3146         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
3147         Reported by Robert Bernstein.
3149         * checks/Makefile.in (check): Modify PATH so check-them will find
3150         m4 in the src directory.
3151         * Makefile.in (check): Don't.
3152         Reported by Akiko Matsushita and Jim Meyering.
3154         * src/output.c (make_room_for, output_character_helper): New
3155         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
3156         a per buffer MAXIMUM_BUFFER_SIZE.
3158         * src/output.c (output_text): New function, for optimizing the
3159         output of strings of characters.  Use it.
3161 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
3163         * doc, src: New directories reorganizing the distribution.
3164         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
3165         files.
3166         * Makefile.in: Adjusted.
3167         * configure.in: Configure new Makefiles.
3169         * m4.h: Declare STRING typedef.  Use it for comment and quote
3170         strings, adjusting all references.  (This is the rudiments of a
3171         beginning for the eventual withdrawal of NUL terminated strings.)
3172         * output.c (shipout_text): Accept a length parameter, and use it.
3173         All callers adjusted.
3175 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
3177         * m4.h: Include <unistd.h> if it exists.
3178         * stackovf.c: Don't.
3180         Clean up for current_diversion variable:
3181         * output.c: Move current_diversion from builtin.c.
3182         * m4.h: Declare current_diversion so builtin.c can access it.
3183         * output.c (output_init, make_diversion): Initialize or update
3184         current_diversion.
3185         * builtin.c (builtin_init, m4_divert): Leave current_diversion
3186         alone.
3188         Remove limit on number of diversions:
3189         * output.c: Replace ndiversion by diversions, declare it.
3190         (output_init): Allocate only diversion 0.
3191         (make_diversion): Allocate new diversions as needed.
3192         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
3193         * m4.c: Still accept -N, but do nothing with it.
3194         Reported by David MacKenzie.
3196         Freeze diversions:
3197         * output.c (freeze_diversions): New function.
3198         * m4.h: Declare freeze_diversions.
3199         * freeze.c: Document frozen file format, revise it, call
3200         freeze_diversions to add diversions to frozen format, and code to
3201         reload them properly.
3202         * m4.c: Do not undivert automatically at end when status being
3203         frozen.  Do not call builtin_init when reloading frozen state.
3205         Speed up diversion processing:
3206         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
3207         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
3208         structure and variables, cached variables out of output_diversion,
3209         reallocate_diversion_for and OUTPUT_CHARACTER.
3210         (shipout_text, make_diversion, insert_diversion): Adapted to new
3211         structures.
3212         (insert_file): Use better buffering.
3213         Reported by David MacKenzie.
3215 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
3217         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
3218         dist works from another build directory.
3220 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
3222         * symtab.c (hack_all_symbols): Use hash_table_size instead of
3223         constant HASHMAX, for -H option to work better.
3225         * builtin.c (DECLARE): Simplify by using _ ().
3227         * freeze.c: New file.
3228         * Makefile.in: Compile it, distribute it.
3229         * m4.c: Recognize, document and process --freeze-state (-F) and
3230         --reload-state (-R) options.  Pass a true flag to builtin_init
3231         only if no reloading some state.
3232         * builtin.c (define_builtin): Remove static specifier.
3233         (find_builtin_by_name): Remove static specifier.
3234         (builtin_init): Accept and obey a flag argument.
3235         * m4.h: Add declarations for freeze.c, changes for builtin.c.
3237 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
3239         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
3240         specifier.
3242         * configure.in: Implement --with-dmalloc.
3243         * acconfig.h: Document WITH_DMALLOC.
3244         * m4.h: Add code for when WITH_DMALLOC.
3246 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
3248         * m4.c (long_options): Use "error-output", the dash was missing.
3249         Reported by Akiko Matsushita.
3251 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
3253         * m4.h: Include <sys/types.h>.
3254         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
3255         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
3256         int.
3257         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
3258         as size_t, not int.
3259         * builtin.c (dump_args): Declare len as size_t, not int.
3261         * debug.c: Prototype the forward declaration of debug_set_file.
3263         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
3264         shadowing of this variable.
3265         * output.c (insert_diversion): Idem.
3267         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
3268         (input_init): Duplicate default quote and comment strings.
3269         (set_quotes): Free previous quote strings in all cases.  Duplicate
3270         even default quote strings.
3271         (set_comment): Free previous comment strings in all cases.
3272         Duplicate even default comment strings.
3274         * configure.in: Updated for Autoconf 2.0.
3275         * Makefile.in (distclean-local): Also delete config.cache.
3277         * m4.c (usage): Reorganize the --help output by topic.  Include a
3278         description for debugging flags.
3280 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
3282         * configure.in: If sigaction is available and SA_ONSTACK defined,
3283         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
3284         defined, use sigvec.  Else don't compile stackovf.c.
3285         * stackovf.c (setup_stackovf_trap): Idem.
3286         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
3287         and Simon Leinen.
3289 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
3291         * m4.c (usage): Replace printf par fputs.
3293 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
3295         * Release 1.2
3297 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
3299         * configure.in: Check for sigaction and sigvec.  Add a new delayed
3300         check for RLIMIT_STACK, combine in the checking for getrlimit.
3301         All those things are not universally available.
3302         * stackovf.c: Split setting up the trap handler and catching
3303         signals, for better taking care of various configure outcomes.
3304         * examples/stackovf.sh: Correct a typo.
3305         Reported by Eric Backus, Jim Avera and Jim Meyering.
3307 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
3309         * ansi2knr.c: New version sent by its author, Peter Deutsch.
3311 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
3313         * Makefile.in: Modify so parallel make will not try making
3314         lib/libm4.a twice simultaneously.
3315         Reported by Jim Meyering.
3317 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
3319         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
3320         error message, for when no code possibility exists.  Even if this
3321         line is completely #ifdef'ed out, it brings a syntax error.
3322         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
3324         * Makefile.in (install): Have install depend on all too, for lib
3325         to be remade as needed.
3327         * examples/stackovf.sh: Try ksh, bsh and bash for shells
3328         providing ulimit, instead of using only ksh.
3329         Reported by Jim Avera and Joseph E. Sacco.
3331 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
3333         * Makefile.in (check): Have it depend on all instead of m4.  In
3334         this way, a change in lib will be detected and processed.
3336         * builtin.c (numeric_arg): Use strtol and verify the conversion,
3337         instead of using sscanf which stops as soon as there is a
3338         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
3339         and divert(1xyzzy) were all accepted without any warning or error
3340         messages.
3341         * m4.h: Declare strtol as long if not including stdlib.h.
3342         * configure.in: Check for limits.h, and replace strtol if missing.
3343         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
3344         * lib/strtol.c: New file, from elsewhere.
3345         Reported by Andreas Schwab.
3347 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
3349         * macro.c (expand_macro): Cast value to (boolean) prior to
3350         assigning it to traced.
3351         Reported by Tom McConnell.
3353         * Makefile.in (m4): Always make all in lib first.
3354         Reported by Jim Meyering.
3356 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
3358         * stackovf.c: Isolated OS-dependent sections; Improved portability,
3359         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
3360         handlers), and a default error message if the fault address is not
3361         available (when neither siginfo.h nor BSD sigcontext are supported).
3362         * configure.in: Changes for stackovf.h: Check for sigcontext,
3363         sigaction, sigstack, and define rlim_t as int if necessary.
3364         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
3365         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
3366         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
3368 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
3370         * configure.in: Use AC_SET_MAKE.
3371         * Makefile.in: Use @SET_MAKE@.
3372         Reported by Jim Meyering.
3374         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
3375         Reported by Ian Taylor.
3377 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
3379         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
3380         because siginfo.h is unrelated to standard headers, and siginfo.h
3381         is already checked for.
3382         Reported by Joseph E. Sacco.
3384         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
3385         PROTOTYPES.
3386         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
3387         AC_PROTOTYPES.
3389 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
3391         * builtin.c (substitute): Use \& to represent this part of the
3392         string which was matched by the whole regexp, instead of
3393         representing the whole string.  Any usage of \0 issues a warning
3394         and acts like \&, it will disappear in some subsequent release.
3396 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
3398         * m4.c: Complete prototype for forwarded declaration of usage.
3400         * input.c (init_macro_token): Correct own reference in error
3401         message.  Previous name get_macro_func was referred to instead.
3402         (next_char):  Correct own reference in error message.  Previous
3403         name advance_input was referred to instead.
3405         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
3406         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
3407         and_term, not_term, logical_not_term, cmp_term, shift_term,
3408         add_term, mult_term, exp_term, unary_term, simple_term): Add
3409         prototype to forwarded declarations.  Declare parameter v1 as
3410         eval_t * instead of int *.  Same for local variable v2 in dyadic
3411         functions.  Same for result in exp_term.
3412         * builtin.c (m4_eval): Declare value as eval_t instead of int.
3413         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
3414         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
3415         (shipout_int): Cast first argument of ntoa to eval_t.
3416         Reported by Thorsten Ohl.
3418         * macro.c: Complete the prototypes of forwarded expand_macro and
3419         expand_token.
3420         Reported by Thorsten Ohl.
3422         * m4.h: Define voidstar as void * or char * depending on __STDC__.
3423         The Ultrix 3.1 compiler cannot do much with void pointers.
3425         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
3426         * m4.c (xfree):  Replace void * by voidstar.
3427         Reported by Tom McConnell.
3429         * ansi2knr.1: New, from elsewhere.
3430         * Makefile.in (DISTFILES): Distribute ansi2knr.1
3432         * Makefile.in (stamp-h.in): Avoid running ./config.status if
3433         stamp-h does not exist yet.  This avoids running it a second time
3434         just after the initial ./configure.
3435         Reported by David MacKenzie and Tom McConnell.
3437         * m4.h: Replace the enum debug_info declaration with a series of
3438         #define's.  The Ultrix 3.1 compiler would otherwise need casting
3439         (int) to most references, when used in expressions.
3440         Reported by Tom McConnell.
3442 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
3444         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
3445         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
3446         calls the compiler.  Previously, FP_PROTOTYPES was only calling
3447         the preprocessor; by not being subject to CFLAGS, this was
3448         discouraging those flags asking for ANSI compilation.
3449         * acconfig.h: Document HAVE_PROTOTYPES.
3450         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
3451         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
3452         Reported by Eric Backus.
3454         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
3455         from the environment.  Default CFLAGS to -g if not set.
3456         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
3457         * lib/Makefile.in: Have CFLAGS substituted from configure.
3458         Reported by Eric Backus and Tom McConnell.
3460         * configure.in: m4_undefine changeword before using AC_ENABLE.
3462         * m4.h: Declare prototypes for error (for ANSI compilers only),
3463         prefix_all_builtins and reference_error.
3464         Reported by Tom McConnell.
3466         * input.c (set_word_regexp): Do not try to initialize the array
3467         test from a string, this does not work with non-ANSI compilers.
3468         Reported by Eric Backus.
3470         * Makefile.in (dist): Clean examples/ before saving it.
3471         (distclean-local): Also remove stamp-h.
3472         Reported by Eric Backus.
3474         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
3475         non ANSI compilers.
3476         Reported by Tom McConnell.
3478         * checks/Makefile.in (clean): Depends on mostlyclean.
3479         (mostlyclean): New goal.
3481 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
3483         * Makefile.in (DISTFILES): Distribute install.sh.
3484         * install.sh: New file, copied from elsewhere.
3485         Reported by Assar Westerlund and Kaveh R. Ghazi.
3487 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
3489         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
3490         * acconfig.h: Explain ENABLE_CHANGEWORD.
3492         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
3493         from code provided by Pete Chown]
3494         * m4.h: Add original_text field to u_t variant of union u.
3495         Declare TOKEN_DATA_FUNC macro.
3496         * builtin.c: Declare changeword.
3497         (m4_changeword): New function.
3498         * input.c: Include "regex.h", define variables with word regexps.
3499         (input_init): Initialize the word regexp.
3500         (set_word_regexp): New.
3501         (next_token): Declare local variables, use the previous code if
3502         default_word_regexp is true.  Else, match using a new code.  Save
3503         the original text.
3504         * macro.c (expand_token): Ship out original text if not a macro
3505         name.
3506         Reported by Krste Asanovic and Pete Chown.
3508         [These modifs all depend upon ENABLE_CHANGEWORD]
3509         * m4.h: Declare external user_word_regexp.
3510         * m4.c: Declare user_word_regexp, and initialize it from
3511         --word-regexp or -W, or NULL if not specified.
3512         * input.c: Use user_word_regexp if specified, instead of
3513         DEFAULT_WORD_REGEXP.
3515         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
3516         agree with it.
3518         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
3519         * checks/Makefile.in: Empty the suffix list.
3520         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
3522         * m4.c: Declare nesting_limit and initialize it to 250.
3523         Implement -LNUMBER or --nesting-limit=NUMBER to change its
3524         value.
3525         * m4.h: Declare nesting_limit as external.
3526         * macro.c (expand_macro): Stop execution whenever nesting limit
3527         is exceeded.
3528         Reported by Bengt Mertensson.
3530         * eval.c (evaluate): Diagnose excess characters in eval input.
3531         Things like `eval(08)' used to return 0 with no diagnostic.
3533         * m4.h: Capitalize first letter of all macro arguments in
3534         definitions.
3536         * m4.c: Declare warning_status, initialize it to 0.  Add new
3537         option -E, or --fatal-warnings, which sets warning_status to
3538         EXIT_FAILURE instead.
3539         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
3540         EXIT_FAILURE if not otherwise done by header files.
3541         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3542         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3543         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3544         argument of all M4ERROR calls.
3545         Reported by Noah Friedman.
3547         * examples/incl-test.m4: Renamed from incl_test.m4.
3548         * examples/include.m4: Include incl-test.m4 instead of
3549         incl_test.m4.
3550         * examples/multiquotes.m4: Renamed from multi-quotes.m.
3552 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
3554         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
3555         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3556         also tested it on a Sun Sparc workstation running SunOS 4.x.
3558         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3559         49.format check, abusing a `union values' argument with sprintf
3560         without selecting the proper field.  Now, save the formatting type
3561         first, delaying the fetch of the corresponding argument.
3562         Reported by Joseph E. Sacco and Tom Quinn.
3564         * format.c (format): Remove const from char *fmt declaration when
3565         not HAVE_EFGCVT, because a NUL may be forced into it.
3567         * m4.h: Declare atof() when not STDC_HEADERS.
3568         Reported by Joseph E. Sacco.
3570         * Regenerate configure using Autoconf 1.11, this corrects a
3571         problem about an incorrect cpp seting on NeXT 3.1.
3572         Reported by Alexander Lehmann.
3574 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
3576         * m4.h (_): Change argument from `x' to `Args'.
3578 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
3580         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3581         bringing more evil than good on a few systems.
3582         Reported by Greg A. Woods.
3584 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
3586         * m4.h: Rename Args() to _().
3587         * m4.h: Remove extern specifier from all function declarations.
3589 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
3591         * stackovf.c: New file implementing stack-overflow detection.
3592         * configure.in: Check for getrlimit, sigaction.  If all of
3593         standard headers, getrlimit and sigaction, define USE_STACKOVF and
3594         substitute ${U}stackovf.o for STACKOVF.
3595         * acconfig.h: Declare USE_STACKOVF.
3596         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3597         * m4.h: Declare setup_stackovf_trap().
3598         * m4.c: Call setup_stackovf_trap().
3599         * tests/stackovf_test.sh: New file.
3601 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
3603         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3605         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3607 Sun Jan 30 14:24:19 1994    (pinard at icule)
3609         * m4.h: Remove definition of volatile, not used anymore.
3610         Reported by Jim Meyering and Joseph E. Sacco.
3612         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3613         of `if ... else /* nothing */' for if macros.
3614         Reported by Jim Meyering.
3616         * builtin.c (m4_regexp): Reorganize the code for avoiding a
3617         warning from gcc about `repl' possibly used before defined.
3618         Reported by Jim Meyering.
3620         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3621         Reported by Jim Meyering.
3623 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
3625         * m4.h: Move the conditional definition of volatile after the
3626         inclusion of system files, because they may define it first.
3628 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
3630         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3631         get around a problem with Alpha make seeing a syntax error, there.
3632         Reported by Vern Paxson.
3634 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
3636         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3637         Reported by Richard Stallman.
3639 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
3641         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3642         instead of AC_HAVE_FUNCS.
3643         Reported by Noah Friedman.
3645 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
3647         * m4.c: Initialize show_help and show_version to zero.
3649         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3650         Use them in exit() and usage() calls.
3652 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
3654         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3655         syserr() macro.  Delete errref, add reference_error and M4ERROR.
3656         * m4.c: Replace errref, which was returning an input reference
3657         string, with reference_error, which prints it on standard error.
3658         * builtin.c, output.c: Use errno as second parameter to error,
3659         instead of using syserr() with %s.
3660         * *.c: Use M4ERROR instead of error: no more errref() with %s.
3661         Doing so, the program name appears after the input reference
3662         instead of before, which eases M-x next-error processing.
3664 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
3666         * checks/get-them: Escape braces with backslashes in patterns,
3667         because HPUX-9.01 awk needs this.
3668         Reported by Jim Meyering.
3670 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
3672         * builtin.c: Declare "FILE *popen ();".
3674         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3675         macros, replace error_message_prefix() declaration by errref()'s.
3676         Declare xrealloc, for use in errref().
3677         * m4.c: Delete error_message_prefix() function, add errref().
3678         * *.c: Use error() systematically in place of all error macros,
3679         now that error() flushes stdout first.  Make needed adjustments.
3681         * m4.h: Remove const in sys_errlist[] declaration, it creates
3682         conflicts on SGI and Alpha.
3683         Reported by Kaveh R. Ghazi.
3685 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3687         * m4.c: Include <getopt.h> instead of "getopt.h".
3689         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3690         * acconfig.h: New, for documenting HAVE_EFGCVT.
3691         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3692         use them wherever appropriate.  Also use -I. for compilations.
3693         * lib/Makefile.in: Use -I.. for compilations.
3694         * *.c: Include <config.h> or "config.h".
3696         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3697         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3699 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3701         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3703         * input.c (input_init): Initialize quote and comment strings
3704         explicitely instead of calling set_quotes and set_comment: by
3705         doing so, we ensure we do not free uninitialized variables.
3707         * checks/check-them: Reverse arguments to both diff, so the
3708         expected is on the left and the obtained on the right.
3710         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3711         macros. Delete declarations for m4error, warning, fatal and
3712         internal_error, add declaration for error_message_prefix.
3713         * m4.c:  Delete m4error, warning, fatal and internal_error
3714         routines, add error_message_prefix routine.
3715         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3716         warning with WARNING*, fatal with FATAL* and internal_error with
3717         INTERNAL_ERROR*.
3718         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3719         this is not needed anymore.
3721         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3722         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3723         and debug_message, add declaration for debug_message_prefix.
3724         * debug.c: Remove static specifier for FILE *debug declaration.
3725         Delete debug_print and debug_message routines, add
3726         debug_message_prefix routine.
3727         * builtin.c, debug.c: Replace debug_print routine calls with
3728         DEBUG_PRINT* macro calls.
3729         * input.c, path.c: Replace debug_message routine calls with
3730         DEBUG_MESSAGE* macro calls.
3732         * m4.h: Remove inclusion of <varargs.h>.
3733         * debug.c: Include <stdarg.h> or <varargs.h>.
3734         (trace_format): Use stdarg instead of varargs if __STDC__.
3736         * configure.in: Remove checks for vfprintf and _doprnt.  These
3737         implementations use varargs tricks which are not portable enough.
3738         * lib/vfprintf.c: Deleted.
3739         * lib/_doprnt.c: Deleted.
3740         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3741         Reported by Joel Sherrill.
3743         * path.c (add_include_directory): Use xstrdup.
3745         * builtin.c (find_builtin_by_name): Declare static.
3747         * *.[ch]: Add const to a few "char *" declarations.
3749         * configure.in: Remove commented tests for fileno() and fstat().
3750         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3752         * debug.c (debug_flush_files): New.
3753         * m4.h: Declares it.
3754         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3755         Reported by Nicolas Pioch.
3757 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3759         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3760         Reported by Joel Sherrill.
3762         * builtin.c (prefix_all_builtins): Instead of the table size, use
3763         the null entry at end for stopping the loop.  It was overwritten.
3764         Reported by Andreas Schwab and Jim Meyering.
3766         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3767         Reported by Kaveh R. Ghazi.
3769         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3770         Reported by Karl Vogel.
3772 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3774         * m4.h: Do not define volatile if already defined.
3775         Reported by Rene' Seindal.
3777         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3779         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3780         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3782 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3784         * m4.h: Define strchr and strrchr in terms of index and rindex,
3785         instead of the other way around.
3786         * builtin.c, m4.c, path.c: Use strchr instead of index.
3788         * input.c (next_char): Remove a "break;" after a "return ...;".
3789         Reported by Tom McConnell.
3791 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3793         * Release 1.1
3795         * configure.in: Do not copy check files in the build hierarchy.
3796         * checks/check-them: Identify the m4 version being checked.  For
3797         finding m4, look in $PATH instead of in the parent directory.
3798         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3799         * checks/Makefile.in (.all-stamp): Always create check files in
3800         the source hierarchy, not anymore in the build hierarchy.
3801         (check): cd to the source hierarchy before performing checks.
3802         Do not copy nor clean COPYING anymore, take it from `..'.
3803         Reported by Tom McConnell.
3805         * Makefile.in (Makefile): Use $(SHELL).
3806         (config.status): Use $(SHELL).  Use "config.status --recheck"
3807         instead of "configure --no-create", which is obsolete.
3808         Reported by Tom McConnell.
3810 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3812         * m4.c (usage): Use "%s" instead of "m4" in format string.
3813         Reported by Jim Meyering.
3815         * Makefile.in: Distribute mkinstalldirs.
3816         Reported by Pierre Gaumond.
3817         Reported by Jim Meyering.
3818         Reported by Tom McConnell.
3819         Reported by Andreas Gustafsson.
3821         * checks/check-them: Renamed from checks/check_them.
3822         * checks/get-them: Renamed from checks/get_them.
3823         * checks/.all-stamp: Renamed from checks/.all_stamp.
3824         * checks/Makefile.in: Changed accordingly.
3825         Reported by Jim Meyering.
3827 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3829         * lib/Makefile.in (dist): Correct permissions on files.
3831         * output.c: Declare tmpfile, some systems don't.
3833 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3835         * checks/Makefile.in (dist): Correct permissions on files.
3837         * Makefile.in (dist): Ensure recursive linking for subdirectory
3838         `examples', also set read/write permissions on all its files.
3840         * mkinstalldirs: New, from elsewhere.
3841         * Makefile.in: Use it.
3843         * debug.c: Synchronize debug messages and regular output when
3844         the debug file and stdout are redirected to the same file.
3845         * configure.in: Add (commented) checks for fileno and fstat.
3846         Reported by Jim Avera.
3848         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3849         etc., arguments, then ignore the superfluous one.  m4 used to
3850         diagnose missing arguments and return the empty string.
3851         Reported by Nick S. Kanakakorn.
3853 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3855         * m4.c (main): At end of all input, ensure all undiverted text
3856         goes to the main output stream.
3857         Reported by Andreas Gustafsson.
3859         * m4.c (main): exit (0), instead of return 0.
3861         * m4.c: Implement -P and --prefix-builtins.
3862         * builtin.c: Delete const specifier on builtin_tab.
3863         (prefix_all_builtins): New.
3864         Reported by Noah Friedman.
3865         Reported by Scott Bartram.
3867         * c-boxes.el: New, from elsewhere.
3868         * Makefile.in: Distribute it.
3870         * m4.h: Do not define bcopy if <string.h> defines it.
3871         Reported by Stephen Perkins.
3873         * builtin.c (define_macro): Allow a missing second argument, in
3874         which case it is implied empty.  Affects define and pushdef.
3875         Reported by Eric Allman.
3877 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3879         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3880         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3881         * builtin.c: Initialize all the blindness fields in builtin_tab.
3882         (define_builtin): Copy the blindness of a builtin into its symbol.
3883         * macro.c (expand_token): Avoid processing a blind builtin if the
3884         next character is not an opening parenthesis.
3885         Reported by David MacKenzie.
3886         Reported by Noah Friedman.
3888         * configure.in: Ensure an exit status of 0 on completion.
3889         Reported by Vivek P. Singhal.
3891         * eval.c (eval_lex): Admit both lower and upper case letters for
3892         bases greater than 10.  Only lower case letters were accepted.
3894         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3895         Reported by Krste Asanovic.
3897         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3898         * eval.c (logical_not_term): New name for not_term.
3899         * eval.c (xor_term): New, between or_term and and_term.
3900         * eval.c (not_term): New, between and_term and logical_not_term.
3901         * eval.c (shift_term): New, between cmp_term and add_term.
3902         Reported by Krste Asanovic: ~, ^, <<, >>.
3903         Reported by Ben A. Mesander: ** vs ^.
3905         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3906         * m4.h: Delete xrealloc.c.
3907         * lib/xmalloc.c: New, from elsewhere.
3908         * lib/xstrdup.c: New, from elsewhere.
3909         * lib/Makefile.in: Distribute and compile them.
3911         * m4.c: Change progname to program_name.
3912         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3913         * lib/error.c: New, from elsewhere.
3914         * lib/Makefile.in: Distribute and compile error.c.
3915         * configure.in: Check AC_VPRINTF and for strerror.
3916         * m4.c: Delete cmd_error.  Use error instead.
3917         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3919         * m4.h: Delete #define const, let Autoconf takes care of this.
3921         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3922         Merge parse_args into main.  Declare argv to be `char *const *',
3923         then remove superfluous casts.
3925         * m4.c: Rename --no-gnu-extensions to --traditional.
3926         Reported by Ben A. Mesander.
3928         * m4.c (usage): Add a status parameter.  Supply one in various
3929         calls.  Add --help processing.  Remove -V for --version.
3931         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3933         * lib/Makefile.in: Have an AR=ar declaration.
3934         Reported by Eric Backus.
3935         Reported by Bjorn R. Bjornsson.
3936         Reported by Tom Tromey.
3937         Reported by Kristine Lund.
3938         Reported by Marion Hakanson.
3940 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3942         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3943         Reported by Noah Friedman.
3945 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3947         * Makefile.in: Remove MDEFINES and cleanup.
3949 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3951         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3952         Create a gzip file.
3954 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3956         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3957         ensure 777 mode for directories, so older tar's will restore file
3958         modes properly.
3960 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3962         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3963         so the installer can override automatically configured choices.
3964         Reported by Karl Berry.
3966 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3968         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3969         previous version was not working properly on m68k-hp-bsd4.3.
3970         Reported by Roland McGrath.
3972         * lib/_doprnt.c: Stolen from Oleo distribution.
3973         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3974         * lib/Makefile.in: Distribute _doprnt.c.
3975         Do not distribute regex.[ch].old anymore.
3977 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3979         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3980         Richard wants it there.
3982 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3984         * Makefile.in: Add DEFS to MDEFINES.
3985         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3986         (libm4.a): Remove the library before creating it.
3987         (distclean): Remove tags and TAGS too.
3989 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3991         * Makefile.in (dvi, m4.dvi): New goals.
3993         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3994         macro.c, output.c, path.c, symtab.c: Change Copyright from
3995         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3997         * examples/divert.m4: Deleted, this bug has been corrected.
3999         * Makefile.in (texclean, mostlyclean): New goals.
4001         * Makefile.in (clean): Remove clutter from ansi2knr.
4002         Reported by Pierre Gaumond.
4003         Reported by Greg A. Woods.
4005 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
4007         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
4008         might well use CFLAGS is s/he needs it.
4010         * Makefile.in: Allow installation of info files from a separate
4011         build directory.
4012         Reported by Jason Merrill.
4013         Reported by David MacKenzie.
4014         Reported by Skip Montanaro.
4015         Reported by Erez Zadok.
4016         Reported by Assar Westerlund.
4018 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
4020         * Release 1.0.3
4021         This is still a beta release for the future GNU m4 version 1.1.
4023         * lib/alloca.c: New, from elsewhere.
4024         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
4026         * m4.h: Do not define index/rindex if already defined.  If
4027         FALSE/TRUE are already defined, do not redefine them, but merely
4028         define boolean typedef to int.
4030         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
4031         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
4032         because some C compilers do not like connectives with #ifdef.
4033         * m4.h: Define `volatile' only if __GNUC__, instead of once for
4034         __GNUC__ and once for __STDC__.
4035         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
4037         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
4038         Makefile dependencies.  Without it, make keeps destroying and
4039         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
4041         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
4042         to diversion/DIVERSION, this was a spelling error.
4044         * m4.c: Declare version[], remove #include "version.h".
4045         * version.h: Deleted.
4046         * Makefile.in: Remove references to version.h.
4048         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
4049         production, by using a simpler and more robust algorithm.  This
4050         solves the problem of synclines sometimes written in the middle of
4051         an output line.  Delete sync_line() and output_lines variable.
4052         * m4.h: Remove sync_line prototype and output_lines declaration.
4053         * input.c (next_char), output.c (shipout_text): Remove references
4054         to output_lines.
4055         * input.c (push_file, pop_file): Merely put the value -1 in
4056         output_current_line instead of calling sync_line, for delaying a
4057         single `#line NUM FILE' before next output line.  Do not test
4058         for sync_output, because this is unnecessary clutter.
4059         * output.c (make_divertion, insert_divertion): Idem.
4060         * input.c: Rename must_advance_line to start_of_input_line, for
4061         consistency.
4063         * debug.c (trace_header): Select a new debug line format, which
4064         better complies with GNU standards for formatting error messages.
4065         With option `-dfl', M-x next-error might be used on the output.
4066         * m4.c (vmesg): Adjust format of error output to GNU standards.
4067         * m4.texinfo: Adjust examples for `make check' to work.
4069         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
4070         case for enum debug_info constants, which were all lower case.
4072         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
4073         re_search_2.
4074         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
4075         collected patches.  I tried a few times using newer regex.[ch], it
4076         mysteriously stopped aborting with this one.  Insecure feeling...
4077         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
4079 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
4081         * m4.c: Change `--no-warnings' to `--silent'.
4082         Reported by David MacKenzie.
4084         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
4085         leave it off for now.  See comment in m4.c for justification.
4086         Reported by David MacKenzie.
4088         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
4089         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
4091         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
4093         * Makefile.in: Ensure recursive cleaning is done before local
4094         cleaning for all clean goals.
4096         * builtin.c (ntoa): Ensure the value is always interpreted as a
4097         signed quantity, whatever the radix is.
4099 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
4101         * builtin.c, format.c, input.c: Split long lines.
4102         * m4.c: Use typedef macro_definition instead of struct
4103         macro_definition.
4104         * symtab.c: Use typedef symbol instead of struct symbol.
4106 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
4108         * *.[ch]: Remove all trailing whitespace, in code and comments.
4110         * configure.in: Find some awk.
4111         * Makefile.in: Add $(AWK) to MDEFINES.
4112         * checks/Makefile.in: Transmit $(AWK) to get_them.
4113         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
4114         awk script when switching files, because without this, mawk runs
4115         out of file descriptors.
4117 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
4119         * Makefile.in (realclean): Delete m4.info*.
4120         Reported by Jim Meyering.
4122         * Makefile.in: Adjust and link with checks/Makefile.
4123         * checks/Makefile.in: New.
4124         * configure.in: Output checks/Makefile.
4126         * checks/get_them: Have the dnl header of each test more
4127         recognizable by next-error, also use a better message.
4129 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
4131         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
4132         And use that only if __GNUC__ since we're using it's GCC-specific
4133         semantics that tell the compiler the associated function doesn't
4134         return.
4136         * builtin.c (substitute): Don't use character as an array index.
4137         (dumpdef_cmp): Make formal arguments `const void *' to avoid
4138         warnings with gcc -W -Wall on systems with qsort prototype.
4139         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
4140         from gcc -W -Wall.
4142         * eval.c (most functions): Add parentheses to assignments used
4143         as truth values go avoid warnings from gcc -Wall.
4145         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
4146         any functions that don't need external scope.
4148         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
4149         (many functions and arrays): Declare `const'.
4151 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
4153         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
4154         removing the declaration from m4.h.  Also rename false to FALSE
4155         and true to TRUE.
4157         * lib/Makefile.in (Makefile): New goal.
4159         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
4160         so heavily loaded.  It gets more easily overridable, calling make.
4161         Reported by Jim Meyering.
4163         * Makefile.in (dist): Get .fname from the current directory name,
4164         instead of from version.h.  I need updating many files manually,
4165         when the version changes, version.h is just one of them.
4167 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
4169         * m4.h: Remove the tag `boolean' on the enum introducing typedef
4170         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
4171         Reported by Tom McConnell.
4173 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
4175         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
4176         39.cleardiv, which were describing missing or spurious newlines.
4177         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
4178         do not depend on machine word size, `/bin/false' implementation,
4179         or `wc' output format.  `make check' is more dependable, now.
4181         * checks/check_them: Summarize the failed tests by listing their
4182         name, at end.  If none, issue `All checks successful'.  Output
4183         `Checking' instead of `Input file:'.
4185         * checks/get_them, checks/check_them: Reindented.
4187         * Makefile.in (dist): chmod a+r before making the tar file.
4189 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
4191         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
4193         * input.c (next_token): Reinitialize token_buttom just after using
4194         it as a watermark with obstack_free.  Or else, a future token, big
4195         enough for triggering reallocation of the obstack chunk, could
4196         void the initialized value of token_buttom, later causing panic in
4197         obstack_free.  Rename token_buttom to token_bottom everywhere.
4199         * m4.h: Before declaring errno, first include <errno.h> and
4200         ensure that it does not define errno.
4201         Reported by Richard Stallman.
4203 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
4205         * builtin.c: Define and use DECLARE macro for builtins.
4207         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
4208         argument, this is a common idiom for introducing long comments.
4210         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
4211         arguments.  The last argument was silently ignored.
4213         * m4.c (cmd_error): Add a missing semicolon before va_end().
4215 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
4217         * Makefile.in: Now handle protoized sources.  Define and use U.
4218         Compile and use ansi2knr with old compilers.  Update DISTFILES.
4219         Add `aclocal.m4' to `configure' dependencies.
4220         * ansi2knr.c: New, from Ghostscript distribution.
4221         * configure.in: Define U through FP_PROTOTYPES for old compilers.
4222         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
4223         * aclocal.m4: New, provide FP_PROTOTYPES.
4224         * m4.h: Conditionnaly protoized through Args, save for varags.
4225         * builtin.c: Protoized.  Then:
4226         Include <sys/types.h> if size_t is not defined, before "regex.h".
4227         (m4_ifelse): Fetch built-in name properly for diagnostic.
4228         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
4229         (m4_regexp): Add const to `msg' declaration.
4230         (m4_patsubst): Add const to `msg' declaration.
4231         * debug.c: Protoized, save for varargs.
4232         * eval.c: Protoized.
4233         * format.c: Protoized.
4234         * input.c: Protoized.
4235         * m4.c: Protoized, save for varargs.  Then:
4236         (xfree): Accept void * instead of char *.
4237         (xmalloc): Return void * instead of char *.
4238         (xrealloc): Accept and return void * instead of char *.
4239         * macro.c: Protoized.
4240         * output.c: Protoized.
4241         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
4242         * symtab.c: Protoized.
4244 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
4246         * m4.texinfo: Remove directory from diagnostics in 30.include,
4247         51.eval, 56.errprint and 57.m4exit tests.
4249         * m4.h: Remove declarations for int or void system functions, they
4250         cause more conflicting trouble than they make good.
4252         * configure.in: Avoid configuration header file.  Add some tests.
4253         * m4.h: Remove #include "config.h".
4254         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
4255         Then, rewritten for better compliance with GNU standards.
4257 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
4259         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
4260         because of a misplaced #endif.
4262         * Many *.[hc] files: Correct intra-line spacing here and there,
4263         according to GNU indent 1.6 advice.
4265         * configure.in: New, using Autoconf 1.2.
4266         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
4267         * Delete old configure.in, configure, etc/configure.in,
4268         etc/configure, lib/configure.in, lib/configure and config/*.
4269         Reported by Jason Merrill.
4271         * symtab.c (hash): Change (char) NULL to '\0'.
4272         Reported by Jason Merrill.
4274         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
4275         etc/nextvers.sh.  Release numbers will be edited `by hand'.
4276         * version.h: De-automatize, force value in.
4278         * m4.c: Changes in order to use a newer getopt.h.
4279         Reported by David MacKenzie.
4281         * checks/: New name for examples/.
4282         * checks/get_them: New location for etc/get_examples.
4283         * checks/check_them: New location for etc/check_examples.
4284         * Makefile.in, checks/get_them, checks/check_them: Adjust.
4285         * lib/vfprintf.c: New location for etc/vfprintf.c.
4286         * Delete empty etc/.
4287         * examples/: New name for test/.
4289 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
4291         * Makefile.in (check): Add m4 as dependency.
4293         * m4.c: Accept --no-warnings instead of --no_warnings, and
4294         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
4295         usage message more informative.
4296         Reported by David MacKenzie.
4298 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
4300         * etc/check_examples: New name for check_examples.sh.
4301         * etc/get_examples: New name for get_examples.sh.
4302         * Makefile.in, etc/Makefile.in: Use new names.
4304         * Makefile.in: Transmit $(CC) while making in lib.
4306         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
4307         code disposition by hand.
4309 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
4311         * m4.h: Delete definitions for abort() and exit().
4312         Reported by Richard Stallman.
4314         * config/hmake-unicos, config/s-unicos.h: New files.
4315         Reported by Hal Peterson.
4317         * eval.c (exp_term): Have N^0 return 1.
4318         Reported by Michael Fetterman.
4320         * eval.c, input.c, m4.h: Remove last comma in enums.
4321         Reported by Mike Lijewski.
4323         * Transfer of maintenance duties from Rene' to Franc,ois.
4325 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
4327         * Release 1.0.  Many thanks to those, who provided me with bug
4328         reports and feedback.
4330         * Uses GNU configure, taken from the gdb distribution.
4332         * Uses GNU getopt(), with long option names.
4334         * The -Q/+quiet option is added, which suppresses warnings about
4335         missing or superflous arguments to built-in macros.
4337         * Added default options via the M4OPTS environment variable.
4339         * The built-in format can now be configured to use sprintf as
4340         the formatting engine, for systems without [efg]cvt(3).
4342         * GNU library code is moved to the ./lib subdirectory; other
4343         utility files are now in ./etc.
4345         * Several minor bugs have been fixed.
4347 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
4349         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
4350         Francois Pinard and Roland H. Pesch for providing me with reports.
4352         * The builtins incr and decr are now implemented without use of
4353         eval.
4355         * The builtin indir is added, to allow for indirect macro calls
4356         (allows use of "illegal" macro names).
4358         * The debugging and tracing facilities has been enhanced
4359         considerably.  See the manual for details.
4361         * The -tMACRO option is added, marks MACRO for tracing as soon
4362         as it is defined.
4364         * Builtins are traced after renaming iff they were before.
4366         * Named files can now be undiverted.
4368         * The -Nnum option can be used to increase the number of
4369         divertions available.
4371         * Calling changecom without arguments now disables all comment
4372         handling.
4374         * The function m4_patsubst() is now consistently declared
4375         static.
4377         * A bug in dnl is fixed.
4379         * A bug in the multi-character quoting code is fixed.
4381         * Several typos in the manual has been corrected.  More probably
4382         persist.
4384         * The m4.info file is now installed along with the program.
4386 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
4388         * Updated and enhanced version.  Release 0.75, manual 0.07.
4390         * Implemented search path for include files (-I option and
4391         M4PATH envronment variable).
4393         * Implemented builtin "format" for printf-like formatting.
4395         * Implemented builtin "regexp" for searching for regular
4396         expressions.
4398         * Implemented builtin "patsubst" for substitution with regular
4399         expressions.
4401         * Implemented builtin "esyscmd", which expands to a shell
4402         commands output.
4404         * Implemented "__file__" and "__line__" for use in error
4405         messages.
4407         * Implemented character ranges in "translit".
4409         * Implemented control over debugging output.
4411         * Implemented multi-character quotes.
4413         * Implemented multi-character comment delimiters.
4415         * Changed predefined macro "gnu" to "__gnu__".
4417         * Changed predefined macro "unix" to "__unix__", when the -G
4418         option is not used.  With -G, "unix" is still defined.
4420         * Changed "shift", "$@" and "$*" to not insert spaces afters
4421         commas.
4423         * Added program name to error messages.
4425         * Fixed two missing null bytes bugs.
4427 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
4429         * Initial beta release.  Release 0.50, manual 0.05.
4431         -----
4433         $Revision$ $Date$
4435         Local Variables:
4436         coding: utf-8
4437         End:
4439         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
4440         2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4442         Copying and distribution of this file, with or without
4443         modification, are permitted provided the copyright notice
4444         and this notice are preserved.