Ignore Windows executables.
[m4/ericb.git] / ChangeLog
blob3ffea53701d5ddf05980e4f7ccd67c928f8502a6
1 2008-01-27  Eric Blake  <ebb9@byu.net>
3         Stage 13: push composite text tokens.
4         Support pushing composite tokens, allowing back-references to be
5         reused through multiple macro expansions.  Add hueristic that
6         avoids creating new reference when pushing existing references.
7         Memory impact: noticeable improvement due to better reference
8         reuse, except for boxed recursion doing more copying.
9         Speed impact: slight penalty, due to more bookkeeping.
10         * src/m4.h (push_token): Adjust prototype.
11         * src/input.c (push_token): Add parameter, and handle composite
12         tokens.
13         (append_quote_token): Inline short strings.
14         * src/macro.c (push_arg, push_args): Adjust callers.
16 2008-01-26  Eric Blake  <ebb9@byu.net>
18         Stage 12: make token_chain a union, add string_pair.
19         Shrink size of symbol chains by using a union.  Make passing quote
20         delimiters around more efficient.  Other code cleanups.
21         Memory impact: slight improvement, due to smaller struct.
22         Speed impact: slight penalty, due to more bookkeeping.
23         * src/m4.h (STRING): Delete typedef.
24         (struct string_pair, enum token_chain_type): New types.
25         (struct token_chain): Reduce size via a union.
26         (ARG_LEN): New macro.
27         (ARG): Move here...
28         * src/builtin.c (ARG): ...from here.
29         (dump_args, define_macro, m4_dumpdef, m4_builtin, m4_indir)
30         (m4_defn, mkstemp_helper, m4_maketemp, m4_mkstemp, m4___file__)
31         (m4___program__, m4_m4wrap, m4_len, m4_index, m4_substr)
32         (m4_regexp, m4_patsubst): Adjust callers.
33         * src/input.c (rquote, lquote, bcomm, ecomm): Delete...
34         (curr_quote, curr_comm): ...replaced by these.
35         (make_text_link, push_token, pop_input, input_print, peek_input)
36         (next_char_1, input_init, set_quotes, set_comment, set_quote_age)
37         (next_token, peek_token): Adjust callers.
38         * src/macro.c (expand_macro, arg_token, arg_mark, arg_text)
39         (arg_equal, arg_len, make_argv_ref, push_arg, push_args):
40         Likewise.
41         * src/format.c (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE, format):
42         Likewise.
43         * src/freeze.c (produce_frozen_state): Likewise.
44         * src/debug.c (trace_format, trace_pre): Likewise.
45         (debug_decode): Don't lose partial traces prior to reducing
46         debugmode.
48 2008-01-22  Eric Blake  <ebb9@byu.net>
50         Stage 11: full circle for single argument references.
51         Pass quoted strings through to argument collection in a single
52         action, so that an argument can be reused throughout macro
53         recursion if it remains unchanged.
54         Memory impact: noticeable improvement, due to more reuse in
55         argument collection stacks.
56         Speed impact: noticeable improvement, due to less copying.
57         * src/m4.h (struct token_chain): Add quote_age member.
58         (struct token_data): Add end member to chain alternate.
59         (make_text_link): New prototype.
60         * src/input.c (CHAR_QUOTE): New macro.
61         (word_start): Pre-allocate.
62         (set_word_regexp): Simplify.
63         (make_text_link): Export, and handle new fields.
64         (next_char, next_char_1): Add parameter.
65         (append_quote_token): New function.
66         (match_input, next_token): Adjust callers to handle quoted input
67         blocks.
68         * src/macro.c (struct macro_arguments): Add wrapper member.
69         (expand_argument): Accept composite blocks from input engine.
70         (expand_macro): Reduce refcounts of composite arguments.
71         (collect_arguments, arg_token, arg_mark, make_argv_ref): Update to
72         use new fields.
73         (arg_type, arg_text, arg_equal, arg_len): Treat composite
74         arguments as text.
75         (push_arg, push_args): Handle composites.
77 2008-01-17  Eric Blake  <ebb9@byu.net>
79         Stage 10: avoid extra copying of strings and comments.
80         When collecting tokens that are immune to further expansion, avoid
81         copying data from one obstack to another by outputting it into the
82         destination obstack to begin with.  Also reduce copying done in
83         format builtin.
84         Memory impact: slight improvement, due to better obstack usage.
85         Speed impact: noticeable improvement, due less data copying.
86         * m4/gnulib-cache.m4: Import the intprops and vasnprintf-posix
87         modules.
88         * src/m4.h (includes): Use new gnulib modules.
89         (next_token): Adjust prototype.
90         (bad_argc): New prototype.
91         * src/format.c (arg_int, arg_long, arg_double): New helper
92         functions.
93         (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE): Track missing
94         arguments.
95         (format): Improve warnings, and avoid copying into obstack in the
96         common case.
97         * src/input.c (next_token): Add new parameter.
98         (lex_debug): Adjust caller.
99         * src/symtab.c (symtab_debug): Likewise.
100         * src/macro.c (expand_input, expand_token, expand_argument)
101         (collect_arguments): Likewise.
102         * src/output.c (m4_tmpname): Guarantee correct buffer size.
103         * src/builtin.c (builtin_init): Improve efficiency.
104         (bad_argc): Export.
105         (ntoa): Tighten buffer allocation.
106         * doc/m4.texinfo (Format): Test the improvements.
107         * NEWS: Document the improvement.
109 2008-01-14  Eric Blake  <ebb9@byu.net>
111         Fix --warn-macro-sequence regression from 2007-11-29.
112         * src/builtin.c (define_user_macro): Use correct length.
113         * doc/m4.texinfo (Arguments): Test the fix.
114         (History): Reword to account for new year and eventual result of
115         the argv_ref branch.
117 2008-01-08  Eric Blake  <ebb9@byu.net>
119         Bump copyright year.
120         * NEWS: Update year.  Mention effect of my recent memmem
121         contributions to gnulib.
123 2007-12-21  Eric Blake  <ebb9@byu.net>
125         Stage 9: share rather than copy single-arg refs.
126         Use hooks of previous patch to create back-references to arguments
127         in the input engine, and inline short text rather than always
128         creating a FIFO link.  Also start testing embedded NUL behavior.
129         Until the argument collection engine also shares references, the
130         memory usage increases.
131         Memory impact: noticeable penalty, due to longer life of argv.
132         Speed impact: slight improvement, due less data copying.
133         * m4/gnulib-cache.m4: Import quote and memmem modules.
134         * src/m4.h (arg_scratch): New prototype.
135         * src/input.c (INPUT_INLINE_THRESHOLD): New define.
136         (push_token): Use it to inline short text, and save references to
137         longer text.
138         (input_init, next_token): Simplify obstack handling.
139         * src/macro.c (expand_argument): Likewise.
140         (expand_macro): Track scratch space.
141         (arg_scratch): New function.
142         (make_argv_ref): Use it.
143         (push_args): Likewise, and simplify comma handling, since most
144         separators are short enough to be inlined.
145         * src/builtin.c (builtin_init): Avoid cast.
146         (m4_errprint, m4_index): Transparently support NUL.
147         (m4_translit): Use scratch space, rather than leaking memory on
148         expansion stack.
149         * doc/m4.texinfo (Syntax): Add new test of embedded NUL.
150         * checks/get-them: Extract test that uses external files.
151         * checks/check-them: Run the new test.  Use unified diff if
152         possible, and force text mode when debugging NUL handling.
153         * examples/null.m4: New file.
154         * examples/null.out: Likewise.
155         * examples/null.err: Likewise.
156         * examples/Makefile.am (EXTRA_FILES): Distribute these files.
157         * .gitattributes: Treat new files as text, in spite of embedded
158         NUL.
160 2007-12-18  Eric Blake  <ebb9@byu.net>
162         Stage 8: extend life of references into argv.
163         Add hooks to lengthen the lifetime of arguments reused in a macro
164         expansion, rather than always discarding arguments at the end of
165         expand_macro.  Rework the expand_macro obstacks to handle longer
166         lifetimes.  For now, the hooks remain unused.
167         Memory impact: slight penalty, due to larger structs.
168         Speed impact: slight penalty, due to more bookkeeping.
169         * src/m4.h (obstack_regrow): Delete, now that it is unused.
170         (struct token_chain): Add level field.
171         (push_token): Adjust prototype.
172         (adjust_refcount): New prototype.
173         * src/macro.c [DEBUG_MACRO]: Add debugging hooks for $@ reference
174         counting.
175         (argc_stack, argv_stack): Delete, replaced by...
176         (struct macro_arg_stacks, stacks, stacks_count): ...these new
177         structure for tracking $@ references.
178         (expand_input): Initialize new structure.
179         (collect_arguments): Alter signature.
180         (expand_macro): Rework obstack handling, in order to keep $@
181         references alive until they have been rescanned.
182         (adjust_refcount, arg_mark): New functions.
183         (make_argv_ref): Use new field.
184         (push_arg, push_args): Update callers.
185         * src/input.c (make_text_link): Use new field.
186         (push_token): Change signature.
187         (pop_input, next_char_1): Call new function.
188         * doc/m4.texinfo: Clean up some examples of -d option usage.
189         (Ifelse): Add some stress tests.
191 2007-12-13  Eric Blake  <ebb9@byu.net>
193         Yet more rewording.
194         * doc/m4.texinfo (Inhibiting Invocation): Missed one instance in
195         the previous patch.
197         * THANKS: Update.
199 2007-12-13  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
201         * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
202         example.
203         Reported by Giovanni Toffetti.
205 2007-12-11  Eric Blake  <ebb9@byu.net>
207         Stage 7: add chained token support to input parser.
208         Allow the LIFO input engine to rescan a macro expansion composed
209         of smaller chunks of FIFO data, rather than the old approach of a
210         monolithic string.  For now, all chunks are still copied.
211         Memory impact: slight penalty, due to FIFO chain overhead.
212         Speed impact: noticeable penalty, due to extra bookkeeping.
213         * src/m4.h (struct token_chain): Add const safety.
214         (push_token): New prototype.
215         * src/input.c (INPUT_CHAIN): New enumerator.
216         (struct input_block): Add new input type u_c, and change u_s to
217         length-based processing.
218         (make_text_link): New helper function.
219         (push_token): New function.
220         (push_string_finish): Use it.
221         (pop_input, input_print, peek_input, next_char, next_char_1):
222         Adjust to handle new input type.
223         * src/macro.c (push_arg, push_args): Use new function.
225 2007-12-10  Eric Blake  <ebb9@byu.net>
227         Stage 6: convert builtins to push arg at a time.
228         Add new methods to factor all builtins whose expansion includes an
229         argument, making back-reference creation easier in future patches.
230         Factor out length-limited printing to obstacks, and use -1 rather
231         than 0 for unlimited length.
232         Memory impact: none.
233         Speed impact: slight improvement, due to better code sharing.
234         * src/m4.h (includes): Include <limits.h> here, instead of in
235         individual files.
236         (input_block): New typedef.
237         (trace_pre, trace_post, push_string_finish): Update prototypes.
238         (obstack_print, input_print, push_arg, push_args): New
239         prototypes.
240         * src/input.c (push_string_finish): Change return type.
241         (input_print): New function.
242         * src/debug.c (trace_format): Add %B specifier, and use new
243         function.
244         (trace_pre): Remove redundant argc parameter.
245         (trace_post): Likewise, and change signature.
246         (obstack_print): New function.
247         * src/macro.c (expand_macro): Update caller.
248         (push_arg, push_args): New functions.
249         * src/builtin.c (m4_ifdef, m4_ifelse, m4_shift, m4_substr)
250         (m4_patsubst, expand_user_macro): Use new functions.
251         (mkstemp_helper, m4_maketemp): Avoid extra trailing NULs.
252         * src/m4.c (max_debug_argument_length, main): Set to INT_MAX, not
253         0, for unlimited.
254         * src/output.c: Update includes.
255         * src/symtab.c: Likewise.
257 2007-12-07  Eric Blake  <ebb9@byu.net>
259         Minor security fix: Quote output of mkstemp.
260         * src/builtin.c (mkstemp_helper): Produce quoted output.
261         * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
262         * NEWS: Document this change.
264         Stage 5: add notion of quote age.
265         Cache the quoting rules that were in effect when a string was
266         parsed, to avoid reparsing that string if no changequote or other
267         quote age change took place in the meantime.  A quote_age of 0 is
268         always safe, but does not benefit from caching.
269         Memory impact: slight penalty, due to larger struct.
270         Speed impact: slight penalty, due to more bookkeeping.
271         * src/input.c: Comment cleanups.
272         (current_quote_age): New global variable.
273         (set_quote_age): New helper function.
274         (input_init, set_word_regexp): Use it.
275         (set_quotes, set_comment): Likewise, and detect no-op changes.
276         (quote_age, safe_quotes): New functions.
277         (next_token): Track quote age.
278         * src/m4.h (struct token_data): Add quote_age member.
279         (TOKEN_DATA_QUOTE_AGE, quote_age, safe_quotes): New prototypes.
280         * src/macro.c (struct macro_arguments): Add quote_age member.
281         (expand_token): Alter signature and track quote age.
282         (expand_input, expand_argument): All callers changed.
283         (collect_arguments, make_argv_ref): Track quote age.
284         (arg_text, arg_len, arg_func): Detect type mismatch.
285         * doc/m4.texinfo (Ifelse, Changequote): Add more tests.
286         (Incompatibilities): Fix typo.
287         * examples/wraplifo.m4: New file.
288         * examples/Makefile.am (EXTRA_DIST): Distribute it.
290 2007-12-04  Eric Blake  <ebb9@byu.net>
292         Fix builds with OpenBSD make.
293         * doc/Makefile.am (HELP2MAN): New macro.
294         (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
295         * README: Update copyright.
296         * HACKING: Mention help2man and makeinfo dependencies.
298 2007-11-29  Eric Blake  <ebb9@byu.net>
300         Stage 4: route indir, builtin through ref; make argv opaque.
301         Finish making struct opaque to all but the input engine, by
302         reworking obstack usage in expand_macro to better support creation
303         of a $@ reference.  Canonicalize the empty argument, to allow
304         pointer comparison optimizations.
305         Memory impact: slight penalty, due to larger struct.
306         Speed impact: slight improvement, due to fewer function calls.
307         * src/m4.h (obstack_regrow): Borrow definition from head.
308         (struct token_chain): Add flatten and len members.
309         (arg_equal, arg_empty, make_argv_ref): New prototypes.
310         (struct macro_arguments): Move...
311         * src/macro.c (struct macro_arguments): ...here, making it
312         opaque.  Add has_ref member.
313         (empty_token): New placeholder, for optimizing comparison with
314         empty string.
315         (collect_arguments): Change signature, and populate new fields.
316         (expand_macro): Alter handling of obstacks.
317         (arg_token): New helper method.
318         (arg_equal, arg_empty, make_argv_ref): New methods.
319         (arg_type, arg_text, arg_len, arg_func): Use new methods.
320         * src/builtin.c (m4_ifelse, m4_builtin, m4_indir, m4_eval):
321         Likewise.
322         * src/format.c (format): Likewise.
324         Stage 3: cache length, rather than computing it.
325         Cache the length of a token, to avoid repeating lots of strlen
326         calls.  Additionally, by using obstack length rather than strlen,
327         the input engine can now support embedded NUL.
328         Memory impact: slight penalty, due to larger struct.
329         Speed impact: noticeable improvement, due to fewer function
330         calls.
331         * src/input.c (next_token): Grab length from obstack rather than
332         calling strlen.
333         * src/m4.h (token_data, macro_arguments): Add length field.
334         (TOKEN_DATA_LEN): New accessor.
335         (define_user_macro): Add parameter.
336         * src/builtin.c (define_user_macro, mkstemp_helper): Use
337         pre-computed length.
338         (builtin_init, define_macro, m4_maketemp, m4_mkstemp): Adjust
339         callers.
340         (dump_args, m4_ifdef, m4_ifelse, m4_builtin, m4_indir, m4_eval)
341         (m4_len, m4_substr, m4_translit, m4_regexp, m4_patsubst)
342         (expand_user_macro): Use cached lengths.
343         * src/freeze.c (reload_frozen_state): Adjust callers.
344         * src/m4.c (main): Likewise.
345         * src/macro.c (expand_token, expand_argument, collect_arguments)
346         (arg_len): Use cached length.
347         * doc/m4.texinfo (Mkstemp): Ensure mkstemp does not produce NUL.
349 2007-11-27  Eric Blake  <ebb9@byu.net>
351         Stage 2: use accessors, not direct reference, into argv.
352         Outside of macro.c, use accessor methods rather than direct access
353         into the argv struct.
354         Memory impact: none.
355         Speed impact: slight penalty, due to increased function calls.
356         * src/m4.h (TOKEN_EOF): Alter value, to ease debugging.
357         (arg_argc, arg_type, arg_text, arg_len, arg_func): New
358         prototypes.
359         * src/macro.c (arg_argc, arg_type, arg_text, arg_len, arg_func):
360         New accessor functions.
361         * src/builtin.c (ARG, dump_args, define_macro, m4_builtin)
362         (m4_indir): Use new accessors.
363         * src/debug.c (trace_pre): Likewise.
364         * src/format.c (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE):
365         Likewise.
367 2007-11-24  Eric Blake  <ebb9@byu.net>
369         Stage 1: convert token_data** into new object.
370         Pass a variable-size wrapper structure instead of an array to
371         builtins, so that subsequent optimizations in the structure need
372         not impact every builtin client.
373         Memory impact: slight penalty, since struct is larger than array.
374         Speed impact: slight penalty, due to increased bookkeeping.
375         * m4/gnulib-cache.m4: Import flexmember module.
376         * src/m4.h (struct macro_arguments, struct token_chain): New
377         structs.
378         (builtin_func): Alter signature.
379         (token_data): Add new TOKEN_COMP alternative.
380         * src/builtin.c: All builtins changed.
381         (ARG, dump_args, define_macro, expand_user_macro): Update to use
382         struct.
383         * src/debug.c (trace_pre, trace_post): Likewise.
384         * src/format.c (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE, format):
385         Likewise.
386         * src/macro.c (collect_arguments): Build new struct.
387         (call_macro, expand_macro): Update to use new struct.
389 2007-11-22  Eric Blake  <ebb9@byu.net>
391         More error messages tied to macro names.
392         * src/input.c (set_word_regexp): Take additional parameter.
393         (input_init): Adjust caller.
394         * src/debug.c (debug_set_file, debug_set_output): Take additional
395         parameter.
396         (debug_init): Adjust caller.
397         (expansion_level): Move declaration...
398         * src/m4.h (expansion_level): ...here.
399         (debug_set_output, set_word_regexp): Adjust prototypes.
400         * src/builtin.c (m4_changeword, m4_m4exit, m4_debugfile): Adjust
401         callers.
402         * src/m4.c (main): Likewise.
404         Refactor error messages to avoid macros.
405         * src/m4.h (_): Define, as a placeholder for now.
406         (M4ERROR, M4ERROR_AT_LINE): Delete.
407         (m4_error, m4_error_at_line): Change prototype.
408         (m4_warn, m4_warn_at_line): New prototypes.
409         * src/m4.c (m4_verror_at_line): New helper function.
410         (m4_error, m4_error_at_line): Use new function, and properly call
411         va_end.
412         (m4_warn, m4_warn_at_line): New functions.
413         (stackovf_handler, main): All callers changed.
414         * src/builtin.c: Likewise.
415         * src/debug.c: Likewise.
416         * src/eval.c: Likewise.
417         * src/format.c: Likewise.
418         * src/freeze.c: Likewise.
419         * src/input.c: Likewise.
420         * src/macro.c: Likewise.
421         * doc/m4.texinfo (Indir, Builtin, Dumpdef, Incr, Eval, Substr)
422         (Improved forloop): Adjust tests accordingly.
424         Security fix: avoid arbitrary code execution with 'm4 -F'.
425         * src/freeze.c (produce_frozen_state): Never pass raw file name as
426         printf format.
427         * NEWS: Document this fix.
429 2007-11-21  Eric Blake  <ebb9@byu.net>
431         Consistently report macro name first in messages.
432         * src/m4.h (evaluate): Adjust prototype.
433         * src/builtin.c (bad_argc, numeric_arg, m4_placeholder): Alter
434         wording to match head.
435         (mkstemp_helper, substitute): Adjust signature.  All callers
436         changed.
437         (m4_dumpdef, m4_builtin, m4_indir, m4_defn, m4_esyscmd, m4_eval)
438         (m4_undivert, m4_maketemp, m4_m4exit, m4_debugmode)
439         (m4_debugfile, m4_regexp, m4_patsubst): Mention macro name in
440         message.
441         (m4_format): Adjust call.
442         * src/format.c (format): No longer skip argv[0].
443         * src/eval.c (evaluate): Mention macro name in message.
444         (logical_or_term, logical_and_term, or_term, xor_term, and_term)
445         (equality_term, cmp_term, shift_term, add_term, mult_term)
446         (exp_term, unary_term, simple_term): Adjust signature.
447         * src/macro.c (warn_builtin_concat): Likewise.
448         (expand_argument): Adjust caller.
449         * doc/m4.texinfo (Macro Arguments, Ifdef, Ifelse, Debug Output)
450         (Dnl, Improved fatal_error, Defn, Builtin, Index macro, Regexp)
451         (Substr, Translit, Patsubst, Format, Eval, Dumpdef, Include)
452         (Improved forloop, Indir, Trace, Incr): Adjust tests to match.
454         Make argument checking a bit more sane.
455         * src/builtin.c (bad_argc): Adjust signature, and don't force
456         callers to add 1.  Adjust all callers.
457         (numeric_arg): Adjust signature.  Adjust all callers.
459         Make dnl diagnostic print macro name.
460         * src/m4.h (skip_line): Adjust prototype.
461         * src/input.c (skip_line): Report error on behalf of caller.
462         * src/builtin.c (m4_dnl): Adjust caller.
463         (dump_args, m4_dumpdef, m4_changequote, m4_changecom)
464         (m4_changeword, m4_traceon, m4_traceoff, expand_user_macro): Use
465         ARG macro instead of open-coding.
466         * doc/m4.texinfo (Dnl): Adjust test.
468 2007-11-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
470         * Makefile.am (EXTRA_DIST): gendocs.sh is gone here.
472 2007-11-14  Eric Blake  <ebb9@byu.net>
474         Avoid builtin concatenation in macro arguments.
475         * doc/m4.texinfo (Defn): Add tests.
476         * src/macro.c (warn_builtin_concat): New function.
477         (expand_argument): Use it to warn on more corner cases.
478         * NEWS: Mention new warning.
480 2007-11-13  Eric Blake  <ebb9@byu.net>
482         Simplify previous patch.
483         * src/input.c (pop_input): Change signature.
484         (push_string_init, next_char_1): Adjust callers.
486         Note: Patches titled Stage 0 through N form a series of patches
487         which decreases the algorithmic complexity of tail recursion in
488         macro expansions from O(n^2) to O(n) in both time and memory, then
489         performs cleanups, such as handling of embedded NUL, made easier
490         by the code refactoring.
492         Stage 0: Fix memory leak in tail recursion.
493         Free expansion text in the input engine as soon as it is parsed,
494         rather than when the recursive expansion completes.
495         Memory impact: noticeable improvement, due to reduction from
496         O(n^2) to O(n) on recursion.
497         Speed impact: minor improvement, due to better memory usage.
498         * src/input.c (push_string_init): Let go of memory earlier.
499         (next_char_1): Make end of string detection reliable.
500         (match_input): Simplify use of push_string_init.
501         * NEWS: Document this fix.
503 2007-11-07  Eric Blake  <ebb9@byu.net>
505         * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
507 2007-11-05  Eric Blake  <ebb9@byu.net>
509         Use assert, rather than INTERNAL ERROR.
510         * src/m4.h: Include <assert.h>.
511         * src/builtin.c (m4_dumpdef, define_macro, m4_defn): Use assert.
512         * src/debug.c (trace_pre): Likewise.
513         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
514         Likewise.
515         * src/freeze.c (produce_frozen_state): Likewise.
516         * src/input.c (push_string_init, pop_input, init_macro_token)
517         (peek_input, next_char_1, set_word_regexp): Likewise.
518         * src/m4.c (main): Likewise.
519         * src/macro.c (expand_token, expand_argument, call_macro):
520         Likewise.
521         * src/output.c (make_diversion): Likewise.
522         * src/symtab.c (symtab_init): Likewise.
524         Use build-aux directory.
525         * configure.ac (PACKAGE, VERSION): Delete, since Automake does
526         this now.
527         (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
528         instead of the top level.
529         * bootstrap: Adjust accordingly.
530         * m4/gnulib-cache.m4: Add --aux-dir option.
531         * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
533 2007-11-02  Eric Blake  <ebb9@byu.net>
535         Update some documentation about version control.
536         * NEWS: M4 is now stored in git.
537         * HACKING: Likewise.
538         * README: Likewise.
539         * bootstrap: Likewise.
540         * commit: Delete, now that CVS commits are no longer necessary.
542         Adjust to recent gnulib change.
543         * m4/gnulib-cache.m4: Drop vasprintf-posix and xvasprintf, and use
544         xvasprintf-posix instead.
546 2007-11-01  Eric Blake  <ebb9@byu.net>
548         Improve error message when early end of file occurs.
549         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
550         (M4wrap): Adjust to new messages.
551         (Improved capitalize): Enhance test.
552         * src/m4.h (next_token): Adjust prototype.
553         * src/input.c (next_token): Add new parameter, and improve error
554         message.
555         (lex_debug): Adjust callers.
556         * src/symtab.c (symtab_debug): Likewise.
557         * src/macro.c (expand_input, collect_arguments): Likewise.
558         (expand_argument): Likewise, and add parameter.
560 2007-10-31  Eric Blake  <ebb9@byu.net>
562         Test more corner cases.
563         * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
564         (Improved foreach): Document alternate foreachq style.
565         * examples/foreachq3.m4: New file.
566         * examples/loop.m4: New file.
567         * examples/Makefile.am (EXTRA_DIST): Distribute them.
569 2007-10-28  Eric Blake  <ebb9@byu.net>
571         More test coverage for autoconf usage patterns.
572         * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
573         (Builtin): Add new undocumented tests.
574         (Shift): Document cond macro, and add new test.
576 2007-10-27  Eric Blake  <ebb9@byu.net>
578         Document one use of changequote(`(',`)').
579         * doc/m4.texinfo (Changequote): Add new test, based on recent
580         autoconf addition of m4_expand.
582 2007-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
584         * examples/Makefile.am (EXTRA_DIST): Add capitalize2.m4.
586 2007-10-24  Eric Blake  <ebb9@byu.net>
588         Reduce number of mingw testsuite failures.
589         * doc/m4.texinfo (Using frozen files): Skip test on mingw.
591 2007-10-22  Eric Blake  <ebb9@byu.net>
593         Add DEBUG_REGEX debugging information.
594         * src/m4.h (DEBUG_REGEX): New debug macro.
595         * src/m4.c (main) [DEBUG_REGEX]: Open regex trace file when
596         requested.
597         * src/builtin.c (m4_patsubst, m4_regexp, compile_pattern)
598         [DEBUG_REGEX]: Trace regex usage.
600         Never let printf failures go undetected.
601         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
602         xprintf'.
603         * src/m4.h: Include xprintf.h.
604         * src/format.c (format): Warn on format failures.
605         * src/builtin.c (ntoa): Export.
606         (m4_errprint): Adjust all *printf callers.
607         * src/debug.c (debug_message_prefix, trace_format): Likewise.
608         * src/freeze.c (produce_frozen_state): Likewise.
609         * src/input.c [DEBUG_INPUT]: Likewise.
610         * src/m4.c (usage): Likewise.
611         * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
612         (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
613         * src/output.c (m4_tmpname, shipout_text, freeze_diversione):
614         Likewise.
615         * src/path.c [DEBUG_INCL]: Likewise.
616         * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
617         * src/symtab.c [DEBUG_SYM]: Likewise.
619 2007-10-17  Eric Blake  <ebb9@byu.net>
621         Fix 'm4 -F file -t undefined'.
622         * src/freeze.c (produce_frozen_state): Avoid core dump.
623         * doc/m4.texinfo (Using frozen files): Test for the bug.
624         * NEWS: Mention the fix.
626 2007-10-09  Eric Blake  <ebb9@byu.net>
628         * NEWS: Document recent speedups.
630         Fix regexp regression of 2007-09-29.
631         * src/builtin.c (substitute): Allow NULL regs when no
632         subexpressions were present.
633         (m4_regexp): Handle \ escapes even with empty regex.
634         * doc/m4.texinfo (Regexp, Patsubst): Catch this bug.
636         Cache regex compilation for another autoconf speedup.
637         * src/m4.h (free_macro_sequence): Rename...
638         (free_regex): ...to this.
639         * src/m4.c (main): Update caller.
640         * src/builtin.c (REGEX_CACHE_SIZE, m4_regex, regex_cache): New
641         declarations.
642         (compile_pattern): New function; cache recent regexes.
643         (free_regex): Rename, and clean up additional memory.
644         (m4_regexp, m4_patsubst): Use new function.
646 2007-10-02  Eric Blake  <ebb9@byu.net>
648         Document quoting pitfalls in capitalize.
649         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
650         document shortfall.
651         (Improved capitalize): New node.
652         * examples/capitalize.m4: Update to match manual.
653         * examples/capitalize2.m4: New file.
655 2007-10-01  Eric Blake  <ebb9@byu.net>
657         Another Autoconf usage pattern optimization.
658         * src/builtin.c (m4_index): Optimize search for one byte.
659         * doc/m4.texinfo (Index macro, Regexp, Patsubst): Test the new
660         code paths.
662 2007-09-29  Eric Blake  <ebb9@byu.net>
664         Optimize for Autoconf usage pattern.
665         * src/builtin.c (m4_regexp, m4_patsubst): Handle empty regex
666         faster.
668 2007-09-24  Eric Blake  <ebb9@byu.net>
670         Create .gitignore alongside .cvsignore.
671         * bootstrap (LC_ALL): Set up front.
672         (version control) Borrow idea from head, to avoid churn in
673         m4/.*ignore files modified by gnulib-tool.
675 2007-09-13  Eric Blake  <ebb9@byu.net>
677         * AUTHORS: Fix typo.
679 2007-09-07  Eric Blake  <ebb9@byu.net>
681         * AUTHORS: Simplify, to match libtool and autoconf layout.
682         * THANKS: Sync with head.
684 2007-08-10  Eric Blake  <ebb9@byu.net>
686         * doc/m4.texinfo (Compatibility): Sync with head.
688 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
689         and Eric Blake  <ebb9@byu.net>
691         * doc/m4.texinfo (Defn): Update wording.
693 2007-08-09  Eric Blake  <ebb9@byu.net>
695         POSIX requires defn(`a',`b') to concatenate definitions.
696         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
697         trying to mix a builtin with anything else.
698         * doc/m4.texinfo (Defn): Document a use for this POSIX
699         requirement.
700         (Incompatibilities): Update to match current status.
701         * NEWS: Document this change.
702         * THANKS: Update.
703         Reported by Konrad Schwarz.
705 2007-08-04  Eric Blake  <ebb9@byu.net>
707         Normalize all GPL license notices.
708         * GNUmakefile: Update license wording.
709         * Makefile.am: Likewise.
710         * Makefile.maint: Likewise.
711         * bootstrap: Likewise.
712         * commit: Likewise.
713         * configure.ac: Likewise.
714         * checks/Makefile.in: Likewise.
715         * doc/Makefile.am: Likewise.
716         * examples/Makefile.am: Likewise.
717         * src/Makefile.am: Likewise.
718         * src/builtin.c: Likewise.
719         * src/debug.c: Likewise.
720         * src/eval.c: Likewise.
721         * src/format.c: Likewise.
722         * src/freeze.c: Likewise.
723         * src/input.c: Likewise.
724         * src/m4.c: Likewise.
725         * src/m4.h: Likewise.
726         * src/macro.c: Likewise.
727         * src/output.c: Likewise.
728         * src/path.c: Likewise.
729         * src/stackovf.c: Likewise.
730         * src/symtab.c: Likewise.
732 2007-07-21  Eric Blake  <ebb9@byu.net>
734         Fix regression on NetBSD from 2007-05-28.
735         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
736         position to byte 0.
737         * NEWS: Document this fix.
738         * THANKS: Update.
739         Reported by Thomas Klausner.
741 2007-07-20  Eric Blake  <ebb9@byu.net>
743         Fix 'make distcheck' issues.
744         * Makefile.am (EXTRA_DIST): No need to distribute
745         gpl-3.0.texi.diff anymore.
746         * m4/gnulib-cache.m4: Update to latest gnulib.
748 2007-07-14  Eric Blake  <ebb9@byu.net>
750         Reflect upstream license .texi changes.
751         * doc/m4.texinfo (Copying): Rename node...
752         (GNU General Public License): ...to this.
753         (GNU Free Documentation License): Adjust node location.
754         * local/doc/gpl-3.0.texi.diff: Remove file.
756 2007-07-10  Eric Blake  <ebb9@byu.net>
758         Start 1.4.10a.
759         * configure.ac (AC_INIT): Bump version number.
760         * NEWS: Start changes since 1.4.10.
761         * doc/m4.texinfo (History): Mention 1.4.11.
762         (Copying This Package, Copying This Manual): Add index entries.
763         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
764         updated.
765         * Makefile.am (EXTRA_DIST): Remove dead file.
767 2007-07-09  Eric Blake  <ebb9@byu.net>
769         Release 1.4.10:
770         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
771         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
772         * configure.ac (AC_INIT): Bump version number.
773         * NEWS: Describe changes since 1.4.9.
775         * src/format.c: Missed a GPLv3 conversion.
777         Avoid undefined behavior of %.*c in printf.
778         * src/format.c (format): Special case %c.
779         * TODO: Document that more remains to be done.
780         * NEWS: Document the fix.
782 2007-07-05  Eric Blake  <ebb9@byu.net>
784         Fix up gnulib-tool usage.
785         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
786         * version-etc.c.diff: Move to...
787         * local/lib/version-etc.c.diff: ...here.
788         * gpl-3.0.texi.diff: Move to...
789         * local/doc/gpl-3.0.texi.diff: ...here.
791 2007-07-04  Eric Blake  <ebb9@byu.net>
793         Upgrade to GPL version 3 or later.
794         * bootstrap: Pick up GPLv3.
795         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
796         --local-dir=. --import gpl-3.0'.
797         * doc/m4.texinfo (Copying This Package): New appendix.
798         * NEWS: Mention this change.
799         * README: Mention why some files still claim to be version 2.
800         * version-etc.c.diff: New file, to make sure --version claims
801         correct GPL version.  Temporary until gnulib makes move.
802         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
803         appendix, rather than section, of the manual.
804         * GNUmakefile: Update to new license.
805         * Makefile.am: Likewise.
806         * Makefile.maint: Likewise.
807         * commit: Likewise.
808         * configure.ac: Likewise.
809         * checks/Makefile.in: Likewise.
810         * doc/Makefile.am: Likewise.
811         * examples/Makefile.am: Likewise.
812         * src/Makefile.am: Likewise.
813         * src/builtin.c: Likewise.
814         * src/debug.c: Likewise.
815         * src/eval.c: Likewise.
816         * src/freeze.c: Likewise.
817         * src/input.c: Likewise.
818         * src/m4.c: Likewise.
819         * src/m4.h: Likewise.
820         * src/macro.c: Likewise.
821         * src/output.c: Likewise.
822         * src/path.c: Likewise.
823         * src/stackovf.c: Likewise.
824         * src/symtab.c: Likewise.
826 2007-06-26  Eric Blake  <ebb9@byu.net>
828         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
830 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
832         Match Free Software Directory categories.
833         * doc/m4.texinfo (dircategory): Update.
835 2007-05-31  Eric Blake  <ebb9@byu.net>
837         * src/output.c (output_text): Fix regression from 2007-05-28.
838         * doc/m4.texinfo (History): Mention 1.4.10.
839         (Format): Make testsuite output easier to debug.
841 2007-05-29  Eric Blake  <ebb9@byu.net>
843         Start 1.4.9c.
844         * configure.ac (AC_INIT): Bump version number.
845         * NEWS: Start changes since 1.4.9b, and fix typo.
847         Beta Release 1.4.9b:
848         * configure.ac (AC_INIT): Bump version number.
849         * NEWS: Describe changes since 1.4.9.
851         Improve format support.
852         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
853         vasprintf-posix'.
854         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
855         printf with too few arguments, as in format(%*.*d,-1,-1,1).
856         * doc/m4.texinfo (Format): Expand tests, and improve
857         documentation.
858         * NEWS: Document this change.
860 2007-05-28  Eric Blake  <ebb9@byu.net>
862         Fix large diversion corner cases, including 1.4.8 regression.
863         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
864         (make_room_for): Use NULL, not 0, for pointers.
865         (insert_diversion_helper): Avoid using rewind.
866         (freeze_diversions): Allow freezing large diversions.
867         * NEWS: Document this fix.
869         Also run gnulib unit tests during make check.
870         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
871         --tests-base=tests --with-tests'.
872         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
873         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
875 2007-05-25  Eric Blake  <ebb9@byu.net>
877         Backport prompts in examples from head.
878         * src/macro.c (expand_macro): Shorten message.
879         * doc/m4.texinfo (Manual, Command line files, Comments)
880         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
881         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
882         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
883         (Using frozen files, Improved forloop, Improved foreach): Add
884         prompts to examples.
885         * checks/get-them: Ignore prompts in examples.
887         Fix sync line interaction with multiline comments.
888         * doc/m4.texinfo (Other Incompatibilities): Add example, and
889         document bug in --syncline/divert interaction.
890         (Preprocessor features): Augment test.
891         * src/m4.h (output_text): Export.
892         (shipout_text, next_token): Add parameter.
893         * src/freeze.c (reload_frozen_state): Don't interfere with
894         synclines when reloading state.
895         * src/output.c (output_text): Export.
896         (shipout_text): Take new parameter for start line of token.
897         Output at most one syncline per token.
898         * src/input.c (next_token): Report line where multiline tokens
899         start.
900         * src/macro.c (expand_input, expand_token, expand_argument):
901         Adjust callers so that line is passed from input to output.
902         * NEWS: Document this fix.
903         Reported by Sergey Poznyakoff.
905         Test -s in testsuite.
906         * doc/m4.texinfo (Preprocessor features): Add a test.
907         * checks/get-them: Support extra options in testsuite.
908         * checks/check-them (examples): Use extra options.
909         * THANKS: Update.
910         Reported by Sergey Poznyakoff.
912 2007-05-24  Eric Blake  <ebb9@byu.net>
914         Support POSIX flush semantics on all platforms.
915         * m4/gnulib-cache.m4: Remove closeout, and augment with
916         'gnulib-tool --import closein fflush'.
917         * src/m4.h (includes): Use closein, not closeout.
918         * src/m4.c (main): Ensure stdin is flushed when not all input is
919         consumed.
920         (process_file): No return needed.
921         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
922         than excluding mingw.
923         * NEWS: Document this change.
925         Work around cygwin and mingw fseeko bugs.
926         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
927         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
929 2007-04-25  Eric Blake  <ebb9@byu.net>
931         Fix negative division within eval, regression of 2007-01-06.
932         * doc/m4.texinfo (Eval): Catch this bug.
933         * src/eval.c (mult_term): Fix it.
934         * NEWS: Document this.
935         * THANKS: Update.
936         Reported by Cesar Strauss.
938 2007-04-23  Eric Blake  <ebb9@byu.net>
940         Start 1.4.9a.
941         * configure.ac (AC_INIT): Bump version number.
942         * NEWS: Start changes since 1.4.9.
944 2007-03-23  Eric Blake  <ebb9@byu.net>
946         Release 1.4.9:
947         * configure.ac (AC_INIT): Bump version number.
948         * NEWS: Describe changes since 1.4.8b.
950 2007-03-16  Eric Blake  <ebb9@byu.net>
952         * doc/m4.texinfo (Mkstemp): Tweak wording.
953         * src/output.c (output_init): Adjust to latest gnulib.
955 2007-03-15  Eric Blake  <ebb9@byu.net>
957         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
958         long long, it confuses gnulib).
959         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
960         if unsigned long long doesn't work.
961         * THANKS: Update.
962         Reported by Matthew Woehlke.
964 2007-03-07  Eric Blake  <ebb9@byu.net>
966         * AUTHORS: Update.
967         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
969 2007-03-01  Eric Blake  <ebb9@byu.net>
971         * doc/m4.texinfo: Pick up more index entries from head.  Follow
972         more texinfo recommendations.
973         (Sysval): Improve tests.
975         Avoid overfull \vbox warning from texinfo, due to indices that
976         weren't quite big enough to split across page boundaries.
977         * doc/m4.texinfo: Add lots of concept index entries.
978         (Concept Index): Move to be last, as recommended by texinfo
979         manual.
980         (Define, Arguments, Pseudo Arguments): Add more function entries.
982 2007-02-28  Eric Blake  <ebb9@byu.net>
984         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
985         137.
986         (Pseudo Arguments): Add useful example.
988         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
989         reflect POSIX XCU ERN 118.
991         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
992         * src/m4.c (usage): ...here,...
993         * src/builtin.c (set_macro_sequence): ...and here.
994         (define_user_macro): Fix typo.
995         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
996         inaccuracies.
997         (Shift): Document composite macro argn for portably getting at
998         positional parameters beyond 9.
999         * configure.ac (AC_INIT): Bump version number.
1000         * NEWS: Start changes of 1.4.8c.
1002 2007-02-24  Eric Blake  <ebb9@byu.net>
1004         Beta Release 1.4.8b:
1005         * configure.ac (AC_INIT): Bump version number.
1006         * NEWS: Describe changes since 1.4.8.
1008         Reserve all uses of raw ${} in macro definitions, not just
1009         ${<digit>}.
1010         * src/builtin.c (set_macro_sequence): Change default macro
1011         sequence.
1012         * doc/m4.texinfo (Operation modes): Update to match.
1013         * src/m4.c (usage): Likewise.
1014         * NEWS: Likewise.
1016 2007-02-23  Eric Blake  <ebb9@byu.net>
1018         * src/m4.h (includes): Update to latest gnulib.
1020 2007-02-08  Eric Blake  <ebb9@byu.net>
1022         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
1023         more flexible, and so that autoconf can use it.
1024         * src/m4.h (set_macro_sequence, free_macro_sequence): New
1025         prototypes.
1026         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
1027         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
1028         New variables and functions.
1029         (define_user_macro): Allow flexibility in regular expression used
1030         to trigger warning.
1031         * src/m4.c (warn_syntax): Delete.
1032         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
1033         spelling of option, along with optional argument.
1034         * doc/m4.texinfo (Operation modes, Arguments): Document this
1035         change.
1036         * NEWS: Document this change.
1038 2007-02-05  Eric Blake  <ebb9@byu.net>
1040         * m4/gnulib-cache.m4: Module strstr no longer exists.
1042         Avoid bool bitfields, as they don't work on AIX.
1043         * src/m4.h (bool_bitfield): New typedef.
1044         (struct symbol, struct builtin): Use it.
1045         * src/input.c (struct input_block): Likewise.
1046         Reported by Albert Chin.
1048         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
1049         Reported by Albert Chin.
1050         * THANKS: Update.
1052 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1054         * doc/m4.texinfo (Input processing): Further clarifications.
1056 2007-02-03  Eric Blake  <ebb9@byu.net>
1058         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
1059         the examples.
1060         Reported by Bruno Haible.
1062 2007-02-01  Eric Blake  <ebb9@byu.net>
1064         * src/m4.c (fatal_warnings): New variable.
1065         (usage): Document new -E behavior.
1066         (main): Make -E an additive option.
1067         (m4_error, m4_error_at_line): Change exit status when required.
1068         * NEWS: Document this change.
1069         * doc/m4.texinfo (Operation modes): Likewise.
1070         Reported by Ralf Wildenhues.
1072 2007-01-27  Eric Blake  <ebb9@byu.net>
1074         * src/m4.h (warn_syntax): Declare.
1075         (init_pattern_buffer): Export.
1076         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
1077         (long_options, main): Implement new option.
1078         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
1079         (define_user_macro): Warn on $11 and ${1} if requested.
1080         * src/input.c (init_pattern_buffer): Delete duplicate method.
1081         * doc/m4.texinfo (Operation modes): Document it.
1082         (Arguments): Document future direction of ${11} vs. $11.
1083         (Incompatibilities): Fix wording on POSIX limitations.
1084         * checks/get-them: Parse @{ and @} correctly.
1085         * NEWS: Document this change.
1087 2007-01-26  Eric Blake  <ebb9@byu.net>
1089         * src/builtin.c (includes): Adjust to gnulib changes.
1091 2007-01-15  Eric Blake  <ebb9@byu.net>
1093         * doc/m4.texinfo: Pull in various improvements from head.
1094         * src/builtin.c (include): Alter exit status on failure.
1095         * NEWS: Document this fix.
1097 2007-01-13  Eric Blake  <ebb9@byu.net>
1099         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
1100         assume the fallback of ss_base for BSDI 4.0.1.
1101         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
1102         ! HAVE_STACK_T_SS_SP]: Use this check.
1103         Reported by Chris McGuire.
1104         * THANKS: Update.
1105         * NEWS: Document the improvement.
1107 2007-01-09  Eric Blake  <ebb9@byu.net>
1109         * src/eval.c (ASSIGN): New enumerator.
1110         (eval_lex): Recognize '='.
1111         (equality_term): Treat '=' like '==', but warn that it is
1112         deprecated.
1113         * doc/m4.texinfo (Eval): Document and test this.
1114         (Incompatibilities): Document the POSIX incompatibility.
1115         * NEWS: Document this change.
1117 2007-01-06  Eric Blake  <ebb9@byu.net>
1119         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
1120         * checks/check-them: Record expected exit status.
1121         * checks/get-them: Check exit status.
1122         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
1123         instead.
1124         * src/builtin.c: All users changed.
1125         * src/eval.c: Likewise.  Also document where we are triggering
1126         undefined or implementation-defined behavior.
1127         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
1128         (logical_or_term, logical_and_term, logical_not_term, not_term)
1129         (equality_term, unary_term): Port from head to follow POSIX
1130         semantics.
1131         (exp_term): Reject 0**0 as undefined.
1132         * doc/m4.texinfo (History): Mention 1.4.9.
1133         (Format, Incompatibilities): Update to document POSIX compliance.
1134         * NEWS: Document this change.
1136 2007-01-04  Eric Blake  <ebb9@byu.net>
1138         * NEWS: Document previous fix.
1139         * THANKS: Update.
1141 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
1143         Fix Debian bug 405594, introduced 2006-11-01 from a bad
1144         copy-n-paste from head.
1145         * src/m4.c (main): Use correct file name after --.
1147 2007-01-04  Eric Blake  <ebb9@byu.net>
1149         Fix regression from 1.4.7 in large file handling on some
1150         platforms, introduced on 2006-10-13.
1151         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
1152         will be handled.
1153         * NEWS: Document this fix.
1155 2007-01-03  Eric Blake  <ebb9@byu.net>
1157         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1158         version-etc-fsf'.
1159         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
1160         it bumps the copyright year).
1162 2006-12-27  Eric Blake  <ebb9@byu.net>
1164         * doc/m4.texinfo (Patsubst): Fix typo.
1166 2006-12-16  Eric Blake  <ebb9@byu.net>
1168         * src/m4.c (main): Check for errors when closing stdin.
1170 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1172         * doc/m4.texinfo: Fix some typos.
1174 2006-12-09  Eric Blake  <ebb9@byu.net>
1176         * configure.ac (AC_INIT): Bump version number.
1177         * NEWS: Start changes of 1.4.8a.
1179 2006-11-20  Eric Blake  <ebb9@byu.net>
1181         Release 1.4.8:
1182         * configure.ac (AC_INIT): Bump version number.
1183         * NEWS: Describe changes since 1.4.7.
1185 2006-11-16  Eric Blake  <ebb9@byu.net>
1187         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
1188         Minor tweaks noticed while porting to head.
1190 2006-11-14  Eric Blake  <ebb9@byu.net>
1192         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
1193         spent iterators.
1194         (m4_tmpname): Avoid memory leak.
1196 2006-11-13  Eric Blake  <ebb9@byu.net>
1198         * src/output.c (cleanup_tmpfile): Avoid double error message when
1199         umask is prohibitive.
1200         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
1201         functions.
1202         (m4_tmpfile): Add parameter, move cloexec action here.
1203         (make_room_for): Adjust caller.  Don't keep too many files open.
1204         (insert_diversion_helper): Unlink emptied temp files.
1205         (make_diversion): Don't keep too many files open.
1206         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
1207         descriptors are no longer a limiting factor.
1208         * NEWS: Document this change.
1210         Backport sparse diversion handling from head.
1211         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1212         avltree-oset'.
1213         * src/output.c (struct m4_diversion): Rename from struct
1214         diversion, and update members.  All users changed.
1215         (diversion_table): Change to an ordered set, instead of an array.
1216         (div0): New storage for diversion 0.
1217         (diversions): No longer needed.
1218         (free_list): New list to allow recycling diversion storage.
1219         (diversion_storage): New storage to reduce malloc overhead.
1220         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
1221         (output_init, output_exit, cleanup_tmpfile, make_room_for)
1222         (make_diversion): Handle new diversion storage scheme.
1223         (insert_diversion_helper): New function.
1224         (insert_diversion, undivert_all, freeze_diversions): Use it.
1225         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
1226         exhaustion to visible test of large diversion numbers.
1227         * NEWS: Document this fix.
1229 2006-11-11  Eric Blake  <ebb9@byu.net>
1231         * src/builtin.c (m4_translit): Slight optimization.
1233         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
1235         * src/builtin.c: Remove unnecessary casts.
1236         (expand_ranges): Make 8-bit clean.
1237         * doc/m4.texinfo (Translit): Add tests and wording.
1238         * NEWS: Document this fix.
1240 2006-11-07  Eric Blake  <ebb9@byu.net>
1242         * src/m4.h (output_exit): New prototype.
1243         * src/m4.c (main): Use it.
1244         * src/output.c (cleanup_tmpfile): Close files before removing
1245         directory.
1246         (insert_diversion): Check for failure.
1247         (output_exit): Avoid memory leak.
1248         * doc/m4.texinfo (Diversions): Test this bug.
1250         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
1252 2006-11-01  Eric Blake  <ebb9@byu.net>
1254         Allow C++ compilation on Linux, as a safety measure in type
1255         checking.
1256         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1257         stdbool'.
1258         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
1259         (boolean): Kill this, and use stdbool.h instead.
1260         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
1261         * src/output.c, src/symtab.c: All users changed.
1262         * src/symtab.c (hack_all_symbols): Update prototype.
1263         * src/builtin.c (dump_symbol, set_trace): Update signature.
1264         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
1265         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
1266         C++ compilation.
1267         * src/debug.c (trace_flush): Likewise.
1268         * src/freeze.c (reload_frozen_state): Likewise.
1269         * src/input.c (push_file, push_string_finish, push_wrapup):
1270         (token_bottom, next_token): Likewise.
1271         * src/m4.c (main): Likewise.
1273         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
1274         draft wording.
1275         * src/m4.h (m4_path_search): Tweak signature.
1276         * src/path.c (m4_path_search): Likewise.
1277         * src/builtin.c (include): Update caller.
1278         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
1279         with file names.  Don't write to **argv.
1280         (process_file): New helper method.
1281         * NEWS: Document this fix.
1283 2006-10-31  Eric Blake  <ebb9@byu.net>
1285         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
1286         * doc/m4.texinfo (Translit): Improve the documentation.
1287         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
1288         algorithm.
1289         (m4_index): Simplify, and speed up slightly.
1290         * NEWS: Document this fix.
1292 2006-10-28  Eric Blake  <ebb9@byu.net>
1294         * src/input.c (set_quotes): Don't allow empty end-quote with
1295         non-empty start-quote.
1296         (set_comment): Likewise for end-comment.
1297         * src/builtin.c (m4_changecom): Adjust caller.
1298         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
1299         match behavior.
1300         (Incompatibilities): Document another POSIX bug.
1301         * NEWS: Mention this change.
1303 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1305         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
1306         files.
1308 2006-10-26  Eric Blake  <ebb9@byu.net>
1310         Silence -Wwrite-strings -Wpointer-arith warnings.
1311         * src/builtin.c (define_user_macro): Allow NULL argument.
1312         (m4_builtin, m4_indir): Cast away const of "".
1313         * src/format.c (format): Likewise.
1314         * src/macro.c (collect_arguments): Likewise.
1315         (expand_macro): Avoid math on void*.
1316         * src/m4.c (main): Adjust caller.
1317         * src/output.c (freeze_diversions): Detect off_t overflow.
1319         * src/input.c (pop_input): Remove unnecessary code.
1321 2006-10-25  Eric Blake  <ebb9@byu.net>
1323         * src/symtab.c (symtab_init): Avoid size_t overflow.
1324         * src/output.c (make_diversion): Avoid size_t overflow.
1325         * doc/m4.texinfo (Diversions): Test this fix.
1326         * src/input.c (input_block): Remove unused member.  Reduce size
1327         of struct.
1328         (push_file, pop_input): Avoid useless assignment.
1329         * NEWS: Document the bug fix.
1331         Redo location tracking.  Instead of having just files track the
1332         line to return to when popping input, now all input blocks track
1333         their current line.
1334         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
1335         needed.
1336         (input_block): Have line and file storage for all input types, and
1337         rename some members.
1338         (input_change): New global flag.
1339         (push_file, push_macro, push_string_init, push_wrapup): Store
1340         location.
1341         (push_string_finish, pop_input, pop_wrapup): Notice changes in
1342         input blocks.
1343         (peek_input): Adjust to new member names.
1344         (next_char, next_char1): Adjust location if needed.
1345         (skip_line): Simplify restoring location.
1346         * doc/m4.texinfo (Location): Augment the test to catch line
1347         location of expansion of multi-line arguments.
1348         Reported by Stepan Kasal.
1350 2006-10-23  Eric Blake  <ebb9@byu.net>
1352         * doc/m4.texinfo (Macro Arguments): Document that leading space
1353         in argument collection stops at macro expansion.
1354         (Incompatibilities): Document POSIX whitespace wording issue.
1356 2006-10-20  Eric Blake  <ebb9@byu.net>
1358         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
1359         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
1360         end of a TeX line splits incorrectly.
1361         (Foreach, Improved foreach): Write these sections, borrowing ideas
1362         from CVS head and from m4sugar.
1363         * checks/get-them: Accomodate new way to show trailing space in
1364         examples.
1365         * examples/foreach.m4: Make usable in documentation.
1366         * examples/foreachq.m4: New file.
1367         * examples/foreachq2.m4: New file.
1368         * examples/foreach2.m4: New file.
1369         * NEWS: Document the documentation updates.
1371 2006-10-19  Eric Blake  <ebb9@byu.net>
1373         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
1374         (m4_maketemp): Provide traditional behavior.
1375         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
1376         new `mkstemp' macro and the flaws of the old `maketemp'.
1377         (Incompatibilities): Move maketemp discussion to...
1378         (Extensions): ...here, since -G now supresses the GNU extension.
1379         * NEWS: Document this.
1381         * examples/forloop.m4: Simplify.
1382         * examples/forloop2.m4: New file.
1383         * examples/quote.m4: New file.
1384         * doc/m4.texinfo (Loops): Rename to...
1385         (Shift): ...this node.
1386         (Forloop, Foreach, Improved forloop, Improved foreach): New
1387         nodes.
1389 2006-10-17  Eric Blake  <ebb9@byu.net>
1391         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
1392         config-h'.
1393         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
1394         gnulib headers, rather than in top directory.
1395         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
1396         output clutter.
1398 2006-10-16  Eric Blake  <ebb9@byu.net>
1400         * doc/m4.texinfo: Backport some minor cleanups from head.
1401         (Cleardivert): Rename from cleardiv.
1403         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
1404         a section of Preliminaries.
1405         (Operation modes, Preprocessor features, Limits control)
1406         (Frozen state, Debugging options, Command line files): Subdivide
1407         into new sections.
1408         (Input processing, Quoting Arguments, Define, Arguments)
1409         (Cleardiv, Format, M4exit): Fix grammar of references.
1410         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
1411         (Debug Levels, Debug Output, Include, Search Path, Divert)
1412         (Platform macros, Syscmd, Location, Extensions): Point to new
1413         sections.
1414         (Top, Loops, Include, Undivert, Location, Incompatibilities):
1415         Improve file references.
1417 2006-10-14  Eric Blake  <ebb9@byu.net>
1419         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
1420         is not portable.
1421         Reported by Ralf Wildenhues.
1423         * src/builtin.c (m4_undivert): Check for read error.
1425 2006-10-13  Eric Blake  <ebb9@byu.net>
1427         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
1428         header files are included, since <unistd.h> can affect the tests.
1429         * THANKS: Updated.
1430         Reported by Martin Koeppe.
1432         Backport head's usage of clean-temp module, as it is cleaner than
1433         using tmpfile-safer.
1434         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1435         clean-temp closeout', and remove tmpfile-safer.
1436         * src/m4.h (includes): Adjust.
1437         (m4_path_search): Rename from path_search, to avoid collision
1438         with gnulib.
1439         * src/m4.c (main): Install closeout handler.  Adjust caller.
1440         (usage): Now done by closeout module.
1441         * src/builtin.c (m4_m4exit): Likewise.
1442         (m4_undivert, include): Adjust callers.
1443         * src/freeze.c (reload_frozen_state): Likewise.
1444         * src/path.c (m4_path_search): Rename from path_search.
1445         * src/output.c (output_temp_dir): New variable.
1446         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
1447         (insert_diversion, make_room_for): Use them.
1448         * doc/m4.texinfo (Diversions): Document this, and add a test.
1449         (Improved fatal_error): Fix typo.
1450         (Maketemp): Port test to mingw, and no longer hide from
1451         documentation.
1452         * NEWS: Document the change in TMPDIR behavior.
1454         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
1455         macros, to work with recent gnulib-tool update.
1457         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
1458         handling of defn results.
1459         * doc/m4.texinfo (Builtin, Indir): Add test cases.
1460         * NEWS: Document this.
1462 2006-10-12  Eric Blake  <ebb9@byu.net>
1464         * doc/m4.texinfo (Location): Fix typo in previous commit.
1465         (Changeword): Catch one more case.
1466         * src/input.c (skip_line): Fix case when outer file used macro to
1467         supply the \n.
1469 2006-10-11  Eric Blake  <ebb9@byu.net>
1471         * src/input.c (enum input_type): Add additional types, to shave
1472         time off the common case.
1473         (push_wrapup): Wrapped strings remember location.
1474         (push_string_finish): Normal strings carry no location.
1475         (push_file): Start new files uninitialized.
1476         (peek_input, next_char_1): Optimize common cases by updating
1477         location only on new input types.
1478         (pop_input): Update to honor new input types.
1479         (skip_line, push_string_finish): Fix regression in previous patch
1480         when dnl is not followed by newline in included file.
1481         (push_string_init): Initialize all fields of INPUT_STRING sooner.
1482         (peek_token): Simplify.
1483         (peek_input): Don't pop input files on peek, so that __file__ and
1484         __line__ as last token of include file work correctly.
1485         * doc/m4.texinfo (History): Mention 1.4.8.
1486         (Answers): Split into sections, one per answer.
1487         (Improved exch, Improved cleardivert, Improved fatal_error): New
1488         nodes.
1489         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
1490         new m4wrap location semantics.
1491         (Changeword): Add test that caught the regression.
1492         * NEWS: Document this.
1494         * src/macro.c (expand_macro): In macro expansion errors, report
1495         line number at open parenthesis.
1496         * src/input.c (next_token): Fix off-by-one bug in reporting end
1497         of file in unterminated comment and string.
1498         (file_names): New obstack, necessary since expand_macro now hangs
1499         on to file names longer than the files remain open.
1500         (input_init): Initialize new obstack.
1501         (push_file): Use new obstack.  Delay updates to current_file
1502         until after expand_macro has restored state.
1503         (peek_input, next_char_1): Update current_file if necessary.
1504         (pop_wrapup): Release memory.
1505         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
1506         the off-by-one bug.
1507         (Dnl): Update to the new location reporting rules.
1508         * NEWS: Document these changes.
1510 2006-10-10  Eric Blake  <ebb9@byu.net>
1512         * src/macro.c (argc_stack, argv_stack): New variables for sharing
1513         obstacks across multiple macro calls.
1514         (expand_input): Initialize and tear down stack once per input
1515         file, instead of once per macro.
1516         (expand_macro): Reuse existing stacks when possible.
1517         (collect_arguments): Simplify slightly.
1519         * src/path.c (include_env_init): Fix botched patch application.
1520         Reported by Ralf Wildenhues.
1522 2006-10-09  Eric Blake  <ebb9@byu.net>
1524         * src/m4.c (usage, main): Detect write failures to stderr.
1525         * src/builtin.c (m4_m4exit): Likewise.
1526         * NEWS: Document this.
1528         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
1529         the limit.
1530         * NEWS: Document this.
1531         * doc/m4.texinfo (Invoking m4): Likewise.
1533 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1535         * src/path.c (include_env_init): Copy the string returned
1536         by getenv before overwriting it; POSIX disallows this.
1538 2006-10-09  Eric Blake  <ebb9@byu.net>
1540         * src/m4.c (main): Defer debugfile until after --help.
1541         * configure.ac (AC_INIT): Bump version number.
1542         * NEWS: Start changes of 1.4.7a.
1544 2006-09-25  Eric Blake  <ebb9@byu.net>
1546         Release 1.4.7:
1547         * configure.ac (AC_INIT): Bump version number.
1548         * NEWS: Describe changes since 1.4.6.
1550 2006-09-21  Eric Blake  <ebb9@byu.net>
1552         * doc/m4.texinfo (Invoking m4): Add clarification on option
1553         processing behavior.
1554         * THANKS: Update.
1555         Reported by Mikhail Teterin.
1557         * bootstrap: Add --force option, based on idea from coreutils.
1558         * README: Document that ./bootstrap and autoreconf are for
1559         developers, and not lightly done in tarballs.
1561 2006-09-20  Eric Blake  <ebb9@byu.net>
1563         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
1564         deprecation warning on -e.
1565         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
1566         * NEWS: Document this.
1568 2006-09-19  Eric Blake  <ebb9@byu.net>
1570         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
1571         -o/--error-output to --debugfile, and deprecate the former.  This
1572         will allow a future release to be more consistent with other GNU
1573         tools, with -o/--output affecting stdout, not debug.
1574         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
1575         * NEWS: Document this.
1577 2006-09-14  Eric Blake  <ebb9@byu.net>
1579         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
1580         --diversions. `m4 --help --version' now displays help, not
1581         version.
1582         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
1583         smaller scope.
1584         (show_help, show_version): No longer needed.
1585         (long_options, DIVERSIONS_OPTION): Backport patch from head to
1586         distinguish between -N and --diversions in warning.
1587         * doc/m4.texinfo (Invoking m4): Document this.
1588         * NEWS: Likewise.
1590 2006-09-11  Eric Blake  <ebb9@byu.net>
1592         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
1593         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
1594         seekable.
1595         (debug_set_file): Use STDOUT_FILENO.
1596         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
1597         with POSIX in regards to unread input.
1598         * NEWS: Document this fix.
1599         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
1601 2006-09-07  Eric Blake  <ebb9@byu.net>
1603         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
1604         * src/m4.h (push_file): Change prototype.
1605         * src/input.c (push_file, peek_input, next_char_1): Only call getc
1606         once at EOF, to avoid double ^D on terminal stdin; regression from
1607         2006-09-04.
1608         (push_file, pop_file): Allow reading stdin twice.
1609         * src/m4.c (main): Likewise.
1610         * src/builtin.c (include): Update caller.
1611         * NEWS: Document this change.
1612         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
1613         (Syscmd): Add a test that failed before this patch.
1615 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1617         * checks/check-them: Quote $pwd.
1619 2006-09-05  Eric Blake  <ebb9@byu.net>
1621         * src/builtin.c (define_macro): Warn on invalid macro name.
1622         * NEWS: Document this change.
1623         * doc/m4.texinfo: Fix typos.
1624         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
1625         (Ifelse): Backport some improvements from head.
1627 2006-09-04  Eric Blake  <ebb9@byu.net>
1629         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
1630         native echo is braindead.
1631         * checks/check-them (strip_needed): Ignore \r in output.  Now the
1632         testsuite will pass when cross-compiling from cygwin to mingw.
1634         * src/input.c (peek_input): Fix regression in handling macro
1635         without arguments as last token in file; debian bug 385720.
1636         (next_token): Always consume an input character.
1637         Reported by Andreas Schultz.
1638         * configure.ac (AC_INIT): Bump version number.
1639         * NEWS: Document this fix.
1640         * doc/m4.texinfo (History): Mention next version.
1641         (Changeword): Add example that exposes this bug.
1642         * THANKS: Update.
1644 2006-08-25  Eric Blake  <ebb9@byu.net>
1646         Release 1.4.6:
1647         * configure.ac (AC_INIT): Bump version number.
1648         * NEWS: Describe changes since 1.4.5.
1650         * Makefile.maint (web-manual): Give up on VPATH build during
1651         distribution.  But distributions are made so infrequently that
1652         this is not too much of a hardship.
1653         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1654         exists.
1656 2006-08-24  Eric Blake  <ebb9@byu.net>
1658         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1659         Solaris, produce output on just one argument.
1660         (m4_regexp, m4_patsubst): For consistency, do likewise.
1661         (m4_patsubst): Allow zero-length match at end of string.
1662         * doc/m4.texinfo (Sysval): Fix overfull hbox.
1663         (Bugs, Macro Arguments): Minor fixes.
1664         (Other tokens): Rearrange node order.
1665         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1666         * NEWS: Document these fixes.
1668 2006-08-22  Eric Blake  <ebb9@byu.net>
1670         * src/input.c (pop_input): Avoid empty filename with -di option.
1671         * src/debug.c (debug_message_prefix): Put space before message.
1673         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1675         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1676         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1678         * checks/check-them: State why a test is skipped.
1679         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1681         * ChangeLog: Add copyright.
1682         * AUTHORS: Likewise.
1683         * BACKLOG: Likewise.
1684         * README: Likewise.
1685         * THANKS: Likewise.
1686         * TODO: Likewise.
1687         * examples/COPYING: New file, add copyright for all the examples.
1688         * checks/get-them: Put copyright on testsuite files.
1690 2006-08-18  Eric Blake  <ebb9@byu.net>
1692         Don't let unrelated child processes see too many files.
1693         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1694         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1695         spelling in error message.
1696         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1697         (debug_set_output): Close debug file on exec.
1698         * src/m4.h (includes): Add cloexec.h.
1699         * src/output.c (make_room_for): Close diversions on exec.
1700         * src/path.c (path_search): Close include files on exec.
1701         * NEWS: Document this.
1703         Regular expressions were leaking memory.
1704         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1705         helper methods.
1706         (m4_regexp, m4_patsubst): Avoid memory leak.
1707         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1708         static.
1709         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
1710         from O(n^2) to O(n) for calculating word_start.
1711         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1712         O(1) bitmap, not O(n) search string.
1713         * NEWS: Document this fix.
1715 2006-08-17  Eric Blake  <ebb9@byu.net>
1717         * NEWS: Document previous checkin.
1719         * src/builtin.c (substitute): Avoid core dump when accessing
1720         beyond bound of regular expression.
1721         Reported by Karl Nelson.
1722         * doc/m4.texinfo (Regexp): Add example that causes core dump on
1723         some architectures prior to this patch.
1724         * THANKS: Updated.
1726 2006-08-16  Eric Blake  <ebb9@byu.net>
1728         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1729         clear that dumpdef does not always go to stderr.
1731         * src/builtin.c (m4_errprint): Flush buffers before printing to
1732         stderr.
1733         * THANKS: Updated.
1735 2006-08-15  Eric Blake  <ebb9@byu.net>
1737         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1738         per debian bug 96075.
1739         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1740         (Changeword): Don't use shift as an example of a swallowed word.
1741         (Divert): Discuss fact that divert is an English word.
1742         Reported by Richard A Nelson.
1744 2006-08-14  Eric Blake  <ebb9@byu.net>
1746         * doc/m4.texinfo (Invoking m4): Minor fixes.
1748 2006-08-12  Eric Blake  <ebb9@byu.net>
1750         * doc/m4.texinfo (Arguments): Hint at better exch macro.
1751         (Answers): Provide a better definition.
1753 2006-08-09  Eric Blake  <ebb9@byu.net>
1755         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1756         yet understand locales.
1757         * NEWS: Fix wording of a few items.
1759 2006-08-08  Eric Blake  <ebb9@byu.net>
1761         Avoid printing `NONE:0:' in error messages.
1762         * src/m4.h (m4_error_at_line): New function.
1763         * src/m4.c (m4_error_at_line): Implement.
1764         * src/input.c (skip_line, input_init, next_token): Use "", not
1765         "NONE", for no file, since NONE can be a real file name.
1766         * src/macro.c (expand_argument): Likewise.
1767         * src/debug.c (debug_message_prefix, trace_header): Check for
1768         current file.
1769         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1770         (Location): Document that synclines and internal message format
1771         are not impacted by redefining these macros.
1772         (M4exit): Hint at bug in fatal_error.
1773         (Answers): Provide workaround to match m4 output.
1775         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1776         * src/m4.h (m4_error): New function.
1777         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1778         error module deficiencies.
1779         (reference_error, suppress_line): No longer needed.
1780         * src/m4.c (m4_error): Implement.
1781         (main): No longer need to install error callback.
1783 2006-08-04  Eric Blake  <ebb9@byu.net>
1785         * src/m4.h (program_name): Declare.
1786         (suppress_line): New variable.
1787         (M4ERROR_AT_LINE): New macro.
1788         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1789         for error message format.
1790         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1791         * src/macro.c (expand_argument): Likewise.
1792         * checks/check-them (examples): Adjust to new message format.
1793         * src/builtin.c (m4___program__): New builtin.
1794         * doc/m4.texinfo (Location): Split from Errprint into new node,
1795         and document __program__.
1796         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1797         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1798         format.
1799         (Extensions): Document __program__.
1800         * NEWS: Document this change.
1802 2006-08-03  Eric Blake  <ebb9@byu.net>
1804         Don't confuse leading `(' in comment or quote with start of
1805         argument collection.
1806         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1807         TOKEN_CLOSE.
1808         (peek_input): Make private to input.c.
1809         (peek_token): New prototype.
1810         * src/input.c (default_word_regexp): Reduce ifdefs.
1811         (peek_input): Make static.
1812         (next_token): Return new token types.
1813         (match_input, MATCH): Add argument consume, which controls
1814         whether match should be pushed back.
1815         (peek_token): New function.
1816         (token_type_string) [DEBUG_INPUT]: New function.
1817         * src/macro.c (expand_token, expand_argument, collect_arguments):
1818         Handle new token types.
1819         * doc/m4.texinfo (Changequote, Changecom): Document this.
1820         * NEWS: Document this.
1822         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1824         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1825         overflow detection when sigstack exists but is not implemented.
1826         Fixes debian bug 154053.
1827         * THANKS: Updated.
1828         Reported by David Perlin.
1830 2006-08-02  Eric Blake  <ebb9@byu.net>
1832         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1833         close.
1835 2006-08-01  Eric Blake  <ebb9@byu.net>
1837         * src/input.c (skip_line, next_token): Remember current file in
1838         case input file ends abruptly.  Addresses debian bug 175365.
1839         (pop_input): Defer freeing storage that holds previous file
1840         name...
1841         (pop_wrapup): to here, after error message is issued.
1842         * src/macro.c (expand_argument): Remember current file in case
1843         input file ends abruptly.
1844         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1845         (M4wrap): Adjust testsuite accordingly.
1846         (Errprint): Document line number limitation of m4wrap.
1847         * NEWS: Document this fix.
1848         * THANKS: Update.
1850 2006-07-31  Eric Blake  <ebb9@byu.net>
1852         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1853         clean; fixes debian bug 311378.
1854         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1855         (Changequote, Changecom): Add examples to test this.
1856         * NEWS: Document this fix.
1857         * THANKS: Update.
1858         Reported by Steven Augart.
1860         * doc/m4.texinfo: Whitespace fix.
1861         * checks/get-them: Avoid exceeding 14-char file name limit.
1862         * THANKS: Update.
1864 2006-07-30  Eric Blake  <ebb9@byu.net>
1866         * src/path.c (path_search): Detect allocation failure.
1868         Use native free when it is good enough.
1869         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1870         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1871         Adjust calls.
1872         * src/symtab.c (free_symbol): Likewise.
1873         * src/m4.c (xfree, main): Likewise.
1874         * src/m4.h (obstack_chunk_free): Likewise.
1875         * src/path.c (path_search): Likewise.
1876         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1878         * doc/m4.texinfo (Errprint): Add example for last patch.
1879         * checks/check-them: Account for VPATH in latest example.
1881 2006-07-29  Eric Blake  <ebb9@byu.net>
1883         * src/path.c (path_search): Add result parameter, so that
1884         -I can be accounted for.  Debian bug 53685.
1885         * src/m4.h (path_search): Update prototype.
1886         * src/m4.c (main): Adjust callers.
1887         * src/freeze.c (reload_frozen_state): Likewise.
1888         * src/builtin.c (include, m4_undivert): Likewise.
1889         * NEWS: Document this change.
1890         Reported by Nicolas Lichtmaier.
1892 2006-07-28  Eric Blake  <ebb9@byu.net>
1894         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1895         several non-GNU makes.
1896         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1897         * src/m4.h: Likewise.
1898         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1899         /usr/ccs/bin/ucbcc.
1901 2006-07-27  Eric Blake  <ebb9@byu.net>
1903         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1904         (History): Update for 1.4.6.
1906         * src/m4.h (_): Remove K&R cruft.
1907         * src/builtin.c: Likewise.
1908         * src/debug.c: Likewise.
1909         * src/eval.c: Likewise.
1910         * src/macro.c: Likewise.
1911         * src/stackovf.c: Likewise.
1913         * doc/Makefile.am (m4.1): Improve man page.
1914         * src/m4.c (usage): Improve --help output, including adding the
1915         bug reporting address.
1916         (main): Follow GNU Coding Standards for --version output.
1918 2006-07-26  Eric Blake  <ebb9@byu.net>
1920         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1921         end-comment consistently, to match POSIX.
1923         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1924         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1925         (Incompatibilities): Document incompatibility of changecom
1926         vs. macro names, and of EOF in include.
1927         * src/input.c (next_token): Reject unterminated comments at EOF.
1928         (skip_line): Warn on unterminated dnl at EOF.
1929         * NEWS: Document these changes.
1931 2006-07-25  Eric Blake  <ebb9@byu.net>
1933         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1934         stdio-safer into fopen-safer and tmpfile-safer.
1935         * src/m4.c: Remove redundant include.
1937 2006-07-24  Eric Blake  <ebb9@byu.net>
1939         Fix bugs related to stream handling.
1940         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1941         unlocked-io stdio-safer stdlib-safer close-stream.
1942         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1943         provided by gnulib if needed.
1944         * src/output.c [! HAVE_TMPFILE]: Likewise.
1945         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1946         their safer counterparts.
1947         (retcode): New global variable.
1948         * src/input.c (pop_input): Check for read failure.
1949         * src/freeze.c (reload_frozen_state): Likewise.
1950         (produce_frozen_state): Check for write failure.
1951         * src/debug.c (debug_set_file): Likewise.
1952         * src/m4.c (usage, main): Likewise.
1953         (retcode): Make global.
1954         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1955         status is non-zero except when everything succeeds.
1956         * doc/m4.texinfo (M4exit): Document these changes.
1957         (Incompatibilities): Remove documentation of bug now fixed.
1958         * NEWS: Document these fixes.
1960 2006-07-22  Eric Blake  <ebb9@byu.net>
1962         * src/format.c (format): Avoid compiler warning that str may be
1963         used uninitialized.
1965 2006-07-21  Eric Blake  <ebb9@byu.net>
1967         * src/m4.h [UNIX]: Add more platforms that are close enough to
1968         categorize as UNIX, but which don't predefine __unix__.
1969         Reported by Nelson H. F. Beebe.
1971 2006-07-20  Eric Blake  <ebb9@byu.net>
1973         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1974         to explicitly ask for --assume-autoconf=2.60.
1976 2006-07-19  Eric Blake  <ebb9@byu.net>
1978         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1979         and exits normally with 129.
1980         Reported by Nelson H. F. Beebe.
1981         * THANKS: Update.
1983         * src/m4.h (EXIT_MISMATCH): Define.
1984         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1985         exiting with status 63.
1986         * src/m4.c (usage): Document this.
1987         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1988         * NEWS: Likewise.
1990         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1991         back-cover texts.
1993 2006-07-17  Eric Blake  <ebb9@byu.net>
1995         * src/format.c (format): Support F, g, and G specifiers.
1996         * doc/m4.texinfo (Format): Document this.
1997         * NEWS: Document this addition.
1999         * doc/m4.texinfo (Builtin): Delete redundant text.
2001         * configure.ac (AC_INIT): Bump version number.
2002         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
2003         * NEWS: Document this fix.
2005 2006-07-15  Eric Blake  <ebb9@byu.net>
2007         Release 1.4.5:
2008         * configure.ac (AC_INIT): Bump version number.
2009         * NEWS: Describe changes since 1.4.4.
2011         * src/m4.c (usage): Document exit status.
2012         * doc/m4.texinfo: Use `exit status', not `exit code'.
2013         (Invoking m4): Document exit status.
2015         * bootstrap: Backport --help, --version from head.
2016         (func_update): New function, for easily grabbing up-to-date files
2017         from gnulib.
2018         * Makefile.maint (web-manual): Fix for VPATH builds.
2020 2006-07-14  Eric Blake  <ebb9@byu.net>
2022         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
2023         looks bad in info.  Use @deffn rather than @example for
2024         describing prototypes.  Fix awkward wording and grammar.
2026         * src/builtin.c (substitute): Warn on bad escape sequences.
2027         Ignore trailing backslash.
2028         * doc/m4.texinfo (Regexp): Add documentation for this.
2029         * NEWS: Document this change.
2031         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
2032         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
2033         more examples.
2034         (Dnl): Update example to show side effects.
2035         * checks/get-them: Generate three digit test names.
2036         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
2038 2006-07-13  Eric Blake  <ebb9@byu.net>
2040         * src/input.c (input_init): Simplify.
2041         (set_word_regexp): Treat empty string as default, since empty
2042         regexp would disable word parsing.
2043         * src/m4.c (user_word_regexp): Default to empty string.
2044         * src/builtin.c (builtin_tab): Make changeword blind.
2045         * doc/m4.texinfo (Changeword): Document this.
2046         * NEWS: Document this.
2047         * TODO: Knock off completed items.
2049         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
2050         just the first.
2051         * doc/m4.texinfo (Undefine, Pushdef): Test this.
2052         * NEWS: Document this change.
2054         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
2055         warning.  Detect quoted leading space and overflow as warnings.
2056         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
2057         Treat width as minimum number of digits, as required by POSIX.
2058         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
2059         arguments.
2060         (m4_substr): Likewise.  Silently treat empty start as 0.
2061         (m4_undivert): Treat ` 1a' as file, not diversion 1.
2062         * src/eval.c (eval_lex): Parse radix 1 numbers.
2063         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
2064         one type of warning.
2065         (Manual): Document behavior of numeric parsing of empty string.
2066         (Divert, Incr): Document error handling.
2067         (Eval): Document radices better.
2068         (Incompatibilities): Document translit incompatibility.
2069         * NEWS: Document these changes.
2071         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
2072         (web-manual): Simplify.
2073         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
2074         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
2075         (MAINTAINERCLEANFILES): Clean it as well.
2076         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
2077         (MAINTAINERCLEANFILES): Clean it as well.
2079 2006-07-12  Eric Blake  <ebb9@byu.net>
2081         * doc/m4.texinfo (Extensions): Document how to overcome
2082         implementation difference in > 9 positional parameters.
2084         * src/m4.c (usage): Sort within sections.
2085         (nesting_limit): Raise default from 250 to 1024.
2086         * doc/m4.texinfo: Use file name, not filename, per GNU coding
2087         standard.  Use @option where appropriate.
2088         (Invoking m4): Sort to match --help output.
2089         (Debug Levels): Sort.
2090         (Frozen files): Sort and break into two nodes.
2092         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
2093         * NEWS: Document raised -L limit.
2095 2006-07-11  Eric Blake  <ebb9@byu.net>
2097         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
2098         stress-test changeword before a release.
2099         * doc/m4.texinfo: More doc cleanups.
2100         (Copying This Manual): New node; actually include the FDL in the
2101         documentation.
2102         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
2103         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
2104         * NEWS: Mention documentation improvements.
2106         * src/m4.h (OS2): New platform macro.
2107         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
2108         platform macro.
2109         * doc/m4.texinfo (Platform macros): Document it.
2110         (Sysval): Remove non-portable test of system("").
2111         * NEWS: Document this change.
2112         Reported by Andreas Buening.
2114 2006-07-09  Eric Blake  <ebb9@byu.net>
2116         * doc/m4.texinfo (Undivert): Fix typo in last commit.
2117         * src/m4.c (usage): Document M4PATH.
2118         * src/path.c (path_search): Reject empty string.
2119         * src/output.c (insert_diversion): Ignore diversion 0.
2120         * src/builtin.c (m4_undivert): Ignore empty string.
2121         * NEWS: Document this fix.
2123 2006-07-08  Eric Blake  <ebb9@byu.net>
2125         * checks/get-them: Make filtering easier.
2126         * checks/check-them: Filter non-input lines, so line counts are
2127         more realistic in the documentation, and so changeword tests work
2128         even when dnl is disabled.
2129         * doc/m4.texinfo: Adjust example line numbers.  Clean up
2130         front-matter, following autoconf's example.
2131         (Changeword): Enable tests, skipping if changeword not supported.
2132         (Define, Defn, Ifelse): Backport more examples from head.
2133         (Input processing, Answers): New nodes, backported from head.
2134         (Include): Expand test to cover empty filename.
2135         (Undivert): Add test of undivert(0).
2137 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2139         * doc/m4.texinfo: Fix spelling errors.
2141 2006-07-07  Eric Blake  <ebb9@byu.net>
2143         * THANKS: Update.
2145         * doc/Makefile.am (m4.1): No need to go through a temporary file;
2146         this also ensures timestamps are updated.
2147         * src/m4.h (includes): Require config.h.  Assume string.h,
2148         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
2149         than prototyping ourselves.
2150         (builtin_func): Add parameter type-checking.
2151         (voidstar): Delete, now that we assume C89.
2152         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
2153         voidstar changed.
2154         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
2155         xfree.
2157 2006-07-06  Eric Blake  <ebb9@byu.net>
2159         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2160         binary-io.
2161         * src/m4.h (includes): Add binary-io.h for O_BINARY.
2162         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
2163         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
2164         * NEWS: Mention this fix.
2166         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
2167         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
2169         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
2170         runs first when needed.
2171         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
2172         once in srcdir rather than multiple times in VPATH builds.
2174 2006-07-03  Eric Blake  <ebb9@byu.net>
2176         * checks/check-them: Use portable = in test.
2177         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
2178         directory, as required by Solaris cc.  Include built headers, as
2179         required by Solaris make in VPATH build.
2180         * checks/Makefile.in: Use $(srcdir) where needed.
2181         (CHECKS): Factor $(srcdir) into macro.
2182         (DISTFILES): Likewise.  Automake takes care of distributing
2183         Makefile.in.
2184         (dist): Simplify.
2185         (Makefile): Use modern syntax of config.status.
2186         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
2187         Avoid overfull and underfull hboxes in dvi.
2189         Fix 'make check' in VPATH build.  All files included by testsuite
2190         now live in a single directory.  Use forloop.m4 in testsuite.
2191         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
2192         here...
2193         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
2194         here.
2195         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
2196         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
2197         * checks/check-them: Avoid s/// when filename is in pattern.
2198         * examples/forloop.m4: Fix to match documentation.
2199         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
2200         new locations.
2201         (Loops, Format): Actually use forloop.m4 in tests.
2203 2006-07-02  Eric Blake  <ebb9@byu.net>
2205         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
2206         $(bindir) works in installcheck.
2207         (check, installcheck): No longer change directory, so that
2208         distcheck works with a read-only builddir.
2209         * checks/check-them: Work when pwd is no longer builddir.
2211 2006-07-01  Eric Blake  <ebb9@byu.net>
2213         * GNUmakefile: New file, borrowed from coreutils.
2214         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
2215         * Makefile.maint (Makefile): Delete this rule, now that
2216         GNUmakefile includes Makefile.
2218 2006-06-30  Eric Blake  <ebb9@byu.net>
2220         For compatibility with other m4 implementations, sysval returns
2221         signal<<8 rather than 0 if syscmd is terminated by a signal.
2222         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
2223         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
2224         not provide wait macros.
2225         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
2226         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
2227         (m4_esyscmd): Set sysval to -1 on failure.
2228         (m4_sysval): Print 127 on failure, and accomodate signals if they
2229         are detectable.
2230         * NEWS: Document this change.
2231         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
2232         last commit.
2233         * checks/check-them: Likewise.
2234         * src/debug.c (debug_set_file): Work around mingw fstat bug.
2236         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
2237         * src/freeze.c (produce_frozen_state): Use new spelling of
2238         platform macro.
2239         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
2240         platforms.
2241         (m4_syscmd, m4_esyscmd): The empty command is successful.
2242         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
2243         Document platform-dependence of system().
2244         (Syscmd): Add example.
2245         (Esyscmd): Make example more robust, and actually demonstrate
2246         rescanning.
2247         (Sysval): Expand test to cover esyscmd code path, and to check
2248         that empty command is successful.  Add conditional check for
2249         signal behavior.
2250         (Other Incompatibilities): Move platform macros from here...
2251         (Platform macros): ...to this new node.  Add windows macro.
2252         Check that exactly one platform macro is provided.
2253         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
2254         .exe in error messages.  Allow for skipping checks.
2255         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
2256         * NEWS: Document platform macros.
2258 2006-06-29  Eric Blake  <ebb9@byu.net>
2260         Fix buffer overrun bug.
2261         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2262         xvasprintf.
2263         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
2264         variant instead, since [efg]cvt are obsolete and our use of them
2265         was buggy (savannah sr #104303).
2266         (format): Fix buffer overflow by using xasprintf.
2267         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
2268         * NEWS: Document this fix.
2270         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
2271         cross-compilation.
2272         (AC_CACHE_CHECK): Cache search for ecvt.
2274 2006-06-27  Eric Blake  <ebb9@byu.net>
2276         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
2277         required by POSIX, and add example that exposed core dump on x86
2278         architectures.
2279         (Incompatibilities): Document incompatibility in eval precedence.
2280         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
2281         behavior.
2282         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
2283         * NEWS: Document this change.
2285         * doc/m4.texinfo: Use @noindent consistently.
2286         (Quoting Arguments): Document that unquoted parentheses group
2287         arguments.
2288         (Pseudo Arguments): Expand tests to show this.
2289         (Incompatibilities): Contrast traditional behavior of
2290         changequote.
2292 2006-06-24  Eric Blake  <ebb9@byu.net>
2294         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
2295         (AC_CHECK_HEADERS_ONCE): Use this new feature.
2296         (AC_CHECK_FUNCS_ONCE): Likewise.
2298 2006-06-23  Eric Blake  <ebb9@byu.net>
2300         * doc/m4.texinfo: Quoting cleanup throughout - follow
2301         autoconf-recommended style of one level of quote per parenthesis
2302         in the normal case.  Adjust error messages to match GNU coding
2303         standards (and to allow 'make check' to pass again).
2304         (Quoted strings, Inhibiting Invocation): Turn more examples into
2305         tests.
2306         (Comments): Resolve FIXME by adding example.
2307         (Define): Add example about underquoting.
2308         (Defn): Add example about use of $0.
2309         (Indir, Format): Resolve FIXME done in last commit.
2310         (Ifelse): Add example about creating blind macro.
2311         (Debugging): Fix grammar.
2312         (Dnl): Add example about dnl with arguments.
2313         (M4wrap): Be explicit that LIFO order is non compliant, and will
2314         change in m4 2.0.
2315         (Undivert): Resolve FIXME by adding example.
2316         (Frozen files): Document that m4wrap and sysval will not work
2317         consistently until m4 2.0.
2318         (Incompatibilities): Document another POSIX compliance bug, this
2319         time with changequote.  Document a traditional incompatibility
2320         with partial input spanning file boundaries.
2322         Make error messages more consistent with GNU coding standards -
2323         start with lower case, and don't end sentence with punctuation.
2324         * src/debug.c (trace_pre): Update message wording.
2325         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
2326         Likewise.
2327         * src/freeze.c (produce_frozen_state, issue_expect_message),
2328         (reload_frozen_state): Likewise.
2329         * src/input.c (push_string_init, pop_init, init_macro_token),
2330         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
2331         * src/m4.c (stackovf_handler, main): Likewise.
2332         * src/macro.c (expand_token, expand_argument, call_macro),
2333         (expand_macro): Likewise.
2334         * src/output.c (make_room_for, output_text, insert_file),
2335         (freeze_diversions): Likewise.
2336         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
2338         * src/builtin.c (builtin_tab): Make format and indir blind.
2339         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
2340         * NEWS: Mention the change to builtins.
2342 2006-06-22  Eric Blake  <ebb9@byu.net>
2344         Robustify frozen file format.
2345         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
2346         macro.  Require V first, and only accept it once.  For F, use
2347         placeholder if builtin is not found, rather than warning.
2348         * src/m4.h (m4_placeholder): New prototype.
2349         * src/builtin.c: Unify error message style.
2350         (m4_placeholder): New function, warn if invoked.
2351         (builtin_tab): Add m4_placeholder.
2352         (m4_defn): Warn if placeholder is encountered.
2353         (find_builtin_by_addr): Handle placeholder.
2354         (find_builtin_by_name): Return placeholder on failure.
2355         (m4_builtin): Treat placeholder as undefined.
2356         * doc/m4.texinfo (Frozen files): Document changes in V and F.
2357         * NEWS: Document this change.
2358         Reported by Bruno Haible.
2360         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
2361         (tabchar): New macro, so that 'make check' still works.
2362         (Invoking m4): Document that ignored compatibility options -B, -S,
2363         and -T each consume an argument.
2364         * checks/get-them: Honor @tabchar{}.
2366         Avoid compiler warnings during -DDEBUG.
2367         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
2368         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
2369         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
2370         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
2371         (next_token) [DEBUG_INPUT]: Print before returning.
2372         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
2373         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
2375         Avoid mkstemp bugs on various platforms.
2376         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
2377         * src/output.c [! HAVE_MKSTEMP]: Delete.
2378         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
2379         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
2380         * NEWS: Document this.
2382         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
2383         Reported by Bruno Haible.
2385 2006-06-21  Eric Blake  <ebb9@byu.net>
2387         Avoid obsolete sigstack when POSIX sigaltstack is available.
2388         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
2389         do likewise.
2390         * configure.ac (AC_CHECK_HEADERS): Likewise.
2391         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
2392         obsolete and most hosts now have it in signal.h.
2393         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
2394         (AC_CACHE_CHECK): Cache decision to use stackovf.
2395         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
2396         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
2397         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
2398         simplify later code.
2399         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
2400         in case of dereferencing a member of a NULL pointer.
2401         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
2402         POSIX handler.
2403         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
2404         EXIT_FAILURE in error, indent preprocessor directives.
2405         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
2406         siginfo.h.
2407         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
2408         Reported by Santiago Vila.
2410 2006-06-19  Eric Blake  <ebb9@byu.net>
2412         * THANKS: Update.
2414 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
2416         * checks/Makefile.in (PATH_SEPARATOR): New macro.
2417         (check, installcheck): Use it, for OS/2.
2419 2006-06-18  Eric Blake  <ebb9@byu.net>
2421         Consistently use "GNU M4" as package name, "m4" as executable
2422         name.
2423         * NEWS: Document previous fix.
2424         * THANKS: Update.
2425         * README: Fix grammar.  Document that --enable-changeword is on
2426         its last leg.
2427         * doc/m4.texinfo (Top, Changeword): Likewise.
2428         (Sysval): Enhance this test.
2429         (History): Backport this section from CVS head, and update.
2431 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
2432             Eric Blake  <ebb9@byu.net>
2434         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
2435         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
2436         big-endian and little-endian wait status definitions.
2437         (m4_sysval): Use WEXITSTATUS.
2438         Reported by Andreas Buening.
2440 2006-06-18  Eric Blake  <ebb9@byu.net>
2442         * configure.ac (AC_INIT): Bump version number.
2443         * NEWS: Describe changes in 1.4.4c.
2445 2006-06-17  Eric Blake  <ebb9@byu.net>
2447         Beta Release 1.4.4b:
2448         * configure.ac (AC_INIT): Bump version number.
2449         * NEWS: Describe changes since 1.4.4.
2450         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
2452         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
2453         bootstrap.
2454         * checks/Makefile.in (maintainer-clean): Add missing target.
2455         * COPYING: Remove generated file from CVS.
2457 2006-06-16  Eric Blake  <ebb9@byu.net>
2459         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
2461 2006-06-15  Eric Blake  <ebb9@byu.net>
2463         * checks/wrapfifo.m4: New file.  Use it...
2464         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
2465         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
2467         * src/m4.h (to_uchar): New function.
2468         * src/eval.c (eval_lex): Use it to avoid passing signed char to
2469         isdigit, isalpha, isupper, islower, isspace, isalnum.
2470         * src/builtin.c (expand_user_macro): Likewise.
2471         * src/format.c (format): Likewise.
2472         * src/macro.c (expand_argument): Likewise.
2473         * NEWS: Document this security fix.
2475         Message cleanup.
2476         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
2477         * src/freeze.c (reload_frozen_state): Fix typo in message.
2478         (produce_frozen_state): Standardize on builtin, not built-in.
2479         * src/builtin.c (numeric_arg, bad_argc): Likewise.
2481         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
2482         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
2483         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
2484         gnulib.
2485         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
2486         * m4/gnulib-cache.m4: New file, from gnulib.
2487         * bootstrap: Invoke gnulib-tool --update.
2488         * src/m4.c (main): Cast away const.
2489         * NEWS: Document that regex is updated.
2490         * THANKS: Update.
2492 2006-06-08  Eric Blake  <ebb9@byu.net>
2494         * configure.ac (changeword): Work even when changeword is not a
2495         macro.
2496         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
2497         Delete; now done by automake.
2498         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
2500 2006-06-07  Eric Blake  <ebb9@byu.net>
2502         * lib/regex.c (bcmp_translate): Canonicalize type name.
2503         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
2504         * configure.ac (changeword): Disable changeword for the creation
2505         of configure, in case of bootstrapping with an m4 configured with
2506         --enable-changeword.
2508         Distribute a rudimentary man page.
2509         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
2510         can feed help2man.
2511         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
2512         (SUFFIXES, m4.1): New macros and rules to build m4.1.
2514 2006-06-06  Eric Blake  <ebb9@byu.net>
2516         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
2517         compiler warnings at -O2.
2518         * lib/getopt.c (_getopt_internal): Likewise.
2520         Cleanup of previous patches.
2521         * src/input.c (struct input_block): Remove traced member.
2522         (push_macro, init_macro_token): Don't pass trace status around.
2523         * src/m4.h (struct token_data): Remove traced member.
2524         (struct symbol, struct builtin): Reduce unused space.
2525         (TOKEN_DATA_FUNC): Simplify.
2526         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
2527         (push_macro, define_builtin): Remove unused parameter.
2528         * src/builtin.c (define_builtin, builtin_init, define_macro),
2529         (m4_defn): Don't pass trace status around.
2530         * src/macro.c (expand_argument): Likewise.
2531         * src/freeze.c (reload_frozen_state): Likewise.
2532         * src/symtab.c: Whitespace cleanup.
2533         * NEWS: Clean up wording.
2534         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
2535         ensure tests actually expose bugs prior to today's patches.
2537         Trace status of builtins is no longer inherited across
2538         define(...,defn(...)).  Fixes bug that autom4te had been working
2539         around.
2540         * src/builtin.c (define_builtin): Don't override trace status.
2541         * doc/m4.texinfo (Trace): Add test for this.
2542         * NEWS: Document this.
2544         When changing macro definitions inside the arguments to the macro,
2545         consistently preserve the old definition that was in effect before
2546         argument collection, similar to the C pre-processor.
2547         Reported by John Brzustowski.
2548         * NEWS: Document this change.
2549         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
2550         this policy, and add tests that expose core dumps prior to this
2551         patch.
2552         * src/m4.h (struct symbol): New members to track when a symbol is
2553         still in use after removal from the symbol table.
2554         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
2555         (free_symbol): Prototype.
2556         * src/macro.c (expand_macro): Track pending expansions of a
2557         symbol.  On completion, if a symbol is deleted and no longer
2558         pending, free its memory.
2559         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
2560         is still in use.
2561         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
2562         is still in use.
2563         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
2564         in use as deleted and remove from the table without freeing
2565         memory.
2566         (symtab_print_list) [DEBUG_SYM]: More debug output.
2568         * src/symtab.c (hack_all_symbols): Allow certain modifications of
2569         the symbol table during traversal.
2570         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
2571         SYMBOL_POPDEF, since only the latter is safe with
2572         hack_all_symbols.
2574         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
2575         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
2576         Preserve placeholder when macro is being traced.
2577         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
2578         symbol is not defined.
2579         (set_trace): Remove placeholder when no longer traced.
2580         (m4_traceon): On named traces, always reserve a slot in the
2581         symbol table.
2582         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
2583         * NEWS: Document new trace behavior.
2584         * doc/m4.texinfo (Trace): Tracing by name now consistently works
2585         no matter whether that macro is currently defined.
2586         (Incompatibilities): Document differences between traditional and
2587         GNU trace.
2589 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2590             Eric Blake  <ebb9@byu.net>
2592         * src/m4.h (hash_table_size): Now size_t instead of int.
2593         * src/m4.c (hash_table_size): Likewise.
2594         (main): Adjust to this; use atol rather than atoi.
2595         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
2596         (symtab_init, lookup_symbol, hack_all_symbols):
2597         Use size_t for sizes and indexes, not int.
2598         (symtab_print_list) [DEBUG_SYM]: Likewise.
2599         (hash): Likewise.  Don't case-fold in the hash function.
2600         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
2601         Don't assume hash word is 32 bits.
2602         * NEWS: Document this change.
2604 2006-06-04  Eric Blake  <ebb9@byu.net>
2606         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
2607         to allow compilation, for use in debugger.
2608         (profiles, current_mode) [DEBUG_SYM]: New variables.
2609         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
2610         determining hash table performance.
2612 2006-05-31  Eric Blake  <ebb9@byu.net>
2613             John Brzustowski  <jbrzusto@fastmail.fm>
2615         * src/input.c (input_stack): Delete; use current_input instead.
2616         (wrapup_stack): Dynamically allocate, so that recursion is handled
2617         properly.
2618         (push_wrapup): Use current wrapup stack.
2619         (pop_wrapup): Rotate wrapup stack to current, and create new
2620         wrapup stack.
2621         (input_init): Dynamically allocate stacks.
2622         * NEWS: Update, now that recursive m4wrap can no longer cause
2623         core dump.
2625 2006-05-31  Eric Blake  <ebb9@byu.net>
2627         * lib/getopt.c: Fix copyright year.
2628         * lib/obstack.c: Ditto.
2629         * src/builtin.c: Ditto.
2631 2006-05-30  Eric Blake  <ebb9@byu.net>
2633         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2634         Reported by John Brzustowski.
2635         (Incompatibilities): Document known POSIX incompatibilities.
2636         * THANKS: Update.
2638 2006-05-29  Eric Blake  <ebb9@byu.net>
2640         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2641         in read-only dir.
2643         Use automake.
2644         * Makefile.am: New file.
2645         * doc/Makefile.am: Ditto.
2646         * examples/Makefile.am: Ditto.
2647         * lib/Makefile.am: Ditto.
2648         * src/Makefile.am: Ditto.
2649         * acinclude.m4: New file, renamed from aclocal.m4.
2650         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2651         (AC_ARG_PROGRAM): Now redundant.
2652         (STACKOVF): Turn into automake conditional.
2653         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2654         * checks/Makefile.in: Converting this dir to automake was not
2655         trivial; for now, just add missing targets demanded by top-level.
2656         * INSTALL: Remove files that are now generated from CVS.
2657         * Makefile.in: Ditto.
2658         * aclocal.m4: Ditto.
2659         * install-sh: Ditto.
2660         * mkinstalldirs: Ditto.
2661         * doc/Makefile.in: Ditto.
2662         * doc/texinfo.tex: Ditto.
2663         * examples/Makefile.in: Ditto.
2664         * lib/Makefile.in: Ditto.
2665         * src/Makefile.in: Ditto.
2667         * AUTHORS: Backport from CVS head, and update.
2668         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2670 2006-05-27  Eric Blake  <ebb9@byu.net>
2672         * lib/regex.c (regex_compile): Kill compiler warnings.
2673         * lib/getopt.c: Likewise.
2674         * lib/obstack.c: Likewise.
2675         * src/builtin.c (builtin_init): Likewise.
2676         * src/path.c (path_search): Likewise.
2678         * doc/m4.texinfo: Fix usage of a vs. an.
2679         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2680         overfull hbox warnings.
2681         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2683         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
2684         quoting.
2685         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2686         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2687         assume C89.
2688         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2689         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2690         * src/Makefile.in: Delete remains of ansi2knr.
2691         * src/ansi2knr.1: Delete.
2692         * src/ansi2knr.c: Delete.
2694 2006-05-25  Eric Blake  <ebb9@byu.net>
2696         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
2697         `illegal'.
2699         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2700         Reported by Karl Berry.
2702 2006-05-24  Eric Blake  <ebb9@byu.net>
2704         * Makefile.in (html): New target.
2705         * doc/Makefile.in (html, m4.html): Likewise.
2706         (MAKEINFOHTML): New macro.
2707         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2708         rendering.
2709         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2710         absolute URL.
2711         Reported by Bob Badour.
2713         * THANKS: Update.  Move reporter's email addresses here, instead
2714         of in ChangeLog.
2716 2006-05-11  Eric Blake  <ebb9@byu.net>
2718         * THANKS: Update.
2719         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2720         patched on 2005-12-04.
2721         Reported by Ilya N. Golubev.
2723         * bootstrap: New file, so that generated files need not be stored
2724         in CVS.
2725         * Makefile.in (DISTFILES): Add bootstrap.
2727         Make testsuite less sensitive to doc changes.
2728         * doc/m4.texinfo: Use m4.input instead of filename.
2729         * checks/check-them (xerr): Turn m4.input into filename.
2730         * checks/Makefile.in (dist): Depend on stamp-checks.
2732         Portability updates for OS/2.
2733         * src/Makefile.in (EXEEXT, OBJEXT): Define.
2734         (LINK): Use CFLAGS.
2735         (.c.obj): Define.
2736         * lib/Makefile.in (OBJEXT): Define.
2737         (.c.obj): Define.
2738         * doc/Makefile.in (install, uninstall): Install info files into
2739         the dir listing.
2740         Reported by Andreas Buening.
2742 2006-05-09  Eric Blake  <ebb9@byu.net>
2744         * install-sh: Update to newer upstream version.
2745         * mkinstalldirs: Likewise.
2746         Reported by Andreas Buening.
2748         * src/m4.c (main): Bump copyright year.
2749         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2750         * doc/Makefile.in (datarootdir): Likewise.
2752 2006-05-08  Eric Blake  <ebb9@byu.net>
2754         * THANKS: Update.
2755         * doc/m4.texinfo (Bugs): Backport bug email address from head.
2756         Reported by Stepan Kasal.
2758 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
2760         * input.c (match_input): Do not pass expression with side effect
2761         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
2762         * NEWS: Updated.
2764 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2766         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2767         Reported by Damian Menscher.
2769 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2771         * configure.ac (AC_INIT): Bump to 1.4.4a.
2773 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2775         Release 1.4.4:
2776         * configure.ac (AC_INIT): Bump to 1.4.4.
2777         * NEWS: Describe 1.4.4's changes.
2778         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2780 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2782         * src/m4.c: fix return code when non-existent files are processed
2784 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2786         * README: update email address for bug reports.
2788 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2790         * doc/m4.info: Generated files are not kept in the repository.
2792 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2794         The FSF are moving offices today.  Changed their contact address
2795         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2796         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2798         Also, some of the files here were never updated from the previous
2799         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2800         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2802 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2804         * Makefile.in (bindir, infodir): Substitute from configure rather
2805         than hardcode.
2806         * doc/Makefile.in (infodir): Ditto.
2807         * src/Makefile.in (bindir): Ditto.
2808         * NEWS: Updated.
2810 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2812         Changes needed to automate the release process for 1.4.3:
2814         * Makefile.in (dist): Make .tar.bz2 tarball too.
2815         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2816         (cvs-news): Look 1 line further down for NEWS release number.
2817         (cvs-dist): We don't use automake, so make dist is fine.
2818         Remove double . before suffixes.
2819         (cvs-release): Don't mention manual.html.
2820         (fetch): Get latest gendocs files.
2821         (web-manual): Rewritten to use gendoc for multiformat manuals.
2822         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2823         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2824         preserving, but case insensitive, so generating html docs per node
2825         clashes between Index.html, the node file, and index.html, the
2826         top-level of the document tree...
2827         (Index macro): ...so renamed to this.  Changed all references.
2829 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2831         * configure.ac (AC_INIT): Bump to 1.4.3a.
2833 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2835         Release 1.4.3:
2836         * configure.in (AC_INIT): Bump to 1.4.3.
2837         * NEWS: Describe 1.4.3's changes.
2839 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2841         * Makefile.maint: New file with release rules, from CVS libtool.
2842         * Makefile.in (DISTFILES): Add Makefile.maint.
2843         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2844         canonical versions.
2846 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2848         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2849         checks/47.patsubst, with a redundant @comment to prevent emacs
2850         from removing it accidentally again.
2851         * checks/get-them: Allow for trailing spaces tucked behind
2852         @comment marks.
2854 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2856         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2857         * src/Makefile.in (install, uninstall): Likewise.
2859 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2861         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2862         on Cygwin.
2863         Reported by Eric Blake.
2865 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2867         * lib/regex.c, lib/regex.h: Updated from gnulib.
2868         * src/input.c (set_word_regexp):  Don't change the word_regexp
2869         unless it compiles correctly.
2870         * NEWS: Updated.
2871         Reported by Frank Schwidom.
2873         * Makefile.in (stamp-h): Regenerate config.h properly.
2875 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2877         * configure.ac (AC_DEFINE): Fix overquoting of description
2878         argument.
2880         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2881         recognition macros.
2882         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2883         on Windows, so that the frozen file reader will work.
2884         Reported by Josef T. Burger.
2886         * src/m4.c (main): Modernise the --version output.
2888 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2890         Modernise the configury a little to prevent spurious errors from
2891         Autoconf-2.59's autoreconf:
2893         * config.h.in: Renamed to...
2894         * config-h.in: ...this to better support DOS 8.3 file systems.
2895         * acconfig.h: Removed.
2896         * configure.in: Renamed to...
2897         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2898         entry comments.  Slight reorganisation and reformatting.
2899         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2900         entry comments.
2901         (AC_INIT): Use a modern 3 argument call.
2902         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2903         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2904         s/PRODUCT/PACKAGE/g.
2905         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2906         config.h.in.  Added configure.ac, config-h.in.
2907         (stamp-h.in): Removed acconfig.h from dependencies.
2908         (configure): Depends on configure.ac, not configure.in.
2909         * doc/Makefile.in (stamp-vti): Ditto.
2910         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2911         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2912         * configure: Regenerated.
2914 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2916         * src/output.c (mkstemp): Make non-static, and build regardless of
2917         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2918         * NEWS: Update.
2920 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2922         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2923         changes from your editor buffer first.
2925         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2926         * src/m4.c: And include them as appropriate.
2927         * NEWS: Updated.
2929 2004-09-09  Andreas Schwab  <schwab@suse.de>
2931         Refactoring of the string read case in next_char provides about a
2932         20% speedup of M4 as typically used by autoconf:
2934         * src/input.c (next_char_1): Renamed from next_char.
2935         (next_char): New macro.
2936         * NEWS: Updated.
2938 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2940         * configure.in (VERSION): Bump to 1.4.2a.
2942 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2944         Release 1.4.2.
2945         * configure.in (VERSION): Bump to 1.4.2.
2946         * News: Describe 1.4.2's changes.
2948         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2949         relies on this.
2950         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2951         (m4_maketemp): Clear errno before calling mkstemp.
2952         * src/path.c (path_search): Don't let "free" trash errno when
2953         returning NULL.
2954         * src/output.c (insert_file): Don't assume errno has a valid
2955         value simply because fread returns zero.  This fixes a
2956         portability bug reported by Marion Hakanson in
2957         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2959 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2961         * configure.in (VERSION): Bump to 1.4.1a.
2962         * NEWS: Place holder for next stable release.
2964 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2966         Release 1.4.1.
2967         * configure.in (VERSION): Bump to 1.4.1.
2968         * NEWS: Describe 1.4.1's changes.
2970         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2971         pacify Autoconf 2.59.
2973         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2974         to pacify Texinfo 4.7.
2975         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2977         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2978         pacify Sun C compilers.
2980 2003-09-28  Akim Demaille  <akim@epita.fr>
2982         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2983         botch.
2985 2003-09-03  Santiago Vila  <sanvila@debian.org>
2987         * examples/stackovf.sh: Use tempfile if available.
2989 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2991         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2992         * src/output.c (m4_insert_file): Do not mix buffered and
2993         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2995 2001-02-01  Santiago Vila  <sanvila@debian.org>
2997         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2998         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
3000 2001-02-01  Matt Kraai  <kraai@debian.org>
3002         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
3003         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
3004         empty file rather than to a nonexistent file.  This closes a common
3005         security hole.
3006         * src/builtin.c (m4_maketemp): Implement the above, by using
3007         mkstemp rather than mktemp.  (trivial change)
3009 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
3011         * src/builtin.c (expand_ranges): Added break after trailing dash.
3012         This caused misbehaviors on some systems.
3014 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
3016         Release 1.4.
3017         * doc/Makefile.in (realclean): Also remove stamp-vti.
3018         Reported by Eric Backus.
3020 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
3022         * src/freeze.c (produce_frozen_state): If the frozen file cannot
3023         be opened, return immediately after producing the error message.
3024         Reported by Andreas Schwab.
3026         * configure.in: Check for const only after having found possible
3027         ANSIfying compiler flags, this is of no use to check it before.
3028         Reported by Alexander Lehmann.
3030 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
3032         * src/macro.c (collect_arguments): Cast obstack arguments to
3033         (voidstar), so avoiding compiler warnings.
3034         Reported by Joseph E. Sacco.
3036         * src/freeze.c (produce_frozen_state): Cast printed lengths to
3037         (int) so they correspond to %d format items.
3038         Reported by Joseph E. Sacco.
3040         * src/m4.c (main): Cast the argument to xfree to (voidstar).
3041         * src/symtab.c (free_symbol): Idem.
3042         Reported by Karl Vogel.
3044 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
3046         * Makefile.in (DISTFILES): Distribute BACKLOG.
3048         * configure.in: Define PRODUCT and VERSION.
3049         * acconfig.h: Document PRODUCT and VERSION.
3050         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
3051         constant string m4 and variable or parameter named version.
3053 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
3055         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
3056         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
3057         defines __STDC__ to 0, for indicating it is *not* ANSI!
3058         Reported by Kaveh R. Ghazi.
3060         * configure.in: Added obsolescent tests for AIX and Minix.
3062         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
3063         which texclean does not exist anymore.
3064         Reported by Eric Backus, Jim Meyering, John David Anglin and
3065         Joseph E. Sacco.
3067 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
3069         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
3070         Reported by John David Anglin.
3072         * src/ansi2knr.c: New version, sent by Peter Deutsch.
3073         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
3074         ANSI2KNR, depending on the fact the compiler is ANSI or not.
3075         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
3076         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
3077         of $U, put underline in extensions rather than in basenames.  Use
3078         implicit rules, now that regularity makes this possible.
3079         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
3080         of ansi2knr whenever it is needed.
3081         * configure.in: Adjusted for correct STACKOVF substitution.
3082         * src/debug.c (trace_format): When not __STDC__, use (...) as a
3083         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
3084         Reported by David MacKenzie.
3086         * Makefile.in: Remove binprefix.  Use transform_name instead.
3087         Reported by David MacKenzie.
3089         * doc/Makefile.in: Create version.texi, use it, clean it.
3090         Reported by Jim Meyering.
3092 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
3094         * Makefile.in (all, install, uninstall): Depend on Makefile.
3096         * Makefile.in: For actions invoking $(MAKE) from within compound
3097         sh statements, exit non-zero if the sub-make fails.  Otherwise,
3098         the top-level make may exit successfully when it should fail.
3099         Reported by Jim Kingdon.
3101         * {,/*}Makefile.in: Use && after all cd, in case they fail.
3103         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
3104         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
3105         * configure.in: Substitute PRODUCT and VERSION.
3107         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
3109 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
3111         * Makefile.in (mostlyclean-local): Do not remove *~.
3112         * */Makefile.in (mostlyclean): Idem.
3113         Reported by Robert E. Brown and Richard Stallman.
3115 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
3117         * src/m4.h: Get rid of CONFIG_BROKETS.
3119 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
3121         * configure.in: Use AC_ARG_PROGRAM.
3122         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
3123         Reported by David MacKenzie.
3125 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
3127         * configure.in: Do not add -O to CFLAGS for GNU C, now that
3128         configure does it automatically.
3129         Reported by Jim Meyering.
3131 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
3133         * src/stackovf.c: Declare the handler_t typedef earlier in the
3134         code, use it for stackovf_handler.
3135         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
3136         casting sigsegv_handler.
3137         Reported by Robert Bernstein.
3139         * src/m4.c (main): Initialize program_name to argv[0] without
3140         basename'ing it.
3141         Reported by Karl Berry.
3143 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
3145         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
3146         Reported by Karl Berry.
3148 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
3150         * lib/Makefile.in (mostlyclean): Added.
3151         (TAGS): Make in $(srcdir).
3153         * configure.in: Use `choke me' in test, like everywhere!
3155         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
3156         unreacheable and useless.
3158         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
3160         * lib/Makefile.in (DISTFILES): Distribute TAGS.
3161         (distclean): Do not remove TAGS.
3162         (realclean): Remove it.
3163         * Makefile.in: Make TAGS in lib also, not just in src.
3164         Reported by Karl Berry.
3166         * Makefile.in (distclean, realclean): Instead of recursively
3167         calling $(MAKE) for the -local part, allow parallel execution of
3168         -recursive and -local, only delay the removal of config.status,
3169         which is repeated in both goals.
3171 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
3173         Release 1.3.
3174         * Makefile.in: Group all *clean-recursive goals in one, using sed
3175         to remove `-recursive' while calling make recursively.  Also, use
3176         a subshell for each recursive $(MAKE).
3177         Reported by Jim Meyering.
3179         * src/m4.h (memcpy): Define with bcopy for BSD systems.
3180         Reported by Kaveh R. Ghazi.
3182         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
3183         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
3184         specify it.
3186         * configure.in: Use date instead of touch for stamp-h.
3187         * Makefile.in (stamp-h.in): Idem.
3189         * Makefile.in (distclean, realclean): Force serial execution of
3190         both goals, in case parallel makes are being used.
3191         Reported by Jim Meyering.
3193         * src/Makefile.in (DISTFILES): Distribute TAGS.
3194         (distclean): Do not remove TAGS.
3195         (realclean): Remove it.
3196         Reported by Karl Berry.
3198 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
3200         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
3201         to old names, for following Autoconf.
3203 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
3205         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
3206         ./install.sh will not be correctly referred to in sub-Makefiles.
3207         Reported by John David Anglin.
3209         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
3210         Reported by Eric Backus.
3212         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3213         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
3214         config.status into remaking this directory's Makefile only.
3215         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
3216         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
3217         Reported by Jim Meyering.
3219 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
3221         * configure.in: Correct stack overflow detection logic, taking
3222         care of systems having only incomplete implementations (like for
3223         Pyramid 9820 OSx 5.0d).
3224         Reported by Kaveh R. Ghazi.
3226         * src/Makefile.in (TAGS): Remote -t from etags call.
3228 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
3230         * lib/Makefile.in (install): Depend on all.
3232 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
3234         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
3235         Reported by Jim Meyering and John David Anglin.
3237         * Makefile.in (distclean-local): Delete config.log.
3238         Reported by Jim Meyering.
3240         Solidify frozen files with respect to -P:
3241         * src/m4.c: Have -P set prefix_all_buitins variable instead of
3242         calling a function by that name.  Declare the variable.
3243         * src/m4.h: Adjust declaration for prefix_all_buitins.
3244         * src/builtin.c (builtin_init): Merge in functionality from
3245         previous prefix_all_buitins function, while making entries in the
3246         symbol table, but not modifying the builtin description itself.
3248         * src/freeze.c (reload_frozen_state): Add a useless `break;',
3249         because *many* compilers do not accept an empty `default:'.
3250         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
3251         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
3253         * configure.in: Use AC_TYPE_SIGNAL.
3254         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
3255         Reported by Robert Bernstein.
3257         * checks/Makefile.in (check): Modify PATH so check-them will find
3258         m4 in the src directory.
3259         * Makefile.in (check): Don't.
3260         Reported by Akiko Matsushita and Jim Meyering.
3262         * src/output.c (make_room_for, output_character_helper): New
3263         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
3264         a per buffer MAXIMUM_BUFFER_SIZE.
3266         * src/output.c (output_text): New function, for optimizing the
3267         output of strings of characters.  Use it.
3269 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
3271         * doc, src: New directories reorganizing the distribution.
3272         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
3273         files.
3274         * Makefile.in: Adjusted.
3275         * configure.in: Configure new Makefiles.
3277         * m4.h: Declare STRING typedef.  Use it for comment and quote
3278         strings, adjusting all references.  (This is the rudiments of a
3279         beginning for the eventual withdrawal of NUL terminated strings.)
3280         * output.c (shipout_text): Accept a length parameter, and use it.
3281         All callers adjusted.
3283 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
3285         * m4.h: Include <unistd.h> if it exists.
3286         * stackovf.c: Don't.
3288         Clean up for current_diversion variable:
3289         * output.c: Move current_diversion from builtin.c.
3290         * m4.h: Declare current_diversion so builtin.c can access it.
3291         * output.c (output_init, make_diversion): Initialize or update
3292         current_diversion.
3293         * builtin.c (builtin_init, m4_divert): Leave current_diversion
3294         alone.
3296         Remove limit on number of diversions:
3297         * output.c: Replace ndiversion by diversions, declare it.
3298         (output_init): Allocate only diversion 0.
3299         (make_diversion): Allocate new diversions as needed.
3300         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
3301         * m4.c: Still accept -N, but do nothing with it.
3302         Reported by David MacKenzie.
3304         Freeze diversions:
3305         * output.c (freeze_diversions): New function.
3306         * m4.h: Declare freeze_diversions.
3307         * freeze.c: Document frozen file format, revise it, call
3308         freeze_diversions to add diversions to frozen format, and code to
3309         reload them properly.
3310         * m4.c: Do not undivert automatically at end when status being
3311         frozen.  Do not call builtin_init when reloading frozen state.
3313         Speed up diversion processing:
3314         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
3315         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
3316         structure and variables, cached variables out of output_diversion,
3317         reallocate_diversion_for and OUTPUT_CHARACTER.
3318         (shipout_text, make_diversion, insert_diversion): Adapted to new
3319         structures.
3320         (insert_file): Use better buffering.
3321         Reported by David MacKenzie.
3323 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
3325         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
3326         dist works from another build directory.
3328 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
3330         * symtab.c (hack_all_symbols): Use hash_table_size instead of
3331         constant HASHMAX, for -H option to work better.
3333         * builtin.c (DECLARE): Simplify by using _ ().
3335         * freeze.c: New file.
3336         * Makefile.in: Compile it, distribute it.
3337         * m4.c: Recognize, document and process --freeze-state (-F) and
3338         --reload-state (-R) options.  Pass a true flag to builtin_init
3339         only if no reloading some state.
3340         * builtin.c (define_builtin): Remove static specifier.
3341         (find_builtin_by_name): Remove static specifier.
3342         (builtin_init): Accept and obey a flag argument.
3343         * m4.h: Add declarations for freeze.c, changes for builtin.c.
3345 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
3347         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
3348         specifier.
3350         * configure.in: Implement --with-dmalloc.
3351         * acconfig.h: Document WITH_DMALLOC.
3352         * m4.h: Add code for when WITH_DMALLOC.
3354 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
3356         * m4.c (long_options): Use "error-output", the dash was missing.
3357         Reported by Akiko Matsushita.
3359 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
3361         * m4.h: Include <sys/types.h>.
3362         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
3363         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
3364         int.
3365         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
3366         as size_t, not int.
3367         * builtin.c (dump_args): Declare len as size_t, not int.
3369         * debug.c: Prototype the forward declaration of debug_set_file.
3371         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
3372         shadowing of this variable.
3373         * output.c (insert_diversion): Idem.
3375         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
3376         (input_init): Duplicate default quote and comment strings.
3377         (set_quotes): Free previous quote strings in all cases.  Duplicate
3378         even default quote strings.
3379         (set_comment): Free previous comment strings in all cases.
3380         Duplicate even default comment strings.
3382         * configure.in: Updated for Autoconf 2.0.
3383         * Makefile.in (distclean-local): Also delete config.cache.
3385         * m4.c (usage): Reorganize the --help output by topic.  Include a
3386         description for debugging flags.
3388 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
3390         * configure.in: If sigaction is available and SA_ONSTACK defined,
3391         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
3392         defined, use sigvec.  Else don't compile stackovf.c.
3393         * stackovf.c (setup_stackovf_trap): Idem.
3394         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
3395         and Simon Leinen.
3397 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
3399         * m4.c (usage): Replace printf par fputs.
3401 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
3403         * Release 1.2
3405 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
3407         * configure.in: Check for sigaction and sigvec.  Add a new delayed
3408         check for RLIMIT_STACK, combine in the checking for getrlimit.
3409         All those things are not universally available.
3410         * stackovf.c: Split setting up the trap handler and catching
3411         signals, for better taking care of various configure outcomes.
3412         * examples/stackovf.sh: Correct a typo.
3413         Reported by Eric Backus, Jim Avera and Jim Meyering.
3415 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
3417         * ansi2knr.c: New version sent by its author, Peter Deutsch.
3419 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
3421         * Makefile.in: Modify so parallel make will not try making
3422         lib/libm4.a twice simultaneously.
3423         Reported by Jim Meyering.
3425 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
3427         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
3428         error message, for when no code possibility exists.  Even if this
3429         line is completely #ifdef'ed out, it brings a syntax error.
3430         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
3432         * Makefile.in (install): Have install depend on all too, for lib
3433         to be remade as needed.
3435         * examples/stackovf.sh: Try ksh, bsh and bash for shells
3436         providing ulimit, instead of using only ksh.
3437         Reported by Jim Avera and Joseph E. Sacco.
3439 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
3441         * Makefile.in (check): Have it depend on all instead of m4.  In
3442         this way, a change in lib will be detected and processed.
3444         * builtin.c (numeric_arg): Use strtol and verify the conversion,
3445         instead of using sscanf which stops as soon as there is a
3446         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
3447         and divert(1xyzzy) were all accepted without any warning or error
3448         messages.
3449         * m4.h: Declare strtol as long if not including stdlib.h.
3450         * configure.in: Check for limits.h, and replace strtol if missing.
3451         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
3452         * lib/strtol.c: New file, from elsewhere.
3453         Reported by Andreas Schwab.
3455 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
3457         * macro.c (expand_macro): Cast value to (boolean) prior to
3458         assigning it to traced.
3459         Reported by Tom McConnell.
3461         * Makefile.in (m4): Always make all in lib first.
3462         Reported by Jim Meyering.
3464 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
3466         * stackovf.c: Isolated OS-dependent sections; Improved portability,
3467         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
3468         handlers), and a default error message if the fault address is not
3469         available (when neither siginfo.h nor BSD sigcontext are supported).
3470         * configure.in: Changes for stackovf.h: Check for sigcontext,
3471         sigaction, sigstack, and define rlim_t as int if necessary.
3472         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
3473         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
3474         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
3476 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
3478         * configure.in: Use AC_SET_MAKE.
3479         * Makefile.in: Use @SET_MAKE@.
3480         Reported by Jim Meyering.
3482         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
3483         Reported by Ian Taylor.
3485 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
3487         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
3488         because siginfo.h is unrelated to standard headers, and siginfo.h
3489         is already checked for.
3490         Reported by Joseph E. Sacco.
3492         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
3493         PROTOTYPES.
3494         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
3495         AC_PROTOTYPES.
3497 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
3499         * builtin.c (substitute): Use \& to represent this part of the
3500         string which was matched by the whole regexp, instead of
3501         representing the whole string.  Any usage of \0 issues a warning
3502         and acts like \&, it will disappear in some subsequent release.
3504 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
3506         * m4.c: Complete prototype for forwarded declaration of usage.
3508         * input.c (init_macro_token): Correct own reference in error
3509         message.  Previous name get_macro_func was referred to instead.
3510         (next_char):  Correct own reference in error message.  Previous
3511         name advance_input was referred to instead.
3513         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
3514         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
3515         and_term, not_term, logical_not_term, cmp_term, shift_term,
3516         add_term, mult_term, exp_term, unary_term, simple_term): Add
3517         prototype to forwarded declarations.  Declare parameter v1 as
3518         eval_t * instead of int *.  Same for local variable v2 in dyadic
3519         functions.  Same for result in exp_term.
3520         * builtin.c (m4_eval): Declare value as eval_t instead of int.
3521         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
3522         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
3523         (shipout_int): Cast first argument of ntoa to eval_t.
3524         Reported by Thorsten Ohl.
3526         * macro.c: Complete the prototypes of forwarded expand_macro and
3527         expand_token.
3528         Reported by Thorsten Ohl.
3530         * m4.h: Define voidstar as void * or char * depending on __STDC__.
3531         The Ultrix 3.1 compiler cannot do much with void pointers.
3533         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
3534         * m4.c (xfree):  Replace void * by voidstar.
3535         Reported by Tom McConnell.
3537         * ansi2knr.1: New, from elsewhere.
3538         * Makefile.in (DISTFILES): Distribute ansi2knr.1
3540         * Makefile.in (stamp-h.in): Avoid running ./config.status if
3541         stamp-h does not exist yet.  This avoids running it a second time
3542         just after the initial ./configure.
3543         Reported by David MacKenzie and Tom McConnell.
3545         * m4.h: Replace the enum debug_info declaration with a series of
3546         #define's.  The Ultrix 3.1 compiler would otherwise need casting
3547         (int) to most references, when used in expressions.
3548         Reported by Tom McConnell.
3550 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
3552         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
3553         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
3554         calls the compiler.  Previously, FP_PROTOTYPES was only calling
3555         the preprocessor; by not being subject to CFLAGS, this was
3556         discouraging those flags asking for ANSI compilation.
3557         * acconfig.h: Document HAVE_PROTOTYPES.
3558         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
3559         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
3560         Reported by Eric Backus.
3562         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
3563         from the environment.  Default CFLAGS to -g if not set.
3564         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
3565         * lib/Makefile.in: Have CFLAGS substituted from configure.
3566         Reported by Eric Backus and Tom McConnell.
3568         * configure.in: m4_undefine changeword before using AC_ENABLE.
3570         * m4.h: Declare prototypes for error (for ANSI compilers only),
3571         prefix_all_builtins and reference_error.
3572         Reported by Tom McConnell.
3574         * input.c (set_word_regexp): Do not try to initialize the array
3575         test from a string, this does not work with non-ANSI compilers.
3576         Reported by Eric Backus.
3578         * Makefile.in (dist): Clean examples/ before saving it.
3579         (distclean-local): Also remove stamp-h.
3580         Reported by Eric Backus.
3582         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
3583         non ANSI compilers.
3584         Reported by Tom McConnell.
3586         * checks/Makefile.in (clean): Depends on mostlyclean.
3587         (mostlyclean): New goal.
3589 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
3591         * Makefile.in (DISTFILES): Distribute install.sh.
3592         * install.sh: New file, copied from elsewhere.
3593         Reported by Assar Westerlund and Kaveh R. Ghazi.
3595 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
3597         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
3598         * acconfig.h: Explain ENABLE_CHANGEWORD.
3600         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
3601         from code provided by Pete Chown]
3602         * m4.h: Add original_text field to u_t variant of union u.
3603         Declare TOKEN_DATA_FUNC macro.
3604         * builtin.c: Declare changeword.
3605         (m4_changeword): New function.
3606         * input.c: Include "regex.h", define variables with word regexps.
3607         (input_init): Initialize the word regexp.
3608         (set_word_regexp): New.
3609         (next_token): Declare local variables, use the previous code if
3610         default_word_regexp is true.  Else, match using a new code.  Save
3611         the original text.
3612         * macro.c (expand_token): Ship out original text if not a macro
3613         name.
3614         Reported by Krste Asanovic and Pete Chown.
3616         [These modifs all depend upon ENABLE_CHANGEWORD]
3617         * m4.h: Declare external user_word_regexp.
3618         * m4.c: Declare user_word_regexp, and initialize it from
3619         --word-regexp or -W, or NULL if not specified.
3620         * input.c: Use user_word_regexp if specified, instead of
3621         DEFAULT_WORD_REGEXP.
3623         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
3624         agree with it.
3626         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
3627         * checks/Makefile.in: Empty the suffix list.
3628         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
3630         * m4.c: Declare nesting_limit and initialize it to 250.
3631         Implement -LNUMBER or --nesting-limit=NUMBER to change its
3632         value.
3633         * m4.h: Declare nesting_limit as external.
3634         * macro.c (expand_macro): Stop execution whenever nesting limit
3635         is exceeded.
3636         Reported by Bengt Mertensson.
3638         * eval.c (evaluate): Diagnose excess characters in eval input.
3639         Things like `eval(08)' used to return 0 with no diagnostic.
3641         * m4.h: Capitalize first letter of all macro arguments in
3642         definitions.
3644         * m4.c: Declare warning_status, initialize it to 0.  Add new
3645         option -E, or --fatal-warnings, which sets warning_status to
3646         EXIT_FAILURE instead.
3647         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
3648         EXIT_FAILURE if not otherwise done by header files.
3649         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3650         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3651         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3652         argument of all M4ERROR calls.
3653         Reported by Noah Friedman.
3655         * examples/incl-test.m4: Renamed from incl_test.m4.
3656         * examples/include.m4: Include incl-test.m4 instead of
3657         incl_test.m4.
3658         * examples/multiquotes.m4: Renamed from multi-quotes.m.
3660 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
3662         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
3663         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3664         also tested it on a Sun Sparc workstation running SunOS 4.x.
3666         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3667         49.format check, abusing a `union values' argument with sprintf
3668         without selecting the proper field.  Now, save the formatting type
3669         first, delaying the fetch of the corresponding argument.
3670         Reported by Joseph E. Sacco and Tom Quinn.
3672         * format.c (format): Remove const from char *fmt declaration when
3673         not HAVE_EFGCVT, because a NUL may be forced into it.
3675         * m4.h: Declare atof() when not STDC_HEADERS.
3676         Reported by Joseph E. Sacco.
3678         * Regenerate configure using Autoconf 1.11, this corrects a
3679         problem about an incorrect cpp seting on NeXT 3.1.
3680         Reported by Alexander Lehmann.
3682 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
3684         * m4.h (_): Change argument from `x' to `Args'.
3686 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
3688         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3689         bringing more evil than good on a few systems.
3690         Reported by Greg A. Woods.
3692 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
3694         * m4.h: Rename Args() to _().
3695         * m4.h: Remove extern specifier from all function declarations.
3697 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
3699         * stackovf.c: New file implementing stack-overflow detection.
3700         * configure.in: Check for getrlimit, sigaction.  If all of
3701         standard headers, getrlimit and sigaction, define USE_STACKOVF and
3702         substitute ${U}stackovf.o for STACKOVF.
3703         * acconfig.h: Declare USE_STACKOVF.
3704         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3705         * m4.h: Declare setup_stackovf_trap().
3706         * m4.c: Call setup_stackovf_trap().
3707         * tests/stackovf_test.sh: New file.
3709 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
3711         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3713         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3715 Sun Jan 30 14:24:19 1994    (pinard at icule)
3717         * m4.h: Remove definition of volatile, not used anymore.
3718         Reported by Jim Meyering and Joseph E. Sacco.
3720         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3721         of `if ... else /* nothing */' for if macros.
3722         Reported by Jim Meyering.
3724         * builtin.c (m4_regexp): Reorganize the code for avoiding a
3725         warning from gcc about `repl' possibly used before defined.
3726         Reported by Jim Meyering.
3728         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3729         Reported by Jim Meyering.
3731 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
3733         * m4.h: Move the conditional definition of volatile after the
3734         inclusion of system files, because they may define it first.
3736 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
3738         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3739         get around a problem with Alpha make seeing a syntax error, there.
3740         Reported by Vern Paxson.
3742 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
3744         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3745         Reported by Richard Stallman.
3747 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
3749         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3750         instead of AC_HAVE_FUNCS.
3751         Reported by Noah Friedman.
3753 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
3755         * m4.c: Initialize show_help and show_version to zero.
3757         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3758         Use them in exit() and usage() calls.
3760 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
3762         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3763         syserr() macro.  Delete errref, add reference_error and M4ERROR.
3764         * m4.c: Replace errref, which was returning an input reference
3765         string, with reference_error, which prints it on standard error.
3766         * builtin.c, output.c: Use errno as second parameter to error,
3767         instead of using syserr() with %s.
3768         * *.c: Use M4ERROR instead of error: no more errref() with %s.
3769         Doing so, the program name appears after the input reference
3770         instead of before, which eases M-x next-error processing.
3772 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
3774         * checks/get-them: Escape braces with backslashes in patterns,
3775         because HPUX-9.01 awk needs this.
3776         Reported by Jim Meyering.
3778 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
3780         * builtin.c: Declare "FILE *popen ();".
3782         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3783         macros, replace error_message_prefix() declaration by errref()'s.
3784         Declare xrealloc, for use in errref().
3785         * m4.c: Delete error_message_prefix() function, add errref().
3786         * *.c: Use error() systematically in place of all error macros,
3787         now that error() flushes stdout first.  Make needed adjustments.
3789         * m4.h: Remove const in sys_errlist[] declaration, it creates
3790         conflicts on SGI and Alpha.
3791         Reported by Kaveh R. Ghazi.
3793 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3795         * m4.c: Include <getopt.h> instead of "getopt.h".
3797         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3798         * acconfig.h: New, for documenting HAVE_EFGCVT.
3799         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3800         use them wherever appropriate.  Also use -I. for compilations.
3801         * lib/Makefile.in: Use -I.. for compilations.
3802         * *.c: Include <config.h> or "config.h".
3804         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3805         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3807 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3809         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3811         * input.c (input_init): Initialize quote and comment strings
3812         explicitely instead of calling set_quotes and set_comment: by
3813         doing so, we ensure we do not free uninitialized variables.
3815         * checks/check-them: Reverse arguments to both diff, so the
3816         expected is on the left and the obtained on the right.
3818         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3819         macros. Delete declarations for m4error, warning, fatal and
3820         internal_error, add declaration for error_message_prefix.
3821         * m4.c:  Delete m4error, warning, fatal and internal_error
3822         routines, add error_message_prefix routine.
3823         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3824         warning with WARNING*, fatal with FATAL* and internal_error with
3825         INTERNAL_ERROR*.
3826         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3827         this is not needed anymore.
3829         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3830         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3831         and debug_message, add declaration for debug_message_prefix.
3832         * debug.c: Remove static specifier for FILE *debug declaration.
3833         Delete debug_print and debug_message routines, add
3834         debug_message_prefix routine.
3835         * builtin.c, debug.c: Replace debug_print routine calls with
3836         DEBUG_PRINT* macro calls.
3837         * input.c, path.c: Replace debug_message routine calls with
3838         DEBUG_MESSAGE* macro calls.
3840         * m4.h: Remove inclusion of <varargs.h>.
3841         * debug.c: Include <stdarg.h> or <varargs.h>.
3842         (trace_format): Use stdarg instead of varargs if __STDC__.
3844         * configure.in: Remove checks for vfprintf and _doprnt.  These
3845         implementations use varargs tricks which are not portable enough.
3846         * lib/vfprintf.c: Deleted.
3847         * lib/_doprnt.c: Deleted.
3848         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3849         Reported by Joel Sherrill.
3851         * path.c (add_include_directory): Use xstrdup.
3853         * builtin.c (find_builtin_by_name): Declare static.
3855         * *.[ch]: Add const to a few "char *" declarations.
3857         * configure.in: Remove commented tests for fileno() and fstat().
3858         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3860         * debug.c (debug_flush_files): New.
3861         * m4.h: Declares it.
3862         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3863         Reported by Nicolas Pioch.
3865 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3867         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3868         Reported by Joel Sherrill.
3870         * builtin.c (prefix_all_builtins): Instead of the table size, use
3871         the null entry at end for stopping the loop.  It was overwritten.
3872         Reported by Andreas Schwab and Jim Meyering.
3874         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3875         Reported by Kaveh R. Ghazi.
3877         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3878         Reported by Karl Vogel.
3880 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3882         * m4.h: Do not define volatile if already defined.
3883         Reported by Rene' Seindal.
3885         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3887         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3888         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3890 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3892         * m4.h: Define strchr and strrchr in terms of index and rindex,
3893         instead of the other way around.
3894         * builtin.c, m4.c, path.c: Use strchr instead of index.
3896         * input.c (next_char): Remove a "break;" after a "return ...;".
3897         Reported by Tom McConnell.
3899 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3901         * Release 1.1
3903         * configure.in: Do not copy check files in the build hierarchy.
3904         * checks/check-them: Identify the m4 version being checked.  For
3905         finding m4, look in $PATH instead of in the parent directory.
3906         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3907         * checks/Makefile.in (.all-stamp): Always create check files in
3908         the source hierarchy, not anymore in the build hierarchy.
3909         (check): cd to the source hierarchy before performing checks.
3910         Do not copy nor clean COPYING anymore, take it from `..'.
3911         Reported by Tom McConnell.
3913         * Makefile.in (Makefile): Use $(SHELL).
3914         (config.status): Use $(SHELL).  Use "config.status --recheck"
3915         instead of "configure --no-create", which is obsolete.
3916         Reported by Tom McConnell.
3918 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3920         * m4.c (usage): Use "%s" instead of "m4" in format string.
3921         Reported by Jim Meyering.
3923         * Makefile.in: Distribute mkinstalldirs.
3924         Reported by Pierre Gaumond.
3925         Reported by Jim Meyering.
3926         Reported by Tom McConnell.
3927         Reported by Andreas Gustafsson.
3929         * checks/check-them: Renamed from checks/check_them.
3930         * checks/get-them: Renamed from checks/get_them.
3931         * checks/.all-stamp: Renamed from checks/.all_stamp.
3932         * checks/Makefile.in: Changed accordingly.
3933         Reported by Jim Meyering.
3935 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3937         * lib/Makefile.in (dist): Correct permissions on files.
3939         * output.c: Declare tmpfile, some systems don't.
3941 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3943         * checks/Makefile.in (dist): Correct permissions on files.
3945         * Makefile.in (dist): Ensure recursive linking for subdirectory
3946         `examples', also set read/write permissions on all its files.
3948         * mkinstalldirs: New, from elsewhere.
3949         * Makefile.in: Use it.
3951         * debug.c: Synchronize debug messages and regular output when
3952         the debug file and stdout are redirected to the same file.
3953         * configure.in: Add (commented) checks for fileno and fstat.
3954         Reported by Jim Avera.
3956         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3957         etc., arguments, then ignore the superfluous one.  m4 used to
3958         diagnose missing arguments and return the empty string.
3959         Reported by Nick S. Kanakakorn.
3961 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3963         * m4.c (main): At end of all input, ensure all undiverted text
3964         goes to the main output stream.
3965         Reported by Andreas Gustafsson.
3967         * m4.c (main): exit (0), instead of return 0.
3969         * m4.c: Implement -P and --prefix-builtins.
3970         * builtin.c: Delete const specifier on builtin_tab.
3971         (prefix_all_builtins): New.
3972         Reported by Noah Friedman.
3973         Reported by Scott Bartram.
3975         * c-boxes.el: New, from elsewhere.
3976         * Makefile.in: Distribute it.
3978         * m4.h: Do not define bcopy if <string.h> defines it.
3979         Reported by Stephen Perkins.
3981         * builtin.c (define_macro): Allow a missing second argument, in
3982         which case it is implied empty.  Affects define and pushdef.
3983         Reported by Eric Allman.
3985 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3987         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3988         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3989         * builtin.c: Initialize all the blindness fields in builtin_tab.
3990         (define_builtin): Copy the blindness of a builtin into its symbol.
3991         * macro.c (expand_token): Avoid processing a blind builtin if the
3992         next character is not an opening parenthesis.
3993         Reported by David MacKenzie.
3994         Reported by Noah Friedman.
3996         * configure.in: Ensure an exit status of 0 on completion.
3997         Reported by Vivek P. Singhal.
3999         * eval.c (eval_lex): Admit both lower and upper case letters for
4000         bases greater than 10.  Only lower case letters were accepted.
4002         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
4003         Reported by Krste Asanovic.
4005         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
4006         * eval.c (logical_not_term): New name for not_term.
4007         * eval.c (xor_term): New, between or_term and and_term.
4008         * eval.c (not_term): New, between and_term and logical_not_term.
4009         * eval.c (shift_term): New, between cmp_term and add_term.
4010         Reported by Krste Asanovic: ~, ^, <<, >>.
4011         Reported by Ben A. Mesander: ** vs ^.
4013         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
4014         * m4.h: Delete xrealloc.c.
4015         * lib/xmalloc.c: New, from elsewhere.
4016         * lib/xstrdup.c: New, from elsewhere.
4017         * lib/Makefile.in: Distribute and compile them.
4019         * m4.c: Change progname to program_name.
4020         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
4021         * lib/error.c: New, from elsewhere.
4022         * lib/Makefile.in: Distribute and compile error.c.
4023         * configure.in: Check AC_VPRINTF and for strerror.
4024         * m4.c: Delete cmd_error.  Use error instead.
4025         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
4027         * m4.h: Delete #define const, let Autoconf takes care of this.
4029         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
4030         Merge parse_args into main.  Declare argv to be `char *const *',
4031         then remove superfluous casts.
4033         * m4.c: Rename --no-gnu-extensions to --traditional.
4034         Reported by Ben A. Mesander.
4036         * m4.c (usage): Add a status parameter.  Supply one in various
4037         calls.  Add --help processing.  Remove -V for --version.
4039         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
4041         * lib/Makefile.in: Have an AR=ar declaration.
4042         Reported by Eric Backus.
4043         Reported by Bjorn R. Bjornsson.
4044         Reported by Tom Tromey.
4045         Reported by Kristine Lund.
4046         Reported by Marion Hakanson.
4048 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
4050         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
4051         Reported by Noah Friedman.
4053 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
4055         * Makefile.in: Remove MDEFINES and cleanup.
4057 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
4059         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
4060         Create a gzip file.
4062 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
4064         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
4065         ensure 777 mode for directories, so older tar's will restore file
4066         modes properly.
4068 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
4070         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
4071         so the installer can override automatically configured choices.
4072         Reported by Karl Berry.
4074 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
4076         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
4077         previous version was not working properly on m68k-hp-bsd4.3.
4078         Reported by Roland McGrath.
4080         * lib/_doprnt.c: Stolen from Oleo distribution.
4081         * configure.in: Check for _doprnt.c if vfprintf.c selected.
4082         * lib/Makefile.in: Distribute _doprnt.c.
4083         Do not distribute regex.[ch].old anymore.
4085 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
4087         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
4088         Richard wants it there.
4090 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
4092         * Makefile.in: Add DEFS to MDEFINES.
4093         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
4094         (libm4.a): Remove the library before creating it.
4095         (distclean): Remove tags and TAGS too.
4097 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
4099         * Makefile.in (dvi, m4.dvi): New goals.
4101         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
4102         macro.c, output.c, path.c, symtab.c: Change Copyright from
4103         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
4105         * examples/divert.m4: Deleted, this bug has been corrected.
4107         * Makefile.in (texclean, mostlyclean): New goals.
4109         * Makefile.in (clean): Remove clutter from ansi2knr.
4110         Reported by Pierre Gaumond.
4111         Reported by Greg A. Woods.
4113 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
4115         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
4116         might well use CFLAGS is s/he needs it.
4118         * Makefile.in: Allow installation of info files from a separate
4119         build directory.
4120         Reported by Jason Merrill.
4121         Reported by David MacKenzie.
4122         Reported by Skip Montanaro.
4123         Reported by Erez Zadok.
4124         Reported by Assar Westerlund.
4126 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
4128         * Release 1.0.3
4129         This is still a beta release for the future GNU m4 version 1.1.
4131         * lib/alloca.c: New, from elsewhere.
4132         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
4134         * m4.h: Do not define index/rindex if already defined.  If
4135         FALSE/TRUE are already defined, do not redefine them, but merely
4136         define boolean typedef to int.
4138         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
4139         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
4140         because some C compilers do not like connectives with #ifdef.
4141         * m4.h: Define `volatile' only if __GNUC__, instead of once for
4142         __GNUC__ and once for __STDC__.
4143         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
4145         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
4146         Makefile dependencies.  Without it, make keeps destroying and
4147         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
4149         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
4150         to diversion/DIVERSION, this was a spelling error.
4152         * m4.c: Declare version[], remove #include "version.h".
4153         * version.h: Deleted.
4154         * Makefile.in: Remove references to version.h.
4156         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
4157         production, by using a simpler and more robust algorithm.  This
4158         solves the problem of synclines sometimes written in the middle of
4159         an output line.  Delete sync_line() and output_lines variable.
4160         * m4.h: Remove sync_line prototype and output_lines declaration.
4161         * input.c (next_char), output.c (shipout_text): Remove references
4162         to output_lines.
4163         * input.c (push_file, pop_file): Merely put the value -1 in
4164         output_current_line instead of calling sync_line, for delaying a
4165         single `#line NUM FILE' before next output line.  Do not test
4166         for sync_output, because this is unnecessary clutter.
4167         * output.c (make_divertion, insert_divertion): Idem.
4168         * input.c: Rename must_advance_line to start_of_input_line, for
4169         consistency.
4171         * debug.c (trace_header): Select a new debug line format, which
4172         better complies with GNU standards for formatting error messages.
4173         With option `-dfl', M-x next-error might be used on the output.
4174         * m4.c (vmesg): Adjust format of error output to GNU standards.
4175         * m4.texinfo: Adjust examples for `make check' to work.
4177         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
4178         case for enum debug_info constants, which were all lower case.
4180         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
4181         re_search_2.
4182         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
4183         collected patches.  I tried a few times using newer regex.[ch], it
4184         mysteriously stopped aborting with this one.  Insecure feeling...
4185         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
4187 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
4189         * m4.c: Change `--no-warnings' to `--silent'.
4190         Reported by David MacKenzie.
4192         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
4193         leave it off for now.  See comment in m4.c for justification.
4194         Reported by David MacKenzie.
4196         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
4197         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
4199         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
4201         * Makefile.in: Ensure recursive cleaning is done before local
4202         cleaning for all clean goals.
4204         * builtin.c (ntoa): Ensure the value is always interpreted as a
4205         signed quantity, whatever the radix is.
4207 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
4209         * builtin.c, format.c, input.c: Split long lines.
4210         * m4.c: Use typedef macro_definition instead of struct
4211         macro_definition.
4212         * symtab.c: Use typedef symbol instead of struct symbol.
4214 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
4216         * *.[ch]: Remove all trailing whitespace, in code and comments.
4218         * configure.in: Find some awk.
4219         * Makefile.in: Add $(AWK) to MDEFINES.
4220         * checks/Makefile.in: Transmit $(AWK) to get_them.
4221         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
4222         awk script when switching files, because without this, mawk runs
4223         out of file descriptors.
4225 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
4227         * Makefile.in (realclean): Delete m4.info*.
4228         Reported by Jim Meyering.
4230         * Makefile.in: Adjust and link with checks/Makefile.
4231         * checks/Makefile.in: New.
4232         * configure.in: Output checks/Makefile.
4234         * checks/get_them: Have the dnl header of each test more
4235         recognizable by next-error, also use a better message.
4237 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
4239         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
4240         And use that only if __GNUC__ since we're using it's GCC-specific
4241         semantics that tell the compiler the associated function doesn't
4242         return.
4244         * builtin.c (substitute): Don't use character as an array index.
4245         (dumpdef_cmp): Make formal arguments `const void *' to avoid
4246         warnings with gcc -W -Wall on systems with qsort prototype.
4247         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
4248         from gcc -W -Wall.
4250         * eval.c (most functions): Add parentheses to assignments used
4251         as truth values go avoid warnings from gcc -Wall.
4253         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
4254         any functions that don't need external scope.
4256         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
4257         (many functions and arrays): Declare `const'.
4259 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
4261         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
4262         removing the declaration from m4.h.  Also rename false to FALSE
4263         and true to TRUE.
4265         * lib/Makefile.in (Makefile): New goal.
4267         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
4268         so heavily loaded.  It gets more easily overridable, calling make.
4269         Reported by Jim Meyering.
4271         * Makefile.in (dist): Get .fname from the current directory name,
4272         instead of from version.h.  I need updating many files manually,
4273         when the version changes, version.h is just one of them.
4275 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
4277         * m4.h: Remove the tag `boolean' on the enum introducing typedef
4278         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
4279         Reported by Tom McConnell.
4281 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
4283         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
4284         39.cleardiv, which were describing missing or spurious newlines.
4285         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
4286         do not depend on machine word size, `/bin/false' implementation,
4287         or `wc' output format.  `make check' is more dependable, now.
4289         * checks/check_them: Summarize the failed tests by listing their
4290         name, at end.  If none, issue `All checks successful'.  Output
4291         `Checking' instead of `Input file:'.
4293         * checks/get_them, checks/check_them: Reindented.
4295         * Makefile.in (dist): chmod a+r before making the tar file.
4297 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
4299         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
4301         * input.c (next_token): Reinitialize token_buttom just after using
4302         it as a watermark with obstack_free.  Or else, a future token, big
4303         enough for triggering reallocation of the obstack chunk, could
4304         void the initialized value of token_buttom, later causing panic in
4305         obstack_free.  Rename token_buttom to token_bottom everywhere.
4307         * m4.h: Before declaring errno, first include <errno.h> and
4308         ensure that it does not define errno.
4309         Reported by Richard Stallman.
4311 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
4313         * builtin.c: Define and use DECLARE macro for builtins.
4315         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
4316         argument, this is a common idiom for introducing long comments.
4318         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
4319         arguments.  The last argument was silently ignored.
4321         * m4.c (cmd_error): Add a missing semicolon before va_end().
4323 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
4325         * Makefile.in: Now handle protoized sources.  Define and use U.
4326         Compile and use ansi2knr with old compilers.  Update DISTFILES.
4327         Add `aclocal.m4' to `configure' dependencies.
4328         * ansi2knr.c: New, from Ghostscript distribution.
4329         * configure.in: Define U through FP_PROTOTYPES for old compilers.
4330         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
4331         * aclocal.m4: New, provide FP_PROTOTYPES.
4332         * m4.h: Conditionnaly protoized through Args, save for varags.
4333         * builtin.c: Protoized.  Then:
4334         Include <sys/types.h> if size_t is not defined, before "regex.h".
4335         (m4_ifelse): Fetch built-in name properly for diagnostic.
4336         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
4337         (m4_regexp): Add const to `msg' declaration.
4338         (m4_patsubst): Add const to `msg' declaration.
4339         * debug.c: Protoized, save for varargs.
4340         * eval.c: Protoized.
4341         * format.c: Protoized.
4342         * input.c: Protoized.
4343         * m4.c: Protoized, save for varargs.  Then:
4344         (xfree): Accept void * instead of char *.
4345         (xmalloc): Return void * instead of char *.
4346         (xrealloc): Accept and return void * instead of char *.
4347         * macro.c: Protoized.
4348         * output.c: Protoized.
4349         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
4350         * symtab.c: Protoized.
4352 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
4354         * m4.texinfo: Remove directory from diagnostics in 30.include,
4355         51.eval, 56.errprint and 57.m4exit tests.
4357         * m4.h: Remove declarations for int or void system functions, they
4358         cause more conflicting trouble than they make good.
4360         * configure.in: Avoid configuration header file.  Add some tests.
4361         * m4.h: Remove #include "config.h".
4362         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
4363         Then, rewritten for better compliance with GNU standards.
4365 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
4367         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
4368         because of a misplaced #endif.
4370         * Many *.[hc] files: Correct intra-line spacing here and there,
4371         according to GNU indent 1.6 advice.
4373         * configure.in: New, using Autoconf 1.2.
4374         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
4375         * Delete old configure.in, configure, etc/configure.in,
4376         etc/configure, lib/configure.in, lib/configure and config/*.
4377         Reported by Jason Merrill.
4379         * symtab.c (hash): Change (char) NULL to '\0'.
4380         Reported by Jason Merrill.
4382         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
4383         etc/nextvers.sh.  Release numbers will be edited `by hand'.
4384         * version.h: De-automatize, force value in.
4386         * m4.c: Changes in order to use a newer getopt.h.
4387         Reported by David MacKenzie.
4389         * checks/: New name for examples/.
4390         * checks/get_them: New location for etc/get_examples.
4391         * checks/check_them: New location for etc/check_examples.
4392         * Makefile.in, checks/get_them, checks/check_them: Adjust.
4393         * lib/vfprintf.c: New location for etc/vfprintf.c.
4394         * Delete empty etc/.
4395         * examples/: New name for test/.
4397 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
4399         * Makefile.in (check): Add m4 as dependency.
4401         * m4.c: Accept --no-warnings instead of --no_warnings, and
4402         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
4403         usage message more informative.
4404         Reported by David MacKenzie.
4406 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
4408         * etc/check_examples: New name for check_examples.sh.
4409         * etc/get_examples: New name for get_examples.sh.
4410         * Makefile.in, etc/Makefile.in: Use new names.
4412         * Makefile.in: Transmit $(CC) while making in lib.
4414         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
4415         code disposition by hand.
4417 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
4419         * m4.h: Delete definitions for abort() and exit().
4420         Reported by Richard Stallman.
4422         * config/hmake-unicos, config/s-unicos.h: New files.
4423         Reported by Hal Peterson.
4425         * eval.c (exp_term): Have N^0 return 1.
4426         Reported by Michael Fetterman.
4428         * eval.c, input.c, m4.h: Remove last comma in enums.
4429         Reported by Mike Lijewski.
4431         * Transfer of maintenance duties from Rene' to Franc,ois.
4433 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
4435         * Release 1.0.  Many thanks to those, who provided me with bug
4436         reports and feedback.
4438         * Uses GNU configure, taken from the gdb distribution.
4440         * Uses GNU getopt(), with long option names.
4442         * The -Q/+quiet option is added, which suppresses warnings about
4443         missing or superflous arguments to built-in macros.
4445         * Added default options via the M4OPTS environment variable.
4447         * The built-in format can now be configured to use sprintf as
4448         the formatting engine, for systems without [efg]cvt(3).
4450         * GNU library code is moved to the ./lib subdirectory; other
4451         utility files are now in ./etc.
4453         * Several minor bugs have been fixed.
4455 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
4457         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
4458         Francois Pinard and Roland H. Pesch for providing me with reports.
4460         * The builtins incr and decr are now implemented without use of
4461         eval.
4463         * The builtin indir is added, to allow for indirect macro calls
4464         (allows use of "illegal" macro names).
4466         * The debugging and tracing facilities has been enhanced
4467         considerably.  See the manual for details.
4469         * The -tMACRO option is added, marks MACRO for tracing as soon
4470         as it is defined.
4472         * Builtins are traced after renaming iff they were before.
4474         * Named files can now be undiverted.
4476         * The -Nnum option can be used to increase the number of
4477         divertions available.
4479         * Calling changecom without arguments now disables all comment
4480         handling.
4482         * The function m4_patsubst() is now consistently declared
4483         static.
4485         * A bug in dnl is fixed.
4487         * A bug in the multi-character quoting code is fixed.
4489         * Several typos in the manual has been corrected.  More probably
4490         persist.
4492         * The m4.info file is now installed along with the program.
4494 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
4496         * Updated and enhanced version.  Release 0.75, manual 0.07.
4498         * Implemented search path for include files (-I option and
4499         M4PATH envronment variable).
4501         * Implemented builtin "format" for printf-like formatting.
4503         * Implemented builtin "regexp" for searching for regular
4504         expressions.
4506         * Implemented builtin "patsubst" for substitution with regular
4507         expressions.
4509         * Implemented builtin "esyscmd", which expands to a shell
4510         commands output.
4512         * Implemented "__file__" and "__line__" for use in error
4513         messages.
4515         * Implemented character ranges in "translit".
4517         * Implemented control over debugging output.
4519         * Implemented multi-character quotes.
4521         * Implemented multi-character comment delimiters.
4523         * Changed predefined macro "gnu" to "__gnu__".
4525         * Changed predefined macro "unix" to "__unix__", when the -G
4526         option is not used.  With -G, "unix" is still defined.
4528         * Changed "shift", "$@" and "$*" to not insert spaces afters
4529         commas.
4531         * Added program name to error messages.
4533         * Fixed two missing null bytes bugs.
4535 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
4537         * Initial beta release.  Release 0.50, manual 0.05.
4539         -----
4541         $Revision$ $Date$
4543         Local Variables:
4544         coding: utf-8
4545         End:
4547         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
4548         2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4550         Copying and distribution of this file, with or without
4551         modification, are permitted provided the copyright notice
4552         and this notice are preserved.