Fix up gnulib-tool usage.
[m4/ericb.git] / ChangeLog
blob63fbe20d06be74e19256cb7cd9b42055c18437bc
1 2007-07-05  Eric Blake  <ebb9@byu.net>
3         Fix up gnulib-tool usage.
4         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
5         * version-etc.c.diff: Move to...
6         * local/lib/version-etc.c.diff: ...here.
7         * gpl-3.0.texi.diff: Move to...
8         * local/doc/gpl-3.0.texi.diff: ...here.
10 2007-07-04  Eric Blake  <ebb9@byu.net>
12         Upgrade to GPL version 3 or later.
13         * bootstrap: Pick up GPLv3.
14         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
15         --local-dir=. --import gpl-3.0'.
16         * doc/m4.texinfo (Copying This Package): New appendix.
17         * NEWS: Mention this change.
18         * README: Mention why some files still claim to be version 2.
19         * version-etc.c.diff: New file, to make sure --version claims
20         correct GPL version.  Temporary until gnulib makes move.
21         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
22         appendix, rather than section, of the manual.
23         * GNUmakefile: Update to new license.
24         * Makefile.am: Likewise.
25         * Makefile.maint: Likewise.
26         * commit: Likewise.
27         * configure.ac: Likewise.
28         * checks/Makefile.in: Likewise.
29         * doc/Makefile.am: Likewise.
30         * examples/Makefile.am: Likewise.
31         * src/Makefile.am: Likewise.
32         * src/builtin.c: Likewise.
33         * src/debug.c: Likewise.
34         * src/eval.c: Likewise.
35         * src/freeze.c: Likewise.
36         * src/input.c: Likewise.
37         * src/m4.c: Likewise.
38         * src/m4.h: Likewise.
39         * src/macro.c: Likewise.
40         * src/output.c: Likewise.
41         * src/path.c: Likewise.
42         * src/stackovf.c: Likewise.
43         * src/symtab.c: Likewise.
45 2007-06-26  Eric Blake  <ebb9@byu.net>
47         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
49 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
51         Match Free Software Directory categories.
52         * doc/m4.texinfo (dircategory): Update.
54 2007-05-31  Eric Blake  <ebb9@byu.net>
56         * src/output.c (output_text): Fix regression from 2007-05-28.
57         * doc/m4.texinfo (History): Mention 1.4.10.
58         (Format): Make testsuite output easier to debug.
60 2007-05-29  Eric Blake  <ebb9@byu.net>
62         Start 1.4.9c.
63         * configure.ac (AC_INIT): Bump version number.
64         * NEWS: Start changes since 1.4.9b, and fix typo.
66         Beta Release 1.4.9b:
67         * configure.ac (AC_INIT): Bump version number.
68         * NEWS: Describe changes since 1.4.9.
70         Improve format support.
71         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
72         vasprintf-posix'.
73         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
74         printf with too few arguments, as in format(%*.*d,-1,-1,1).
75         * doc/m4.texinfo (Format): Expand tests, and improve
76         documentation.
77         * NEWS: Document this change.
79 2007-05-28  Eric Blake  <ebb9@byu.net>
81         Fix large diversion corner cases, including 1.4.8 regression.
82         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
83         (make_room_for): Use NULL, not 0, for pointers.
84         (insert_diversion_helper): Avoid using rewind.
85         (freeze_diversions): Allow freezing large diversions.
86         * NEWS: Document this fix.
88         Also run gnulib unit tests during make check.
89         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
90         --tests-base=tests --with-tests'.
91         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
92         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
94 2007-05-25  Eric Blake  <ebb9@byu.net>
96         Backport prompts in examples from head.
97         * src/macro.c (expand_macro): Shorten message.
98         * doc/m4.texinfo (Manual, Command line files, Comments)
99         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
100         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
101         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
102         (Using frozen files, Improved forloop, Improved foreach): Add
103         prompts to examples.
104         * checks/get-them: Ignore prompts in examples.
106         Fix sync line interaction with multiline comments.
107         * doc/m4.texinfo (Other Incompatibilities): Add example, and
108         document bug in --syncline/divert interaction.
109         (Preprocessor features): Augment test.
110         * src/m4.h (output_text): Export.
111         (shipout_text, next_token): Add parameter.
112         * src/freeze.c (reload_frozen_state): Don't interfere with
113         synclines when reloading state.
114         * src/output.c (output_text): Export.
115         (shipout_text): Take new parameter for start line of token.
116         Output at most one syncline per token.
117         * src/input.c (next_token): Report line where multiline tokens
118         start.
119         * src/macro.c (expand_input, expand_token, expand_argument):
120         Adjust callers so that line is passed from input to output.
121         * NEWS: Document this fix.
122         Reported by Sergey Poznyakoff.
124         Test -s in testsuite.
125         * doc/m4.texinfo (Preprocessor features): Add a test.
126         * checks/get-them: Support extra options in testsuite.
127         * checks/check-them (examples): Use extra options.
128         * THANKS: Update.
129         Reported by Sergey Poznyakoff.
131 2007-05-24  Eric Blake  <ebb9@byu.net>
133         Support POSIX flush semantics on all platforms.
134         * m4/gnulib-cache.m4: Remove closeout, and augment with
135         'gnulib-tool --import closein fflush'.
136         * src/m4.h (includes): Use closein, not closeout.
137         * src/m4.c (main): Ensure stdin is flushed when not all input is
138         consumed.
139         (process_file): No return needed.
140         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
141         than excluding mingw.
142         * NEWS: Document this change.
144         Work around cygwin and mingw fseeko bugs.
145         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
146         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
148 2007-04-25  Eric Blake  <ebb9@byu.net>
150         Fix negative division within eval, regression of 2007-01-06.
151         * doc/m4.texinfo (Eval): Catch this bug.
152         * src/eval.c (mult_term): Fix it.
153         * NEWS: Document this.
154         * THANKS: Update.
155         Reported by Cesar Strauss.
157 2007-04-23  Eric Blake  <ebb9@byu.net>
159         Start 1.4.9a.
160         * configure.ac (AC_INIT): Bump version number.
161         * NEWS: Start changes since 1.4.9.
163 2007-03-23  Eric Blake  <ebb9@byu.net>
165         Release 1.4.9:
166         * configure.ac (AC_INIT): Bump version number.
167         * NEWS: Describe changes since 1.4.8b.
169 2007-03-16  Eric Blake  <ebb9@byu.net>
171         * doc/m4.texinfo (Mkstemp): Tweak wording.
172         * src/output.c (output_init): Adjust to latest gnulib.
174 2007-03-15  Eric Blake  <ebb9@byu.net>
176         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
177         long long, it confuses gnulib).
178         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
179         if unsigned long long doesn't work.
180         * THANKS: Update.
181         Reported by Matthew Woehlke.
183 2007-03-07  Eric Blake  <ebb9@byu.net>
185         * AUTHORS: Update.
186         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
188 2007-03-01  Eric Blake  <ebb9@byu.net>
190         * doc/m4.texinfo: Pick up more index entries from head.  Follow
191         more texinfo recommendations.
192         (Sysval): Improve tests.
194         Avoid overfull \vbox warning from texinfo, due to indices that
195         weren't quite big enough to split across page boundaries.
196         * doc/m4.texinfo: Add lots of concept index entries.
197         (Concept Index): Move to be last, as recommended by texinfo
198         manual.
199         (Define, Arguments, Pseudo Arguments): Add more function entries.
201 2007-02-28  Eric Blake  <ebb9@byu.net>
203         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
204         137.
205         (Pseudo Arguments): Add useful example.
207         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
208         reflect POSIX XCU ERN 118.
210         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
211         * src/m4.c (usage): ...here,...
212         * src/builtin.c (set_macro_sequence): ...and here.
213         (define_user_macro): Fix typo.
214         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
215         inaccuracies.
216         (Shift): Document composite macro argn for portably getting at
217         positional parameters beyond 9.
218         * configure.ac (AC_INIT): Bump version number.
219         * NEWS: Start changes of 1.4.8c.
221 2007-02-24  Eric Blake  <ebb9@byu.net>
223         Beta Release 1.4.8b:
224         * configure.ac (AC_INIT): Bump version number.
225         * NEWS: Describe changes since 1.4.8.
227         Reserve all uses of raw ${} in macro definitions, not just
228         ${<digit>}.
229         * src/builtin.c (set_macro_sequence): Change default macro
230         sequence.
231         * doc/m4.texinfo (Operation modes): Update to match.
232         * src/m4.c (usage): Likewise.
233         * NEWS: Likewise.
235 2007-02-23  Eric Blake  <ebb9@byu.net>
237         * src/m4.h (includes): Update to latest gnulib.
239 2007-02-08  Eric Blake  <ebb9@byu.net>
241         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
242         more flexible, and so that autoconf can use it.
243         * src/m4.h (set_macro_sequence, free_macro_sequence): New
244         prototypes.
245         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
246         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
247         New variables and functions.
248         (define_user_macro): Allow flexibility in regular expression used
249         to trigger warning.
250         * src/m4.c (warn_syntax): Delete.
251         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
252         spelling of option, along with optional argument.
253         * doc/m4.texinfo (Operation modes, Arguments): Document this
254         change.
255         * NEWS: Document this change.
257 2007-02-05  Eric Blake  <ebb9@byu.net>
259         * m4/gnulib-cache.m4: Module strstr no longer exists.
261         Avoid bool bitfields, as they don't work on AIX.
262         * src/m4.h (bool_bitfield): New typedef.
263         (struct symbol, struct builtin): Use it.
264         * src/input.c (struct input_block): Likewise.
265         Reported by Albert Chin.
267         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
268         Reported by Albert Chin.
269         * THANKS: Update.
271 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
273         * doc/m4.texinfo (Input processing): Further clarifications.
275 2007-02-03  Eric Blake  <ebb9@byu.net>
277         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
278         the examples.
279         Reported by Bruno Haible.
281 2007-02-01  Eric Blake  <ebb9@byu.net>
283         * src/m4.c (fatal_warnings): New variable.
284         (usage): Document new -E behavior.
285         (main): Make -E an additive option.
286         (m4_error, m4_error_at_line): Change exit status when required.
287         * NEWS: Document this change.
288         * doc/m4.texinfo (Operation modes): Likewise.
289         Reported by Ralf Wildenhues.
291 2007-01-27  Eric Blake  <ebb9@byu.net>
293         * src/m4.h (warn_syntax): Declare.
294         (init_pattern_buffer): Export.
295         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
296         (long_options, main): Implement new option.
297         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
298         (define_user_macro): Warn on $11 and ${1} if requested.
299         * src/input.c (init_pattern_buffer): Delete duplicate method.
300         * doc/m4.texinfo (Operation modes): Document it.
301         (Arguments): Document future direction of ${11} vs. $11.
302         (Incompatibilities): Fix wording on POSIX limitations.
303         * checks/get-them: Parse @{ and @} correctly.
304         * NEWS: Document this change.
306 2007-01-26  Eric Blake  <ebb9@byu.net>
308         * src/builtin.c (includes): Adjust to gnulib changes.
310 2007-01-15  Eric Blake  <ebb9@byu.net>
312         * doc/m4.texinfo: Pull in various improvements from head.
313         * src/builtin.c (include): Alter exit status on failure.
314         * NEWS: Document this fix.
316 2007-01-13  Eric Blake  <ebb9@byu.net>
318         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
319         assume the fallback of ss_base for BSDI 4.0.1.
320         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
321         ! HAVE_STACK_T_SS_SP]: Use this check.
322         Reported by Chris McGuire.
323         * THANKS: Update.
324         * NEWS: Document the improvement.
326 2007-01-09  Eric Blake  <ebb9@byu.net>
328         * src/eval.c (ASSIGN): New enumerator.
329         (eval_lex): Recognize '='.
330         (equality_term): Treat '=' like '==', but warn that it is
331         deprecated.
332         * doc/m4.texinfo (Eval): Document and test this.
333         (Incompatibilities): Document the POSIX incompatibility.
334         * NEWS: Document this change.
336 2007-01-06  Eric Blake  <ebb9@byu.net>
338         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
339         * checks/check-them: Record expected exit status.
340         * checks/get-them: Check exit status.
341         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
342         instead.
343         * src/builtin.c: All users changed.
344         * src/eval.c: Likewise.  Also document where we are triggering
345         undefined or implementation-defined behavior.
346         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
347         (logical_or_term, logical_and_term, logical_not_term, not_term)
348         (equality_term, unary_term): Port from head to follow POSIX
349         semantics.
350         (exp_term): Reject 0**0 as undefined.
351         * doc/m4.texinfo (History): Mention 1.4.9.
352         (Format, Incompatibilities): Update to document POSIX compliance.
353         * NEWS: Document this change.
355 2007-01-04  Eric Blake  <ebb9@byu.net>
357         * NEWS: Document previous fix.
358         * THANKS: Update.
360 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
362         Fix Debian bug 405594, introduced 2006-11-01 from a bad
363         copy-n-paste from head.
364         * src/m4.c (main): Use correct file name after --.
366 2007-01-04  Eric Blake  <ebb9@byu.net>
368         Fix regression from 1.4.7 in large file handling on some
369         platforms, introduced on 2006-10-13.
370         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
371         will be handled.
372         * NEWS: Document this fix.
374 2007-01-03  Eric Blake  <ebb9@byu.net>
376         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
377         version-etc-fsf'.
378         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
379         it bumps the copyright year).
381 2006-12-27  Eric Blake  <ebb9@byu.net>
383         * doc/m4.texinfo (Patsubst): Fix typo.
385 2006-12-16  Eric Blake  <ebb9@byu.net>
387         * src/m4.c (main): Check for errors when closing stdin.
389 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
391         * doc/m4.texinfo: Fix some typos.
393 2006-12-09  Eric Blake  <ebb9@byu.net>
395         * configure.ac (AC_INIT): Bump version number.
396         * NEWS: Start changes of 1.4.8a.
398 2006-11-20  Eric Blake  <ebb9@byu.net>
400         Release 1.4.8:
401         * configure.ac (AC_INIT): Bump version number.
402         * NEWS: Describe changes since 1.4.7.
404 2006-11-16  Eric Blake  <ebb9@byu.net>
406         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
407         Minor tweaks noticed while porting to head.
409 2006-11-14  Eric Blake  <ebb9@byu.net>
411         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
412         spent iterators.
413         (m4_tmpname): Avoid memory leak.
415 2006-11-13  Eric Blake  <ebb9@byu.net>
417         * src/output.c (cleanup_tmpfile): Avoid double error message when
418         umask is prohibitive.
419         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
420         functions.
421         (m4_tmpfile): Add parameter, move cloexec action here.
422         (make_room_for): Adjust caller.  Don't keep too many files open.
423         (insert_diversion_helper): Unlink emptied temp files.
424         (make_diversion): Don't keep too many files open.
425         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
426         descriptors are no longer a limiting factor.
427         * NEWS: Document this change.
429         Backport sparse diversion handling from head.
430         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
431         avltree-oset'.
432         * src/output.c (struct m4_diversion): Rename from struct
433         diversion, and update members.  All users changed.
434         (diversion_table): Change to an ordered set, instead of an array.
435         (div0): New storage for diversion 0.
436         (diversions): No longer needed.
437         (free_list): New list to allow recycling diversion storage.
438         (diversion_storage): New storage to reduce malloc overhead.
439         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
440         (output_init, output_exit, cleanup_tmpfile, make_room_for)
441         (make_diversion): Handle new diversion storage scheme.
442         (insert_diversion_helper): New function.
443         (insert_diversion, undivert_all, freeze_diversions): Use it.
444         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
445         exhaustion to visible test of large diversion numbers.
446         * NEWS: Document this fix.
448 2006-11-11  Eric Blake  <ebb9@byu.net>
450         * src/builtin.c (m4_translit): Slight optimization.
452         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
454         * src/builtin.c: Remove unnecessary casts.
455         (expand_ranges): Make 8-bit clean.
456         * doc/m4.texinfo (Translit): Add tests and wording.
457         * NEWS: Document this fix.
459 2006-11-07  Eric Blake  <ebb9@byu.net>
461         * src/m4.h (output_exit): New prototype.
462         * src/m4.c (main): Use it.
463         * src/output.c (cleanup_tmpfile): Close files before removing
464         directory.
465         (insert_diversion): Check for failure.
466         (output_exit): Avoid memory leak.
467         * doc/m4.texinfo (Diversions): Test this bug.
469         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
471 2006-11-01  Eric Blake  <ebb9@byu.net>
473         Allow C++ compilation on Linux, as a safety measure in type
474         checking.
475         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
476         stdbool'.
477         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
478         (boolean): Kill this, and use stdbool.h instead.
479         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
480         * src/output.c, src/symtab.c: All users changed.
481         * src/symtab.c (hack_all_symbols): Update prototype.
482         * src/builtin.c (dump_symbol, set_trace): Update signature.
483         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
484         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
485         C++ compilation.
486         * src/debug.c (trace_flush): Likewise.
487         * src/freeze.c (reload_frozen_state): Likewise.
488         * src/input.c (push_file, push_string_finish, push_wrapup):
489         (token_bottom, next_token): Likewise.
490         * src/m4.c (main): Likewise.
492         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
493         draft wording.
494         * src/m4.h (m4_path_search): Tweak signature.
495         * src/path.c (m4_path_search): Likewise.
496         * src/builtin.c (include): Update caller.
497         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
498         with file names.  Don't write to **argv.
499         (process_file): New helper method.
500         * NEWS: Document this fix.
502 2006-10-31  Eric Blake  <ebb9@byu.net>
504         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
505         * doc/m4.texinfo (Translit): Improve the documentation.
506         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
507         algorithm.
508         (m4_index): Simplify, and speed up slightly.
509         * NEWS: Document this fix.
511 2006-10-28  Eric Blake  <ebb9@byu.net>
513         * src/input.c (set_quotes): Don't allow empty end-quote with
514         non-empty start-quote.
515         (set_comment): Likewise for end-comment.
516         * src/builtin.c (m4_changecom): Adjust caller.
517         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
518         match behavior.
519         (Incompatibilities): Document another POSIX bug.
520         * NEWS: Mention this change.
522 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
524         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
525         files.
527 2006-10-26  Eric Blake  <ebb9@byu.net>
529         Silence -Wwrite-strings -Wpointer-arith warnings.
530         * src/builtin.c (define_user_macro): Allow NULL argument.
531         (m4_builtin, m4_indir): Cast away const of "".
532         * src/format.c (format): Likewise.
533         * src/macro.c (collect_arguments): Likewise.
534         (expand_macro): Avoid math on void*.
535         * src/m4.c (main): Adjust caller.
536         * src/output.c (freeze_diversions): Detect off_t overflow.
538         * src/input.c (pop_input): Remove unnecessary code.
540 2006-10-25  Eric Blake  <ebb9@byu.net>
542         * src/symtab.c (symtab_init): Avoid size_t overflow.
543         * src/output.c (make_diversion): Avoid size_t overflow.
544         * doc/m4.texinfo (Diversions): Test this fix.
545         * src/input.c (input_block): Remove unused member.  Reduce size
546         of struct.
547         (push_file, pop_input): Avoid useless assignment.
548         * NEWS: Document the bug fix.
550         Redo location tracking.  Instead of having just files track the
551         line to return to when popping input, now all input blocks track
552         their current line.
553         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
554         needed.
555         (input_block): Have line and file storage for all input types, and
556         rename some members.
557         (input_change): New global flag.
558         (push_file, push_macro, push_string_init, push_wrapup): Store
559         location.
560         (push_string_finish, pop_input, pop_wrapup): Notice changes in
561         input blocks.
562         (peek_input): Adjust to new member names.
563         (next_char, next_char1): Adjust location if needed.
564         (skip_line): Simplify restoring location.
565         * doc/m4.texinfo (Location): Augment the test to catch line
566         location of expansion of multi-line arguments.
567         Reported by Stepan Kasal.
569 2006-10-23  Eric Blake  <ebb9@byu.net>
571         * doc/m4.texinfo (Macro Arguments): Document that leading space
572         in argument collection stops at macro expansion.
573         (Incompatibilities): Document POSIX whitespace wording issue.
575 2006-10-20  Eric Blake  <ebb9@byu.net>
577         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
578         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
579         end of a TeX line splits incorrectly.
580         (Foreach, Improved foreach): Write these sections, borrowing ideas
581         from CVS head and from m4sugar.
582         * checks/get-them: Accomodate new way to show trailing space in
583         examples.
584         * examples/foreach.m4: Make usable in documentation.
585         * examples/foreachq.m4: New file.
586         * examples/foreachq2.m4: New file.
587         * examples/foreach2.m4: New file.
588         * NEWS: Document the documentation updates.
590 2006-10-19  Eric Blake  <ebb9@byu.net>
592         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
593         (m4_maketemp): Provide traditional behavior.
594         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
595         new `mkstemp' macro and the flaws of the old `maketemp'.
596         (Incompatibilities): Move maketemp discussion to...
597         (Extensions): ...here, since -G now supresses the GNU extension.
598         * NEWS: Document this.
600         * examples/forloop.m4: Simplify.
601         * examples/forloop2.m4: New file.
602         * examples/quote.m4: New file.
603         * doc/m4.texinfo (Loops): Rename to...
604         (Shift): ...this node.
605         (Forloop, Foreach, Improved forloop, Improved foreach): New
606         nodes.
608 2006-10-17  Eric Blake  <ebb9@byu.net>
610         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
611         config-h'.
612         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
613         gnulib headers, rather than in top directory.
614         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
615         output clutter.
617 2006-10-16  Eric Blake  <ebb9@byu.net>
619         * doc/m4.texinfo: Backport some minor cleanups from head.
620         (Cleardivert): Rename from cleardiv.
622         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
623         a section of Preliminaries.
624         (Operation modes, Preprocessor features, Limits control)
625         (Frozen state, Debugging options, Command line files): Subdivide
626         into new sections.
627         (Input processing, Quoting Arguments, Define, Arguments)
628         (Cleardiv, Format, M4exit): Fix grammar of references.
629         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
630         (Debug Levels, Debug Output, Include, Search Path, Divert)
631         (Platform macros, Syscmd, Location, Extensions): Point to new
632         sections.
633         (Top, Loops, Include, Undivert, Location, Incompatibilities):
634         Improve file references.
636 2006-10-14  Eric Blake  <ebb9@byu.net>
638         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
639         is not portable.
640         Reported by Ralf Wildenhues.
642         * src/builtin.c (m4_undivert): Check for read error.
644 2006-10-13  Eric Blake  <ebb9@byu.net>
646         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
647         header files are included, since <unistd.h> can affect the tests.
648         * THANKS: Updated.
649         Reported by Martin Koeppe.
651         Backport head's usage of clean-temp module, as it is cleaner than
652         using tmpfile-safer.
653         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
654         clean-temp closeout', and remove tmpfile-safer.
655         * src/m4.h (includes): Adjust.
656         (m4_path_search): Rename from path_search, to avoid collision
657         with gnulib.
658         * src/m4.c (main): Install closeout handler.  Adjust caller.
659         (usage): Now done by closeout module.
660         * src/builtin.c (m4_m4exit): Likewise.
661         (m4_undivert, include): Adjust callers.
662         * src/freeze.c (reload_frozen_state): Likewise.
663         * src/path.c (m4_path_search): Rename from path_search.
664         * src/output.c (output_temp_dir): New variable.
665         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
666         (insert_diversion, make_room_for): Use them.
667         * doc/m4.texinfo (Diversions): Document this, and add a test.
668         (Improved fatal_error): Fix typo.
669         (Maketemp): Port test to mingw, and no longer hide from
670         documentation.
671         * NEWS: Document the change in TMPDIR behavior.
673         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
674         macros, to work with recent gnulib-tool update.
676         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
677         handling of defn results.
678         * doc/m4.texinfo (Builtin, Indir): Add test cases.
679         * NEWS: Document this.
681 2006-10-12  Eric Blake  <ebb9@byu.net>
683         * doc/m4.texinfo (Location): Fix typo in previous commit.
684         (Changeword): Catch one more case.
685         * src/input.c (skip_line): Fix case when outer file used macro to
686         supply the \n.
688 2006-10-11  Eric Blake  <ebb9@byu.net>
690         * src/input.c (enum input_type): Add additional types, to shave
691         time off the common case.
692         (push_wrapup): Wrapped strings remember location.
693         (push_string_finish): Normal strings carry no location.
694         (push_file): Start new files uninitialized.
695         (peek_input, next_char_1): Optimize common cases by updating
696         location only on new input types.
697         (pop_input): Update to honor new input types.
698         (skip_line, push_string_finish): Fix regression in previous patch
699         when dnl is not followed by newline in included file.
700         (push_string_init): Initialize all fields of INPUT_STRING sooner.
701         (peek_token): Simplify.
702         (peek_input): Don't pop input files on peek, so that __file__ and
703         __line__ as last token of include file work correctly.
704         * doc/m4.texinfo (History): Mention 1.4.8.
705         (Answers): Split into sections, one per answer.
706         (Improved exch, Improved cleardivert, Improved fatal_error): New
707         nodes.
708         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
709         new m4wrap location semantics.
710         (Changeword): Add test that caught the regression.
711         * NEWS: Document this.
713         * src/macro.c (expand_macro): In macro expansion errors, report
714         line number at open parenthesis.
715         * src/input.c (next_token): Fix off-by-one bug in reporting end
716         of file in unterminated comment and string.
717         (file_names): New obstack, necessary since expand_macro now hangs
718         on to file names longer than the files remain open.
719         (input_init): Initialize new obstack.
720         (push_file): Use new obstack.  Delay updates to current_file
721         until after expand_macro has restored state.
722         (peek_input, next_char_1): Update current_file if necessary.
723         (pop_wrapup): Release memory.
724         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
725         the off-by-one bug.
726         (Dnl): Update to the new location reporting rules.
727         * NEWS: Document these changes.
729 2006-10-10  Eric Blake  <ebb9@byu.net>
731         * src/macro.c (argc_stack, argv_stack): New variables for sharing
732         obstacks across multiple macro calls.
733         (expand_input): Initialize and tear down stack once per input
734         file, instead of once per macro.
735         (expand_macro): Reuse existing stacks when possible.
736         (collect_arguments): Simplify slightly.
738         * src/path.c (include_env_init): Fix botched patch application.
739         Reported by Ralf Wildenhues.
741 2006-10-09  Eric Blake  <ebb9@byu.net>
743         * src/m4.c (usage, main): Detect write failures to stderr.
744         * src/builtin.c (m4_m4exit): Likewise.
745         * NEWS: Document this.
747         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
748         the limit.
749         * NEWS: Document this.
750         * doc/m4.texinfo (Invoking m4): Likewise.
752 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
754         * src/path.c (include_env_init): Copy the string returned
755         by getenv before overwriting it; POSIX disallows this.
757 2006-10-09  Eric Blake  <ebb9@byu.net>
759         * src/m4.c (main): Defer debugfile until after --help.
760         * configure.ac (AC_INIT): Bump version number.
761         * NEWS: Start changes of 1.4.7a.
763 2006-09-25  Eric Blake  <ebb9@byu.net>
765         Release 1.4.7:
766         * configure.ac (AC_INIT): Bump version number.
767         * NEWS: Describe changes since 1.4.6.
769 2006-09-21  Eric Blake  <ebb9@byu.net>
771         * doc/m4.texinfo (Invoking m4): Add clarification on option
772         processing behavior.
773         * THANKS: Update.
774         Reported by Mikhail Teterin.
776         * bootstrap: Add --force option, based on idea from coreutils.
777         * README: Document that ./bootstrap and autoreconf are for
778         developers, and not lightly done in tarballs.
780 2006-09-20  Eric Blake  <ebb9@byu.net>
782         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
783         deprecation warning on -e.
784         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
785         * NEWS: Document this.
787 2006-09-19  Eric Blake  <ebb9@byu.net>
789         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
790         -o/--error-output to --debugfile, and deprecate the former.  This
791         will allow a future release to be more consistent with other GNU
792         tools, with -o/--output affecting stdout, not debug.
793         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
794         * NEWS: Document this.
796 2006-09-14  Eric Blake  <ebb9@byu.net>
798         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
799         --diversions. `m4 --help --version' now displays help, not
800         version.
801         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
802         smaller scope.
803         (show_help, show_version): No longer needed.
804         (long_options, DIVERSIONS_OPTION): Backport patch from head to
805         distinguish between -N and --diversions in warning.
806         * doc/m4.texinfo (Invoking m4): Document this.
807         * NEWS: Likewise.
809 2006-09-11  Eric Blake  <ebb9@byu.net>
811         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
812         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
813         seekable.
814         (debug_set_file): Use STDOUT_FILENO.
815         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
816         with POSIX in regards to unread input.
817         * NEWS: Document this fix.
818         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
820 2006-09-07  Eric Blake  <ebb9@byu.net>
822         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
823         * src/m4.h (push_file): Change prototype.
824         * src/input.c (push_file, peek_input, next_char_1): Only call getc
825         once at EOF, to avoid double ^D on terminal stdin; regression from
826         2006-09-04.
827         (push_file, pop_file): Allow reading stdin twice.
828         * src/m4.c (main): Likewise.
829         * src/builtin.c (include): Update caller.
830         * NEWS: Document this change.
831         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
832         (Syscmd): Add a test that failed before this patch.
834 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
836         * checks/check-them: Quote $pwd.
838 2006-09-05  Eric Blake  <ebb9@byu.net>
840         * src/builtin.c (define_macro): Warn on invalid macro name.
841         * NEWS: Document this change.
842         * doc/m4.texinfo: Fix typos.
843         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
844         (Ifelse): Backport some improvements from head.
846 2006-09-04  Eric Blake  <ebb9@byu.net>
848         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
849         native echo is braindead.
850         * checks/check-them (strip_needed): Ignore \r in output.  Now the
851         testsuite will pass when cross-compiling from cygwin to mingw.
853         * src/input.c (peek_input): Fix regression in handling macro
854         without arguments as last token in file; debian bug 385720.
855         (next_token): Always consume an input character.
856         Reported by Andreas Schultz.
857         * configure.ac (AC_INIT): Bump version number.
858         * NEWS: Document this fix.
859         * doc/m4.texinfo (History): Mention next version.
860         (Changeword): Add example that exposes this bug.
861         * THANKS: Update.
863 2006-08-25  Eric Blake  <ebb9@byu.net>
865         Release 1.4.6:
866         * configure.ac (AC_INIT): Bump version number.
867         * NEWS: Describe changes since 1.4.5.
869         * Makefile.maint (web-manual): Give up on VPATH build during
870         distribution.  But distributions are made so infrequently that
871         this is not too much of a hardship.
872         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
873         exists.
875 2006-08-24  Eric Blake  <ebb9@byu.net>
877         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
878         Solaris, produce output on just one argument.
879         (m4_regexp, m4_patsubst): For consistency, do likewise.
880         (m4_patsubst): Allow zero-length match at end of string.
881         * doc/m4.texinfo (Sysval): Fix overfull hbox.
882         (Bugs, Macro Arguments): Minor fixes.
883         (Other tokens): Rearrange node order.
884         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
885         * NEWS: Document these fixes.
887 2006-08-22  Eric Blake  <ebb9@byu.net>
889         * src/input.c (pop_input): Avoid empty filename with -di option.
890         * src/debug.c (debug_message_prefix): Put space before message.
892         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
894         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
895         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
897         * checks/check-them: State why a test is skipped.
898         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
900         * ChangeLog: Add copyright.
901         * AUTHORS: Likewise.
902         * BACKLOG: Likewise.
903         * README: Likewise.
904         * THANKS: Likewise.
905         * TODO: Likewise.
906         * examples/COPYING: New file, add copyright for all the examples.
907         * checks/get-them: Put copyright on testsuite files.
909 2006-08-18  Eric Blake  <ebb9@byu.net>
911         Don't let unrelated child processes see too many files.
912         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
913         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
914         spelling in error message.
915         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
916         (debug_set_output): Close debug file on exec.
917         * src/m4.h (includes): Add cloexec.h.
918         * src/output.c (make_room_for): Close diversions on exec.
919         * src/path.c (path_search): Close include files on exec.
920         * NEWS: Document this.
922         Regular expressions were leaking memory.
923         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
924         helper methods.
925         (m4_regexp, m4_patsubst): Avoid memory leak.
926         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
927         static.
928         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
929         from O(n^2) to O(n) for calculating word_start.
930         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
931         O(1) bitmap, not O(n) search string.
932         * NEWS: Document this fix.
934 2006-08-17  Eric Blake  <ebb9@byu.net>
936         * NEWS: Document previous checkin.
938         * src/builtin.c (substitute): Avoid core dump when accessing
939         beyond bound of regular expression.
940         Reported by Karl Nelson.
941         * doc/m4.texinfo (Regexp): Add example that causes core dump on
942         some architectures prior to this patch.
943         * THANKS: Updated.
945 2006-08-16  Eric Blake  <ebb9@byu.net>
947         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
948         clear that dumpdef does not always go to stderr.
950         * src/builtin.c (m4_errprint): Flush buffers before printing to
951         stderr.
952         * THANKS: Updated.
954 2006-08-15  Eric Blake  <ebb9@byu.net>
956         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
957         per debian bug 96075.
958         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
959         (Changeword): Don't use shift as an example of a swallowed word.
960         (Divert): Discuss fact that divert is an English word.
961         Reported by Richard A Nelson.
963 2006-08-14  Eric Blake  <ebb9@byu.net>
965         * doc/m4.texinfo (Invoking m4): Minor fixes.
967 2006-08-12  Eric Blake  <ebb9@byu.net>
969         * doc/m4.texinfo (Arguments): Hint at better exch macro.
970         (Answers): Provide a better definition.
972 2006-08-09  Eric Blake  <ebb9@byu.net>
974         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
975         yet understand locales.
976         * NEWS: Fix wording of a few items.
978 2006-08-08  Eric Blake  <ebb9@byu.net>
980         Avoid printing `NONE:0:' in error messages.
981         * src/m4.h (m4_error_at_line): New function.
982         * src/m4.c (m4_error_at_line): Implement.
983         * src/input.c (skip_line, input_init, next_token): Use "", not
984         "NONE", for no file, since NONE can be a real file name.
985         * src/macro.c (expand_argument): Likewise.
986         * src/debug.c (debug_message_prefix, trace_header): Check for
987         current file.
988         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
989         (Location): Document that synclines and internal message format
990         are not impacted by redefining these macros.
991         (M4exit): Hint at bug in fatal_error.
992         (Answers): Provide workaround to match m4 output.
994         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
995         * src/m4.h (m4_error): New function.
996         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
997         error module deficiencies.
998         (reference_error, suppress_line): No longer needed.
999         * src/m4.c (m4_error): Implement.
1000         (main): No longer need to install error callback.
1002 2006-08-04  Eric Blake  <ebb9@byu.net>
1004         * src/m4.h (program_name): Declare.
1005         (suppress_line): New variable.
1006         (M4ERROR_AT_LINE): New macro.
1007         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1008         for error message format.
1009         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1010         * src/macro.c (expand_argument): Likewise.
1011         * checks/check-them (examples): Adjust to new message format.
1012         * src/builtin.c (m4___program__): New builtin.
1013         * doc/m4.texinfo (Location): Split from Errprint into new node,
1014         and document __program__.
1015         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1016         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1017         format.
1018         (Extensions): Document __program__.
1019         * NEWS: Document this change.
1021 2006-08-03  Eric Blake  <ebb9@byu.net>
1023         Don't confuse leading `(' in comment or quote with start of
1024         argument collection.
1025         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1026         TOKEN_CLOSE.
1027         (peek_input): Make private to input.c.
1028         (peek_token): New prototype.
1029         * src/input.c (default_word_regexp): Reduce ifdefs.
1030         (peek_input): Make static.
1031         (next_token): Return new token types.
1032         (match_input, MATCH): Add argument consume, which controls
1033         whether match should be pushed back.
1034         (peek_token): New function.
1035         (token_type_string) [DEBUG_INPUT]: New function.
1036         * src/macro.c (expand_token, expand_argument, collect_arguments):
1037         Handle new token types.
1038         * doc/m4.texinfo (Changequote, Changecom): Document this.
1039         * NEWS: Document this.
1041         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1043         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1044         overflow detection when sigstack exists but is not implemented.
1045         Fixes debian bug 154053.
1046         * THANKS: Updated.
1047         Reported by David Perlin.
1049 2006-08-02  Eric Blake  <ebb9@byu.net>
1051         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1052         close.
1054 2006-08-01  Eric Blake  <ebb9@byu.net>
1056         * src/input.c (skip_line, next_token): Remember current file in
1057         case input file ends abruptly.  Addresses debian bug 175365.
1058         (pop_input): Defer freeing storage that holds previous file
1059         name...
1060         (pop_wrapup): to here, after error message is issued.
1061         * src/macro.c (expand_argument): Remember current file in case
1062         input file ends abruptly.
1063         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1064         (M4wrap): Adjust testsuite accordingly.
1065         (Errprint): Document line number limitation of m4wrap.
1066         * NEWS: Document this fix.
1067         * THANKS: Update.
1069 2006-07-31  Eric Blake  <ebb9@byu.net>
1071         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1072         clean; fixes debian bug 311378.
1073         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1074         (Changequote, Changecom): Add examples to test this.
1075         * NEWS: Document this fix.
1076         * THANKS: Update.
1077         Reported by Steven Augart.
1079         * doc/m4.texinfo: Whitespace fix.
1080         * checks/get-them: Avoid exceeding 14-char file name limit.
1081         * THANKS: Update.
1083 2006-07-30  Eric Blake  <ebb9@byu.net>
1085         * src/path.c (path_search): Detect allocation failure.
1087         Use native free when it is good enough.
1088         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1089         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1090         Adjust calls.
1091         * src/symtab.c (free_symbol): Likewise.
1092         * src/m4.c (xfree, main): Likewise.
1093         * src/m4.h (obstack_chunk_free): Likewise.
1094         * src/path.c (path_search): Likewise.
1095         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1097         * doc/m4.texinfo (Errprint): Add example for last patch.
1098         * checks/check-them: Account for VPATH in latest example.
1100 2006-07-29  Eric Blake  <ebb9@byu.net>
1102         * src/path.c (path_search): Add result parameter, so that
1103         -I can be accounted for.  Debian bug 53685.
1104         * src/m4.h (path_search): Update prototype.
1105         * src/m4.c (main): Adjust callers.
1106         * src/freeze.c (reload_frozen_state): Likewise.
1107         * src/builtin.c (include, m4_undivert): Likewise.
1108         * NEWS: Document this change.
1109         Reported by Nicolas Lichtmaier.
1111 2006-07-28  Eric Blake  <ebb9@byu.net>
1113         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1114         several non-GNU makes.
1115         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1116         * src/m4.h: Likewise.
1117         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1118         /usr/ccs/bin/ucbcc.
1120 2006-07-27  Eric Blake  <ebb9@byu.net>
1122         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1123         (History): Update for 1.4.6.
1125         * src/m4.h (_): Remove K&R cruft.
1126         * src/builtin.c: Likewise.
1127         * src/debug.c: Likewise.
1128         * src/eval.c: Likewise.
1129         * src/macro.c: Likewise.
1130         * src/stackovf.c: Likewise.
1132         * doc/Makefile.am (m4.1): Improve man page.
1133         * src/m4.c (usage): Improve --help output, including adding the
1134         bug reporting address.
1135         (main): Follow GNU Coding Standards for --version output.
1137 2006-07-26  Eric Blake  <ebb9@byu.net>
1139         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1140         end-comment consistently, to match POSIX.
1142         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1143         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1144         (Incompatibilities): Document incompatibility of changecom
1145         vs. macro names, and of EOF in include.
1146         * src/input.c (next_token): Reject unterminated comments at EOF.
1147         (skip_line): Warn on unterminated dnl at EOF.
1148         * NEWS: Document these changes.
1150 2006-07-25  Eric Blake  <ebb9@byu.net>
1152         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1153         stdio-safer into fopen-safer and tmpfile-safer.
1154         * src/m4.c: Remove redundant include.
1156 2006-07-24  Eric Blake  <ebb9@byu.net>
1158         Fix bugs related to stream handling.
1159         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1160         unlocked-io stdio-safer stdlib-safer close-stream.
1161         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1162         provided by gnulib if needed.
1163         * src/output.c [! HAVE_TMPFILE]: Likewise.
1164         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1165         their safer counterparts.
1166         (retcode): New global variable.
1167         * src/input.c (pop_input): Check for read failure.
1168         * src/freeze.c (reload_frozen_state): Likewise.
1169         (produce_frozen_state): Check for write failure.
1170         * src/debug.c (debug_set_file): Likewise.
1171         * src/m4.c (usage, main): Likewise.
1172         (retcode): Make global.
1173         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1174         status is non-zero except when everything succeeds.
1175         * doc/m4.texinfo (M4exit): Document these changes.
1176         (Incompatibilities): Remove documentation of bug now fixed.
1177         * NEWS: Document these fixes.
1179 2006-07-22  Eric Blake  <ebb9@byu.net>
1181         * src/format.c (format): Avoid compiler warning that str may be
1182         used uninitialized.
1184 2006-07-21  Eric Blake  <ebb9@byu.net>
1186         * src/m4.h [UNIX]: Add more platforms that are close enough to
1187         categorize as UNIX, but which don't predefine __unix__.
1188         Reported by Nelson H. F. Beebe.
1190 2006-07-20  Eric Blake  <ebb9@byu.net>
1192         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1193         to explicitly ask for --assume-autoconf=2.60.
1195 2006-07-19  Eric Blake  <ebb9@byu.net>
1197         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1198         and exits normally with 129.
1199         Reported by Nelson H. F. Beebe.
1200         * THANKS: Update.
1202         * src/m4.h (EXIT_MISMATCH): Define.
1203         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1204         exiting with status 63.
1205         * src/m4.c (usage): Document this.
1206         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1207         * NEWS: Likewise.
1209         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1210         back-cover texts.
1212 2006-07-17  Eric Blake  <ebb9@byu.net>
1214         * src/format.c (format): Support F, g, and G specifiers.
1215         * doc/m4.texinfo (Format): Document this.
1216         * NEWS: Document this addition.
1218         * doc/m4.texinfo (Builtin): Delete redundant text.
1220         * configure.ac (AC_INIT): Bump version number.
1221         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1222         * NEWS: Document this fix.
1224 2006-07-15  Eric Blake  <ebb9@byu.net>
1226         Release 1.4.5:
1227         * configure.ac (AC_INIT): Bump version number.
1228         * NEWS: Describe changes since 1.4.4.
1230         * src/m4.c (usage): Document exit status.
1231         * doc/m4.texinfo: Use `exit status', not `exit code'.
1232         (Invoking m4): Document exit status.
1234         * bootstrap: Backport --help, --version from head.
1235         (func_update): New function, for easily grabbing up-to-date files
1236         from gnulib.
1237         * Makefile.maint (web-manual): Fix for VPATH builds.
1239 2006-07-14  Eric Blake  <ebb9@byu.net>
1241         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1242         looks bad in info.  Use @deffn rather than @example for
1243         describing prototypes.  Fix awkward wording and grammar.
1245         * src/builtin.c (substitute): Warn on bad escape sequences.
1246         Ignore trailing backslash.
1247         * doc/m4.texinfo (Regexp): Add documentation for this.
1248         * NEWS: Document this change.
1250         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1251         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1252         more examples.
1253         (Dnl): Update example to show side effects.
1254         * checks/get-them: Generate three digit test names.
1255         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1257 2006-07-13  Eric Blake  <ebb9@byu.net>
1259         * src/input.c (input_init): Simplify.
1260         (set_word_regexp): Treat empty string as default, since empty
1261         regexp would disable word parsing.
1262         * src/m4.c (user_word_regexp): Default to empty string.
1263         * src/builtin.c (builtin_tab): Make changeword blind.
1264         * doc/m4.texinfo (Changeword): Document this.
1265         * NEWS: Document this.
1266         * TODO: Knock off completed items.
1268         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1269         just the first.
1270         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1271         * NEWS: Document this change.
1273         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1274         warning.  Detect quoted leading space and overflow as warnings.
1275         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1276         Treat width as minimum number of digits, as required by POSIX.
1277         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1278         arguments.
1279         (m4_substr): Likewise.  Silently treat empty start as 0.
1280         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1281         * src/eval.c (eval_lex): Parse radix 1 numbers.
1282         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1283         one type of warning.
1284         (Manual): Document behavior of numeric parsing of empty string.
1285         (Divert, Incr): Document error handling.
1286         (Eval): Document radices better.
1287         (Incompatibilities): Document translit incompatibility.
1288         * NEWS: Document these changes.
1290         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1291         (web-manual): Simplify.
1292         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1293         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1294         (MAINTAINERCLEANFILES): Clean it as well.
1295         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1296         (MAINTAINERCLEANFILES): Clean it as well.
1298 2006-07-12  Eric Blake  <ebb9@byu.net>
1300         * doc/m4.texinfo (Extensions): Document how to overcome
1301         implementation difference in > 9 positional parameters.
1303         * src/m4.c (usage): Sort within sections.
1304         (nesting_limit): Raise default from 250 to 1024.
1305         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1306         standard.  Use @option where appropriate.
1307         (Invoking m4): Sort to match --help output.
1308         (Debug Levels): Sort.
1309         (Frozen files): Sort and break into two nodes.
1311         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1312         * NEWS: Document raised -L limit.
1314 2006-07-11  Eric Blake  <ebb9@byu.net>
1316         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1317         stress-test changeword before a release.
1318         * doc/m4.texinfo: More doc cleanups.
1319         (Copying This Manual): New node; actually include the FDL in the
1320         documentation.
1321         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1322         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1323         * NEWS: Mention documentation improvements.
1325         * src/m4.h (OS2): New platform macro.
1326         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
1327         platform macro.
1328         * doc/m4.texinfo (Platform macros): Document it.
1329         (Sysval): Remove non-portable test of system("").
1330         * NEWS: Document this change.
1331         Reported by Andreas Buening.
1333 2006-07-09  Eric Blake  <ebb9@byu.net>
1335         * doc/m4.texinfo (Undivert): Fix typo in last commit.
1336         * src/m4.c (usage): Document M4PATH.
1337         * src/path.c (path_search): Reject empty string.
1338         * src/output.c (insert_diversion): Ignore diversion 0.
1339         * src/builtin.c (m4_undivert): Ignore empty string.
1340         * NEWS: Document this fix.
1342 2006-07-08  Eric Blake  <ebb9@byu.net>
1344         * checks/get-them: Make filtering easier.
1345         * checks/check-them: Filter non-input lines, so line counts are
1346         more realistic in the documentation, and so changeword tests work
1347         even when dnl is disabled.
1348         * doc/m4.texinfo: Adjust example line numbers.  Clean up
1349         front-matter, following autoconf's example.
1350         (Changeword): Enable tests, skipping if changeword not supported.
1351         (Define, Defn, Ifelse): Backport more examples from head.
1352         (Input processing, Answers): New nodes, backported from head.
1353         (Include): Expand test to cover empty filename.
1354         (Undivert): Add test of undivert(0).
1356 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1358         * doc/m4.texinfo: Fix spelling errors.
1360 2006-07-07  Eric Blake  <ebb9@byu.net>
1362         * THANKS: Update.
1364         * doc/Makefile.am (m4.1): No need to go through a temporary file;
1365         this also ensures timestamps are updated.
1366         * src/m4.h (includes): Require config.h.  Assume string.h,
1367         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
1368         than prototyping ourselves.
1369         (builtin_func): Add parameter type-checking.
1370         (voidstar): Delete, now that we assume C89.
1371         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1372         voidstar changed.
1373         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1374         xfree.
1376 2006-07-06  Eric Blake  <ebb9@byu.net>
1378         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1379         binary-io.
1380         * src/m4.h (includes): Add binary-io.h for O_BINARY.
1381         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1382         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
1383         * NEWS: Mention this fix.
1385         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1386         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1388         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1389         runs first when needed.
1390         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1391         once in srcdir rather than multiple times in VPATH builds.
1393 2006-07-03  Eric Blake  <ebb9@byu.net>
1395         * checks/check-them: Use portable = in test.
1396         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1397         directory, as required by Solaris cc.  Include built headers, as
1398         required by Solaris make in VPATH build.
1399         * checks/Makefile.in: Use $(srcdir) where needed.
1400         (CHECKS): Factor $(srcdir) into macro.
1401         (DISTFILES): Likewise.  Automake takes care of distributing
1402         Makefile.in.
1403         (dist): Simplify.
1404         (Makefile): Use modern syntax of config.status.
1405         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1406         Avoid overfull and underfull hboxes in dvi.
1408         Fix 'make check' in VPATH build.  All files included by testsuite
1409         now live in a single directory.  Use forloop.m4 in testsuite.
1410         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1411         here...
1412         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1413         here.
1414         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1415         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1416         * checks/check-them: Avoid s/// when filename is in pattern.
1417         * examples/forloop.m4: Fix to match documentation.
1418         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1419         new locations.
1420         (Loops, Format): Actually use forloop.m4 in tests.
1422 2006-07-02  Eric Blake  <ebb9@byu.net>
1424         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1425         $(bindir) works in installcheck.
1426         (check, installcheck): No longer change directory, so that
1427         distcheck works with a read-only builddir.
1428         * checks/check-them: Work when pwd is no longer builddir.
1430 2006-07-01  Eric Blake  <ebb9@byu.net>
1432         * GNUmakefile: New file, borrowed from coreutils.
1433         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1434         * Makefile.maint (Makefile): Delete this rule, now that
1435         GNUmakefile includes Makefile.
1437 2006-06-30  Eric Blake  <ebb9@byu.net>
1439         For compatibility with other m4 implementations, sysval returns
1440         signal<<8 rather than 0 if syscmd is terminated by a signal.
1441         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1442         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1443         not provide wait macros.
1444         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1445         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1446         (m4_esyscmd): Set sysval to -1 on failure.
1447         (m4_sysval): Print 127 on failure, and accomodate signals if they
1448         are detectable.
1449         * NEWS: Document this change.
1450         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1451         last commit.
1452         * checks/check-them: Likewise.
1453         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1455         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1456         * src/freeze.c (produce_frozen_state): Use new spelling of
1457         platform macro.
1458         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1459         platforms.
1460         (m4_syscmd, m4_esyscmd): The empty command is successful.
1461         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1462         Document platform-dependence of system().
1463         (Syscmd): Add example.
1464         (Esyscmd): Make example more robust, and actually demonstrate
1465         rescanning.
1466         (Sysval): Expand test to cover esyscmd code path, and to check
1467         that empty command is successful.  Add conditional check for
1468         signal behavior.
1469         (Other Incompatibilities): Move platform macros from here...
1470         (Platform macros): ...to this new node.  Add windows macro.
1471         Check that exactly one platform macro is provided.
1472         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1473         .exe in error messages.  Allow for skipping checks.
1474         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1475         * NEWS: Document platform macros.
1477 2006-06-29  Eric Blake  <ebb9@byu.net>
1479         Fix buffer overrun bug.
1480         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1481         xvasprintf.
1482         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1483         variant instead, since [efg]cvt are obsolete and our use of them
1484         was buggy (savannah sr #104303).
1485         (format): Fix buffer overflow by using xasprintf.
1486         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1487         * NEWS: Document this fix.
1489         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1490         cross-compilation.
1491         (AC_CACHE_CHECK): Cache search for ecvt.
1493 2006-06-27  Eric Blake  <ebb9@byu.net>
1495         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1496         required by POSIX, and add example that exposed core dump on x86
1497         architectures.
1498         (Incompatibilities): Document incompatibility in eval precedence.
1499         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1500         behavior.
1501         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1502         * NEWS: Document this change.
1504         * doc/m4.texinfo: Use @noindent consistently.
1505         (Quoting Arguments): Document that unquoted parentheses group
1506         arguments.
1507         (Pseudo Arguments): Expand tests to show this.
1508         (Incompatibilities): Contrast traditional behavior of
1509         changequote.
1511 2006-06-24  Eric Blake  <ebb9@byu.net>
1513         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1514         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1515         (AC_CHECK_FUNCS_ONCE): Likewise.
1517 2006-06-23  Eric Blake  <ebb9@byu.net>
1519         * doc/m4.texinfo: Quoting cleanup throughout - follow
1520         autoconf-recommended style of one level of quote per parenthesis
1521         in the normal case.  Adjust error messages to match GNU coding
1522         standards (and to allow 'make check' to pass again).
1523         (Quoted strings, Inhibiting Invocation): Turn more examples into
1524         tests.
1525         (Comments): Resolve FIXME by adding example.
1526         (Define): Add example about underquoting.
1527         (Defn): Add example about use of $0.
1528         (Indir, Format): Resolve FIXME done in last commit.
1529         (Ifelse): Add example about creating blind macro.
1530         (Debugging): Fix grammar.
1531         (Dnl): Add example about dnl with arguments.
1532         (M4wrap): Be explicit that LIFO order is non compliant, and will
1533         change in m4 2.0.
1534         (Undivert): Resolve FIXME by adding example.
1535         (Frozen files): Document that m4wrap and sysval will not work
1536         consistently until m4 2.0.
1537         (Incompatibilities): Document another POSIX compliance bug, this
1538         time with changequote.  Document a traditional incompatibility
1539         with partial input spanning file boundaries.
1541         Make error messages more consistent with GNU coding standards -
1542         start with lower case, and don't end sentence with punctuation.
1543         * src/debug.c (trace_pre): Update message wording.
1544         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1545         Likewise.
1546         * src/freeze.c (produce_frozen_state, issue_expect_message),
1547         (reload_frozen_state): Likewise.
1548         * src/input.c (push_string_init, pop_init, init_macro_token),
1549         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1550         * src/m4.c (stackovf_handler, main): Likewise.
1551         * src/macro.c (expand_token, expand_argument, call_macro),
1552         (expand_macro): Likewise.
1553         * src/output.c (make_room_for, output_text, insert_file),
1554         (freeze_diversions): Likewise.
1555         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1557         * src/builtin.c (builtin_tab): Make format and indir blind.
1558         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1559         * NEWS: Mention the change to builtins.
1561 2006-06-22  Eric Blake  <ebb9@byu.net>
1563         Robustify frozen file format.
1564         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1565         macro.  Require V first, and only accept it once.  For F, use
1566         placeholder if builtin is not found, rather than warning.
1567         * src/m4.h (m4_placeholder): New prototype.
1568         * src/builtin.c: Unify error message style.
1569         (m4_placeholder): New function, warn if invoked.
1570         (builtin_tab): Add m4_placeholder.
1571         (m4_defn): Warn if placeholder is encountered.
1572         (find_builtin_by_addr): Handle placeholder.
1573         (find_builtin_by_name): Return placeholder on failure.
1574         (m4_builtin): Treat placeholder as undefined.
1575         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1576         * NEWS: Document this change.
1577         Reported by Bruno Haible.
1579         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1580         (tabchar): New macro, so that 'make check' still works.
1581         (Invoking m4): Document that ignored compatibility options -B, -S,
1582         and -T each consume an argument.
1583         * checks/get-them: Honor @tabchar{}.
1585         Avoid compiler warnings during -DDEBUG.
1586         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1587         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1588         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1589         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1590         (next_token) [DEBUG_INPUT]: Print before returning.
1591         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1592         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1594         Avoid mkstemp bugs on various platforms.
1595         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1596         * src/output.c [! HAVE_MKSTEMP]: Delete.
1597         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1598         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1599         * NEWS: Document this.
1601         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1602         Reported by Bruno Haible.
1604 2006-06-21  Eric Blake  <ebb9@byu.net>
1606         Avoid obsolete sigstack when POSIX sigaltstack is available.
1607         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1608         do likewise.
1609         * configure.ac (AC_CHECK_HEADERS): Likewise.
1610         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1611         obsolete and most hosts now have it in signal.h.
1612         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1613         (AC_CACHE_CHECK): Cache decision to use stackovf.
1614         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1615         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1616         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1617         simplify later code.
1618         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1619         in case of dereferencing a member of a NULL pointer.
1620         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1621         POSIX handler.
1622         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1623         EXIT_FAILURE in error, indent preprocessor directives.
1624         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1625         siginfo.h.
1626         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1627         Reported by Santiago Vila.
1629 2006-06-19  Eric Blake  <ebb9@byu.net>
1631         * THANKS: Update.
1633 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1635         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1636         (check, installcheck): Use it, for OS/2.
1638 2006-06-18  Eric Blake  <ebb9@byu.net>
1640         Consistently use "GNU M4" as package name, "m4" as executable
1641         name.
1642         * NEWS: Document previous fix.
1643         * THANKS: Update.
1644         * README: Fix grammar.  Document that --enable-changeword is on
1645         its last leg.
1646         * doc/m4.texinfo (Top, Changeword): Likewise.
1647         (Sysval): Enhance this test.
1648         (History): Backport this section from CVS head, and update.
1650 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1651             Eric Blake  <ebb9@byu.net>
1653         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1654         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1655         big-endian and little-endian wait status definitions.
1656         (m4_sysval): Use WEXITSTATUS.
1657         Reported by Andreas Buening.
1659 2006-06-18  Eric Blake  <ebb9@byu.net>
1661         * configure.ac (AC_INIT): Bump version number.
1662         * NEWS: Describe changes in 1.4.4c.
1664 2006-06-17  Eric Blake  <ebb9@byu.net>
1666         Beta Release 1.4.4b:
1667         * configure.ac (AC_INIT): Bump version number.
1668         * NEWS: Describe changes since 1.4.4.
1669         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1671         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1672         bootstrap.
1673         * checks/Makefile.in (maintainer-clean): Add missing target.
1674         * COPYING: Remove generated file from CVS.
1676 2006-06-16  Eric Blake  <ebb9@byu.net>
1678         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1680 2006-06-15  Eric Blake  <ebb9@byu.net>
1682         * checks/wrapfifo.m4: New file.  Use it...
1683         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1684         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1686         * src/m4.h (to_uchar): New function.
1687         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1688         isdigit, isalpha, isupper, islower, isspace, isalnum.
1689         * src/builtin.c (expand_user_macro): Likewise.
1690         * src/format.c (format): Likewise.
1691         * src/macro.c (expand_argument): Likewise.
1692         * NEWS: Document this security fix.
1694         Message cleanup.
1695         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1696         * src/freeze.c (reload_frozen_state): Fix typo in message.
1697         (produce_frozen_state): Standardize on builtin, not built-in.
1698         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1700         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1701         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1702         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1703         gnulib.
1704         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1705         * m4/gnulib-cache.m4: New file, from gnulib.
1706         * bootstrap: Invoke gnulib-tool --update.
1707         * src/m4.c (main): Cast away const.
1708         * NEWS: Document that regex is updated.
1709         * THANKS: Update.
1711 2006-06-08  Eric Blake  <ebb9@byu.net>
1713         * configure.ac (changeword): Work even when changeword is not a
1714         macro.
1715         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1716         Delete; now done by automake.
1717         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1719 2006-06-07  Eric Blake  <ebb9@byu.net>
1721         * lib/regex.c (bcmp_translate): Canonicalize type name.
1722         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1723         * configure.ac (changeword): Disable changeword for the creation
1724         of configure, in case of bootstrapping with an m4 configured with
1725         --enable-changeword.
1727         Distribute a rudimentary man page.
1728         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1729         can feed help2man.
1730         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1731         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1733 2006-06-06  Eric Blake  <ebb9@byu.net>
1735         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1736         compiler warnings at -O2.
1737         * lib/getopt.c (_getopt_internal): Likewise.
1739         Cleanup of previous patches.
1740         * src/input.c (struct input_block): Remove traced member.
1741         (push_macro, init_macro_token): Don't pass trace status around.
1742         * src/m4.h (struct token_data): Remove traced member.
1743         (struct symbol, struct builtin): Reduce unused space.
1744         (TOKEN_DATA_FUNC): Simplify.
1745         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1746         (push_macro, define_builtin): Remove unused parameter.
1747         * src/builtin.c (define_builtin, builtin_init, define_macro),
1748         (m4_defn): Don't pass trace status around.
1749         * src/macro.c (expand_argument): Likewise.
1750         * src/freeze.c (reload_frozen_state): Likewise.
1751         * src/symtab.c: Whitespace cleanup.
1752         * NEWS: Clean up wording.
1753         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1754         ensure tests actually expose bugs prior to today's patches.
1756         Trace status of builtins is no longer inherited across
1757         define(...,defn(...)).  Fixes bug that autom4te had been working
1758         around.
1759         * src/builtin.c (define_builtin): Don't override trace status.
1760         * doc/m4.texinfo (Trace): Add test for this.
1761         * NEWS: Document this.
1763         When changing macro definitions inside the arguments to the macro,
1764         consistently preserve the old definition that was in effect before
1765         argument collection, similar to the C pre-processor.
1766         Reported by John Brzustowski.
1767         * NEWS: Document this change.
1768         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1769         this policy, and add tests that expose core dumps prior to this
1770         patch.
1771         * src/m4.h (struct symbol): New members to track when a symbol is
1772         still in use after removal from the symbol table.
1773         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1774         (free_symbol): Prototype.
1775         * src/macro.c (expand_macro): Track pending expansions of a
1776         symbol.  On completion, if a symbol is deleted and no longer
1777         pending, free its memory.
1778         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1779         is still in use.
1780         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1781         is still in use.
1782         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1783         in use as deleted and remove from the table without freeing
1784         memory.
1785         (symtab_print_list) [DEBUG_SYM]: More debug output.
1787         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1788         the symbol table during traversal.
1789         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1790         SYMBOL_POPDEF, since only the latter is safe with
1791         hack_all_symbols.
1793         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1794         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1795         Preserve placeholder when macro is being traced.
1796         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1797         symbol is not defined.
1798         (set_trace): Remove placeholder when no longer traced.
1799         (m4_traceon): On named traces, always reserve a slot in the
1800         symbol table.
1801         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1802         * NEWS: Document new trace behavior.
1803         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1804         no matter whether that macro is currently defined.
1805         (Incompatibilities): Document differences between traditional and
1806         GNU trace.
1808 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1809             Eric Blake  <ebb9@byu.net>
1811         * src/m4.h (hash_table_size): Now size_t instead of int.
1812         * src/m4.c (hash_table_size): Likewise.
1813         (main): Adjust to this; use atol rather than atoi.
1814         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1815         (symtab_init, lookup_symbol, hack_all_symbols):
1816         Use size_t for sizes and indexes, not int.
1817         (symtab_print_list) [DEBUG_SYM]: Likewise.
1818         (hash): Likewise.  Don't case-fold in the hash function.
1819         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1820         Don't assume hash word is 32 bits.
1821         * NEWS: Document this change.
1823 2006-06-04  Eric Blake  <ebb9@byu.net>
1825         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1826         to allow compilation, for use in debugger.
1827         (profiles, current_mode) [DEBUG_SYM]: New variables.
1828         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1829         determining hash table performance.
1831 2006-05-31  Eric Blake  <ebb9@byu.net>
1832             John Brzustowski  <jbrzusto@fastmail.fm>
1834         * src/input.c (input_stack): Delete; use current_input instead.
1835         (wrapup_stack): Dynamically allocate, so that recursion is handled
1836         properly.
1837         (push_wrapup): Use current wrapup stack.
1838         (pop_wrapup): Rotate wrapup stack to current, and create new
1839         wrapup stack.
1840         (input_init): Dynamically allocate stacks.
1841         * NEWS: Update, now that recursive m4wrap can no longer cause
1842         core dump.
1844 2006-05-31  Eric Blake  <ebb9@byu.net>
1846         * lib/getopt.c: Fix copyright year.
1847         * lib/obstack.c: Ditto.
1848         * src/builtin.c: Ditto.
1850 2006-05-30  Eric Blake  <ebb9@byu.net>
1852         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
1853         Reported by John Brzustowski.
1854         (Incompatibilities): Document known POSIX incompatibilities.
1855         * THANKS: Update.
1857 2006-05-29  Eric Blake  <ebb9@byu.net>
1859         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
1860         in read-only dir.
1862         Use automake.
1863         * Makefile.am: New file.
1864         * doc/Makefile.am: Ditto.
1865         * examples/Makefile.am: Ditto.
1866         * lib/Makefile.am: Ditto.
1867         * src/Makefile.am: Ditto.
1868         * acinclude.m4: New file, renamed from aclocal.m4.
1869         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
1870         (AC_ARG_PROGRAM): Now redundant.
1871         (STACKOVF): Turn into automake conditional.
1872         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
1873         * checks/Makefile.in: Converting this dir to automake was not
1874         trivial; for now, just add missing targets demanded by top-level.
1875         * INSTALL: Remove files that are now generated from CVS.
1876         * Makefile.in: Ditto.
1877         * aclocal.m4: Ditto.
1878         * install-sh: Ditto.
1879         * mkinstalldirs: Ditto.
1880         * doc/Makefile.in: Ditto.
1881         * doc/texinfo.tex: Ditto.
1882         * examples/Makefile.in: Ditto.
1883         * lib/Makefile.in: Ditto.
1884         * src/Makefile.in: Ditto.
1886         * AUTHORS: Backport from CVS head, and update.
1887         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
1889 2006-05-27  Eric Blake  <ebb9@byu.net>
1891         * lib/regex.c (regex_compile): Kill compiler warnings.
1892         * lib/getopt.c: Likewise.
1893         * lib/obstack.c: Likewise.
1894         * src/builtin.c (builtin_init): Likewise.
1895         * src/path.c (path_search): Likewise.
1897         * doc/m4.texinfo: Fix usage of a vs. an.
1898         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
1899         overfull hbox warnings.
1900         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
1902         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
1903         quoting.
1904         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
1905         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
1906         assume C89.
1907         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
1908         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
1909         * src/Makefile.in: Delete remains of ansi2knr.
1910         * src/ansi2knr.1: Delete.
1911         * src/ansi2knr.c: Delete.
1913 2006-05-25  Eric Blake  <ebb9@byu.net>
1915         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
1916         `illegal'.
1918         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
1919         Reported by Karl Berry.
1921 2006-05-24  Eric Blake  <ebb9@byu.net>
1923         * Makefile.in (html): New target.
1924         * doc/Makefile.in (html, m4.html): Likewise.
1925         (MAKEINFOHTML): New macro.
1926         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
1927         rendering.
1928         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
1929         absolute URL.
1930         Reported by Bob Badour.
1932         * THANKS: Update.  Move reporter's email addresses here, instead
1933         of in ChangeLog.
1935 2006-05-11  Eric Blake  <ebb9@byu.net>
1937         * THANKS: Update.
1938         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
1939         patched on 2005-12-04.
1940         Reported by Ilya N. Golubev.
1942         * bootstrap: New file, so that generated files need not be stored
1943         in CVS.
1944         * Makefile.in (DISTFILES): Add bootstrap.
1946         Make testsuite less sensitive to doc changes.
1947         * doc/m4.texinfo: Use m4.input instead of filename.
1948         * checks/check-them (xerr): Turn m4.input into filename.
1949         * checks/Makefile.in (dist): Depend on stamp-checks.
1951         Portability updates for OS/2.
1952         * src/Makefile.in (EXEEXT, OBJEXT): Define.
1953         (LINK): Use CFLAGS.
1954         (.c.obj): Define.
1955         * lib/Makefile.in (OBJEXT): Define.
1956         (.c.obj): Define.
1957         * doc/Makefile.in (install, uninstall): Install info files into
1958         the dir listing.
1959         Reported by Andreas Buening.
1961 2006-05-09  Eric Blake  <ebb9@byu.net>
1963         * install-sh: Update to newer upstream version.
1964         * mkinstalldirs: Likewise.
1965         Reported by Andreas Buening.
1967         * src/m4.c (main): Bump copyright year.
1968         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
1969         * doc/Makefile.in (datarootdir): Likewise.
1971 2006-05-08  Eric Blake  <ebb9@byu.net>
1973         * THANKS: Update.
1974         * doc/m4.texinfo (Bugs): Backport bug email address from head.
1975         Reported by Stepan Kasal.
1977 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
1979         * input.c (match_input): Do not pass expression with side effect
1980         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
1981         * NEWS: Updated.
1983 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1985         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
1986         Reported by Damian Menscher.
1988 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1990         * configure.ac (AC_INIT): Bump to 1.4.4a.
1992 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1994         Release 1.4.4:
1995         * configure.ac (AC_INIT): Bump to 1.4.4.
1996         * NEWS: Describe 1.4.4's changes.
1997         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
1999 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2001         * src/m4.c: fix return code when non-existent files are processed
2003 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2005         * README: update email address for bug reports.
2007 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2009         * doc/m4.info: Generated files are not kept in the repository.
2011 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2013         The FSF are moving offices today.  Changed their contact address
2014         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2015         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2017         Also, some of the files here were never updated from the previous
2018         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2019         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2021 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2023         * Makefile.in (bindir, infodir): Substitute from configure rather
2024         than hardcode.
2025         * doc/Makefile.in (infodir): Ditto.
2026         * src/Makefile.in (bindir): Ditto.
2027         * NEWS: Updated.
2029 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2031         Changes needed to automate the release process for 1.4.3:
2033         * Makefile.in (dist): Make .tar.bz2 tarball too.
2034         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2035         (cvs-news): Look 1 line further down for NEWS release number.
2036         (cvs-dist): We don't use automake, so make dist is fine.
2037         Remove double . before suffixes.
2038         (cvs-release): Don't mention manual.html.
2039         (fetch): Get latest gendocs files.
2040         (web-manual): Rewritten to use gendoc for multiformat manuals.
2041         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2042         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2043         preserving, but case insensitive, so generating html docs per node
2044         clashes between Index.html, the node file, and index.html, the
2045         top-level of the document tree...
2046         (Index macro): ...so renamed to this.  Changed all references.
2048 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2050         * configure.ac (AC_INIT): Bump to 1.4.3a.
2052 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2054         Release 1.4.3:
2055         * configure.in (AC_INIT): Bump to 1.4.3.
2056         * NEWS: Describe 1.4.3's changes.
2058 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2060         * Makefile.maint: New file with release rules, from CVS libtool.
2061         * Makefile.in (DISTFILES): Add Makefile.maint.
2062         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2063         canonical versions.
2065 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2067         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2068         checks/47.patsubst, with a redundant @comment to prevent emacs
2069         from removing it accidentally again.
2070         * checks/get-them: Allow for trailing spaces tucked behind
2071         @comment marks.
2073 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2075         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2076         * src/Makefile.in (install, uninstall): Likewise.
2078 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2080         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2081         on Cygwin.
2082         Reported by Eric Blake.
2084 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2086         * lib/regex.c, lib/regex.h: Updated from gnulib.
2087         * src/input.c (set_word_regexp):  Don't change the word_regexp
2088         unless it compiles correctly.
2089         * NEWS: Updated.
2090         Reported by Frank Schwidom.
2092         * Makefile.in (stamp-h): Regenerate config.h properly.
2094 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2096         * configure.ac (AC_DEFINE): Fix overquoting of description
2097         argument.
2099         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2100         recognition macros.
2101         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2102         on Windows, so that the frozen file reader will work.
2103         Reported by Josef T. Burger.
2105         * src/m4.c (main): Modernise the --version output.
2107 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2109         Modernise the configury a little to prevent spurious errors from
2110         Autoconf-2.59's autoreconf:
2112         * config.h.in: Renamed to...
2113         * config-h.in: ...this to better support DOS 8.3 file systems.
2114         * acconfig.h: Removed.
2115         * configure.in: Renamed to...
2116         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2117         entry comments.  Slight reorganisation and reformatting.
2118         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2119         entry comments.
2120         (AC_INIT): Use a modern 3 argument call.
2121         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2122         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2123         s/PRODUCT/PACKAGE/g.
2124         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2125         config.h.in.  Added configure.ac, config-h.in.
2126         (stamp-h.in): Removed acconfig.h from dependencies.
2127         (configure): Depends on configure.ac, not configure.in.
2128         * doc/Makefile.in (stamp-vti): Ditto.
2129         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2130         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2131         * configure: Regenerated.
2133 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2135         * src/output.c (mkstemp): Make non-static, and build regardless of
2136         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2137         * NEWS: Update.
2139 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2141         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2142         changes from your editor buffer first.
2144         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2145         * src/m4.c: And include them as appropriate.
2146         * NEWS: Updated.
2148 2004-09-09  Andreas Schwab  <schwab@suse.de>
2150         Refactoring of the string read case in next_char provides about a
2151         20% speedup of M4 as typically used by autoconf:
2153         * src/input.c (next_char_1): Renamed from next_char.
2154         (next_char): New macro.
2155         * NEWS: Updated.
2157 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2159         * configure.in (VERSION): Bump to 1.4.2a.
2161 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2163         Release 1.4.2.
2164         * configure.in (VERSION): Bump to 1.4.2.
2165         * News: Describe 1.4.2's changes.
2167         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2168         relies on this.
2169         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2170         (m4_maketemp): Clear errno before calling mkstemp.
2171         * src/path.c (path_search): Don't let "free" trash errno when
2172         returning NULL.
2173         * src/output.c (insert_file): Don't assume errno has a valid
2174         value simply because fread returns zero.  This fixes a
2175         portability bug reported by Marion Hakanson in
2176         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2178 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2180         * configure.in (VERSION): Bump to 1.4.1a.
2181         * NEWS: Place holder for next stable release.
2183 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2185         Release 1.4.1.
2186         * configure.in (VERSION): Bump to 1.4.1.
2187         * NEWS: Describe 1.4.1's changes.
2189         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2190         pacify Autoconf 2.59.
2192         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2193         to pacify Texinfo 4.7.
2194         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2196         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2197         pacify Sun C compilers.
2199 2003-09-28  Akim Demaille  <akim@epita.fr>
2201         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2202         botch.
2204 2003-09-03  Santiago Vila  <sanvila@debian.org>
2206         * examples/stackovf.sh: Use tempfile if available.
2208 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2210         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2211         * src/output.c (m4_insert_file): Do not mix buffered and
2212         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2214 2001-02-01  Santiago Vila  <sanvila@debian.org>
2216         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2217         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2219 2001-02-01  Matt Kraai  <kraai@debian.org>
2221         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2222         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2223         empty file rather than to a nonexistent file.  This closes a common
2224         security hole.
2225         * src/builtin.c (m4_maketemp): Implement the above, by using
2226         mkstemp rather than mktemp.  (trivial change)
2228 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2230         * src/builtin.c (expand_ranges): Added break after trailing dash.
2231         This caused misbehaviors on some systems.
2233 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2235         Release 1.4.
2236         * doc/Makefile.in (realclean): Also remove stamp-vti.
2237         Reported by Eric Backus.
2239 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2241         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2242         be opened, return immediately after producing the error message.
2243         Reported by Andreas Schwab.
2245         * configure.in: Check for const only after having found possible
2246         ANSIfying compiler flags, this is of no use to check it before.
2247         Reported by Alexander Lehmann.
2249 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2251         * src/macro.c (collect_arguments): Cast obstack arguments to
2252         (voidstar), so avoiding compiler warnings.
2253         Reported by Joseph E. Sacco.
2255         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2256         (int) so they correspond to %d format items.
2257         Reported by Joseph E. Sacco.
2259         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2260         * src/symtab.c (free_symbol): Idem.
2261         Reported by Karl Vogel.
2263 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2265         * Makefile.in (DISTFILES): Distribute BACKLOG.
2267         * configure.in: Define PRODUCT and VERSION.
2268         * acconfig.h: Document PRODUCT and VERSION.
2269         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2270         constant string m4 and variable or parameter named version.
2272 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2274         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2275         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2276         defines __STDC__ to 0, for indicating it is *not* ANSI!
2277         Reported by Kaveh R. Ghazi.
2279         * configure.in: Added obsolescent tests for AIX and Minix.
2281         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2282         which texclean does not exist anymore.
2283         Reported by Eric Backus, Jim Meyering, John David Anglin and
2284         Joseph E. Sacco.
2286 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2288         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2289         Reported by John David Anglin.
2291         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2292         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2293         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2294         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2295         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2296         of $U, put underline in extensions rather than in basenames.  Use
2297         implicit rules, now that regularity makes this possible.
2298         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2299         of ansi2knr whenever it is needed.
2300         * configure.in: Adjusted for correct STACKOVF substitution.
2301         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2302         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2303         Reported by David MacKenzie.
2305         * Makefile.in: Remove binprefix.  Use transform_name instead.
2306         Reported by David MacKenzie.
2308         * doc/Makefile.in: Create version.texi, use it, clean it.
2309         Reported by Jim Meyering.
2311 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2313         * Makefile.in (all, install, uninstall): Depend on Makefile.
2315         * Makefile.in: For actions invoking $(MAKE) from within compound
2316         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2317         the top-level make may exit successfully when it should fail.
2318         Reported by Jim Kingdon.
2320         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2322         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2323         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2324         * configure.in: Substitute PRODUCT and VERSION.
2326         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
2328 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
2330         * Makefile.in (mostlyclean-local): Do not remove *~.
2331         * */Makefile.in (mostlyclean): Idem.
2332         Reported by Robert E. Brown and Richard Stallman.
2334 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
2336         * src/m4.h: Get rid of CONFIG_BROKETS.
2338 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
2340         * configure.in: Use AC_ARG_PROGRAM.
2341         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
2342         Reported by David MacKenzie.
2344 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
2346         * configure.in: Do not add -O to CFLAGS for GNU C, now that
2347         configure does it automatically.
2348         Reported by Jim Meyering.
2350 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
2352         * src/stackovf.c: Declare the handler_t typedef earlier in the
2353         code, use it for stackovf_handler.
2354         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2355         casting sigsegv_handler.
2356         Reported by Robert Bernstein.
2358         * src/m4.c (main): Initialize program_name to argv[0] without
2359         basename'ing it.
2360         Reported by Karl Berry.
2362 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
2364         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2365         Reported by Karl Berry.
2367 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
2369         * lib/Makefile.in (mostlyclean): Added.
2370         (TAGS): Make in $(srcdir).
2372         * configure.in: Use `choke me' in test, like everywhere!
2374         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2375         unreacheable and useless.
2377         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2379         * lib/Makefile.in (DISTFILES): Distribute TAGS.
2380         (distclean): Do not remove TAGS.
2381         (realclean): Remove it.
2382         * Makefile.in: Make TAGS in lib also, not just in src.
2383         Reported by Karl Berry.
2385         * Makefile.in (distclean, realclean): Instead of recursively
2386         calling $(MAKE) for the -local part, allow parallel execution of
2387         -recursive and -local, only delay the removal of config.status,
2388         which is repeated in both goals.
2390 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
2392         Release 1.3.
2393         * Makefile.in: Group all *clean-recursive goals in one, using sed
2394         to remove `-recursive' while calling make recursively.  Also, use
2395         a subshell for each recursive $(MAKE).
2396         Reported by Jim Meyering.
2398         * src/m4.h (memcpy): Define with bcopy for BSD systems.
2399         Reported by Kaveh R. Ghazi.
2401         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2402         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2403         specify it.
2405         * configure.in: Use date instead of touch for stamp-h.
2406         * Makefile.in (stamp-h.in): Idem.
2408         * Makefile.in (distclean, realclean): Force serial execution of
2409         both goals, in case parallel makes are being used.
2410         Reported by Jim Meyering.
2412         * src/Makefile.in (DISTFILES): Distribute TAGS.
2413         (distclean): Do not remove TAGS.
2414         (realclean): Remove it.
2415         Reported by Karl Berry.
2417 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
2419         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
2420         to old names, for following Autoconf.
2422 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
2424         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2425         ./install.sh will not be correctly referred to in sub-Makefiles.
2426         Reported by John David Anglin.
2428         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2429         Reported by Eric Backus.
2431         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2432         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2433         config.status into remaking this directory's Makefile only.
2434         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2435         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2436         Reported by Jim Meyering.
2438 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2440         * configure.in: Correct stack overflow detection logic, taking
2441         care of systems having only incomplete implementations (like for
2442         Pyramid 9820 OSx 5.0d).
2443         Reported by Kaveh R. Ghazi.
2445         * src/Makefile.in (TAGS): Remote -t from etags call.
2447 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2449         * lib/Makefile.in (install): Depend on all.
2451 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2453         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2454         Reported by Jim Meyering and John David Anglin.
2456         * Makefile.in (distclean-local): Delete config.log.
2457         Reported by Jim Meyering.
2459         Solidify frozen files with respect to -P:
2460         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2461         calling a function by that name.  Declare the variable.
2462         * src/m4.h: Adjust declaration for prefix_all_buitins.
2463         * src/builtin.c (builtin_init): Merge in functionality from
2464         previous prefix_all_buitins function, while making entries in the
2465         symbol table, but not modifying the builtin description itself.
2467         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2468         because *many* compilers do not accept an empty `default:'.
2469         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2470         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2472         * configure.in: Use AC_TYPE_SIGNAL.
2473         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2474         Reported by Robert Bernstein.
2476         * checks/Makefile.in (check): Modify PATH so check-them will find
2477         m4 in the src directory.
2478         * Makefile.in (check): Don't.
2479         Reported by Akiko Matsushita and Jim Meyering.
2481         * src/output.c (make_room_for, output_character_helper): New
2482         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2483         a per buffer MAXIMUM_BUFFER_SIZE.
2485         * src/output.c (output_text): New function, for optimizing the
2486         output of strings of characters.  Use it.
2488 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2490         * doc, src: New directories reorganizing the distribution.
2491         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2492         files.
2493         * Makefile.in: Adjusted.
2494         * configure.in: Configure new Makefiles.
2496         * m4.h: Declare STRING typedef.  Use it for comment and quote
2497         strings, adjusting all references.  (This is the rudiments of a
2498         beginning for the eventual withdrawal of NUL terminated strings.)
2499         * output.c (shipout_text): Accept a length parameter, and use it.
2500         All callers adjusted.
2502 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2504         * m4.h: Include <unistd.h> if it exists.
2505         * stackovf.c: Don't.
2507         Clean up for current_diversion variable:
2508         * output.c: Move current_diversion from builtin.c.
2509         * m4.h: Declare current_diversion so builtin.c can access it.
2510         * output.c (output_init, make_diversion): Initialize or update
2511         current_diversion.
2512         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2513         alone.
2515         Remove limit on number of diversions:
2516         * output.c: Replace ndiversion by diversions, declare it.
2517         (output_init): Allocate only diversion 0.
2518         (make_diversion): Allocate new diversions as needed.
2519         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2520         * m4.c: Still accept -N, but do nothing with it.
2521         Reported by David MacKenzie.
2523         Freeze diversions:
2524         * output.c (freeze_diversions): New function.
2525         * m4.h: Declare freeze_diversions.
2526         * freeze.c: Document frozen file format, revise it, call
2527         freeze_diversions to add diversions to frozen format, and code to
2528         reload them properly.
2529         * m4.c: Do not undivert automatically at end when status being
2530         frozen.  Do not call builtin_init when reloading frozen state.
2532         Speed up diversion processing:
2533         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2534         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2535         structure and variables, cached variables out of output_diversion,
2536         reallocate_diversion_for and OUTPUT_CHARACTER.
2537         (shipout_text, make_diversion, insert_diversion): Adapted to new
2538         structures.
2539         (insert_file): Use better buffering.
2540         Reported by David MacKenzie.
2542 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2544         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2545         dist works from another build directory.
2547 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2549         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2550         constant HASHMAX, for -H option to work better.
2552         * builtin.c (DECLARE): Simplify by using _ ().
2554         * freeze.c: New file.
2555         * Makefile.in: Compile it, distribute it.
2556         * m4.c: Recognize, document and process --freeze-state (-F) and
2557         --reload-state (-R) options.  Pass a true flag to builtin_init
2558         only if no reloading some state.
2559         * builtin.c (define_builtin): Remove static specifier.
2560         (find_builtin_by_name): Remove static specifier.
2561         (builtin_init): Accept and obey a flag argument.
2562         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2564 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2566         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2567         specifier.
2569         * configure.in: Implement --with-dmalloc.
2570         * acconfig.h: Document WITH_DMALLOC.
2571         * m4.h: Add code for when WITH_DMALLOC.
2573 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2575         * m4.c (long_options): Use "error-output", the dash was missing.
2576         Reported by Akiko Matsushita.
2578 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2580         * m4.h: Include <sys/types.h>.
2581         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2582         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2583         int.
2584         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2585         as size_t, not int.
2586         * builtin.c (dump_args): Declare len as size_t, not int.
2588         * debug.c: Prototype the forward declaration of debug_set_file.
2590         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2591         shadowing of this variable.
2592         * output.c (insert_diversion): Idem.
2594         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2595         (input_init): Duplicate default quote and comment strings.
2596         (set_quotes): Free previous quote strings in all cases.  Duplicate
2597         even default quote strings.
2598         (set_comment): Free previous comment strings in all cases.
2599         Duplicate even default comment strings.
2601         * configure.in: Updated for Autoconf 2.0.
2602         * Makefile.in (distclean-local): Also delete config.cache.
2604         * m4.c (usage): Reorganize the --help output by topic.  Include a
2605         description for debugging flags.
2607 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2609         * configure.in: If sigaction is available and SA_ONSTACK defined,
2610         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2611         defined, use sigvec.  Else don't compile stackovf.c.
2612         * stackovf.c (setup_stackovf_trap): Idem.
2613         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2614         and Simon Leinen.
2616 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2618         * m4.c (usage): Replace printf par fputs.
2620 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2622         * Release 1.2
2624 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2626         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2627         check for RLIMIT_STACK, combine in the checking for getrlimit.
2628         All those things are not universally available.
2629         * stackovf.c: Split setting up the trap handler and catching
2630         signals, for better taking care of various configure outcomes.
2631         * examples/stackovf.sh: Correct a typo.
2632         Reported by Eric Backus, Jim Avera and Jim Meyering.
2634 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2636         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2638 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2640         * Makefile.in: Modify so parallel make will not try making
2641         lib/libm4.a twice simultaneously.
2642         Reported by Jim Meyering.
2644 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2646         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2647         error message, for when no code possibility exists.  Even if this
2648         line is completely #ifdef'ed out, it brings a syntax error.
2649         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2651         * Makefile.in (install): Have install depend on all too, for lib
2652         to be remade as needed.
2654         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2655         providing ulimit, instead of using only ksh.
2656         Reported by Jim Avera and Joseph E. Sacco.
2658 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2660         * Makefile.in (check): Have it depend on all instead of m4.  In
2661         this way, a change in lib will be detected and processed.
2663         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2664         instead of using sscanf which stops as soon as there is a
2665         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2666         and divert(1xyzzy) were all accepted without any warning or error
2667         messages.
2668         * m4.h: Declare strtol as long if not including stdlib.h.
2669         * configure.in: Check for limits.h, and replace strtol if missing.
2670         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2671         * lib/strtol.c: New file, from elsewhere.
2672         Reported by Andreas Schwab.
2674 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2676         * macro.c (expand_macro): Cast value to (boolean) prior to
2677         assigning it to traced.
2678         Reported by Tom McConnell.
2680         * Makefile.in (m4): Always make all in lib first.
2681         Reported by Jim Meyering.
2683 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2685         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2686         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2687         handlers), and a default error message if the fault address is not
2688         available (when neither siginfo.h nor BSD sigcontext are supported).
2689         * configure.in: Changes for stackovf.h: Check for sigcontext,
2690         sigaction, sigstack, and define rlim_t as int if necessary.
2691         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2692         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2693         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2695 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2697         * configure.in: Use AC_SET_MAKE.
2698         * Makefile.in: Use @SET_MAKE@.
2699         Reported by Jim Meyering.
2701         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2702         Reported by Ian Taylor.
2704 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2706         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2707         because siginfo.h is unrelated to standard headers, and siginfo.h
2708         is already checked for.
2709         Reported by Joseph E. Sacco.
2711         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2712         PROTOTYPES.
2713         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2714         AC_PROTOTYPES.
2716 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2718         * builtin.c (substitute): Use \& to represent this part of the
2719         string which was matched by the whole regexp, instead of
2720         representing the whole string.  Any usage of \0 issues a warning
2721         and acts like \&, it will disappear in some subsequent release.
2723 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2725         * m4.c: Complete prototype for forwarded declaration of usage.
2727         * input.c (init_macro_token): Correct own reference in error
2728         message.  Previous name get_macro_func was referred to instead.
2729         (next_char):  Correct own reference in error message.  Previous
2730         name advance_input was referred to instead.
2732         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2733         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2734         and_term, not_term, logical_not_term, cmp_term, shift_term,
2735         add_term, mult_term, exp_term, unary_term, simple_term): Add
2736         prototype to forwarded declarations.  Declare parameter v1 as
2737         eval_t * instead of int *.  Same for local variable v2 in dyadic
2738         functions.  Same for result in exp_term.
2739         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2740         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2741         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2742         (shipout_int): Cast first argument of ntoa to eval_t.
2743         Reported by Thorsten Ohl.
2745         * macro.c: Complete the prototypes of forwarded expand_macro and
2746         expand_token.
2747         Reported by Thorsten Ohl.
2749         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2750         The Ultrix 3.1 compiler cannot do much with void pointers.
2752         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2753         * m4.c (xfree):  Replace void * by voidstar.
2754         Reported by Tom McConnell.
2756         * ansi2knr.1: New, from elsewhere.
2757         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2759         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2760         stamp-h does not exist yet.  This avoids running it a second time
2761         just after the initial ./configure.
2762         Reported by David MacKenzie and Tom McConnell.
2764         * m4.h: Replace the enum debug_info declaration with a series of
2765         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2766         (int) to most references, when used in expressions.
2767         Reported by Tom McConnell.
2769 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2771         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2772         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2773         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2774         the preprocessor; by not being subject to CFLAGS, this was
2775         discouraging those flags asking for ANSI compilation.
2776         * acconfig.h: Document HAVE_PROTOTYPES.
2777         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2778         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2779         Reported by Eric Backus.
2781         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2782         from the environment.  Default CFLAGS to -g if not set.
2783         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2784         * lib/Makefile.in: Have CFLAGS substituted from configure.
2785         Reported by Eric Backus and Tom McConnell.
2787         * configure.in: m4_undefine changeword before using AC_ENABLE.
2789         * m4.h: Declare prototypes for error (for ANSI compilers only),
2790         prefix_all_builtins and reference_error.
2791         Reported by Tom McConnell.
2793         * input.c (set_word_regexp): Do not try to initialize the array
2794         test from a string, this does not work with non-ANSI compilers.
2795         Reported by Eric Backus.
2797         * Makefile.in (dist): Clean examples/ before saving it.
2798         (distclean-local): Also remove stamp-h.
2799         Reported by Eric Backus.
2801         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2802         non ANSI compilers.
2803         Reported by Tom McConnell.
2805         * checks/Makefile.in (clean): Depends on mostlyclean.
2806         (mostlyclean): New goal.
2808 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
2810         * Makefile.in (DISTFILES): Distribute install.sh.
2811         * install.sh: New file, copied from elsewhere.
2812         Reported by Assar Westerlund and Kaveh R. Ghazi.
2814 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
2816         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2817         * acconfig.h: Explain ENABLE_CHANGEWORD.
2819         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2820         from code provided by Pete Chown]
2821         * m4.h: Add original_text field to u_t variant of union u.
2822         Declare TOKEN_DATA_FUNC macro.
2823         * builtin.c: Declare changeword.
2824         (m4_changeword): New function.
2825         * input.c: Include "regex.h", define variables with word regexps.
2826         (input_init): Initialize the word regexp.
2827         (set_word_regexp): New.
2828         (next_token): Declare local variables, use the previous code if
2829         default_word_regexp is true.  Else, match using a new code.  Save
2830         the original text.
2831         * macro.c (expand_token): Ship out original text if not a macro
2832         name.
2833         Reported by Krste Asanovic and Pete Chown.
2835         [These modifs all depend upon ENABLE_CHANGEWORD]
2836         * m4.h: Declare external user_word_regexp.
2837         * m4.c: Declare user_word_regexp, and initialize it from
2838         --word-regexp or -W, or NULL if not specified.
2839         * input.c: Use user_word_regexp if specified, instead of
2840         DEFAULT_WORD_REGEXP.
2842         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
2843         agree with it.
2845         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2846         * checks/Makefile.in: Empty the suffix list.
2847         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2849         * m4.c: Declare nesting_limit and initialize it to 250.
2850         Implement -LNUMBER or --nesting-limit=NUMBER to change its
2851         value.
2852         * m4.h: Declare nesting_limit as external.
2853         * macro.c (expand_macro): Stop execution whenever nesting limit
2854         is exceeded.
2855         Reported by Bengt Mertensson.
2857         * eval.c (evaluate): Diagnose excess characters in eval input.
2858         Things like `eval(08)' used to return 0 with no diagnostic.
2860         * m4.h: Capitalize first letter of all macro arguments in
2861         definitions.
2863         * m4.c: Declare warning_status, initialize it to 0.  Add new
2864         option -E, or --fatal-warnings, which sets warning_status to
2865         EXIT_FAILURE instead.
2866         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
2867         EXIT_FAILURE if not otherwise done by header files.
2868         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
2869         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
2870         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
2871         argument of all M4ERROR calls.
2872         Reported by Noah Friedman.
2874         * examples/incl-test.m4: Renamed from incl_test.m4.
2875         * examples/include.m4: Include incl-test.m4 instead of
2876         incl_test.m4.
2877         * examples/multiquotes.m4: Renamed from multi-quotes.m.
2879 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
2881         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
2882         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
2883         also tested it on a Sun Sparc workstation running SunOS 4.x.
2885         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
2886         49.format check, abusing a `union values' argument with sprintf
2887         without selecting the proper field.  Now, save the formatting type
2888         first, delaying the fetch of the corresponding argument.
2889         Reported by Joseph E. Sacco and Tom Quinn.
2891         * format.c (format): Remove const from char *fmt declaration when
2892         not HAVE_EFGCVT, because a NUL may be forced into it.
2894         * m4.h: Declare atof() when not STDC_HEADERS.
2895         Reported by Joseph E. Sacco.
2897         * Regenerate configure using Autoconf 1.11, this corrects a
2898         problem about an incorrect cpp seting on NeXT 3.1.
2899         Reported by Alexander Lehmann.
2901 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
2903         * m4.h (_): Change argument from `x' to `Args'.
2905 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
2907         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
2908         bringing more evil than good on a few systems.
2909         Reported by Greg A. Woods.
2911 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
2913         * m4.h: Rename Args() to _().
2914         * m4.h: Remove extern specifier from all function declarations.
2916 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
2918         * stackovf.c: New file implementing stack-overflow detection.
2919         * configure.in: Check for getrlimit, sigaction.  If all of
2920         standard headers, getrlimit and sigaction, define USE_STACKOVF and
2921         substitute ${U}stackovf.o for STACKOVF.
2922         * acconfig.h: Declare USE_STACKOVF.
2923         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
2924         * m4.h: Declare setup_stackovf_trap().
2925         * m4.c: Call setup_stackovf_trap().
2926         * tests/stackovf_test.sh: New file.
2928 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
2930         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
2932         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
2934 Sun Jan 30 14:24:19 1994    (pinard at icule)
2936         * m4.h: Remove definition of volatile, not used anymore.
2937         Reported by Jim Meyering and Joseph E. Sacco.
2939         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
2940         of `if ... else /* nothing */' for if macros.
2941         Reported by Jim Meyering.
2943         * builtin.c (m4_regexp): Reorganize the code for avoiding a
2944         warning from gcc about `repl' possibly used before defined.
2945         Reported by Jim Meyering.
2947         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
2948         Reported by Jim Meyering.
2950 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
2952         * m4.h: Move the conditional definition of volatile after the
2953         inclusion of system files, because they may define it first.
2955 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
2957         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
2958         get around a problem with Alpha make seeing a syntax error, there.
2959         Reported by Vern Paxson.
2961 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
2963         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
2964         Reported by Richard Stallman.
2966 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
2968         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
2969         instead of AC_HAVE_FUNCS.
2970         Reported by Noah Friedman.
2972 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
2974         * m4.c: Initialize show_help and show_version to zero.
2976         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
2977         Use them in exit() and usage() calls.
2979 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
2981         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
2982         syserr() macro.  Delete errref, add reference_error and M4ERROR.
2983         * m4.c: Replace errref, which was returning an input reference
2984         string, with reference_error, which prints it on standard error.
2985         * builtin.c, output.c: Use errno as second parameter to error,
2986         instead of using syserr() with %s.
2987         * *.c: Use M4ERROR instead of error: no more errref() with %s.
2988         Doing so, the program name appears after the input reference
2989         instead of before, which eases M-x next-error processing.
2991 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
2993         * checks/get-them: Escape braces with backslashes in patterns,
2994         because HPUX-9.01 awk needs this.
2995         Reported by Jim Meyering.
2997 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
2999         * builtin.c: Declare "FILE *popen ();".
3001         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3002         macros, replace error_message_prefix() declaration by errref()'s.
3003         Declare xrealloc, for use in errref().
3004         * m4.c: Delete error_message_prefix() function, add errref().
3005         * *.c: Use error() systematically in place of all error macros,
3006         now that error() flushes stdout first.  Make needed adjustments.
3008         * m4.h: Remove const in sys_errlist[] declaration, it creates
3009         conflicts on SGI and Alpha.
3010         Reported by Kaveh R. Ghazi.
3012 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3014         * m4.c: Include <getopt.h> instead of "getopt.h".
3016         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3017         * acconfig.h: New, for documenting HAVE_EFGCVT.
3018         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3019         use them wherever appropriate.  Also use -I. for compilations.
3020         * lib/Makefile.in: Use -I.. for compilations.
3021         * *.c: Include <config.h> or "config.h".
3023         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3024         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3026 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3028         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3030         * input.c (input_init): Initialize quote and comment strings
3031         explicitely instead of calling set_quotes and set_comment: by
3032         doing so, we ensure we do not free uninitialized variables.
3034         * checks/check-them: Reverse arguments to both diff, so the
3035         expected is on the left and the obtained on the right.
3037         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3038         macros. Delete declarations for m4error, warning, fatal and
3039         internal_error, add declaration for error_message_prefix.
3040         * m4.c:  Delete m4error, warning, fatal and internal_error
3041         routines, add error_message_prefix routine.
3042         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3043         warning with WARNING*, fatal with FATAL* and internal_error with
3044         INTERNAL_ERROR*.
3045         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3046         this is not needed anymore.
3048         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3049         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3050         and debug_message, add declaration for debug_message_prefix.
3051         * debug.c: Remove static specifier for FILE *debug declaration.
3052         Delete debug_print and debug_message routines, add
3053         debug_message_prefix routine.
3054         * builtin.c, debug.c: Replace debug_print routine calls with
3055         DEBUG_PRINT* macro calls.
3056         * input.c, path.c: Replace debug_message routine calls with
3057         DEBUG_MESSAGE* macro calls.
3059         * m4.h: Remove inclusion of <varargs.h>.
3060         * debug.c: Include <stdarg.h> or <varargs.h>.
3061         (trace_format): Use stdarg instead of varargs if __STDC__.
3063         * configure.in: Remove checks for vfprintf and _doprnt.  These
3064         implementations use varargs tricks which are not portable enough.
3065         * lib/vfprintf.c: Deleted.
3066         * lib/_doprnt.c: Deleted.
3067         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3068         Reported by Joel Sherrill.
3070         * path.c (add_include_directory): Use xstrdup.
3072         * builtin.c (find_builtin_by_name): Declare static.
3074         * *.[ch]: Add const to a few "char *" declarations.
3076         * configure.in: Remove commented tests for fileno() and fstat().
3077         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3079         * debug.c (debug_flush_files): New.
3080         * m4.h: Declares it.
3081         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3082         Reported by Nicolas Pioch.
3084 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3086         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3087         Reported by Joel Sherrill.
3089         * builtin.c (prefix_all_builtins): Instead of the table size, use
3090         the null entry at end for stopping the loop.  It was overwritten.
3091         Reported by Andreas Schwab and Jim Meyering.
3093         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3094         Reported by Kaveh R. Ghazi.
3096         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3097         Reported by Karl Vogel.
3099 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3101         * m4.h: Do not define volatile if already defined.
3102         Reported by Rene' Seindal.
3104         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3106         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3107         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3109 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3111         * m4.h: Define strchr and strrchr in terms of index and rindex,
3112         instead of the other way around.
3113         * builtin.c, m4.c, path.c: Use strchr instead of index.
3115         * input.c (next_char): Remove a "break;" after a "return ...;".
3116         Reported by Tom McConnell.
3118 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3120         * Release 1.1
3122         * configure.in: Do not copy check files in the build hierarchy.
3123         * checks/check-them: Identify the m4 version being checked.  For
3124         finding m4, look in $PATH instead of in the parent directory.
3125         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3126         * checks/Makefile.in (.all-stamp): Always create check files in
3127         the source hierarchy, not anymore in the build hierarchy.
3128         (check): cd to the source hierarchy before performing checks.
3129         Do not copy nor clean COPYING anymore, take it from `..'.
3130         Reported by Tom McConnell.
3132         * Makefile.in (Makefile): Use $(SHELL).
3133         (config.status): Use $(SHELL).  Use "config.status --recheck"
3134         instead of "configure --no-create", which is obsolete.
3135         Reported by Tom McConnell.
3137 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3139         * m4.c (usage): Use "%s" instead of "m4" in format string.
3140         Reported by Jim Meyering.
3142         * Makefile.in: Distribute mkinstalldirs.
3143         Reported by Pierre Gaumond.
3144         Reported by Jim Meyering.
3145         Reported by Tom McConnell.
3146         Reported by Andreas Gustafsson.
3148         * checks/check-them: Renamed from checks/check_them.
3149         * checks/get-them: Renamed from checks/get_them.
3150         * checks/.all-stamp: Renamed from checks/.all_stamp.
3151         * checks/Makefile.in: Changed accordingly.
3152         Reported by Jim Meyering.
3154 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3156         * lib/Makefile.in (dist): Correct permissions on files.
3158         * output.c: Declare tmpfile, some systems don't.
3160 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3162         * checks/Makefile.in (dist): Correct permissions on files.
3164         * Makefile.in (dist): Ensure recursive linking for subdirectory
3165         `examples', also set read/write permissions on all its files.
3167         * mkinstalldirs: New, from elsewhere.
3168         * Makefile.in: Use it.
3170         * debug.c: Synchronize debug messages and regular output when
3171         the debug file and stdout are redirected to the same file.
3172         * configure.in: Add (commented) checks for fileno and fstat.
3173         Reported by Jim Avera.
3175         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3176         etc., arguments, then ignore the superfluous one.  m4 used to
3177         diagnose missing arguments and return the empty string.
3178         Reported by Nick S. Kanakakorn.
3180 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3182         * m4.c (main): At end of all input, ensure all undiverted text
3183         goes to the main output stream.
3184         Reported by Andreas Gustafsson.
3186         * m4.c (main): exit (0), instead of return 0.
3188         * m4.c: Implement -P and --prefix-builtins.
3189         * builtin.c: Delete const specifier on builtin_tab.
3190         (prefix_all_builtins): New.
3191         Reported by Noah Friedman.
3192         Reported by Scott Bartram.
3194         * c-boxes.el: New, from elsewhere.
3195         * Makefile.in: Distribute it.
3197         * m4.h: Do not define bcopy if <string.h> defines it.
3198         Reported by Stephen Perkins.
3200         * builtin.c (define_macro): Allow a missing second argument, in
3201         which case it is implied empty.  Affects define and pushdef.
3202         Reported by Eric Allman.
3204 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3206         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3207         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3208         * builtin.c: Initialize all the blindness fields in builtin_tab.
3209         (define_builtin): Copy the blindness of a builtin into its symbol.
3210         * macro.c (expand_token): Avoid processing a blind builtin if the
3211         next character is not an opening parenthesis.
3212         Reported by David MacKenzie.
3213         Reported by Noah Friedman.
3215         * configure.in: Ensure an exit status of 0 on completion.
3216         Reported by Vivek P. Singhal.
3218         * eval.c (eval_lex): Admit both lower and upper case letters for
3219         bases greater than 10.  Only lower case letters were accepted.
3221         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3222         Reported by Krste Asanovic.
3224         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3225         * eval.c (logical_not_term): New name for not_term.
3226         * eval.c (xor_term): New, between or_term and and_term.
3227         * eval.c (not_term): New, between and_term and logical_not_term.
3228         * eval.c (shift_term): New, between cmp_term and add_term.
3229         Reported by Krste Asanovic: ~, ^, <<, >>.
3230         Reported by Ben A. Mesander: ** vs ^.
3232         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3233         * m4.h: Delete xrealloc.c.
3234         * lib/xmalloc.c: New, from elsewhere.
3235         * lib/xstrdup.c: New, from elsewhere.
3236         * lib/Makefile.in: Distribute and compile them.
3238         * m4.c: Change progname to program_name.
3239         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3240         * lib/error.c: New, from elsewhere.
3241         * lib/Makefile.in: Distribute and compile error.c.
3242         * configure.in: Check AC_VPRINTF and for strerror.
3243         * m4.c: Delete cmd_error.  Use error instead.
3244         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3246         * m4.h: Delete #define const, let Autoconf takes care of this.
3248         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3249         Merge parse_args into main.  Declare argv to be `char *const *',
3250         then remove superfluous casts.
3252         * m4.c: Rename --no-gnu-extensions to --traditional.
3253         Reported by Ben A. Mesander.
3255         * m4.c (usage): Add a status parameter.  Supply one in various
3256         calls.  Add --help processing.  Remove -V for --version.
3258         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3260         * lib/Makefile.in: Have an AR=ar declaration.
3261         Reported by Eric Backus.
3262         Reported by Bjorn R. Bjornsson.
3263         Reported by Tom Tromey.
3264         Reported by Kristine Lund.
3265         Reported by Marion Hakanson.
3267 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3269         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3270         Reported by Noah Friedman.
3272 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3274         * Makefile.in: Remove MDEFINES and cleanup.
3276 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3278         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3279         Create a gzip file.
3281 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3283         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3284         ensure 777 mode for directories, so older tar's will restore file
3285         modes properly.
3287 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3289         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3290         so the installer can override automatically configured choices.
3291         Reported by Karl Berry.
3293 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3295         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3296         previous version was not working properly on m68k-hp-bsd4.3.
3297         Reported by Roland McGrath.
3299         * lib/_doprnt.c: Stolen from Oleo distribution.
3300         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3301         * lib/Makefile.in: Distribute _doprnt.c.
3302         Do not distribute regex.[ch].old anymore.
3304 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3306         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3307         Richard wants it there.
3309 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3311         * Makefile.in: Add DEFS to MDEFINES.
3312         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3313         (libm4.a): Remove the library before creating it.
3314         (distclean): Remove tags and TAGS too.
3316 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3318         * Makefile.in (dvi, m4.dvi): New goals.
3320         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3321         macro.c, output.c, path.c, symtab.c: Change Copyright from
3322         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3324         * examples/divert.m4: Deleted, this bug has been corrected.
3326         * Makefile.in (texclean, mostlyclean): New goals.
3328         * Makefile.in (clean): Remove clutter from ansi2knr.
3329         Reported by Pierre Gaumond.
3330         Reported by Greg A. Woods.
3332 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
3334         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
3335         might well use CFLAGS is s/he needs it.
3337         * Makefile.in: Allow installation of info files from a separate
3338         build directory.
3339         Reported by Jason Merrill.
3340         Reported by David MacKenzie.
3341         Reported by Skip Montanaro.
3342         Reported by Erez Zadok.
3343         Reported by Assar Westerlund.
3345 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
3347         * Release 1.0.3
3348         This is still a beta release for the future GNU m4 version 1.1.
3350         * lib/alloca.c: New, from elsewhere.
3351         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
3353         * m4.h: Do not define index/rindex if already defined.  If
3354         FALSE/TRUE are already defined, do not redefine them, but merely
3355         define boolean typedef to int.
3357         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3358         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3359         because some C compilers do not like connectives with #ifdef.
3360         * m4.h: Define `volatile' only if __GNUC__, instead of once for
3361         __GNUC__ and once for __STDC__.
3362         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3364         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3365         Makefile dependencies.  Without it, make keeps destroying and
3366         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
3368         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3369         to diversion/DIVERSION, this was a spelling error.
3371         * m4.c: Declare version[], remove #include "version.h".
3372         * version.h: Deleted.
3373         * Makefile.in: Remove references to version.h.
3375         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3376         production, by using a simpler and more robust algorithm.  This
3377         solves the problem of synclines sometimes written in the middle of
3378         an output line.  Delete sync_line() and output_lines variable.
3379         * m4.h: Remove sync_line prototype and output_lines declaration.
3380         * input.c (next_char), output.c (shipout_text): Remove references
3381         to output_lines.
3382         * input.c (push_file, pop_file): Merely put the value -1 in
3383         output_current_line instead of calling sync_line, for delaying a
3384         single `#line NUM FILE' before next output line.  Do not test
3385         for sync_output, because this is unnecessary clutter.
3386         * output.c (make_divertion, insert_divertion): Idem.
3387         * input.c: Rename must_advance_line to start_of_input_line, for
3388         consistency.
3390         * debug.c (trace_header): Select a new debug line format, which
3391         better complies with GNU standards for formatting error messages.
3392         With option `-dfl', M-x next-error might be used on the output.
3393         * m4.c (vmesg): Adjust format of error output to GNU standards.
3394         * m4.texinfo: Adjust examples for `make check' to work.
3396         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3397         case for enum debug_info constants, which were all lower case.
3399         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3400         re_search_2.
3401         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3402         collected patches.  I tried a few times using newer regex.[ch], it
3403         mysteriously stopped aborting with this one.  Insecure feeling...
3404         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3406 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
3408         * m4.c: Change `--no-warnings' to `--silent'.
3409         Reported by David MacKenzie.
3411         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3412         leave it off for now.  See comment in m4.c for justification.
3413         Reported by David MacKenzie.
3415         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3416         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3418         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
3420         * Makefile.in: Ensure recursive cleaning is done before local
3421         cleaning for all clean goals.
3423         * builtin.c (ntoa): Ensure the value is always interpreted as a
3424         signed quantity, whatever the radix is.
3426 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
3428         * builtin.c, format.c, input.c: Split long lines.
3429         * m4.c: Use typedef macro_definition instead of struct
3430         macro_definition.
3431         * symtab.c: Use typedef symbol instead of struct symbol.
3433 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
3435         * *.[ch]: Remove all trailing whitespace, in code and comments.
3437         * configure.in: Find some awk.
3438         * Makefile.in: Add $(AWK) to MDEFINES.
3439         * checks/Makefile.in: Transmit $(AWK) to get_them.
3440         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3441         awk script when switching files, because without this, mawk runs
3442         out of file descriptors.
3444 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3446         * Makefile.in (realclean): Delete m4.info*.
3447         Reported by Jim Meyering.
3449         * Makefile.in: Adjust and link with checks/Makefile.
3450         * checks/Makefile.in: New.
3451         * configure.in: Output checks/Makefile.
3453         * checks/get_them: Have the dnl header of each test more
3454         recognizable by next-error, also use a better message.
3456 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3458         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3459         And use that only if __GNUC__ since we're using it's GCC-specific
3460         semantics that tell the compiler the associated function doesn't
3461         return.
3463         * builtin.c (substitute): Don't use character as an array index.
3464         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3465         warnings with gcc -W -Wall on systems with qsort prototype.
3466         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3467         from gcc -W -Wall.
3469         * eval.c (most functions): Add parentheses to assignments used
3470         as truth values go avoid warnings from gcc -Wall.
3472         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3473         any functions that don't need external scope.
3475         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3476         (many functions and arrays): Declare `const'.
3478 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3480         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3481         removing the declaration from m4.h.  Also rename false to FALSE
3482         and true to TRUE.
3484         * lib/Makefile.in (Makefile): New goal.
3486         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3487         so heavily loaded.  It gets more easily overridable, calling make.
3488         Reported by Jim Meyering.
3490         * Makefile.in (dist): Get .fname from the current directory name,
3491         instead of from version.h.  I need updating many files manually,
3492         when the version changes, version.h is just one of them.
3494 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3496         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3497         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3498         Reported by Tom McConnell.
3500 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3502         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3503         39.cleardiv, which were describing missing or spurious newlines.
3504         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3505         do not depend on machine word size, `/bin/false' implementation,
3506         or `wc' output format.  `make check' is more dependable, now.
3508         * checks/check_them: Summarize the failed tests by listing their
3509         name, at end.  If none, issue `All checks successful'.  Output
3510         `Checking' instead of `Input file:'.
3512         * checks/get_them, checks/check_them: Reindented.
3514         * Makefile.in (dist): chmod a+r before making the tar file.
3516 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3518         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3520         * input.c (next_token): Reinitialize token_buttom just after using
3521         it as a watermark with obstack_free.  Or else, a future token, big
3522         enough for triggering reallocation of the obstack chunk, could
3523         void the initialized value of token_buttom, later causing panic in
3524         obstack_free.  Rename token_buttom to token_bottom everywhere.
3526         * m4.h: Before declaring errno, first include <errno.h> and
3527         ensure that it does not define errno.
3528         Reported by Richard Stallman.
3530 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3532         * builtin.c: Define and use DECLARE macro for builtins.
3534         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3535         argument, this is a common idiom for introducing long comments.
3537         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3538         arguments.  The last argument was silently ignored.
3540         * m4.c (cmd_error): Add a missing semicolon before va_end().
3542 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3544         * Makefile.in: Now handle protoized sources.  Define and use U.
3545         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3546         Add `aclocal.m4' to `configure' dependencies.
3547         * ansi2knr.c: New, from Ghostscript distribution.
3548         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3549         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3550         * aclocal.m4: New, provide FP_PROTOTYPES.
3551         * m4.h: Conditionnaly protoized through Args, save for varags.
3552         * builtin.c: Protoized.  Then:
3553         Include <sys/types.h> if size_t is not defined, before "regex.h".
3554         (m4_ifelse): Fetch built-in name properly for diagnostic.
3555         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3556         (m4_regexp): Add const to `msg' declaration.
3557         (m4_patsubst): Add const to `msg' declaration.
3558         * debug.c: Protoized, save for varargs.
3559         * eval.c: Protoized.
3560         * format.c: Protoized.
3561         * input.c: Protoized.
3562         * m4.c: Protoized, save for varargs.  Then:
3563         (xfree): Accept void * instead of char *.
3564         (xmalloc): Return void * instead of char *.
3565         (xrealloc): Accept and return void * instead of char *.
3566         * macro.c: Protoized.
3567         * output.c: Protoized.
3568         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3569         * symtab.c: Protoized.
3571 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3573         * m4.texinfo: Remove directory from diagnostics in 30.include,
3574         51.eval, 56.errprint and 57.m4exit tests.
3576         * m4.h: Remove declarations for int or void system functions, they
3577         cause more conflicting trouble than they make good.
3579         * configure.in: Avoid configuration header file.  Add some tests.
3580         * m4.h: Remove #include "config.h".
3581         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3582         Then, rewritten for better compliance with GNU standards.
3584 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3586         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3587         because of a misplaced #endif.
3589         * Many *.[hc] files: Correct intra-line spacing here and there,
3590         according to GNU indent 1.6 advice.
3592         * configure.in: New, using Autoconf 1.2.
3593         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3594         * Delete old configure.in, configure, etc/configure.in,
3595         etc/configure, lib/configure.in, lib/configure and config/*.
3596         Reported by Jason Merrill.
3598         * symtab.c (hash): Change (char) NULL to '\0'.
3599         Reported by Jason Merrill.
3601         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3602         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3603         * version.h: De-automatize, force value in.
3605         * m4.c: Changes in order to use a newer getopt.h.
3606         Reported by David MacKenzie.
3608         * checks/: New name for examples/.
3609         * checks/get_them: New location for etc/get_examples.
3610         * checks/check_them: New location for etc/check_examples.
3611         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3612         * lib/vfprintf.c: New location for etc/vfprintf.c.
3613         * Delete empty etc/.
3614         * examples/: New name for test/.
3616 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3618         * Makefile.in (check): Add m4 as dependency.
3620         * m4.c: Accept --no-warnings instead of --no_warnings, and
3621         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3622         usage message more informative.
3623         Reported by David MacKenzie.
3625 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3627         * etc/check_examples: New name for check_examples.sh.
3628         * etc/get_examples: New name for get_examples.sh.
3629         * Makefile.in, etc/Makefile.in: Use new names.
3631         * Makefile.in: Transmit $(CC) while making in lib.
3633         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3634         code disposition by hand.
3636 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3638         * m4.h: Delete definitions for abort() and exit().
3639         Reported by Richard Stallman.
3641         * config/hmake-unicos, config/s-unicos.h: New files.
3642         Reported by Hal Peterson.
3644         * eval.c (exp_term): Have N^0 return 1.
3645         Reported by Michael Fetterman.
3647         * eval.c, input.c, m4.h: Remove last comma in enums.
3648         Reported by Mike Lijewski.
3650         * Transfer of maintenance duties from Rene' to Franc,ois.
3652 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3654         * Release 1.0.  Many thanks to those, who provided me with bug
3655         reports and feedback.
3657         * Uses GNU configure, taken from the gdb distribution.
3659         * Uses GNU getopt(), with long option names.
3661         * The -Q/+quiet option is added, which suppresses warnings about
3662         missing or superflous arguments to built-in macros.
3664         * Added default options via the M4OPTS environment variable.
3666         * The built-in format can now be configured to use sprintf as
3667         the formatting engine, for systems without [efg]cvt(3).
3669         * GNU library code is moved to the ./lib subdirectory; other
3670         utility files are now in ./etc.
3672         * Several minor bugs have been fixed.
3674 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3676         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3677         Francois Pinard and Roland H. Pesch for providing me with reports.
3679         * The builtins incr and decr are now implemented without use of
3680         eval.
3682         * The builtin indir is added, to allow for indirect macro calls
3683         (allows use of "illegal" macro names).
3685         * The debugging and tracing facilities has been enhanced
3686         considerably.  See the manual for details.
3688         * The -tMACRO option is added, marks MACRO for tracing as soon
3689         as it is defined.
3691         * Builtins are traced after renaming iff they were before.
3693         * Named files can now be undiverted.
3695         * The -Nnum option can be used to increase the number of
3696         divertions available.
3698         * Calling changecom without arguments now disables all comment
3699         handling.
3701         * The function m4_patsubst() is now consistently declared
3702         static.
3704         * A bug in dnl is fixed.
3706         * A bug in the multi-character quoting code is fixed.
3708         * Several typos in the manual has been corrected.  More probably
3709         persist.
3711         * The m4.info file is now installed along with the program.
3713 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3715         * Updated and enhanced version.  Release 0.75, manual 0.07.
3717         * Implemented search path for include files (-I option and
3718         M4PATH envronment variable).
3720         * Implemented builtin "format" for printf-like formatting.
3722         * Implemented builtin "regexp" for searching for regular
3723         expressions.
3725         * Implemented builtin "patsubst" for substitution with regular
3726         expressions.
3728         * Implemented builtin "esyscmd", which expands to a shell
3729         commands output.
3731         * Implemented "__file__" and "__line__" for use in error
3732         messages.
3734         * Implemented character ranges in "translit".
3736         * Implemented control over debugging output.
3738         * Implemented multi-character quotes.
3740         * Implemented multi-character comment delimiters.
3742         * Changed predefined macro "gnu" to "__gnu__".
3744         * Changed predefined macro "unix" to "__unix__", when the -G
3745         option is not used.  With -G, "unix" is still defined.
3747         * Changed "shift", "$@" and "$*" to not insert spaces afters
3748         commas.
3750         * Added program name to error messages.
3752         * Fixed two missing null bytes bugs.
3754 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3756         * Initial beta release.  Release 0.50, manual 0.05.
3758         -----
3760         $Revision$ $Date$
3762         Local Variables:
3763         coding: utf-8
3764         End:
3766         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3767         2005, 2006, 2007 Free Software Foundation, Inc.
3769         Copying and distribution of this file, with or without
3770         modification, are permitted provided the copyright notice
3771         and this notice are preserved.