Fix 'm4 -F file -t undefined'.
[m4/ericb.git] / ChangeLog
blob2e4a12be76cfe6c339642c62e84107d8283b335c
1 2007-10-17  Eric Blake  <ebb9@byu.net>
3         Fix 'm4 -F file -t undefined'.
4         * src/freeze.c (produce_frozen_state): Avoid core dump.
5         * doc/m4.texinfo (Using frozen files): Test for the bug.
6         * NEWS: Mention the fix.
8 2007-10-09  Eric Blake  <ebb9@byu.net>
10         * NEWS: Document recent speedups.
12         Fix regexp regression of 2007-09-29.
13         * src/builtin.c (substitute): Allow NULL regs when no
14         subexpressions were present.
15         (m4_regexp): Handle \ escapes even with empty regex.
16         * doc/m4.texinfo (Regexp, Patsubst): Catch this bug.
18         Cache regex compilation for another autoconf speedup.
19         * src/m4.h (free_macro_sequence): Rename...
20         (free_regex): ...to this.
21         * src/m4.c (main): Update caller.
22         * src/builtin.c (REGEX_CACHE_SIZE, m4_regex, regex_cache): New
23         declarations.
24         (compile_pattern): New function; cache recent regexes.
25         (free_regex): Rename, and clean up additional memory.
26         (m4_regexp, m4_patsubst): Use new function.
28 2007-10-02  Eric Blake  <ebb9@byu.net>
30         Document quoting pitfalls in capitalize.
31         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
32         document shortfall.
33         (Improved capitalize): New node.
34         * examples/capitalize.m4: Update to match manual.
35         * examples/capitalize2.m4: New file.
37 2007-10-01  Eric Blake  <ebb9@byu.net>
39         Another Autoconf usage pattern optimization.
40         * src/builtin.c (m4_index): Optimize search for one byte.
41         * doc/m4.texinfo (Index macro, Regexp, Patsubst): Test the new
42         code paths.
44 2007-09-29  Eric Blake  <ebb9@byu.net>
46         Optimize for Autoconf usage pattern.
47         * src/builtin.c (m4_regexp, m4_patsubst): Handle empty regex
48         faster.
50 2007-09-24  Eric Blake  <ebb9@byu.net>
52         Create .gitignore alongside .cvsignore.
53         * bootstrap (LC_ALL): Set up front.
54         (version control) Borrow idea from head, to avoid churn in
55         m4/.*ignore files modified by gnulib-tool.
57 2007-09-13  Eric Blake  <ebb9@byu.net>
59         * AUTHORS: Fix typo.
61 2007-09-07  Eric Blake  <ebb9@byu.net>
63         * AUTHORS: Simplify, to match libtool and autoconf layout.
64         * THANKS: Sync with head.
66 2007-08-10  Eric Blake  <ebb9@byu.net>
68         * doc/m4.texinfo (Compatibility): Sync with head.
70 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
71         and Eric Blake  <ebb9@byu.net>
73         * doc/m4.texinfo (Defn): Update wording.
75 2007-08-09  Eric Blake  <ebb9@byu.net>
77         POSIX requires defn(`a',`b') to concatenate definitions.
78         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
79         trying to mix a builtin with anything else.
80         * doc/m4.texinfo (Defn): Document a use for this POSIX
81         requirement.
82         (Incompatibilities): Update to match current status.
83         * NEWS: Document this change.
84         * THANKS: Update.
85         Reported by Konrad Schwarz.
87 2007-08-04  Eric Blake  <ebb9@byu.net>
89         Normalize all GPL license notices.
90         * GNUmakefile: Update license wording.
91         * Makefile.am: Likewise.
92         * Makefile.maint: Likewise.
93         * bootstrap: Likewise.
94         * commit: Likewise.
95         * configure.ac: Likewise.
96         * checks/Makefile.in: Likewise.
97         * doc/Makefile.am: Likewise.
98         * examples/Makefile.am: Likewise.
99         * src/Makefile.am: Likewise.
100         * src/builtin.c: Likewise.
101         * src/debug.c: Likewise.
102         * src/eval.c: Likewise.
103         * src/format.c: Likewise.
104         * src/freeze.c: Likewise.
105         * src/input.c: Likewise.
106         * src/m4.c: Likewise.
107         * src/m4.h: Likewise.
108         * src/macro.c: Likewise.
109         * src/output.c: Likewise.
110         * src/path.c: Likewise.
111         * src/stackovf.c: Likewise.
112         * src/symtab.c: Likewise.
114 2007-07-21  Eric Blake  <ebb9@byu.net>
116         Fix regression on NetBSD from 2007-05-28.
117         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
118         position to byte 0.
119         * NEWS: Document this fix.
120         * THANKS: Update.
121         Reported by Thomas Klausner.
123 2007-07-20  Eric Blake  <ebb9@byu.net>
125         Fix 'make distcheck' issues.
126         * Makefile.am (EXTRA_DIST): No need to distribute
127         gpl-3.0.texi.diff anymore.
128         * m4/gnulib-cache.m4: Update to latest gnulib.
130 2007-07-14  Eric Blake  <ebb9@byu.net>
132         Reflect upstream license .texi changes.
133         * doc/m4.texinfo (Copying): Rename node...
134         (GNU General Public License): ...to this.
135         (GNU Free Documentation License): Adjust node location.
136         * local/doc/gpl-3.0.texi.diff: Remove file.
138 2007-07-10  Eric Blake  <ebb9@byu.net>
140         Start 1.4.10a.
141         * configure.ac (AC_INIT): Bump version number.
142         * NEWS: Start changes since 1.4.10.
143         * doc/m4.texinfo (History): Mention 1.4.11.
144         (Copying This Package, Copying This Manual): Add index entries.
145         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
146         updated.
147         * Makefile.am (EXTRA_DIST): Remove dead file.
149 2007-07-09  Eric Blake  <ebb9@byu.net>
151         Release 1.4.10:
152         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
153         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
154         * configure.ac (AC_INIT): Bump version number.
155         * NEWS: Describe changes since 1.4.9.
157         * src/format.c: Missed a GPLv3 conversion.
159         Avoid undefined behavior of %.*c in printf.
160         * src/format.c (format): Special case %c.
161         * TODO: Document that more remains to be done.
162         * NEWS: Document the fix.
164 2007-07-05  Eric Blake  <ebb9@byu.net>
166         Fix up gnulib-tool usage.
167         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
168         * version-etc.c.diff: Move to...
169         * local/lib/version-etc.c.diff: ...here.
170         * gpl-3.0.texi.diff: Move to...
171         * local/doc/gpl-3.0.texi.diff: ...here.
173 2007-07-04  Eric Blake  <ebb9@byu.net>
175         Upgrade to GPL version 3 or later.
176         * bootstrap: Pick up GPLv3.
177         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
178         --local-dir=. --import gpl-3.0'.
179         * doc/m4.texinfo (Copying This Package): New appendix.
180         * NEWS: Mention this change.
181         * README: Mention why some files still claim to be version 2.
182         * version-etc.c.diff: New file, to make sure --version claims
183         correct GPL version.  Temporary until gnulib makes move.
184         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
185         appendix, rather than section, of the manual.
186         * GNUmakefile: Update to new license.
187         * Makefile.am: Likewise.
188         * Makefile.maint: Likewise.
189         * commit: Likewise.
190         * configure.ac: Likewise.
191         * checks/Makefile.in: Likewise.
192         * doc/Makefile.am: Likewise.
193         * examples/Makefile.am: Likewise.
194         * src/Makefile.am: Likewise.
195         * src/builtin.c: Likewise.
196         * src/debug.c: Likewise.
197         * src/eval.c: Likewise.
198         * src/freeze.c: Likewise.
199         * src/input.c: Likewise.
200         * src/m4.c: Likewise.
201         * src/m4.h: Likewise.
202         * src/macro.c: Likewise.
203         * src/output.c: Likewise.
204         * src/path.c: Likewise.
205         * src/stackovf.c: Likewise.
206         * src/symtab.c: Likewise.
208 2007-06-26  Eric Blake  <ebb9@byu.net>
210         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
212 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
214         Match Free Software Directory categories.
215         * doc/m4.texinfo (dircategory): Update.
217 2007-05-31  Eric Blake  <ebb9@byu.net>
219         * src/output.c (output_text): Fix regression from 2007-05-28.
220         * doc/m4.texinfo (History): Mention 1.4.10.
221         (Format): Make testsuite output easier to debug.
223 2007-05-29  Eric Blake  <ebb9@byu.net>
225         Start 1.4.9c.
226         * configure.ac (AC_INIT): Bump version number.
227         * NEWS: Start changes since 1.4.9b, and fix typo.
229         Beta Release 1.4.9b:
230         * configure.ac (AC_INIT): Bump version number.
231         * NEWS: Describe changes since 1.4.9.
233         Improve format support.
234         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
235         vasprintf-posix'.
236         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
237         printf with too few arguments, as in format(%*.*d,-1,-1,1).
238         * doc/m4.texinfo (Format): Expand tests, and improve
239         documentation.
240         * NEWS: Document this change.
242 2007-05-28  Eric Blake  <ebb9@byu.net>
244         Fix large diversion corner cases, including 1.4.8 regression.
245         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
246         (make_room_for): Use NULL, not 0, for pointers.
247         (insert_diversion_helper): Avoid using rewind.
248         (freeze_diversions): Allow freezing large diversions.
249         * NEWS: Document this fix.
251         Also run gnulib unit tests during make check.
252         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
253         --tests-base=tests --with-tests'.
254         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
255         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
257 2007-05-25  Eric Blake  <ebb9@byu.net>
259         Backport prompts in examples from head.
260         * src/macro.c (expand_macro): Shorten message.
261         * doc/m4.texinfo (Manual, Command line files, Comments)
262         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
263         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
264         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
265         (Using frozen files, Improved forloop, Improved foreach): Add
266         prompts to examples.
267         * checks/get-them: Ignore prompts in examples.
269         Fix sync line interaction with multiline comments.
270         * doc/m4.texinfo (Other Incompatibilities): Add example, and
271         document bug in --syncline/divert interaction.
272         (Preprocessor features): Augment test.
273         * src/m4.h (output_text): Export.
274         (shipout_text, next_token): Add parameter.
275         * src/freeze.c (reload_frozen_state): Don't interfere with
276         synclines when reloading state.
277         * src/output.c (output_text): Export.
278         (shipout_text): Take new parameter for start line of token.
279         Output at most one syncline per token.
280         * src/input.c (next_token): Report line where multiline tokens
281         start.
282         * src/macro.c (expand_input, expand_token, expand_argument):
283         Adjust callers so that line is passed from input to output.
284         * NEWS: Document this fix.
285         Reported by Sergey Poznyakoff.
287         Test -s in testsuite.
288         * doc/m4.texinfo (Preprocessor features): Add a test.
289         * checks/get-them: Support extra options in testsuite.
290         * checks/check-them (examples): Use extra options.
291         * THANKS: Update.
292         Reported by Sergey Poznyakoff.
294 2007-05-24  Eric Blake  <ebb9@byu.net>
296         Support POSIX flush semantics on all platforms.
297         * m4/gnulib-cache.m4: Remove closeout, and augment with
298         'gnulib-tool --import closein fflush'.
299         * src/m4.h (includes): Use closein, not closeout.
300         * src/m4.c (main): Ensure stdin is flushed when not all input is
301         consumed.
302         (process_file): No return needed.
303         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
304         than excluding mingw.
305         * NEWS: Document this change.
307         Work around cygwin and mingw fseeko bugs.
308         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
309         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
311 2007-04-25  Eric Blake  <ebb9@byu.net>
313         Fix negative division within eval, regression of 2007-01-06.
314         * doc/m4.texinfo (Eval): Catch this bug.
315         * src/eval.c (mult_term): Fix it.
316         * NEWS: Document this.
317         * THANKS: Update.
318         Reported by Cesar Strauss.
320 2007-04-23  Eric Blake  <ebb9@byu.net>
322         Start 1.4.9a.
323         * configure.ac (AC_INIT): Bump version number.
324         * NEWS: Start changes since 1.4.9.
326 2007-03-23  Eric Blake  <ebb9@byu.net>
328         Release 1.4.9:
329         * configure.ac (AC_INIT): Bump version number.
330         * NEWS: Describe changes since 1.4.8b.
332 2007-03-16  Eric Blake  <ebb9@byu.net>
334         * doc/m4.texinfo (Mkstemp): Tweak wording.
335         * src/output.c (output_init): Adjust to latest gnulib.
337 2007-03-15  Eric Blake  <ebb9@byu.net>
339         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
340         long long, it confuses gnulib).
341         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
342         if unsigned long long doesn't work.
343         * THANKS: Update.
344         Reported by Matthew Woehlke.
346 2007-03-07  Eric Blake  <ebb9@byu.net>
348         * AUTHORS: Update.
349         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
351 2007-03-01  Eric Blake  <ebb9@byu.net>
353         * doc/m4.texinfo: Pick up more index entries from head.  Follow
354         more texinfo recommendations.
355         (Sysval): Improve tests.
357         Avoid overfull \vbox warning from texinfo, due to indices that
358         weren't quite big enough to split across page boundaries.
359         * doc/m4.texinfo: Add lots of concept index entries.
360         (Concept Index): Move to be last, as recommended by texinfo
361         manual.
362         (Define, Arguments, Pseudo Arguments): Add more function entries.
364 2007-02-28  Eric Blake  <ebb9@byu.net>
366         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
367         137.
368         (Pseudo Arguments): Add useful example.
370         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
371         reflect POSIX XCU ERN 118.
373         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
374         * src/m4.c (usage): ...here,...
375         * src/builtin.c (set_macro_sequence): ...and here.
376         (define_user_macro): Fix typo.
377         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
378         inaccuracies.
379         (Shift): Document composite macro argn for portably getting at
380         positional parameters beyond 9.
381         * configure.ac (AC_INIT): Bump version number.
382         * NEWS: Start changes of 1.4.8c.
384 2007-02-24  Eric Blake  <ebb9@byu.net>
386         Beta Release 1.4.8b:
387         * configure.ac (AC_INIT): Bump version number.
388         * NEWS: Describe changes since 1.4.8.
390         Reserve all uses of raw ${} in macro definitions, not just
391         ${<digit>}.
392         * src/builtin.c (set_macro_sequence): Change default macro
393         sequence.
394         * doc/m4.texinfo (Operation modes): Update to match.
395         * src/m4.c (usage): Likewise.
396         * NEWS: Likewise.
398 2007-02-23  Eric Blake  <ebb9@byu.net>
400         * src/m4.h (includes): Update to latest gnulib.
402 2007-02-08  Eric Blake  <ebb9@byu.net>
404         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
405         more flexible, and so that autoconf can use it.
406         * src/m4.h (set_macro_sequence, free_macro_sequence): New
407         prototypes.
408         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
409         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
410         New variables and functions.
411         (define_user_macro): Allow flexibility in regular expression used
412         to trigger warning.
413         * src/m4.c (warn_syntax): Delete.
414         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
415         spelling of option, along with optional argument.
416         * doc/m4.texinfo (Operation modes, Arguments): Document this
417         change.
418         * NEWS: Document this change.
420 2007-02-05  Eric Blake  <ebb9@byu.net>
422         * m4/gnulib-cache.m4: Module strstr no longer exists.
424         Avoid bool bitfields, as they don't work on AIX.
425         * src/m4.h (bool_bitfield): New typedef.
426         (struct symbol, struct builtin): Use it.
427         * src/input.c (struct input_block): Likewise.
428         Reported by Albert Chin.
430         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
431         Reported by Albert Chin.
432         * THANKS: Update.
434 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
436         * doc/m4.texinfo (Input processing): Further clarifications.
438 2007-02-03  Eric Blake  <ebb9@byu.net>
440         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
441         the examples.
442         Reported by Bruno Haible.
444 2007-02-01  Eric Blake  <ebb9@byu.net>
446         * src/m4.c (fatal_warnings): New variable.
447         (usage): Document new -E behavior.
448         (main): Make -E an additive option.
449         (m4_error, m4_error_at_line): Change exit status when required.
450         * NEWS: Document this change.
451         * doc/m4.texinfo (Operation modes): Likewise.
452         Reported by Ralf Wildenhues.
454 2007-01-27  Eric Blake  <ebb9@byu.net>
456         * src/m4.h (warn_syntax): Declare.
457         (init_pattern_buffer): Export.
458         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
459         (long_options, main): Implement new option.
460         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
461         (define_user_macro): Warn on $11 and ${1} if requested.
462         * src/input.c (init_pattern_buffer): Delete duplicate method.
463         * doc/m4.texinfo (Operation modes): Document it.
464         (Arguments): Document future direction of ${11} vs. $11.
465         (Incompatibilities): Fix wording on POSIX limitations.
466         * checks/get-them: Parse @{ and @} correctly.
467         * NEWS: Document this change.
469 2007-01-26  Eric Blake  <ebb9@byu.net>
471         * src/builtin.c (includes): Adjust to gnulib changes.
473 2007-01-15  Eric Blake  <ebb9@byu.net>
475         * doc/m4.texinfo: Pull in various improvements from head.
476         * src/builtin.c (include): Alter exit status on failure.
477         * NEWS: Document this fix.
479 2007-01-13  Eric Blake  <ebb9@byu.net>
481         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
482         assume the fallback of ss_base for BSDI 4.0.1.
483         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
484         ! HAVE_STACK_T_SS_SP]: Use this check.
485         Reported by Chris McGuire.
486         * THANKS: Update.
487         * NEWS: Document the improvement.
489 2007-01-09  Eric Blake  <ebb9@byu.net>
491         * src/eval.c (ASSIGN): New enumerator.
492         (eval_lex): Recognize '='.
493         (equality_term): Treat '=' like '==', but warn that it is
494         deprecated.
495         * doc/m4.texinfo (Eval): Document and test this.
496         (Incompatibilities): Document the POSIX incompatibility.
497         * NEWS: Document this change.
499 2007-01-06  Eric Blake  <ebb9@byu.net>
501         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
502         * checks/check-them: Record expected exit status.
503         * checks/get-them: Check exit status.
504         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
505         instead.
506         * src/builtin.c: All users changed.
507         * src/eval.c: Likewise.  Also document where we are triggering
508         undefined or implementation-defined behavior.
509         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
510         (logical_or_term, logical_and_term, logical_not_term, not_term)
511         (equality_term, unary_term): Port from head to follow POSIX
512         semantics.
513         (exp_term): Reject 0**0 as undefined.
514         * doc/m4.texinfo (History): Mention 1.4.9.
515         (Format, Incompatibilities): Update to document POSIX compliance.
516         * NEWS: Document this change.
518 2007-01-04  Eric Blake  <ebb9@byu.net>
520         * NEWS: Document previous fix.
521         * THANKS: Update.
523 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
525         Fix Debian bug 405594, introduced 2006-11-01 from a bad
526         copy-n-paste from head.
527         * src/m4.c (main): Use correct file name after --.
529 2007-01-04  Eric Blake  <ebb9@byu.net>
531         Fix regression from 1.4.7 in large file handling on some
532         platforms, introduced on 2006-10-13.
533         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
534         will be handled.
535         * NEWS: Document this fix.
537 2007-01-03  Eric Blake  <ebb9@byu.net>
539         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
540         version-etc-fsf'.
541         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
542         it bumps the copyright year).
544 2006-12-27  Eric Blake  <ebb9@byu.net>
546         * doc/m4.texinfo (Patsubst): Fix typo.
548 2006-12-16  Eric Blake  <ebb9@byu.net>
550         * src/m4.c (main): Check for errors when closing stdin.
552 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
554         * doc/m4.texinfo: Fix some typos.
556 2006-12-09  Eric Blake  <ebb9@byu.net>
558         * configure.ac (AC_INIT): Bump version number.
559         * NEWS: Start changes of 1.4.8a.
561 2006-11-20  Eric Blake  <ebb9@byu.net>
563         Release 1.4.8:
564         * configure.ac (AC_INIT): Bump version number.
565         * NEWS: Describe changes since 1.4.7.
567 2006-11-16  Eric Blake  <ebb9@byu.net>
569         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
570         Minor tweaks noticed while porting to head.
572 2006-11-14  Eric Blake  <ebb9@byu.net>
574         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
575         spent iterators.
576         (m4_tmpname): Avoid memory leak.
578 2006-11-13  Eric Blake  <ebb9@byu.net>
580         * src/output.c (cleanup_tmpfile): Avoid double error message when
581         umask is prohibitive.
582         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
583         functions.
584         (m4_tmpfile): Add parameter, move cloexec action here.
585         (make_room_for): Adjust caller.  Don't keep too many files open.
586         (insert_diversion_helper): Unlink emptied temp files.
587         (make_diversion): Don't keep too many files open.
588         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
589         descriptors are no longer a limiting factor.
590         * NEWS: Document this change.
592         Backport sparse diversion handling from head.
593         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
594         avltree-oset'.
595         * src/output.c (struct m4_diversion): Rename from struct
596         diversion, and update members.  All users changed.
597         (diversion_table): Change to an ordered set, instead of an array.
598         (div0): New storage for diversion 0.
599         (diversions): No longer needed.
600         (free_list): New list to allow recycling diversion storage.
601         (diversion_storage): New storage to reduce malloc overhead.
602         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
603         (output_init, output_exit, cleanup_tmpfile, make_room_for)
604         (make_diversion): Handle new diversion storage scheme.
605         (insert_diversion_helper): New function.
606         (insert_diversion, undivert_all, freeze_diversions): Use it.
607         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
608         exhaustion to visible test of large diversion numbers.
609         * NEWS: Document this fix.
611 2006-11-11  Eric Blake  <ebb9@byu.net>
613         * src/builtin.c (m4_translit): Slight optimization.
615         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
617         * src/builtin.c: Remove unnecessary casts.
618         (expand_ranges): Make 8-bit clean.
619         * doc/m4.texinfo (Translit): Add tests and wording.
620         * NEWS: Document this fix.
622 2006-11-07  Eric Blake  <ebb9@byu.net>
624         * src/m4.h (output_exit): New prototype.
625         * src/m4.c (main): Use it.
626         * src/output.c (cleanup_tmpfile): Close files before removing
627         directory.
628         (insert_diversion): Check for failure.
629         (output_exit): Avoid memory leak.
630         * doc/m4.texinfo (Diversions): Test this bug.
632         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
634 2006-11-01  Eric Blake  <ebb9@byu.net>
636         Allow C++ compilation on Linux, as a safety measure in type
637         checking.
638         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
639         stdbool'.
640         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
641         (boolean): Kill this, and use stdbool.h instead.
642         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
643         * src/output.c, src/symtab.c: All users changed.
644         * src/symtab.c (hack_all_symbols): Update prototype.
645         * src/builtin.c (dump_symbol, set_trace): Update signature.
646         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
647         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
648         C++ compilation.
649         * src/debug.c (trace_flush): Likewise.
650         * src/freeze.c (reload_frozen_state): Likewise.
651         * src/input.c (push_file, push_string_finish, push_wrapup):
652         (token_bottom, next_token): Likewise.
653         * src/m4.c (main): Likewise.
655         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
656         draft wording.
657         * src/m4.h (m4_path_search): Tweak signature.
658         * src/path.c (m4_path_search): Likewise.
659         * src/builtin.c (include): Update caller.
660         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
661         with file names.  Don't write to **argv.
662         (process_file): New helper method.
663         * NEWS: Document this fix.
665 2006-10-31  Eric Blake  <ebb9@byu.net>
667         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
668         * doc/m4.texinfo (Translit): Improve the documentation.
669         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
670         algorithm.
671         (m4_index): Simplify, and speed up slightly.
672         * NEWS: Document this fix.
674 2006-10-28  Eric Blake  <ebb9@byu.net>
676         * src/input.c (set_quotes): Don't allow empty end-quote with
677         non-empty start-quote.
678         (set_comment): Likewise for end-comment.
679         * src/builtin.c (m4_changecom): Adjust caller.
680         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
681         match behavior.
682         (Incompatibilities): Document another POSIX bug.
683         * NEWS: Mention this change.
685 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
687         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
688         files.
690 2006-10-26  Eric Blake  <ebb9@byu.net>
692         Silence -Wwrite-strings -Wpointer-arith warnings.
693         * src/builtin.c (define_user_macro): Allow NULL argument.
694         (m4_builtin, m4_indir): Cast away const of "".
695         * src/format.c (format): Likewise.
696         * src/macro.c (collect_arguments): Likewise.
697         (expand_macro): Avoid math on void*.
698         * src/m4.c (main): Adjust caller.
699         * src/output.c (freeze_diversions): Detect off_t overflow.
701         * src/input.c (pop_input): Remove unnecessary code.
703 2006-10-25  Eric Blake  <ebb9@byu.net>
705         * src/symtab.c (symtab_init): Avoid size_t overflow.
706         * src/output.c (make_diversion): Avoid size_t overflow.
707         * doc/m4.texinfo (Diversions): Test this fix.
708         * src/input.c (input_block): Remove unused member.  Reduce size
709         of struct.
710         (push_file, pop_input): Avoid useless assignment.
711         * NEWS: Document the bug fix.
713         Redo location tracking.  Instead of having just files track the
714         line to return to when popping input, now all input blocks track
715         their current line.
716         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
717         needed.
718         (input_block): Have line and file storage for all input types, and
719         rename some members.
720         (input_change): New global flag.
721         (push_file, push_macro, push_string_init, push_wrapup): Store
722         location.
723         (push_string_finish, pop_input, pop_wrapup): Notice changes in
724         input blocks.
725         (peek_input): Adjust to new member names.
726         (next_char, next_char1): Adjust location if needed.
727         (skip_line): Simplify restoring location.
728         * doc/m4.texinfo (Location): Augment the test to catch line
729         location of expansion of multi-line arguments.
730         Reported by Stepan Kasal.
732 2006-10-23  Eric Blake  <ebb9@byu.net>
734         * doc/m4.texinfo (Macro Arguments): Document that leading space
735         in argument collection stops at macro expansion.
736         (Incompatibilities): Document POSIX whitespace wording issue.
738 2006-10-20  Eric Blake  <ebb9@byu.net>
740         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
741         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
742         end of a TeX line splits incorrectly.
743         (Foreach, Improved foreach): Write these sections, borrowing ideas
744         from CVS head and from m4sugar.
745         * checks/get-them: Accomodate new way to show trailing space in
746         examples.
747         * examples/foreach.m4: Make usable in documentation.
748         * examples/foreachq.m4: New file.
749         * examples/foreachq2.m4: New file.
750         * examples/foreach2.m4: New file.
751         * NEWS: Document the documentation updates.
753 2006-10-19  Eric Blake  <ebb9@byu.net>
755         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
756         (m4_maketemp): Provide traditional behavior.
757         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
758         new `mkstemp' macro and the flaws of the old `maketemp'.
759         (Incompatibilities): Move maketemp discussion to...
760         (Extensions): ...here, since -G now supresses the GNU extension.
761         * NEWS: Document this.
763         * examples/forloop.m4: Simplify.
764         * examples/forloop2.m4: New file.
765         * examples/quote.m4: New file.
766         * doc/m4.texinfo (Loops): Rename to...
767         (Shift): ...this node.
768         (Forloop, Foreach, Improved forloop, Improved foreach): New
769         nodes.
771 2006-10-17  Eric Blake  <ebb9@byu.net>
773         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
774         config-h'.
775         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
776         gnulib headers, rather than in top directory.
777         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
778         output clutter.
780 2006-10-16  Eric Blake  <ebb9@byu.net>
782         * doc/m4.texinfo: Backport some minor cleanups from head.
783         (Cleardivert): Rename from cleardiv.
785         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
786         a section of Preliminaries.
787         (Operation modes, Preprocessor features, Limits control)
788         (Frozen state, Debugging options, Command line files): Subdivide
789         into new sections.
790         (Input processing, Quoting Arguments, Define, Arguments)
791         (Cleardiv, Format, M4exit): Fix grammar of references.
792         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
793         (Debug Levels, Debug Output, Include, Search Path, Divert)
794         (Platform macros, Syscmd, Location, Extensions): Point to new
795         sections.
796         (Top, Loops, Include, Undivert, Location, Incompatibilities):
797         Improve file references.
799 2006-10-14  Eric Blake  <ebb9@byu.net>
801         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
802         is not portable.
803         Reported by Ralf Wildenhues.
805         * src/builtin.c (m4_undivert): Check for read error.
807 2006-10-13  Eric Blake  <ebb9@byu.net>
809         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
810         header files are included, since <unistd.h> can affect the tests.
811         * THANKS: Updated.
812         Reported by Martin Koeppe.
814         Backport head's usage of clean-temp module, as it is cleaner than
815         using tmpfile-safer.
816         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
817         clean-temp closeout', and remove tmpfile-safer.
818         * src/m4.h (includes): Adjust.
819         (m4_path_search): Rename from path_search, to avoid collision
820         with gnulib.
821         * src/m4.c (main): Install closeout handler.  Adjust caller.
822         (usage): Now done by closeout module.
823         * src/builtin.c (m4_m4exit): Likewise.
824         (m4_undivert, include): Adjust callers.
825         * src/freeze.c (reload_frozen_state): Likewise.
826         * src/path.c (m4_path_search): Rename from path_search.
827         * src/output.c (output_temp_dir): New variable.
828         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
829         (insert_diversion, make_room_for): Use them.
830         * doc/m4.texinfo (Diversions): Document this, and add a test.
831         (Improved fatal_error): Fix typo.
832         (Maketemp): Port test to mingw, and no longer hide from
833         documentation.
834         * NEWS: Document the change in TMPDIR behavior.
836         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
837         macros, to work with recent gnulib-tool update.
839         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
840         handling of defn results.
841         * doc/m4.texinfo (Builtin, Indir): Add test cases.
842         * NEWS: Document this.
844 2006-10-12  Eric Blake  <ebb9@byu.net>
846         * doc/m4.texinfo (Location): Fix typo in previous commit.
847         (Changeword): Catch one more case.
848         * src/input.c (skip_line): Fix case when outer file used macro to
849         supply the \n.
851 2006-10-11  Eric Blake  <ebb9@byu.net>
853         * src/input.c (enum input_type): Add additional types, to shave
854         time off the common case.
855         (push_wrapup): Wrapped strings remember location.
856         (push_string_finish): Normal strings carry no location.
857         (push_file): Start new files uninitialized.
858         (peek_input, next_char_1): Optimize common cases by updating
859         location only on new input types.
860         (pop_input): Update to honor new input types.
861         (skip_line, push_string_finish): Fix regression in previous patch
862         when dnl is not followed by newline in included file.
863         (push_string_init): Initialize all fields of INPUT_STRING sooner.
864         (peek_token): Simplify.
865         (peek_input): Don't pop input files on peek, so that __file__ and
866         __line__ as last token of include file work correctly.
867         * doc/m4.texinfo (History): Mention 1.4.8.
868         (Answers): Split into sections, one per answer.
869         (Improved exch, Improved cleardivert, Improved fatal_error): New
870         nodes.
871         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
872         new m4wrap location semantics.
873         (Changeword): Add test that caught the regression.
874         * NEWS: Document this.
876         * src/macro.c (expand_macro): In macro expansion errors, report
877         line number at open parenthesis.
878         * src/input.c (next_token): Fix off-by-one bug in reporting end
879         of file in unterminated comment and string.
880         (file_names): New obstack, necessary since expand_macro now hangs
881         on to file names longer than the files remain open.
882         (input_init): Initialize new obstack.
883         (push_file): Use new obstack.  Delay updates to current_file
884         until after expand_macro has restored state.
885         (peek_input, next_char_1): Update current_file if necessary.
886         (pop_wrapup): Release memory.
887         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
888         the off-by-one bug.
889         (Dnl): Update to the new location reporting rules.
890         * NEWS: Document these changes.
892 2006-10-10  Eric Blake  <ebb9@byu.net>
894         * src/macro.c (argc_stack, argv_stack): New variables for sharing
895         obstacks across multiple macro calls.
896         (expand_input): Initialize and tear down stack once per input
897         file, instead of once per macro.
898         (expand_macro): Reuse existing stacks when possible.
899         (collect_arguments): Simplify slightly.
901         * src/path.c (include_env_init): Fix botched patch application.
902         Reported by Ralf Wildenhues.
904 2006-10-09  Eric Blake  <ebb9@byu.net>
906         * src/m4.c (usage, main): Detect write failures to stderr.
907         * src/builtin.c (m4_m4exit): Likewise.
908         * NEWS: Document this.
910         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
911         the limit.
912         * NEWS: Document this.
913         * doc/m4.texinfo (Invoking m4): Likewise.
915 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
917         * src/path.c (include_env_init): Copy the string returned
918         by getenv before overwriting it; POSIX disallows this.
920 2006-10-09  Eric Blake  <ebb9@byu.net>
922         * src/m4.c (main): Defer debugfile until after --help.
923         * configure.ac (AC_INIT): Bump version number.
924         * NEWS: Start changes of 1.4.7a.
926 2006-09-25  Eric Blake  <ebb9@byu.net>
928         Release 1.4.7:
929         * configure.ac (AC_INIT): Bump version number.
930         * NEWS: Describe changes since 1.4.6.
932 2006-09-21  Eric Blake  <ebb9@byu.net>
934         * doc/m4.texinfo (Invoking m4): Add clarification on option
935         processing behavior.
936         * THANKS: Update.
937         Reported by Mikhail Teterin.
939         * bootstrap: Add --force option, based on idea from coreutils.
940         * README: Document that ./bootstrap and autoreconf are for
941         developers, and not lightly done in tarballs.
943 2006-09-20  Eric Blake  <ebb9@byu.net>
945         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
946         deprecation warning on -e.
947         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
948         * NEWS: Document this.
950 2006-09-19  Eric Blake  <ebb9@byu.net>
952         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
953         -o/--error-output to --debugfile, and deprecate the former.  This
954         will allow a future release to be more consistent with other GNU
955         tools, with -o/--output affecting stdout, not debug.
956         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
957         * NEWS: Document this.
959 2006-09-14  Eric Blake  <ebb9@byu.net>
961         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
962         --diversions. `m4 --help --version' now displays help, not
963         version.
964         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
965         smaller scope.
966         (show_help, show_version): No longer needed.
967         (long_options, DIVERSIONS_OPTION): Backport patch from head to
968         distinguish between -N and --diversions in warning.
969         * doc/m4.texinfo (Invoking m4): Document this.
970         * NEWS: Likewise.
972 2006-09-11  Eric Blake  <ebb9@byu.net>
974         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
975         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
976         seekable.
977         (debug_set_file): Use STDOUT_FILENO.
978         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
979         with POSIX in regards to unread input.
980         * NEWS: Document this fix.
981         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
983 2006-09-07  Eric Blake  <ebb9@byu.net>
985         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
986         * src/m4.h (push_file): Change prototype.
987         * src/input.c (push_file, peek_input, next_char_1): Only call getc
988         once at EOF, to avoid double ^D on terminal stdin; regression from
989         2006-09-04.
990         (push_file, pop_file): Allow reading stdin twice.
991         * src/m4.c (main): Likewise.
992         * src/builtin.c (include): Update caller.
993         * NEWS: Document this change.
994         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
995         (Syscmd): Add a test that failed before this patch.
997 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
999         * checks/check-them: Quote $pwd.
1001 2006-09-05  Eric Blake  <ebb9@byu.net>
1003         * src/builtin.c (define_macro): Warn on invalid macro name.
1004         * NEWS: Document this change.
1005         * doc/m4.texinfo: Fix typos.
1006         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
1007         (Ifelse): Backport some improvements from head.
1009 2006-09-04  Eric Blake  <ebb9@byu.net>
1011         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
1012         native echo is braindead.
1013         * checks/check-them (strip_needed): Ignore \r in output.  Now the
1014         testsuite will pass when cross-compiling from cygwin to mingw.
1016         * src/input.c (peek_input): Fix regression in handling macro
1017         without arguments as last token in file; debian bug 385720.
1018         (next_token): Always consume an input character.
1019         Reported by Andreas Schultz.
1020         * configure.ac (AC_INIT): Bump version number.
1021         * NEWS: Document this fix.
1022         * doc/m4.texinfo (History): Mention next version.
1023         (Changeword): Add example that exposes this bug.
1024         * THANKS: Update.
1026 2006-08-25  Eric Blake  <ebb9@byu.net>
1028         Release 1.4.6:
1029         * configure.ac (AC_INIT): Bump version number.
1030         * NEWS: Describe changes since 1.4.5.
1032         * Makefile.maint (web-manual): Give up on VPATH build during
1033         distribution.  But distributions are made so infrequently that
1034         this is not too much of a hardship.
1035         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1036         exists.
1038 2006-08-24  Eric Blake  <ebb9@byu.net>
1040         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1041         Solaris, produce output on just one argument.
1042         (m4_regexp, m4_patsubst): For consistency, do likewise.
1043         (m4_patsubst): Allow zero-length match at end of string.
1044         * doc/m4.texinfo (Sysval): Fix overfull hbox.
1045         (Bugs, Macro Arguments): Minor fixes.
1046         (Other tokens): Rearrange node order.
1047         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1048         * NEWS: Document these fixes.
1050 2006-08-22  Eric Blake  <ebb9@byu.net>
1052         * src/input.c (pop_input): Avoid empty filename with -di option.
1053         * src/debug.c (debug_message_prefix): Put space before message.
1055         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1057         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1058         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1060         * checks/check-them: State why a test is skipped.
1061         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1063         * ChangeLog: Add copyright.
1064         * AUTHORS: Likewise.
1065         * BACKLOG: Likewise.
1066         * README: Likewise.
1067         * THANKS: Likewise.
1068         * TODO: Likewise.
1069         * examples/COPYING: New file, add copyright for all the examples.
1070         * checks/get-them: Put copyright on testsuite files.
1072 2006-08-18  Eric Blake  <ebb9@byu.net>
1074         Don't let unrelated child processes see too many files.
1075         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1076         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1077         spelling in error message.
1078         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1079         (debug_set_output): Close debug file on exec.
1080         * src/m4.h (includes): Add cloexec.h.
1081         * src/output.c (make_room_for): Close diversions on exec.
1082         * src/path.c (path_search): Close include files on exec.
1083         * NEWS: Document this.
1085         Regular expressions were leaking memory.
1086         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1087         helper methods.
1088         (m4_regexp, m4_patsubst): Avoid memory leak.
1089         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1090         static.
1091         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
1092         from O(n^2) to O(n) for calculating word_start.
1093         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1094         O(1) bitmap, not O(n) search string.
1095         * NEWS: Document this fix.
1097 2006-08-17  Eric Blake  <ebb9@byu.net>
1099         * NEWS: Document previous checkin.
1101         * src/builtin.c (substitute): Avoid core dump when accessing
1102         beyond bound of regular expression.
1103         Reported by Karl Nelson.
1104         * doc/m4.texinfo (Regexp): Add example that causes core dump on
1105         some architectures prior to this patch.
1106         * THANKS: Updated.
1108 2006-08-16  Eric Blake  <ebb9@byu.net>
1110         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1111         clear that dumpdef does not always go to stderr.
1113         * src/builtin.c (m4_errprint): Flush buffers before printing to
1114         stderr.
1115         * THANKS: Updated.
1117 2006-08-15  Eric Blake  <ebb9@byu.net>
1119         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1120         per debian bug 96075.
1121         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1122         (Changeword): Don't use shift as an example of a swallowed word.
1123         (Divert): Discuss fact that divert is an English word.
1124         Reported by Richard A Nelson.
1126 2006-08-14  Eric Blake  <ebb9@byu.net>
1128         * doc/m4.texinfo (Invoking m4): Minor fixes.
1130 2006-08-12  Eric Blake  <ebb9@byu.net>
1132         * doc/m4.texinfo (Arguments): Hint at better exch macro.
1133         (Answers): Provide a better definition.
1135 2006-08-09  Eric Blake  <ebb9@byu.net>
1137         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1138         yet understand locales.
1139         * NEWS: Fix wording of a few items.
1141 2006-08-08  Eric Blake  <ebb9@byu.net>
1143         Avoid printing `NONE:0:' in error messages.
1144         * src/m4.h (m4_error_at_line): New function.
1145         * src/m4.c (m4_error_at_line): Implement.
1146         * src/input.c (skip_line, input_init, next_token): Use "", not
1147         "NONE", for no file, since NONE can be a real file name.
1148         * src/macro.c (expand_argument): Likewise.
1149         * src/debug.c (debug_message_prefix, trace_header): Check for
1150         current file.
1151         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1152         (Location): Document that synclines and internal message format
1153         are not impacted by redefining these macros.
1154         (M4exit): Hint at bug in fatal_error.
1155         (Answers): Provide workaround to match m4 output.
1157         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1158         * src/m4.h (m4_error): New function.
1159         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1160         error module deficiencies.
1161         (reference_error, suppress_line): No longer needed.
1162         * src/m4.c (m4_error): Implement.
1163         (main): No longer need to install error callback.
1165 2006-08-04  Eric Blake  <ebb9@byu.net>
1167         * src/m4.h (program_name): Declare.
1168         (suppress_line): New variable.
1169         (M4ERROR_AT_LINE): New macro.
1170         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1171         for error message format.
1172         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1173         * src/macro.c (expand_argument): Likewise.
1174         * checks/check-them (examples): Adjust to new message format.
1175         * src/builtin.c (m4___program__): New builtin.
1176         * doc/m4.texinfo (Location): Split from Errprint into new node,
1177         and document __program__.
1178         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1179         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1180         format.
1181         (Extensions): Document __program__.
1182         * NEWS: Document this change.
1184 2006-08-03  Eric Blake  <ebb9@byu.net>
1186         Don't confuse leading `(' in comment or quote with start of
1187         argument collection.
1188         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1189         TOKEN_CLOSE.
1190         (peek_input): Make private to input.c.
1191         (peek_token): New prototype.
1192         * src/input.c (default_word_regexp): Reduce ifdefs.
1193         (peek_input): Make static.
1194         (next_token): Return new token types.
1195         (match_input, MATCH): Add argument consume, which controls
1196         whether match should be pushed back.
1197         (peek_token): New function.
1198         (token_type_string) [DEBUG_INPUT]: New function.
1199         * src/macro.c (expand_token, expand_argument, collect_arguments):
1200         Handle new token types.
1201         * doc/m4.texinfo (Changequote, Changecom): Document this.
1202         * NEWS: Document this.
1204         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1206         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1207         overflow detection when sigstack exists but is not implemented.
1208         Fixes debian bug 154053.
1209         * THANKS: Updated.
1210         Reported by David Perlin.
1212 2006-08-02  Eric Blake  <ebb9@byu.net>
1214         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1215         close.
1217 2006-08-01  Eric Blake  <ebb9@byu.net>
1219         * src/input.c (skip_line, next_token): Remember current file in
1220         case input file ends abruptly.  Addresses debian bug 175365.
1221         (pop_input): Defer freeing storage that holds previous file
1222         name...
1223         (pop_wrapup): to here, after error message is issued.
1224         * src/macro.c (expand_argument): Remember current file in case
1225         input file ends abruptly.
1226         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1227         (M4wrap): Adjust testsuite accordingly.
1228         (Errprint): Document line number limitation of m4wrap.
1229         * NEWS: Document this fix.
1230         * THANKS: Update.
1232 2006-07-31  Eric Blake  <ebb9@byu.net>
1234         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1235         clean; fixes debian bug 311378.
1236         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1237         (Changequote, Changecom): Add examples to test this.
1238         * NEWS: Document this fix.
1239         * THANKS: Update.
1240         Reported by Steven Augart.
1242         * doc/m4.texinfo: Whitespace fix.
1243         * checks/get-them: Avoid exceeding 14-char file name limit.
1244         * THANKS: Update.
1246 2006-07-30  Eric Blake  <ebb9@byu.net>
1248         * src/path.c (path_search): Detect allocation failure.
1250         Use native free when it is good enough.
1251         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1252         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1253         Adjust calls.
1254         * src/symtab.c (free_symbol): Likewise.
1255         * src/m4.c (xfree, main): Likewise.
1256         * src/m4.h (obstack_chunk_free): Likewise.
1257         * src/path.c (path_search): Likewise.
1258         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1260         * doc/m4.texinfo (Errprint): Add example for last patch.
1261         * checks/check-them: Account for VPATH in latest example.
1263 2006-07-29  Eric Blake  <ebb9@byu.net>
1265         * src/path.c (path_search): Add result parameter, so that
1266         -I can be accounted for.  Debian bug 53685.
1267         * src/m4.h (path_search): Update prototype.
1268         * src/m4.c (main): Adjust callers.
1269         * src/freeze.c (reload_frozen_state): Likewise.
1270         * src/builtin.c (include, m4_undivert): Likewise.
1271         * NEWS: Document this change.
1272         Reported by Nicolas Lichtmaier.
1274 2006-07-28  Eric Blake  <ebb9@byu.net>
1276         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1277         several non-GNU makes.
1278         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1279         * src/m4.h: Likewise.
1280         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1281         /usr/ccs/bin/ucbcc.
1283 2006-07-27  Eric Blake  <ebb9@byu.net>
1285         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1286         (History): Update for 1.4.6.
1288         * src/m4.h (_): Remove K&R cruft.
1289         * src/builtin.c: Likewise.
1290         * src/debug.c: Likewise.
1291         * src/eval.c: Likewise.
1292         * src/macro.c: Likewise.
1293         * src/stackovf.c: Likewise.
1295         * doc/Makefile.am (m4.1): Improve man page.
1296         * src/m4.c (usage): Improve --help output, including adding the
1297         bug reporting address.
1298         (main): Follow GNU Coding Standards for --version output.
1300 2006-07-26  Eric Blake  <ebb9@byu.net>
1302         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1303         end-comment consistently, to match POSIX.
1305         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1306         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1307         (Incompatibilities): Document incompatibility of changecom
1308         vs. macro names, and of EOF in include.
1309         * src/input.c (next_token): Reject unterminated comments at EOF.
1310         (skip_line): Warn on unterminated dnl at EOF.
1311         * NEWS: Document these changes.
1313 2006-07-25  Eric Blake  <ebb9@byu.net>
1315         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1316         stdio-safer into fopen-safer and tmpfile-safer.
1317         * src/m4.c: Remove redundant include.
1319 2006-07-24  Eric Blake  <ebb9@byu.net>
1321         Fix bugs related to stream handling.
1322         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1323         unlocked-io stdio-safer stdlib-safer close-stream.
1324         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1325         provided by gnulib if needed.
1326         * src/output.c [! HAVE_TMPFILE]: Likewise.
1327         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1328         their safer counterparts.
1329         (retcode): New global variable.
1330         * src/input.c (pop_input): Check for read failure.
1331         * src/freeze.c (reload_frozen_state): Likewise.
1332         (produce_frozen_state): Check for write failure.
1333         * src/debug.c (debug_set_file): Likewise.
1334         * src/m4.c (usage, main): Likewise.
1335         (retcode): Make global.
1336         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1337         status is non-zero except when everything succeeds.
1338         * doc/m4.texinfo (M4exit): Document these changes.
1339         (Incompatibilities): Remove documentation of bug now fixed.
1340         * NEWS: Document these fixes.
1342 2006-07-22  Eric Blake  <ebb9@byu.net>
1344         * src/format.c (format): Avoid compiler warning that str may be
1345         used uninitialized.
1347 2006-07-21  Eric Blake  <ebb9@byu.net>
1349         * src/m4.h [UNIX]: Add more platforms that are close enough to
1350         categorize as UNIX, but which don't predefine __unix__.
1351         Reported by Nelson H. F. Beebe.
1353 2006-07-20  Eric Blake  <ebb9@byu.net>
1355         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1356         to explicitly ask for --assume-autoconf=2.60.
1358 2006-07-19  Eric Blake  <ebb9@byu.net>
1360         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1361         and exits normally with 129.
1362         Reported by Nelson H. F. Beebe.
1363         * THANKS: Update.
1365         * src/m4.h (EXIT_MISMATCH): Define.
1366         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1367         exiting with status 63.
1368         * src/m4.c (usage): Document this.
1369         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1370         * NEWS: Likewise.
1372         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1373         back-cover texts.
1375 2006-07-17  Eric Blake  <ebb9@byu.net>
1377         * src/format.c (format): Support F, g, and G specifiers.
1378         * doc/m4.texinfo (Format): Document this.
1379         * NEWS: Document this addition.
1381         * doc/m4.texinfo (Builtin): Delete redundant text.
1383         * configure.ac (AC_INIT): Bump version number.
1384         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1385         * NEWS: Document this fix.
1387 2006-07-15  Eric Blake  <ebb9@byu.net>
1389         Release 1.4.5:
1390         * configure.ac (AC_INIT): Bump version number.
1391         * NEWS: Describe changes since 1.4.4.
1393         * src/m4.c (usage): Document exit status.
1394         * doc/m4.texinfo: Use `exit status', not `exit code'.
1395         (Invoking m4): Document exit status.
1397         * bootstrap: Backport --help, --version from head.
1398         (func_update): New function, for easily grabbing up-to-date files
1399         from gnulib.
1400         * Makefile.maint (web-manual): Fix for VPATH builds.
1402 2006-07-14  Eric Blake  <ebb9@byu.net>
1404         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1405         looks bad in info.  Use @deffn rather than @example for
1406         describing prototypes.  Fix awkward wording and grammar.
1408         * src/builtin.c (substitute): Warn on bad escape sequences.
1409         Ignore trailing backslash.
1410         * doc/m4.texinfo (Regexp): Add documentation for this.
1411         * NEWS: Document this change.
1413         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1414         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1415         more examples.
1416         (Dnl): Update example to show side effects.
1417         * checks/get-them: Generate three digit test names.
1418         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1420 2006-07-13  Eric Blake  <ebb9@byu.net>
1422         * src/input.c (input_init): Simplify.
1423         (set_word_regexp): Treat empty string as default, since empty
1424         regexp would disable word parsing.
1425         * src/m4.c (user_word_regexp): Default to empty string.
1426         * src/builtin.c (builtin_tab): Make changeword blind.
1427         * doc/m4.texinfo (Changeword): Document this.
1428         * NEWS: Document this.
1429         * TODO: Knock off completed items.
1431         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1432         just the first.
1433         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1434         * NEWS: Document this change.
1436         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1437         warning.  Detect quoted leading space and overflow as warnings.
1438         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1439         Treat width as minimum number of digits, as required by POSIX.
1440         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1441         arguments.
1442         (m4_substr): Likewise.  Silently treat empty start as 0.
1443         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1444         * src/eval.c (eval_lex): Parse radix 1 numbers.
1445         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1446         one type of warning.
1447         (Manual): Document behavior of numeric parsing of empty string.
1448         (Divert, Incr): Document error handling.
1449         (Eval): Document radices better.
1450         (Incompatibilities): Document translit incompatibility.
1451         * NEWS: Document these changes.
1453         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1454         (web-manual): Simplify.
1455         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1456         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1457         (MAINTAINERCLEANFILES): Clean it as well.
1458         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1459         (MAINTAINERCLEANFILES): Clean it as well.
1461 2006-07-12  Eric Blake  <ebb9@byu.net>
1463         * doc/m4.texinfo (Extensions): Document how to overcome
1464         implementation difference in > 9 positional parameters.
1466         * src/m4.c (usage): Sort within sections.
1467         (nesting_limit): Raise default from 250 to 1024.
1468         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1469         standard.  Use @option where appropriate.
1470         (Invoking m4): Sort to match --help output.
1471         (Debug Levels): Sort.
1472         (Frozen files): Sort and break into two nodes.
1474         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1475         * NEWS: Document raised -L limit.
1477 2006-07-11  Eric Blake  <ebb9@byu.net>
1479         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1480         stress-test changeword before a release.
1481         * doc/m4.texinfo: More doc cleanups.
1482         (Copying This Manual): New node; actually include the FDL in the
1483         documentation.
1484         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1485         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1486         * NEWS: Mention documentation improvements.
1488         * src/m4.h (OS2): New platform macro.
1489         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
1490         platform macro.
1491         * doc/m4.texinfo (Platform macros): Document it.
1492         (Sysval): Remove non-portable test of system("").
1493         * NEWS: Document this change.
1494         Reported by Andreas Buening.
1496 2006-07-09  Eric Blake  <ebb9@byu.net>
1498         * doc/m4.texinfo (Undivert): Fix typo in last commit.
1499         * src/m4.c (usage): Document M4PATH.
1500         * src/path.c (path_search): Reject empty string.
1501         * src/output.c (insert_diversion): Ignore diversion 0.
1502         * src/builtin.c (m4_undivert): Ignore empty string.
1503         * NEWS: Document this fix.
1505 2006-07-08  Eric Blake  <ebb9@byu.net>
1507         * checks/get-them: Make filtering easier.
1508         * checks/check-them: Filter non-input lines, so line counts are
1509         more realistic in the documentation, and so changeword tests work
1510         even when dnl is disabled.
1511         * doc/m4.texinfo: Adjust example line numbers.  Clean up
1512         front-matter, following autoconf's example.
1513         (Changeword): Enable tests, skipping if changeword not supported.
1514         (Define, Defn, Ifelse): Backport more examples from head.
1515         (Input processing, Answers): New nodes, backported from head.
1516         (Include): Expand test to cover empty filename.
1517         (Undivert): Add test of undivert(0).
1519 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1521         * doc/m4.texinfo: Fix spelling errors.
1523 2006-07-07  Eric Blake  <ebb9@byu.net>
1525         * THANKS: Update.
1527         * doc/Makefile.am (m4.1): No need to go through a temporary file;
1528         this also ensures timestamps are updated.
1529         * src/m4.h (includes): Require config.h.  Assume string.h,
1530         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
1531         than prototyping ourselves.
1532         (builtin_func): Add parameter type-checking.
1533         (voidstar): Delete, now that we assume C89.
1534         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1535         voidstar changed.
1536         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1537         xfree.
1539 2006-07-06  Eric Blake  <ebb9@byu.net>
1541         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1542         binary-io.
1543         * src/m4.h (includes): Add binary-io.h for O_BINARY.
1544         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1545         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
1546         * NEWS: Mention this fix.
1548         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1549         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1551         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1552         runs first when needed.
1553         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1554         once in srcdir rather than multiple times in VPATH builds.
1556 2006-07-03  Eric Blake  <ebb9@byu.net>
1558         * checks/check-them: Use portable = in test.
1559         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1560         directory, as required by Solaris cc.  Include built headers, as
1561         required by Solaris make in VPATH build.
1562         * checks/Makefile.in: Use $(srcdir) where needed.
1563         (CHECKS): Factor $(srcdir) into macro.
1564         (DISTFILES): Likewise.  Automake takes care of distributing
1565         Makefile.in.
1566         (dist): Simplify.
1567         (Makefile): Use modern syntax of config.status.
1568         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1569         Avoid overfull and underfull hboxes in dvi.
1571         Fix 'make check' in VPATH build.  All files included by testsuite
1572         now live in a single directory.  Use forloop.m4 in testsuite.
1573         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1574         here...
1575         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1576         here.
1577         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1578         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1579         * checks/check-them: Avoid s/// when filename is in pattern.
1580         * examples/forloop.m4: Fix to match documentation.
1581         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1582         new locations.
1583         (Loops, Format): Actually use forloop.m4 in tests.
1585 2006-07-02  Eric Blake  <ebb9@byu.net>
1587         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1588         $(bindir) works in installcheck.
1589         (check, installcheck): No longer change directory, so that
1590         distcheck works with a read-only builddir.
1591         * checks/check-them: Work when pwd is no longer builddir.
1593 2006-07-01  Eric Blake  <ebb9@byu.net>
1595         * GNUmakefile: New file, borrowed from coreutils.
1596         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1597         * Makefile.maint (Makefile): Delete this rule, now that
1598         GNUmakefile includes Makefile.
1600 2006-06-30  Eric Blake  <ebb9@byu.net>
1602         For compatibility with other m4 implementations, sysval returns
1603         signal<<8 rather than 0 if syscmd is terminated by a signal.
1604         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1605         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1606         not provide wait macros.
1607         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1608         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1609         (m4_esyscmd): Set sysval to -1 on failure.
1610         (m4_sysval): Print 127 on failure, and accomodate signals if they
1611         are detectable.
1612         * NEWS: Document this change.
1613         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1614         last commit.
1615         * checks/check-them: Likewise.
1616         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1618         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1619         * src/freeze.c (produce_frozen_state): Use new spelling of
1620         platform macro.
1621         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1622         platforms.
1623         (m4_syscmd, m4_esyscmd): The empty command is successful.
1624         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1625         Document platform-dependence of system().
1626         (Syscmd): Add example.
1627         (Esyscmd): Make example more robust, and actually demonstrate
1628         rescanning.
1629         (Sysval): Expand test to cover esyscmd code path, and to check
1630         that empty command is successful.  Add conditional check for
1631         signal behavior.
1632         (Other Incompatibilities): Move platform macros from here...
1633         (Platform macros): ...to this new node.  Add windows macro.
1634         Check that exactly one platform macro is provided.
1635         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1636         .exe in error messages.  Allow for skipping checks.
1637         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1638         * NEWS: Document platform macros.
1640 2006-06-29  Eric Blake  <ebb9@byu.net>
1642         Fix buffer overrun bug.
1643         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1644         xvasprintf.
1645         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1646         variant instead, since [efg]cvt are obsolete and our use of them
1647         was buggy (savannah sr #104303).
1648         (format): Fix buffer overflow by using xasprintf.
1649         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1650         * NEWS: Document this fix.
1652         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1653         cross-compilation.
1654         (AC_CACHE_CHECK): Cache search for ecvt.
1656 2006-06-27  Eric Blake  <ebb9@byu.net>
1658         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1659         required by POSIX, and add example that exposed core dump on x86
1660         architectures.
1661         (Incompatibilities): Document incompatibility in eval precedence.
1662         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1663         behavior.
1664         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1665         * NEWS: Document this change.
1667         * doc/m4.texinfo: Use @noindent consistently.
1668         (Quoting Arguments): Document that unquoted parentheses group
1669         arguments.
1670         (Pseudo Arguments): Expand tests to show this.
1671         (Incompatibilities): Contrast traditional behavior of
1672         changequote.
1674 2006-06-24  Eric Blake  <ebb9@byu.net>
1676         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1677         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1678         (AC_CHECK_FUNCS_ONCE): Likewise.
1680 2006-06-23  Eric Blake  <ebb9@byu.net>
1682         * doc/m4.texinfo: Quoting cleanup throughout - follow
1683         autoconf-recommended style of one level of quote per parenthesis
1684         in the normal case.  Adjust error messages to match GNU coding
1685         standards (and to allow 'make check' to pass again).
1686         (Quoted strings, Inhibiting Invocation): Turn more examples into
1687         tests.
1688         (Comments): Resolve FIXME by adding example.
1689         (Define): Add example about underquoting.
1690         (Defn): Add example about use of $0.
1691         (Indir, Format): Resolve FIXME done in last commit.
1692         (Ifelse): Add example about creating blind macro.
1693         (Debugging): Fix grammar.
1694         (Dnl): Add example about dnl with arguments.
1695         (M4wrap): Be explicit that LIFO order is non compliant, and will
1696         change in m4 2.0.
1697         (Undivert): Resolve FIXME by adding example.
1698         (Frozen files): Document that m4wrap and sysval will not work
1699         consistently until m4 2.0.
1700         (Incompatibilities): Document another POSIX compliance bug, this
1701         time with changequote.  Document a traditional incompatibility
1702         with partial input spanning file boundaries.
1704         Make error messages more consistent with GNU coding standards -
1705         start with lower case, and don't end sentence with punctuation.
1706         * src/debug.c (trace_pre): Update message wording.
1707         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1708         Likewise.
1709         * src/freeze.c (produce_frozen_state, issue_expect_message),
1710         (reload_frozen_state): Likewise.
1711         * src/input.c (push_string_init, pop_init, init_macro_token),
1712         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1713         * src/m4.c (stackovf_handler, main): Likewise.
1714         * src/macro.c (expand_token, expand_argument, call_macro),
1715         (expand_macro): Likewise.
1716         * src/output.c (make_room_for, output_text, insert_file),
1717         (freeze_diversions): Likewise.
1718         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1720         * src/builtin.c (builtin_tab): Make format and indir blind.
1721         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1722         * NEWS: Mention the change to builtins.
1724 2006-06-22  Eric Blake  <ebb9@byu.net>
1726         Robustify frozen file format.
1727         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1728         macro.  Require V first, and only accept it once.  For F, use
1729         placeholder if builtin is not found, rather than warning.
1730         * src/m4.h (m4_placeholder): New prototype.
1731         * src/builtin.c: Unify error message style.
1732         (m4_placeholder): New function, warn if invoked.
1733         (builtin_tab): Add m4_placeholder.
1734         (m4_defn): Warn if placeholder is encountered.
1735         (find_builtin_by_addr): Handle placeholder.
1736         (find_builtin_by_name): Return placeholder on failure.
1737         (m4_builtin): Treat placeholder as undefined.
1738         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1739         * NEWS: Document this change.
1740         Reported by Bruno Haible.
1742         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1743         (tabchar): New macro, so that 'make check' still works.
1744         (Invoking m4): Document that ignored compatibility options -B, -S,
1745         and -T each consume an argument.
1746         * checks/get-them: Honor @tabchar{}.
1748         Avoid compiler warnings during -DDEBUG.
1749         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1750         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1751         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1752         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1753         (next_token) [DEBUG_INPUT]: Print before returning.
1754         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1755         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1757         Avoid mkstemp bugs on various platforms.
1758         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1759         * src/output.c [! HAVE_MKSTEMP]: Delete.
1760         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1761         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1762         * NEWS: Document this.
1764         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1765         Reported by Bruno Haible.
1767 2006-06-21  Eric Blake  <ebb9@byu.net>
1769         Avoid obsolete sigstack when POSIX sigaltstack is available.
1770         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1771         do likewise.
1772         * configure.ac (AC_CHECK_HEADERS): Likewise.
1773         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1774         obsolete and most hosts now have it in signal.h.
1775         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1776         (AC_CACHE_CHECK): Cache decision to use stackovf.
1777         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1778         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1779         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1780         simplify later code.
1781         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1782         in case of dereferencing a member of a NULL pointer.
1783         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1784         POSIX handler.
1785         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1786         EXIT_FAILURE in error, indent preprocessor directives.
1787         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1788         siginfo.h.
1789         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1790         Reported by Santiago Vila.
1792 2006-06-19  Eric Blake  <ebb9@byu.net>
1794         * THANKS: Update.
1796 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1798         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1799         (check, installcheck): Use it, for OS/2.
1801 2006-06-18  Eric Blake  <ebb9@byu.net>
1803         Consistently use "GNU M4" as package name, "m4" as executable
1804         name.
1805         * NEWS: Document previous fix.
1806         * THANKS: Update.
1807         * README: Fix grammar.  Document that --enable-changeword is on
1808         its last leg.
1809         * doc/m4.texinfo (Top, Changeword): Likewise.
1810         (Sysval): Enhance this test.
1811         (History): Backport this section from CVS head, and update.
1813 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1814             Eric Blake  <ebb9@byu.net>
1816         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1817         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1818         big-endian and little-endian wait status definitions.
1819         (m4_sysval): Use WEXITSTATUS.
1820         Reported by Andreas Buening.
1822 2006-06-18  Eric Blake  <ebb9@byu.net>
1824         * configure.ac (AC_INIT): Bump version number.
1825         * NEWS: Describe changes in 1.4.4c.
1827 2006-06-17  Eric Blake  <ebb9@byu.net>
1829         Beta Release 1.4.4b:
1830         * configure.ac (AC_INIT): Bump version number.
1831         * NEWS: Describe changes since 1.4.4.
1832         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1834         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1835         bootstrap.
1836         * checks/Makefile.in (maintainer-clean): Add missing target.
1837         * COPYING: Remove generated file from CVS.
1839 2006-06-16  Eric Blake  <ebb9@byu.net>
1841         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1843 2006-06-15  Eric Blake  <ebb9@byu.net>
1845         * checks/wrapfifo.m4: New file.  Use it...
1846         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1847         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1849         * src/m4.h (to_uchar): New function.
1850         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1851         isdigit, isalpha, isupper, islower, isspace, isalnum.
1852         * src/builtin.c (expand_user_macro): Likewise.
1853         * src/format.c (format): Likewise.
1854         * src/macro.c (expand_argument): Likewise.
1855         * NEWS: Document this security fix.
1857         Message cleanup.
1858         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1859         * src/freeze.c (reload_frozen_state): Fix typo in message.
1860         (produce_frozen_state): Standardize on builtin, not built-in.
1861         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1863         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1864         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1865         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1866         gnulib.
1867         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1868         * m4/gnulib-cache.m4: New file, from gnulib.
1869         * bootstrap: Invoke gnulib-tool --update.
1870         * src/m4.c (main): Cast away const.
1871         * NEWS: Document that regex is updated.
1872         * THANKS: Update.
1874 2006-06-08  Eric Blake  <ebb9@byu.net>
1876         * configure.ac (changeword): Work even when changeword is not a
1877         macro.
1878         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1879         Delete; now done by automake.
1880         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1882 2006-06-07  Eric Blake  <ebb9@byu.net>
1884         * lib/regex.c (bcmp_translate): Canonicalize type name.
1885         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1886         * configure.ac (changeword): Disable changeword for the creation
1887         of configure, in case of bootstrapping with an m4 configured with
1888         --enable-changeword.
1890         Distribute a rudimentary man page.
1891         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1892         can feed help2man.
1893         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1894         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1896 2006-06-06  Eric Blake  <ebb9@byu.net>
1898         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1899         compiler warnings at -O2.
1900         * lib/getopt.c (_getopt_internal): Likewise.
1902         Cleanup of previous patches.
1903         * src/input.c (struct input_block): Remove traced member.
1904         (push_macro, init_macro_token): Don't pass trace status around.
1905         * src/m4.h (struct token_data): Remove traced member.
1906         (struct symbol, struct builtin): Reduce unused space.
1907         (TOKEN_DATA_FUNC): Simplify.
1908         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1909         (push_macro, define_builtin): Remove unused parameter.
1910         * src/builtin.c (define_builtin, builtin_init, define_macro),
1911         (m4_defn): Don't pass trace status around.
1912         * src/macro.c (expand_argument): Likewise.
1913         * src/freeze.c (reload_frozen_state): Likewise.
1914         * src/symtab.c: Whitespace cleanup.
1915         * NEWS: Clean up wording.
1916         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1917         ensure tests actually expose bugs prior to today's patches.
1919         Trace status of builtins is no longer inherited across
1920         define(...,defn(...)).  Fixes bug that autom4te had been working
1921         around.
1922         * src/builtin.c (define_builtin): Don't override trace status.
1923         * doc/m4.texinfo (Trace): Add test for this.
1924         * NEWS: Document this.
1926         When changing macro definitions inside the arguments to the macro,
1927         consistently preserve the old definition that was in effect before
1928         argument collection, similar to the C pre-processor.
1929         Reported by John Brzustowski.
1930         * NEWS: Document this change.
1931         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1932         this policy, and add tests that expose core dumps prior to this
1933         patch.
1934         * src/m4.h (struct symbol): New members to track when a symbol is
1935         still in use after removal from the symbol table.
1936         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1937         (free_symbol): Prototype.
1938         * src/macro.c (expand_macro): Track pending expansions of a
1939         symbol.  On completion, if a symbol is deleted and no longer
1940         pending, free its memory.
1941         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1942         is still in use.
1943         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1944         is still in use.
1945         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1946         in use as deleted and remove from the table without freeing
1947         memory.
1948         (symtab_print_list) [DEBUG_SYM]: More debug output.
1950         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1951         the symbol table during traversal.
1952         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1953         SYMBOL_POPDEF, since only the latter is safe with
1954         hack_all_symbols.
1956         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1957         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1958         Preserve placeholder when macro is being traced.
1959         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1960         symbol is not defined.
1961         (set_trace): Remove placeholder when no longer traced.
1962         (m4_traceon): On named traces, always reserve a slot in the
1963         symbol table.
1964         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1965         * NEWS: Document new trace behavior.
1966         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1967         no matter whether that macro is currently defined.
1968         (Incompatibilities): Document differences between traditional and
1969         GNU trace.
1971 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1972             Eric Blake  <ebb9@byu.net>
1974         * src/m4.h (hash_table_size): Now size_t instead of int.
1975         * src/m4.c (hash_table_size): Likewise.
1976         (main): Adjust to this; use atol rather than atoi.
1977         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1978         (symtab_init, lookup_symbol, hack_all_symbols):
1979         Use size_t for sizes and indexes, not int.
1980         (symtab_print_list) [DEBUG_SYM]: Likewise.
1981         (hash): Likewise.  Don't case-fold in the hash function.
1982         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1983         Don't assume hash word is 32 bits.
1984         * NEWS: Document this change.
1986 2006-06-04  Eric Blake  <ebb9@byu.net>
1988         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1989         to allow compilation, for use in debugger.
1990         (profiles, current_mode) [DEBUG_SYM]: New variables.
1991         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1992         determining hash table performance.
1994 2006-05-31  Eric Blake  <ebb9@byu.net>
1995             John Brzustowski  <jbrzusto@fastmail.fm>
1997         * src/input.c (input_stack): Delete; use current_input instead.
1998         (wrapup_stack): Dynamically allocate, so that recursion is handled
1999         properly.
2000         (push_wrapup): Use current wrapup stack.
2001         (pop_wrapup): Rotate wrapup stack to current, and create new
2002         wrapup stack.
2003         (input_init): Dynamically allocate stacks.
2004         * NEWS: Update, now that recursive m4wrap can no longer cause
2005         core dump.
2007 2006-05-31  Eric Blake  <ebb9@byu.net>
2009         * lib/getopt.c: Fix copyright year.
2010         * lib/obstack.c: Ditto.
2011         * src/builtin.c: Ditto.
2013 2006-05-30  Eric Blake  <ebb9@byu.net>
2015         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2016         Reported by John Brzustowski.
2017         (Incompatibilities): Document known POSIX incompatibilities.
2018         * THANKS: Update.
2020 2006-05-29  Eric Blake  <ebb9@byu.net>
2022         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2023         in read-only dir.
2025         Use automake.
2026         * Makefile.am: New file.
2027         * doc/Makefile.am: Ditto.
2028         * examples/Makefile.am: Ditto.
2029         * lib/Makefile.am: Ditto.
2030         * src/Makefile.am: Ditto.
2031         * acinclude.m4: New file, renamed from aclocal.m4.
2032         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2033         (AC_ARG_PROGRAM): Now redundant.
2034         (STACKOVF): Turn into automake conditional.
2035         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2036         * checks/Makefile.in: Converting this dir to automake was not
2037         trivial; for now, just add missing targets demanded by top-level.
2038         * INSTALL: Remove files that are now generated from CVS.
2039         * Makefile.in: Ditto.
2040         * aclocal.m4: Ditto.
2041         * install-sh: Ditto.
2042         * mkinstalldirs: Ditto.
2043         * doc/Makefile.in: Ditto.
2044         * doc/texinfo.tex: Ditto.
2045         * examples/Makefile.in: Ditto.
2046         * lib/Makefile.in: Ditto.
2047         * src/Makefile.in: Ditto.
2049         * AUTHORS: Backport from CVS head, and update.
2050         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2052 2006-05-27  Eric Blake  <ebb9@byu.net>
2054         * lib/regex.c (regex_compile): Kill compiler warnings.
2055         * lib/getopt.c: Likewise.
2056         * lib/obstack.c: Likewise.
2057         * src/builtin.c (builtin_init): Likewise.
2058         * src/path.c (path_search): Likewise.
2060         * doc/m4.texinfo: Fix usage of a vs. an.
2061         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2062         overfull hbox warnings.
2063         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2065         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
2066         quoting.
2067         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2068         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2069         assume C89.
2070         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2071         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2072         * src/Makefile.in: Delete remains of ansi2knr.
2073         * src/ansi2knr.1: Delete.
2074         * src/ansi2knr.c: Delete.
2076 2006-05-25  Eric Blake  <ebb9@byu.net>
2078         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
2079         `illegal'.
2081         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2082         Reported by Karl Berry.
2084 2006-05-24  Eric Blake  <ebb9@byu.net>
2086         * Makefile.in (html): New target.
2087         * doc/Makefile.in (html, m4.html): Likewise.
2088         (MAKEINFOHTML): New macro.
2089         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2090         rendering.
2091         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2092         absolute URL.
2093         Reported by Bob Badour.
2095         * THANKS: Update.  Move reporter's email addresses here, instead
2096         of in ChangeLog.
2098 2006-05-11  Eric Blake  <ebb9@byu.net>
2100         * THANKS: Update.
2101         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2102         patched on 2005-12-04.
2103         Reported by Ilya N. Golubev.
2105         * bootstrap: New file, so that generated files need not be stored
2106         in CVS.
2107         * Makefile.in (DISTFILES): Add bootstrap.
2109         Make testsuite less sensitive to doc changes.
2110         * doc/m4.texinfo: Use m4.input instead of filename.
2111         * checks/check-them (xerr): Turn m4.input into filename.
2112         * checks/Makefile.in (dist): Depend on stamp-checks.
2114         Portability updates for OS/2.
2115         * src/Makefile.in (EXEEXT, OBJEXT): Define.
2116         (LINK): Use CFLAGS.
2117         (.c.obj): Define.
2118         * lib/Makefile.in (OBJEXT): Define.
2119         (.c.obj): Define.
2120         * doc/Makefile.in (install, uninstall): Install info files into
2121         the dir listing.
2122         Reported by Andreas Buening.
2124 2006-05-09  Eric Blake  <ebb9@byu.net>
2126         * install-sh: Update to newer upstream version.
2127         * mkinstalldirs: Likewise.
2128         Reported by Andreas Buening.
2130         * src/m4.c (main): Bump copyright year.
2131         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2132         * doc/Makefile.in (datarootdir): Likewise.
2134 2006-05-08  Eric Blake  <ebb9@byu.net>
2136         * THANKS: Update.
2137         * doc/m4.texinfo (Bugs): Backport bug email address from head.
2138         Reported by Stepan Kasal.
2140 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
2142         * input.c (match_input): Do not pass expression with side effect
2143         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
2144         * NEWS: Updated.
2146 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2148         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2149         Reported by Damian Menscher.
2151 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2153         * configure.ac (AC_INIT): Bump to 1.4.4a.
2155 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2157         Release 1.4.4:
2158         * configure.ac (AC_INIT): Bump to 1.4.4.
2159         * NEWS: Describe 1.4.4's changes.
2160         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2162 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2164         * src/m4.c: fix return code when non-existent files are processed
2166 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2168         * README: update email address for bug reports.
2170 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2172         * doc/m4.info: Generated files are not kept in the repository.
2174 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2176         The FSF are moving offices today.  Changed their contact address
2177         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2178         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2180         Also, some of the files here were never updated from the previous
2181         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2182         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2184 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2186         * Makefile.in (bindir, infodir): Substitute from configure rather
2187         than hardcode.
2188         * doc/Makefile.in (infodir): Ditto.
2189         * src/Makefile.in (bindir): Ditto.
2190         * NEWS: Updated.
2192 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2194         Changes needed to automate the release process for 1.4.3:
2196         * Makefile.in (dist): Make .tar.bz2 tarball too.
2197         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2198         (cvs-news): Look 1 line further down for NEWS release number.
2199         (cvs-dist): We don't use automake, so make dist is fine.
2200         Remove double . before suffixes.
2201         (cvs-release): Don't mention manual.html.
2202         (fetch): Get latest gendocs files.
2203         (web-manual): Rewritten to use gendoc for multiformat manuals.
2204         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2205         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2206         preserving, but case insensitive, so generating html docs per node
2207         clashes between Index.html, the node file, and index.html, the
2208         top-level of the document tree...
2209         (Index macro): ...so renamed to this.  Changed all references.
2211 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2213         * configure.ac (AC_INIT): Bump to 1.4.3a.
2215 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2217         Release 1.4.3:
2218         * configure.in (AC_INIT): Bump to 1.4.3.
2219         * NEWS: Describe 1.4.3's changes.
2221 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2223         * Makefile.maint: New file with release rules, from CVS libtool.
2224         * Makefile.in (DISTFILES): Add Makefile.maint.
2225         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2226         canonical versions.
2228 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2230         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2231         checks/47.patsubst, with a redundant @comment to prevent emacs
2232         from removing it accidentally again.
2233         * checks/get-them: Allow for trailing spaces tucked behind
2234         @comment marks.
2236 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2238         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2239         * src/Makefile.in (install, uninstall): Likewise.
2241 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2243         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2244         on Cygwin.
2245         Reported by Eric Blake.
2247 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2249         * lib/regex.c, lib/regex.h: Updated from gnulib.
2250         * src/input.c (set_word_regexp):  Don't change the word_regexp
2251         unless it compiles correctly.
2252         * NEWS: Updated.
2253         Reported by Frank Schwidom.
2255         * Makefile.in (stamp-h): Regenerate config.h properly.
2257 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2259         * configure.ac (AC_DEFINE): Fix overquoting of description
2260         argument.
2262         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2263         recognition macros.
2264         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2265         on Windows, so that the frozen file reader will work.
2266         Reported by Josef T. Burger.
2268         * src/m4.c (main): Modernise the --version output.
2270 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2272         Modernise the configury a little to prevent spurious errors from
2273         Autoconf-2.59's autoreconf:
2275         * config.h.in: Renamed to...
2276         * config-h.in: ...this to better support DOS 8.3 file systems.
2277         * acconfig.h: Removed.
2278         * configure.in: Renamed to...
2279         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2280         entry comments.  Slight reorganisation and reformatting.
2281         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2282         entry comments.
2283         (AC_INIT): Use a modern 3 argument call.
2284         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2285         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2286         s/PRODUCT/PACKAGE/g.
2287         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2288         config.h.in.  Added configure.ac, config-h.in.
2289         (stamp-h.in): Removed acconfig.h from dependencies.
2290         (configure): Depends on configure.ac, not configure.in.
2291         * doc/Makefile.in (stamp-vti): Ditto.
2292         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2293         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2294         * configure: Regenerated.
2296 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2298         * src/output.c (mkstemp): Make non-static, and build regardless of
2299         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2300         * NEWS: Update.
2302 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2304         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2305         changes from your editor buffer first.
2307         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2308         * src/m4.c: And include them as appropriate.
2309         * NEWS: Updated.
2311 2004-09-09  Andreas Schwab  <schwab@suse.de>
2313         Refactoring of the string read case in next_char provides about a
2314         20% speedup of M4 as typically used by autoconf:
2316         * src/input.c (next_char_1): Renamed from next_char.
2317         (next_char): New macro.
2318         * NEWS: Updated.
2320 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2322         * configure.in (VERSION): Bump to 1.4.2a.
2324 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2326         Release 1.4.2.
2327         * configure.in (VERSION): Bump to 1.4.2.
2328         * News: Describe 1.4.2's changes.
2330         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2331         relies on this.
2332         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2333         (m4_maketemp): Clear errno before calling mkstemp.
2334         * src/path.c (path_search): Don't let "free" trash errno when
2335         returning NULL.
2336         * src/output.c (insert_file): Don't assume errno has a valid
2337         value simply because fread returns zero.  This fixes a
2338         portability bug reported by Marion Hakanson in
2339         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2341 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2343         * configure.in (VERSION): Bump to 1.4.1a.
2344         * NEWS: Place holder for next stable release.
2346 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2348         Release 1.4.1.
2349         * configure.in (VERSION): Bump to 1.4.1.
2350         * NEWS: Describe 1.4.1's changes.
2352         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2353         pacify Autoconf 2.59.
2355         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2356         to pacify Texinfo 4.7.
2357         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2359         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2360         pacify Sun C compilers.
2362 2003-09-28  Akim Demaille  <akim@epita.fr>
2364         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2365         botch.
2367 2003-09-03  Santiago Vila  <sanvila@debian.org>
2369         * examples/stackovf.sh: Use tempfile if available.
2371 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2373         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2374         * src/output.c (m4_insert_file): Do not mix buffered and
2375         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2377 2001-02-01  Santiago Vila  <sanvila@debian.org>
2379         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2380         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2382 2001-02-01  Matt Kraai  <kraai@debian.org>
2384         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2385         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2386         empty file rather than to a nonexistent file.  This closes a common
2387         security hole.
2388         * src/builtin.c (m4_maketemp): Implement the above, by using
2389         mkstemp rather than mktemp.  (trivial change)
2391 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2393         * src/builtin.c (expand_ranges): Added break after trailing dash.
2394         This caused misbehaviors on some systems.
2396 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2398         Release 1.4.
2399         * doc/Makefile.in (realclean): Also remove stamp-vti.
2400         Reported by Eric Backus.
2402 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2404         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2405         be opened, return immediately after producing the error message.
2406         Reported by Andreas Schwab.
2408         * configure.in: Check for const only after having found possible
2409         ANSIfying compiler flags, this is of no use to check it before.
2410         Reported by Alexander Lehmann.
2412 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2414         * src/macro.c (collect_arguments): Cast obstack arguments to
2415         (voidstar), so avoiding compiler warnings.
2416         Reported by Joseph E. Sacco.
2418         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2419         (int) so they correspond to %d format items.
2420         Reported by Joseph E. Sacco.
2422         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2423         * src/symtab.c (free_symbol): Idem.
2424         Reported by Karl Vogel.
2426 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2428         * Makefile.in (DISTFILES): Distribute BACKLOG.
2430         * configure.in: Define PRODUCT and VERSION.
2431         * acconfig.h: Document PRODUCT and VERSION.
2432         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2433         constant string m4 and variable or parameter named version.
2435 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2437         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2438         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2439         defines __STDC__ to 0, for indicating it is *not* ANSI!
2440         Reported by Kaveh R. Ghazi.
2442         * configure.in: Added obsolescent tests for AIX and Minix.
2444         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2445         which texclean does not exist anymore.
2446         Reported by Eric Backus, Jim Meyering, John David Anglin and
2447         Joseph E. Sacco.
2449 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2451         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2452         Reported by John David Anglin.
2454         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2455         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2456         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2457         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2458         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2459         of $U, put underline in extensions rather than in basenames.  Use
2460         implicit rules, now that regularity makes this possible.
2461         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2462         of ansi2knr whenever it is needed.
2463         * configure.in: Adjusted for correct STACKOVF substitution.
2464         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2465         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2466         Reported by David MacKenzie.
2468         * Makefile.in: Remove binprefix.  Use transform_name instead.
2469         Reported by David MacKenzie.
2471         * doc/Makefile.in: Create version.texi, use it, clean it.
2472         Reported by Jim Meyering.
2474 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2476         * Makefile.in (all, install, uninstall): Depend on Makefile.
2478         * Makefile.in: For actions invoking $(MAKE) from within compound
2479         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2480         the top-level make may exit successfully when it should fail.
2481         Reported by Jim Kingdon.
2483         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2485         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2486         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2487         * configure.in: Substitute PRODUCT and VERSION.
2489         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
2491 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
2493         * Makefile.in (mostlyclean-local): Do not remove *~.
2494         * */Makefile.in (mostlyclean): Idem.
2495         Reported by Robert E. Brown and Richard Stallman.
2497 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
2499         * src/m4.h: Get rid of CONFIG_BROKETS.
2501 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
2503         * configure.in: Use AC_ARG_PROGRAM.
2504         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
2505         Reported by David MacKenzie.
2507 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
2509         * configure.in: Do not add -O to CFLAGS for GNU C, now that
2510         configure does it automatically.
2511         Reported by Jim Meyering.
2513 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
2515         * src/stackovf.c: Declare the handler_t typedef earlier in the
2516         code, use it for stackovf_handler.
2517         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2518         casting sigsegv_handler.
2519         Reported by Robert Bernstein.
2521         * src/m4.c (main): Initialize program_name to argv[0] without
2522         basename'ing it.
2523         Reported by Karl Berry.
2525 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
2527         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2528         Reported by Karl Berry.
2530 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
2532         * lib/Makefile.in (mostlyclean): Added.
2533         (TAGS): Make in $(srcdir).
2535         * configure.in: Use `choke me' in test, like everywhere!
2537         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2538         unreacheable and useless.
2540         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2542         * lib/Makefile.in (DISTFILES): Distribute TAGS.
2543         (distclean): Do not remove TAGS.
2544         (realclean): Remove it.
2545         * Makefile.in: Make TAGS in lib also, not just in src.
2546         Reported by Karl Berry.
2548         * Makefile.in (distclean, realclean): Instead of recursively
2549         calling $(MAKE) for the -local part, allow parallel execution of
2550         -recursive and -local, only delay the removal of config.status,
2551         which is repeated in both goals.
2553 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
2555         Release 1.3.
2556         * Makefile.in: Group all *clean-recursive goals in one, using sed
2557         to remove `-recursive' while calling make recursively.  Also, use
2558         a subshell for each recursive $(MAKE).
2559         Reported by Jim Meyering.
2561         * src/m4.h (memcpy): Define with bcopy for BSD systems.
2562         Reported by Kaveh R. Ghazi.
2564         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2565         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2566         specify it.
2568         * configure.in: Use date instead of touch for stamp-h.
2569         * Makefile.in (stamp-h.in): Idem.
2571         * Makefile.in (distclean, realclean): Force serial execution of
2572         both goals, in case parallel makes are being used.
2573         Reported by Jim Meyering.
2575         * src/Makefile.in (DISTFILES): Distribute TAGS.
2576         (distclean): Do not remove TAGS.
2577         (realclean): Remove it.
2578         Reported by Karl Berry.
2580 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
2582         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
2583         to old names, for following Autoconf.
2585 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
2587         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2588         ./install.sh will not be correctly referred to in sub-Makefiles.
2589         Reported by John David Anglin.
2591         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2592         Reported by Eric Backus.
2594         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2595         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2596         config.status into remaking this directory's Makefile only.
2597         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2598         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2599         Reported by Jim Meyering.
2601 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2603         * configure.in: Correct stack overflow detection logic, taking
2604         care of systems having only incomplete implementations (like for
2605         Pyramid 9820 OSx 5.0d).
2606         Reported by Kaveh R. Ghazi.
2608         * src/Makefile.in (TAGS): Remote -t from etags call.
2610 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2612         * lib/Makefile.in (install): Depend on all.
2614 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2616         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2617         Reported by Jim Meyering and John David Anglin.
2619         * Makefile.in (distclean-local): Delete config.log.
2620         Reported by Jim Meyering.
2622         Solidify frozen files with respect to -P:
2623         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2624         calling a function by that name.  Declare the variable.
2625         * src/m4.h: Adjust declaration for prefix_all_buitins.
2626         * src/builtin.c (builtin_init): Merge in functionality from
2627         previous prefix_all_buitins function, while making entries in the
2628         symbol table, but not modifying the builtin description itself.
2630         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2631         because *many* compilers do not accept an empty `default:'.
2632         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2633         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2635         * configure.in: Use AC_TYPE_SIGNAL.
2636         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2637         Reported by Robert Bernstein.
2639         * checks/Makefile.in (check): Modify PATH so check-them will find
2640         m4 in the src directory.
2641         * Makefile.in (check): Don't.
2642         Reported by Akiko Matsushita and Jim Meyering.
2644         * src/output.c (make_room_for, output_character_helper): New
2645         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2646         a per buffer MAXIMUM_BUFFER_SIZE.
2648         * src/output.c (output_text): New function, for optimizing the
2649         output of strings of characters.  Use it.
2651 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2653         * doc, src: New directories reorganizing the distribution.
2654         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2655         files.
2656         * Makefile.in: Adjusted.
2657         * configure.in: Configure new Makefiles.
2659         * m4.h: Declare STRING typedef.  Use it for comment and quote
2660         strings, adjusting all references.  (This is the rudiments of a
2661         beginning for the eventual withdrawal of NUL terminated strings.)
2662         * output.c (shipout_text): Accept a length parameter, and use it.
2663         All callers adjusted.
2665 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2667         * m4.h: Include <unistd.h> if it exists.
2668         * stackovf.c: Don't.
2670         Clean up for current_diversion variable:
2671         * output.c: Move current_diversion from builtin.c.
2672         * m4.h: Declare current_diversion so builtin.c can access it.
2673         * output.c (output_init, make_diversion): Initialize or update
2674         current_diversion.
2675         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2676         alone.
2678         Remove limit on number of diversions:
2679         * output.c: Replace ndiversion by diversions, declare it.
2680         (output_init): Allocate only diversion 0.
2681         (make_diversion): Allocate new diversions as needed.
2682         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2683         * m4.c: Still accept -N, but do nothing with it.
2684         Reported by David MacKenzie.
2686         Freeze diversions:
2687         * output.c (freeze_diversions): New function.
2688         * m4.h: Declare freeze_diversions.
2689         * freeze.c: Document frozen file format, revise it, call
2690         freeze_diversions to add diversions to frozen format, and code to
2691         reload them properly.
2692         * m4.c: Do not undivert automatically at end when status being
2693         frozen.  Do not call builtin_init when reloading frozen state.
2695         Speed up diversion processing:
2696         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2697         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2698         structure and variables, cached variables out of output_diversion,
2699         reallocate_diversion_for and OUTPUT_CHARACTER.
2700         (shipout_text, make_diversion, insert_diversion): Adapted to new
2701         structures.
2702         (insert_file): Use better buffering.
2703         Reported by David MacKenzie.
2705 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2707         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2708         dist works from another build directory.
2710 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2712         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2713         constant HASHMAX, for -H option to work better.
2715         * builtin.c (DECLARE): Simplify by using _ ().
2717         * freeze.c: New file.
2718         * Makefile.in: Compile it, distribute it.
2719         * m4.c: Recognize, document and process --freeze-state (-F) and
2720         --reload-state (-R) options.  Pass a true flag to builtin_init
2721         only if no reloading some state.
2722         * builtin.c (define_builtin): Remove static specifier.
2723         (find_builtin_by_name): Remove static specifier.
2724         (builtin_init): Accept and obey a flag argument.
2725         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2727 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2729         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2730         specifier.
2732         * configure.in: Implement --with-dmalloc.
2733         * acconfig.h: Document WITH_DMALLOC.
2734         * m4.h: Add code for when WITH_DMALLOC.
2736 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2738         * m4.c (long_options): Use "error-output", the dash was missing.
2739         Reported by Akiko Matsushita.
2741 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2743         * m4.h: Include <sys/types.h>.
2744         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2745         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2746         int.
2747         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2748         as size_t, not int.
2749         * builtin.c (dump_args): Declare len as size_t, not int.
2751         * debug.c: Prototype the forward declaration of debug_set_file.
2753         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2754         shadowing of this variable.
2755         * output.c (insert_diversion): Idem.
2757         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2758         (input_init): Duplicate default quote and comment strings.
2759         (set_quotes): Free previous quote strings in all cases.  Duplicate
2760         even default quote strings.
2761         (set_comment): Free previous comment strings in all cases.
2762         Duplicate even default comment strings.
2764         * configure.in: Updated for Autoconf 2.0.
2765         * Makefile.in (distclean-local): Also delete config.cache.
2767         * m4.c (usage): Reorganize the --help output by topic.  Include a
2768         description for debugging flags.
2770 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2772         * configure.in: If sigaction is available and SA_ONSTACK defined,
2773         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2774         defined, use sigvec.  Else don't compile stackovf.c.
2775         * stackovf.c (setup_stackovf_trap): Idem.
2776         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2777         and Simon Leinen.
2779 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2781         * m4.c (usage): Replace printf par fputs.
2783 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2785         * Release 1.2
2787 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2789         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2790         check for RLIMIT_STACK, combine in the checking for getrlimit.
2791         All those things are not universally available.
2792         * stackovf.c: Split setting up the trap handler and catching
2793         signals, for better taking care of various configure outcomes.
2794         * examples/stackovf.sh: Correct a typo.
2795         Reported by Eric Backus, Jim Avera and Jim Meyering.
2797 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2799         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2801 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2803         * Makefile.in: Modify so parallel make will not try making
2804         lib/libm4.a twice simultaneously.
2805         Reported by Jim Meyering.
2807 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2809         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2810         error message, for when no code possibility exists.  Even if this
2811         line is completely #ifdef'ed out, it brings a syntax error.
2812         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2814         * Makefile.in (install): Have install depend on all too, for lib
2815         to be remade as needed.
2817         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2818         providing ulimit, instead of using only ksh.
2819         Reported by Jim Avera and Joseph E. Sacco.
2821 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2823         * Makefile.in (check): Have it depend on all instead of m4.  In
2824         this way, a change in lib will be detected and processed.
2826         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2827         instead of using sscanf which stops as soon as there is a
2828         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2829         and divert(1xyzzy) were all accepted without any warning or error
2830         messages.
2831         * m4.h: Declare strtol as long if not including stdlib.h.
2832         * configure.in: Check for limits.h, and replace strtol if missing.
2833         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2834         * lib/strtol.c: New file, from elsewhere.
2835         Reported by Andreas Schwab.
2837 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2839         * macro.c (expand_macro): Cast value to (boolean) prior to
2840         assigning it to traced.
2841         Reported by Tom McConnell.
2843         * Makefile.in (m4): Always make all in lib first.
2844         Reported by Jim Meyering.
2846 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2848         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2849         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2850         handlers), and a default error message if the fault address is not
2851         available (when neither siginfo.h nor BSD sigcontext are supported).
2852         * configure.in: Changes for stackovf.h: Check for sigcontext,
2853         sigaction, sigstack, and define rlim_t as int if necessary.
2854         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2855         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2856         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2858 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2860         * configure.in: Use AC_SET_MAKE.
2861         * Makefile.in: Use @SET_MAKE@.
2862         Reported by Jim Meyering.
2864         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2865         Reported by Ian Taylor.
2867 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2869         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2870         because siginfo.h is unrelated to standard headers, and siginfo.h
2871         is already checked for.
2872         Reported by Joseph E. Sacco.
2874         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2875         PROTOTYPES.
2876         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2877         AC_PROTOTYPES.
2879 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2881         * builtin.c (substitute): Use \& to represent this part of the
2882         string which was matched by the whole regexp, instead of
2883         representing the whole string.  Any usage of \0 issues a warning
2884         and acts like \&, it will disappear in some subsequent release.
2886 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2888         * m4.c: Complete prototype for forwarded declaration of usage.
2890         * input.c (init_macro_token): Correct own reference in error
2891         message.  Previous name get_macro_func was referred to instead.
2892         (next_char):  Correct own reference in error message.  Previous
2893         name advance_input was referred to instead.
2895         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2896         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2897         and_term, not_term, logical_not_term, cmp_term, shift_term,
2898         add_term, mult_term, exp_term, unary_term, simple_term): Add
2899         prototype to forwarded declarations.  Declare parameter v1 as
2900         eval_t * instead of int *.  Same for local variable v2 in dyadic
2901         functions.  Same for result in exp_term.
2902         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2903         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2904         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2905         (shipout_int): Cast first argument of ntoa to eval_t.
2906         Reported by Thorsten Ohl.
2908         * macro.c: Complete the prototypes of forwarded expand_macro and
2909         expand_token.
2910         Reported by Thorsten Ohl.
2912         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2913         The Ultrix 3.1 compiler cannot do much with void pointers.
2915         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2916         * m4.c (xfree):  Replace void * by voidstar.
2917         Reported by Tom McConnell.
2919         * ansi2knr.1: New, from elsewhere.
2920         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2922         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2923         stamp-h does not exist yet.  This avoids running it a second time
2924         just after the initial ./configure.
2925         Reported by David MacKenzie and Tom McConnell.
2927         * m4.h: Replace the enum debug_info declaration with a series of
2928         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2929         (int) to most references, when used in expressions.
2930         Reported by Tom McConnell.
2932 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2934         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2935         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2936         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2937         the preprocessor; by not being subject to CFLAGS, this was
2938         discouraging those flags asking for ANSI compilation.
2939         * acconfig.h: Document HAVE_PROTOTYPES.
2940         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2941         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2942         Reported by Eric Backus.
2944         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2945         from the environment.  Default CFLAGS to -g if not set.
2946         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2947         * lib/Makefile.in: Have CFLAGS substituted from configure.
2948         Reported by Eric Backus and Tom McConnell.
2950         * configure.in: m4_undefine changeword before using AC_ENABLE.
2952         * m4.h: Declare prototypes for error (for ANSI compilers only),
2953         prefix_all_builtins and reference_error.
2954         Reported by Tom McConnell.
2956         * input.c (set_word_regexp): Do not try to initialize the array
2957         test from a string, this does not work with non-ANSI compilers.
2958         Reported by Eric Backus.
2960         * Makefile.in (dist): Clean examples/ before saving it.
2961         (distclean-local): Also remove stamp-h.
2962         Reported by Eric Backus.
2964         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2965         non ANSI compilers.
2966         Reported by Tom McConnell.
2968         * checks/Makefile.in (clean): Depends on mostlyclean.
2969         (mostlyclean): New goal.
2971 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
2973         * Makefile.in (DISTFILES): Distribute install.sh.
2974         * install.sh: New file, copied from elsewhere.
2975         Reported by Assar Westerlund and Kaveh R. Ghazi.
2977 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
2979         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2980         * acconfig.h: Explain ENABLE_CHANGEWORD.
2982         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2983         from code provided by Pete Chown]
2984         * m4.h: Add original_text field to u_t variant of union u.
2985         Declare TOKEN_DATA_FUNC macro.
2986         * builtin.c: Declare changeword.
2987         (m4_changeword): New function.
2988         * input.c: Include "regex.h", define variables with word regexps.
2989         (input_init): Initialize the word regexp.
2990         (set_word_regexp): New.
2991         (next_token): Declare local variables, use the previous code if
2992         default_word_regexp is true.  Else, match using a new code.  Save
2993         the original text.
2994         * macro.c (expand_token): Ship out original text if not a macro
2995         name.
2996         Reported by Krste Asanovic and Pete Chown.
2998         [These modifs all depend upon ENABLE_CHANGEWORD]
2999         * m4.h: Declare external user_word_regexp.
3000         * m4.c: Declare user_word_regexp, and initialize it from
3001         --word-regexp or -W, or NULL if not specified.
3002         * input.c: Use user_word_regexp if specified, instead of
3003         DEFAULT_WORD_REGEXP.
3005         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
3006         agree with it.
3008         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
3009         * checks/Makefile.in: Empty the suffix list.
3010         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
3012         * m4.c: Declare nesting_limit and initialize it to 250.
3013         Implement -LNUMBER or --nesting-limit=NUMBER to change its
3014         value.
3015         * m4.h: Declare nesting_limit as external.
3016         * macro.c (expand_macro): Stop execution whenever nesting limit
3017         is exceeded.
3018         Reported by Bengt Mertensson.
3020         * eval.c (evaluate): Diagnose excess characters in eval input.
3021         Things like `eval(08)' used to return 0 with no diagnostic.
3023         * m4.h: Capitalize first letter of all macro arguments in
3024         definitions.
3026         * m4.c: Declare warning_status, initialize it to 0.  Add new
3027         option -E, or --fatal-warnings, which sets warning_status to
3028         EXIT_FAILURE instead.
3029         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
3030         EXIT_FAILURE if not otherwise done by header files.
3031         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3032         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3033         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3034         argument of all M4ERROR calls.
3035         Reported by Noah Friedman.
3037         * examples/incl-test.m4: Renamed from incl_test.m4.
3038         * examples/include.m4: Include incl-test.m4 instead of
3039         incl_test.m4.
3040         * examples/multiquotes.m4: Renamed from multi-quotes.m.
3042 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
3044         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
3045         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3046         also tested it on a Sun Sparc workstation running SunOS 4.x.
3048         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3049         49.format check, abusing a `union values' argument with sprintf
3050         without selecting the proper field.  Now, save the formatting type
3051         first, delaying the fetch of the corresponding argument.
3052         Reported by Joseph E. Sacco and Tom Quinn.
3054         * format.c (format): Remove const from char *fmt declaration when
3055         not HAVE_EFGCVT, because a NUL may be forced into it.
3057         * m4.h: Declare atof() when not STDC_HEADERS.
3058         Reported by Joseph E. Sacco.
3060         * Regenerate configure using Autoconf 1.11, this corrects a
3061         problem about an incorrect cpp seting on NeXT 3.1.
3062         Reported by Alexander Lehmann.
3064 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
3066         * m4.h (_): Change argument from `x' to `Args'.
3068 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
3070         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3071         bringing more evil than good on a few systems.
3072         Reported by Greg A. Woods.
3074 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
3076         * m4.h: Rename Args() to _().
3077         * m4.h: Remove extern specifier from all function declarations.
3079 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
3081         * stackovf.c: New file implementing stack-overflow detection.
3082         * configure.in: Check for getrlimit, sigaction.  If all of
3083         standard headers, getrlimit and sigaction, define USE_STACKOVF and
3084         substitute ${U}stackovf.o for STACKOVF.
3085         * acconfig.h: Declare USE_STACKOVF.
3086         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3087         * m4.h: Declare setup_stackovf_trap().
3088         * m4.c: Call setup_stackovf_trap().
3089         * tests/stackovf_test.sh: New file.
3091 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
3093         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3095         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3097 Sun Jan 30 14:24:19 1994    (pinard at icule)
3099         * m4.h: Remove definition of volatile, not used anymore.
3100         Reported by Jim Meyering and Joseph E. Sacco.
3102         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3103         of `if ... else /* nothing */' for if macros.
3104         Reported by Jim Meyering.
3106         * builtin.c (m4_regexp): Reorganize the code for avoiding a
3107         warning from gcc about `repl' possibly used before defined.
3108         Reported by Jim Meyering.
3110         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3111         Reported by Jim Meyering.
3113 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
3115         * m4.h: Move the conditional definition of volatile after the
3116         inclusion of system files, because they may define it first.
3118 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
3120         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3121         get around a problem with Alpha make seeing a syntax error, there.
3122         Reported by Vern Paxson.
3124 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
3126         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3127         Reported by Richard Stallman.
3129 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
3131         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3132         instead of AC_HAVE_FUNCS.
3133         Reported by Noah Friedman.
3135 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
3137         * m4.c: Initialize show_help and show_version to zero.
3139         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3140         Use them in exit() and usage() calls.
3142 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
3144         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3145         syserr() macro.  Delete errref, add reference_error and M4ERROR.
3146         * m4.c: Replace errref, which was returning an input reference
3147         string, with reference_error, which prints it on standard error.
3148         * builtin.c, output.c: Use errno as second parameter to error,
3149         instead of using syserr() with %s.
3150         * *.c: Use M4ERROR instead of error: no more errref() with %s.
3151         Doing so, the program name appears after the input reference
3152         instead of before, which eases M-x next-error processing.
3154 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
3156         * checks/get-them: Escape braces with backslashes in patterns,
3157         because HPUX-9.01 awk needs this.
3158         Reported by Jim Meyering.
3160 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
3162         * builtin.c: Declare "FILE *popen ();".
3164         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3165         macros, replace error_message_prefix() declaration by errref()'s.
3166         Declare xrealloc, for use in errref().
3167         * m4.c: Delete error_message_prefix() function, add errref().
3168         * *.c: Use error() systematically in place of all error macros,
3169         now that error() flushes stdout first.  Make needed adjustments.
3171         * m4.h: Remove const in sys_errlist[] declaration, it creates
3172         conflicts on SGI and Alpha.
3173         Reported by Kaveh R. Ghazi.
3175 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3177         * m4.c: Include <getopt.h> instead of "getopt.h".
3179         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3180         * acconfig.h: New, for documenting HAVE_EFGCVT.
3181         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3182         use them wherever appropriate.  Also use -I. for compilations.
3183         * lib/Makefile.in: Use -I.. for compilations.
3184         * *.c: Include <config.h> or "config.h".
3186         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3187         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3189 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3191         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3193         * input.c (input_init): Initialize quote and comment strings
3194         explicitely instead of calling set_quotes and set_comment: by
3195         doing so, we ensure we do not free uninitialized variables.
3197         * checks/check-them: Reverse arguments to both diff, so the
3198         expected is on the left and the obtained on the right.
3200         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3201         macros. Delete declarations for m4error, warning, fatal and
3202         internal_error, add declaration for error_message_prefix.
3203         * m4.c:  Delete m4error, warning, fatal and internal_error
3204         routines, add error_message_prefix routine.
3205         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3206         warning with WARNING*, fatal with FATAL* and internal_error with
3207         INTERNAL_ERROR*.
3208         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3209         this is not needed anymore.
3211         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3212         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3213         and debug_message, add declaration for debug_message_prefix.
3214         * debug.c: Remove static specifier for FILE *debug declaration.
3215         Delete debug_print and debug_message routines, add
3216         debug_message_prefix routine.
3217         * builtin.c, debug.c: Replace debug_print routine calls with
3218         DEBUG_PRINT* macro calls.
3219         * input.c, path.c: Replace debug_message routine calls with
3220         DEBUG_MESSAGE* macro calls.
3222         * m4.h: Remove inclusion of <varargs.h>.
3223         * debug.c: Include <stdarg.h> or <varargs.h>.
3224         (trace_format): Use stdarg instead of varargs if __STDC__.
3226         * configure.in: Remove checks for vfprintf and _doprnt.  These
3227         implementations use varargs tricks which are not portable enough.
3228         * lib/vfprintf.c: Deleted.
3229         * lib/_doprnt.c: Deleted.
3230         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3231         Reported by Joel Sherrill.
3233         * path.c (add_include_directory): Use xstrdup.
3235         * builtin.c (find_builtin_by_name): Declare static.
3237         * *.[ch]: Add const to a few "char *" declarations.
3239         * configure.in: Remove commented tests for fileno() and fstat().
3240         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3242         * debug.c (debug_flush_files): New.
3243         * m4.h: Declares it.
3244         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3245         Reported by Nicolas Pioch.
3247 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3249         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3250         Reported by Joel Sherrill.
3252         * builtin.c (prefix_all_builtins): Instead of the table size, use
3253         the null entry at end for stopping the loop.  It was overwritten.
3254         Reported by Andreas Schwab and Jim Meyering.
3256         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3257         Reported by Kaveh R. Ghazi.
3259         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3260         Reported by Karl Vogel.
3262 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3264         * m4.h: Do not define volatile if already defined.
3265         Reported by Rene' Seindal.
3267         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3269         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3270         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3272 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3274         * m4.h: Define strchr and strrchr in terms of index and rindex,
3275         instead of the other way around.
3276         * builtin.c, m4.c, path.c: Use strchr instead of index.
3278         * input.c (next_char): Remove a "break;" after a "return ...;".
3279         Reported by Tom McConnell.
3281 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3283         * Release 1.1
3285         * configure.in: Do not copy check files in the build hierarchy.
3286         * checks/check-them: Identify the m4 version being checked.  For
3287         finding m4, look in $PATH instead of in the parent directory.
3288         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3289         * checks/Makefile.in (.all-stamp): Always create check files in
3290         the source hierarchy, not anymore in the build hierarchy.
3291         (check): cd to the source hierarchy before performing checks.
3292         Do not copy nor clean COPYING anymore, take it from `..'.
3293         Reported by Tom McConnell.
3295         * Makefile.in (Makefile): Use $(SHELL).
3296         (config.status): Use $(SHELL).  Use "config.status --recheck"
3297         instead of "configure --no-create", which is obsolete.
3298         Reported by Tom McConnell.
3300 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3302         * m4.c (usage): Use "%s" instead of "m4" in format string.
3303         Reported by Jim Meyering.
3305         * Makefile.in: Distribute mkinstalldirs.
3306         Reported by Pierre Gaumond.
3307         Reported by Jim Meyering.
3308         Reported by Tom McConnell.
3309         Reported by Andreas Gustafsson.
3311         * checks/check-them: Renamed from checks/check_them.
3312         * checks/get-them: Renamed from checks/get_them.
3313         * checks/.all-stamp: Renamed from checks/.all_stamp.
3314         * checks/Makefile.in: Changed accordingly.
3315         Reported by Jim Meyering.
3317 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3319         * lib/Makefile.in (dist): Correct permissions on files.
3321         * output.c: Declare tmpfile, some systems don't.
3323 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3325         * checks/Makefile.in (dist): Correct permissions on files.
3327         * Makefile.in (dist): Ensure recursive linking for subdirectory
3328         `examples', also set read/write permissions on all its files.
3330         * mkinstalldirs: New, from elsewhere.
3331         * Makefile.in: Use it.
3333         * debug.c: Synchronize debug messages and regular output when
3334         the debug file and stdout are redirected to the same file.
3335         * configure.in: Add (commented) checks for fileno and fstat.
3336         Reported by Jim Avera.
3338         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3339         etc., arguments, then ignore the superfluous one.  m4 used to
3340         diagnose missing arguments and return the empty string.
3341         Reported by Nick S. Kanakakorn.
3343 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3345         * m4.c (main): At end of all input, ensure all undiverted text
3346         goes to the main output stream.
3347         Reported by Andreas Gustafsson.
3349         * m4.c (main): exit (0), instead of return 0.
3351         * m4.c: Implement -P and --prefix-builtins.
3352         * builtin.c: Delete const specifier on builtin_tab.
3353         (prefix_all_builtins): New.
3354         Reported by Noah Friedman.
3355         Reported by Scott Bartram.
3357         * c-boxes.el: New, from elsewhere.
3358         * Makefile.in: Distribute it.
3360         * m4.h: Do not define bcopy if <string.h> defines it.
3361         Reported by Stephen Perkins.
3363         * builtin.c (define_macro): Allow a missing second argument, in
3364         which case it is implied empty.  Affects define and pushdef.
3365         Reported by Eric Allman.
3367 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3369         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3370         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3371         * builtin.c: Initialize all the blindness fields in builtin_tab.
3372         (define_builtin): Copy the blindness of a builtin into its symbol.
3373         * macro.c (expand_token): Avoid processing a blind builtin if the
3374         next character is not an opening parenthesis.
3375         Reported by David MacKenzie.
3376         Reported by Noah Friedman.
3378         * configure.in: Ensure an exit status of 0 on completion.
3379         Reported by Vivek P. Singhal.
3381         * eval.c (eval_lex): Admit both lower and upper case letters for
3382         bases greater than 10.  Only lower case letters were accepted.
3384         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3385         Reported by Krste Asanovic.
3387         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3388         * eval.c (logical_not_term): New name for not_term.
3389         * eval.c (xor_term): New, between or_term and and_term.
3390         * eval.c (not_term): New, between and_term and logical_not_term.
3391         * eval.c (shift_term): New, between cmp_term and add_term.
3392         Reported by Krste Asanovic: ~, ^, <<, >>.
3393         Reported by Ben A. Mesander: ** vs ^.
3395         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3396         * m4.h: Delete xrealloc.c.
3397         * lib/xmalloc.c: New, from elsewhere.
3398         * lib/xstrdup.c: New, from elsewhere.
3399         * lib/Makefile.in: Distribute and compile them.
3401         * m4.c: Change progname to program_name.
3402         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3403         * lib/error.c: New, from elsewhere.
3404         * lib/Makefile.in: Distribute and compile error.c.
3405         * configure.in: Check AC_VPRINTF and for strerror.
3406         * m4.c: Delete cmd_error.  Use error instead.
3407         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3409         * m4.h: Delete #define const, let Autoconf takes care of this.
3411         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3412         Merge parse_args into main.  Declare argv to be `char *const *',
3413         then remove superfluous casts.
3415         * m4.c: Rename --no-gnu-extensions to --traditional.
3416         Reported by Ben A. Mesander.
3418         * m4.c (usage): Add a status parameter.  Supply one in various
3419         calls.  Add --help processing.  Remove -V for --version.
3421         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3423         * lib/Makefile.in: Have an AR=ar declaration.
3424         Reported by Eric Backus.
3425         Reported by Bjorn R. Bjornsson.
3426         Reported by Tom Tromey.
3427         Reported by Kristine Lund.
3428         Reported by Marion Hakanson.
3430 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3432         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3433         Reported by Noah Friedman.
3435 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3437         * Makefile.in: Remove MDEFINES and cleanup.
3439 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3441         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3442         Create a gzip file.
3444 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3446         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3447         ensure 777 mode for directories, so older tar's will restore file
3448         modes properly.
3450 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3452         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3453         so the installer can override automatically configured choices.
3454         Reported by Karl Berry.
3456 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3458         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3459         previous version was not working properly on m68k-hp-bsd4.3.
3460         Reported by Roland McGrath.
3462         * lib/_doprnt.c: Stolen from Oleo distribution.
3463         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3464         * lib/Makefile.in: Distribute _doprnt.c.
3465         Do not distribute regex.[ch].old anymore.
3467 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3469         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3470         Richard wants it there.
3472 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3474         * Makefile.in: Add DEFS to MDEFINES.
3475         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3476         (libm4.a): Remove the library before creating it.
3477         (distclean): Remove tags and TAGS too.
3479 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3481         * Makefile.in (dvi, m4.dvi): New goals.
3483         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3484         macro.c, output.c, path.c, symtab.c: Change Copyright from
3485         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3487         * examples/divert.m4: Deleted, this bug has been corrected.
3489         * Makefile.in (texclean, mostlyclean): New goals.
3491         * Makefile.in (clean): Remove clutter from ansi2knr.
3492         Reported by Pierre Gaumond.
3493         Reported by Greg A. Woods.
3495 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
3497         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
3498         might well use CFLAGS is s/he needs it.
3500         * Makefile.in: Allow installation of info files from a separate
3501         build directory.
3502         Reported by Jason Merrill.
3503         Reported by David MacKenzie.
3504         Reported by Skip Montanaro.
3505         Reported by Erez Zadok.
3506         Reported by Assar Westerlund.
3508 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
3510         * Release 1.0.3
3511         This is still a beta release for the future GNU m4 version 1.1.
3513         * lib/alloca.c: New, from elsewhere.
3514         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
3516         * m4.h: Do not define index/rindex if already defined.  If
3517         FALSE/TRUE are already defined, do not redefine them, but merely
3518         define boolean typedef to int.
3520         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3521         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3522         because some C compilers do not like connectives with #ifdef.
3523         * m4.h: Define `volatile' only if __GNUC__, instead of once for
3524         __GNUC__ and once for __STDC__.
3525         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3527         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3528         Makefile dependencies.  Without it, make keeps destroying and
3529         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
3531         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3532         to diversion/DIVERSION, this was a spelling error.
3534         * m4.c: Declare version[], remove #include "version.h".
3535         * version.h: Deleted.
3536         * Makefile.in: Remove references to version.h.
3538         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3539         production, by using a simpler and more robust algorithm.  This
3540         solves the problem of synclines sometimes written in the middle of
3541         an output line.  Delete sync_line() and output_lines variable.
3542         * m4.h: Remove sync_line prototype and output_lines declaration.
3543         * input.c (next_char), output.c (shipout_text): Remove references
3544         to output_lines.
3545         * input.c (push_file, pop_file): Merely put the value -1 in
3546         output_current_line instead of calling sync_line, for delaying a
3547         single `#line NUM FILE' before next output line.  Do not test
3548         for sync_output, because this is unnecessary clutter.
3549         * output.c (make_divertion, insert_divertion): Idem.
3550         * input.c: Rename must_advance_line to start_of_input_line, for
3551         consistency.
3553         * debug.c (trace_header): Select a new debug line format, which
3554         better complies with GNU standards for formatting error messages.
3555         With option `-dfl', M-x next-error might be used on the output.
3556         * m4.c (vmesg): Adjust format of error output to GNU standards.
3557         * m4.texinfo: Adjust examples for `make check' to work.
3559         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3560         case for enum debug_info constants, which were all lower case.
3562         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3563         re_search_2.
3564         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3565         collected patches.  I tried a few times using newer regex.[ch], it
3566         mysteriously stopped aborting with this one.  Insecure feeling...
3567         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3569 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
3571         * m4.c: Change `--no-warnings' to `--silent'.
3572         Reported by David MacKenzie.
3574         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3575         leave it off for now.  See comment in m4.c for justification.
3576         Reported by David MacKenzie.
3578         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3579         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3581         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
3583         * Makefile.in: Ensure recursive cleaning is done before local
3584         cleaning for all clean goals.
3586         * builtin.c (ntoa): Ensure the value is always interpreted as a
3587         signed quantity, whatever the radix is.
3589 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
3591         * builtin.c, format.c, input.c: Split long lines.
3592         * m4.c: Use typedef macro_definition instead of struct
3593         macro_definition.
3594         * symtab.c: Use typedef symbol instead of struct symbol.
3596 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
3598         * *.[ch]: Remove all trailing whitespace, in code and comments.
3600         * configure.in: Find some awk.
3601         * Makefile.in: Add $(AWK) to MDEFINES.
3602         * checks/Makefile.in: Transmit $(AWK) to get_them.
3603         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3604         awk script when switching files, because without this, mawk runs
3605         out of file descriptors.
3607 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3609         * Makefile.in (realclean): Delete m4.info*.
3610         Reported by Jim Meyering.
3612         * Makefile.in: Adjust and link with checks/Makefile.
3613         * checks/Makefile.in: New.
3614         * configure.in: Output checks/Makefile.
3616         * checks/get_them: Have the dnl header of each test more
3617         recognizable by next-error, also use a better message.
3619 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3621         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3622         And use that only if __GNUC__ since we're using it's GCC-specific
3623         semantics that tell the compiler the associated function doesn't
3624         return.
3626         * builtin.c (substitute): Don't use character as an array index.
3627         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3628         warnings with gcc -W -Wall on systems with qsort prototype.
3629         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3630         from gcc -W -Wall.
3632         * eval.c (most functions): Add parentheses to assignments used
3633         as truth values go avoid warnings from gcc -Wall.
3635         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3636         any functions that don't need external scope.
3638         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3639         (many functions and arrays): Declare `const'.
3641 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3643         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3644         removing the declaration from m4.h.  Also rename false to FALSE
3645         and true to TRUE.
3647         * lib/Makefile.in (Makefile): New goal.
3649         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3650         so heavily loaded.  It gets more easily overridable, calling make.
3651         Reported by Jim Meyering.
3653         * Makefile.in (dist): Get .fname from the current directory name,
3654         instead of from version.h.  I need updating many files manually,
3655         when the version changes, version.h is just one of them.
3657 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3659         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3660         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3661         Reported by Tom McConnell.
3663 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3665         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3666         39.cleardiv, which were describing missing or spurious newlines.
3667         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3668         do not depend on machine word size, `/bin/false' implementation,
3669         or `wc' output format.  `make check' is more dependable, now.
3671         * checks/check_them: Summarize the failed tests by listing their
3672         name, at end.  If none, issue `All checks successful'.  Output
3673         `Checking' instead of `Input file:'.
3675         * checks/get_them, checks/check_them: Reindented.
3677         * Makefile.in (dist): chmod a+r before making the tar file.
3679 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3681         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3683         * input.c (next_token): Reinitialize token_buttom just after using
3684         it as a watermark with obstack_free.  Or else, a future token, big
3685         enough for triggering reallocation of the obstack chunk, could
3686         void the initialized value of token_buttom, later causing panic in
3687         obstack_free.  Rename token_buttom to token_bottom everywhere.
3689         * m4.h: Before declaring errno, first include <errno.h> and
3690         ensure that it does not define errno.
3691         Reported by Richard Stallman.
3693 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3695         * builtin.c: Define and use DECLARE macro for builtins.
3697         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3698         argument, this is a common idiom for introducing long comments.
3700         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3701         arguments.  The last argument was silently ignored.
3703         * m4.c (cmd_error): Add a missing semicolon before va_end().
3705 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3707         * Makefile.in: Now handle protoized sources.  Define and use U.
3708         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3709         Add `aclocal.m4' to `configure' dependencies.
3710         * ansi2knr.c: New, from Ghostscript distribution.
3711         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3712         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3713         * aclocal.m4: New, provide FP_PROTOTYPES.
3714         * m4.h: Conditionnaly protoized through Args, save for varags.
3715         * builtin.c: Protoized.  Then:
3716         Include <sys/types.h> if size_t is not defined, before "regex.h".
3717         (m4_ifelse): Fetch built-in name properly for diagnostic.
3718         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3719         (m4_regexp): Add const to `msg' declaration.
3720         (m4_patsubst): Add const to `msg' declaration.
3721         * debug.c: Protoized, save for varargs.
3722         * eval.c: Protoized.
3723         * format.c: Protoized.
3724         * input.c: Protoized.
3725         * m4.c: Protoized, save for varargs.  Then:
3726         (xfree): Accept void * instead of char *.
3727         (xmalloc): Return void * instead of char *.
3728         (xrealloc): Accept and return void * instead of char *.
3729         * macro.c: Protoized.
3730         * output.c: Protoized.
3731         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3732         * symtab.c: Protoized.
3734 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3736         * m4.texinfo: Remove directory from diagnostics in 30.include,
3737         51.eval, 56.errprint and 57.m4exit tests.
3739         * m4.h: Remove declarations for int or void system functions, they
3740         cause more conflicting trouble than they make good.
3742         * configure.in: Avoid configuration header file.  Add some tests.
3743         * m4.h: Remove #include "config.h".
3744         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3745         Then, rewritten for better compliance with GNU standards.
3747 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3749         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3750         because of a misplaced #endif.
3752         * Many *.[hc] files: Correct intra-line spacing here and there,
3753         according to GNU indent 1.6 advice.
3755         * configure.in: New, using Autoconf 1.2.
3756         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3757         * Delete old configure.in, configure, etc/configure.in,
3758         etc/configure, lib/configure.in, lib/configure and config/*.
3759         Reported by Jason Merrill.
3761         * symtab.c (hash): Change (char) NULL to '\0'.
3762         Reported by Jason Merrill.
3764         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3765         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3766         * version.h: De-automatize, force value in.
3768         * m4.c: Changes in order to use a newer getopt.h.
3769         Reported by David MacKenzie.
3771         * checks/: New name for examples/.
3772         * checks/get_them: New location for etc/get_examples.
3773         * checks/check_them: New location for etc/check_examples.
3774         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3775         * lib/vfprintf.c: New location for etc/vfprintf.c.
3776         * Delete empty etc/.
3777         * examples/: New name for test/.
3779 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3781         * Makefile.in (check): Add m4 as dependency.
3783         * m4.c: Accept --no-warnings instead of --no_warnings, and
3784         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3785         usage message more informative.
3786         Reported by David MacKenzie.
3788 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3790         * etc/check_examples: New name for check_examples.sh.
3791         * etc/get_examples: New name for get_examples.sh.
3792         * Makefile.in, etc/Makefile.in: Use new names.
3794         * Makefile.in: Transmit $(CC) while making in lib.
3796         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3797         code disposition by hand.
3799 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3801         * m4.h: Delete definitions for abort() and exit().
3802         Reported by Richard Stallman.
3804         * config/hmake-unicos, config/s-unicos.h: New files.
3805         Reported by Hal Peterson.
3807         * eval.c (exp_term): Have N^0 return 1.
3808         Reported by Michael Fetterman.
3810         * eval.c, input.c, m4.h: Remove last comma in enums.
3811         Reported by Mike Lijewski.
3813         * Transfer of maintenance duties from Rene' to Franc,ois.
3815 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3817         * Release 1.0.  Many thanks to those, who provided me with bug
3818         reports and feedback.
3820         * Uses GNU configure, taken from the gdb distribution.
3822         * Uses GNU getopt(), with long option names.
3824         * The -Q/+quiet option is added, which suppresses warnings about
3825         missing or superflous arguments to built-in macros.
3827         * Added default options via the M4OPTS environment variable.
3829         * The built-in format can now be configured to use sprintf as
3830         the formatting engine, for systems without [efg]cvt(3).
3832         * GNU library code is moved to the ./lib subdirectory; other
3833         utility files are now in ./etc.
3835         * Several minor bugs have been fixed.
3837 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3839         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3840         Francois Pinard and Roland H. Pesch for providing me with reports.
3842         * The builtins incr and decr are now implemented without use of
3843         eval.
3845         * The builtin indir is added, to allow for indirect macro calls
3846         (allows use of "illegal" macro names).
3848         * The debugging and tracing facilities has been enhanced
3849         considerably.  See the manual for details.
3851         * The -tMACRO option is added, marks MACRO for tracing as soon
3852         as it is defined.
3854         * Builtins are traced after renaming iff they were before.
3856         * Named files can now be undiverted.
3858         * The -Nnum option can be used to increase the number of
3859         divertions available.
3861         * Calling changecom without arguments now disables all comment
3862         handling.
3864         * The function m4_patsubst() is now consistently declared
3865         static.
3867         * A bug in dnl is fixed.
3869         * A bug in the multi-character quoting code is fixed.
3871         * Several typos in the manual has been corrected.  More probably
3872         persist.
3874         * The m4.info file is now installed along with the program.
3876 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3878         * Updated and enhanced version.  Release 0.75, manual 0.07.
3880         * Implemented search path for include files (-I option and
3881         M4PATH envronment variable).
3883         * Implemented builtin "format" for printf-like formatting.
3885         * Implemented builtin "regexp" for searching for regular
3886         expressions.
3888         * Implemented builtin "patsubst" for substitution with regular
3889         expressions.
3891         * Implemented builtin "esyscmd", which expands to a shell
3892         commands output.
3894         * Implemented "__file__" and "__line__" for use in error
3895         messages.
3897         * Implemented character ranges in "translit".
3899         * Implemented control over debugging output.
3901         * Implemented multi-character quotes.
3903         * Implemented multi-character comment delimiters.
3905         * Changed predefined macro "gnu" to "__gnu__".
3907         * Changed predefined macro "unix" to "__unix__", when the -G
3908         option is not used.  With -G, "unix" is still defined.
3910         * Changed "shift", "$@" and "$*" to not insert spaces afters
3911         commas.
3913         * Added program name to error messages.
3915         * Fixed two missing null bytes bugs.
3917 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3919         * Initial beta release.  Release 0.50, manual 0.05.
3921         -----
3923         $Revision$ $Date$
3925         Local Variables:
3926         coding: utf-8
3927         End:
3929         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3930         2005, 2006, 2007 Free Software Foundation, Inc.
3932         Copying and distribution of this file, with or without
3933         modification, are permitted provided the copyright notice
3934         and this notice are preserved.