Add DEBUG_REGEX debugging information.
[m4/ericb.git] / ChangeLog
blobc8bc35752140c6762d4dc79aaa16844db8b56d94
1 2007-10-22  Eric Blake  <ebb9@byu.net>
3         Add DEBUG_REGEX debugging information.
4         * src/m4.h (DEBUG_REGEX): New debug macro.
5         * src/m4.c (main) [DEBUG_REGEX]: Open regex trace file when
6         requested.
7         * src/builtin.c (m4_patsubst, m4_regexp, compile_pattern)
8         [DEBUG_REGEX]: Trace regex usage.
10         Never let printf failures go undetected.
11         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
12         xprintf'.
13         * src/m4.h: Include xprintf.h.
14         * src/format.c (format): Warn on format failures.
15         * src/builtin.c (ntoa): Export.
16         (m4_errprint): Adjust all *printf callers.
17         * src/debug.c (debug_message_prefix, trace_format): Likewise.
18         * src/freeze.c (produce_frozen_state): Likewise.
19         * src/input.c [DEBUG_INPUT]: Likewise.
20         * src/m4.c (usage): Likewise.
21         * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
22         (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
23         * src/output.c (m4_tmpname, shipout_text, freeze_diversione):
24         Likewise.
25         * src/path.c [DEBUG_INCL]: Likewise.
26         * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
27         * src/symtab.c [DEBUG_SYM]: Likewise.
29 2007-10-17  Eric Blake  <ebb9@byu.net>
31         Fix 'm4 -F file -t undefined'.
32         * src/freeze.c (produce_frozen_state): Avoid core dump.
33         * doc/m4.texinfo (Using frozen files): Test for the bug.
34         * NEWS: Mention the fix.
36 2007-10-09  Eric Blake  <ebb9@byu.net>
38         * NEWS: Document recent speedups.
40         Fix regexp regression of 2007-09-29.
41         * src/builtin.c (substitute): Allow NULL regs when no
42         subexpressions were present.
43         (m4_regexp): Handle \ escapes even with empty regex.
44         * doc/m4.texinfo (Regexp, Patsubst): Catch this bug.
46         Cache regex compilation for another autoconf speedup.
47         * src/m4.h (free_macro_sequence): Rename...
48         (free_regex): ...to this.
49         * src/m4.c (main): Update caller.
50         * src/builtin.c (REGEX_CACHE_SIZE, m4_regex, regex_cache): New
51         declarations.
52         (compile_pattern): New function; cache recent regexes.
53         (free_regex): Rename, and clean up additional memory.
54         (m4_regexp, m4_patsubst): Use new function.
56 2007-10-02  Eric Blake  <ebb9@byu.net>
58         Document quoting pitfalls in capitalize.
59         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
60         document shortfall.
61         (Improved capitalize): New node.
62         * examples/capitalize.m4: Update to match manual.
63         * examples/capitalize2.m4: New file.
65 2007-10-01  Eric Blake  <ebb9@byu.net>
67         Another Autoconf usage pattern optimization.
68         * src/builtin.c (m4_index): Optimize search for one byte.
69         * doc/m4.texinfo (Index macro, Regexp, Patsubst): Test the new
70         code paths.
72 2007-09-29  Eric Blake  <ebb9@byu.net>
74         Optimize for Autoconf usage pattern.
75         * src/builtin.c (m4_regexp, m4_patsubst): Handle empty regex
76         faster.
78 2007-09-24  Eric Blake  <ebb9@byu.net>
80         Create .gitignore alongside .cvsignore.
81         * bootstrap (LC_ALL): Set up front.
82         (version control) Borrow idea from head, to avoid churn in
83         m4/.*ignore files modified by gnulib-tool.
85 2007-09-13  Eric Blake  <ebb9@byu.net>
87         * AUTHORS: Fix typo.
89 2007-09-07  Eric Blake  <ebb9@byu.net>
91         * AUTHORS: Simplify, to match libtool and autoconf layout.
92         * THANKS: Sync with head.
94 2007-08-10  Eric Blake  <ebb9@byu.net>
96         * doc/m4.texinfo (Compatibility): Sync with head.
98 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
99         and Eric Blake  <ebb9@byu.net>
101         * doc/m4.texinfo (Defn): Update wording.
103 2007-08-09  Eric Blake  <ebb9@byu.net>
105         POSIX requires defn(`a',`b') to concatenate definitions.
106         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
107         trying to mix a builtin with anything else.
108         * doc/m4.texinfo (Defn): Document a use for this POSIX
109         requirement.
110         (Incompatibilities): Update to match current status.
111         * NEWS: Document this change.
112         * THANKS: Update.
113         Reported by Konrad Schwarz.
115 2007-08-04  Eric Blake  <ebb9@byu.net>
117         Normalize all GPL license notices.
118         * GNUmakefile: Update license wording.
119         * Makefile.am: Likewise.
120         * Makefile.maint: Likewise.
121         * bootstrap: Likewise.
122         * commit: Likewise.
123         * configure.ac: Likewise.
124         * checks/Makefile.in: Likewise.
125         * doc/Makefile.am: Likewise.
126         * examples/Makefile.am: Likewise.
127         * src/Makefile.am: Likewise.
128         * src/builtin.c: Likewise.
129         * src/debug.c: Likewise.
130         * src/eval.c: Likewise.
131         * src/format.c: Likewise.
132         * src/freeze.c: Likewise.
133         * src/input.c: Likewise.
134         * src/m4.c: Likewise.
135         * src/m4.h: Likewise.
136         * src/macro.c: Likewise.
137         * src/output.c: Likewise.
138         * src/path.c: Likewise.
139         * src/stackovf.c: Likewise.
140         * src/symtab.c: Likewise.
142 2007-07-21  Eric Blake  <ebb9@byu.net>
144         Fix regression on NetBSD from 2007-05-28.
145         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
146         position to byte 0.
147         * NEWS: Document this fix.
148         * THANKS: Update.
149         Reported by Thomas Klausner.
151 2007-07-20  Eric Blake  <ebb9@byu.net>
153         Fix 'make distcheck' issues.
154         * Makefile.am (EXTRA_DIST): No need to distribute
155         gpl-3.0.texi.diff anymore.
156         * m4/gnulib-cache.m4: Update to latest gnulib.
158 2007-07-14  Eric Blake  <ebb9@byu.net>
160         Reflect upstream license .texi changes.
161         * doc/m4.texinfo (Copying): Rename node...
162         (GNU General Public License): ...to this.
163         (GNU Free Documentation License): Adjust node location.
164         * local/doc/gpl-3.0.texi.diff: Remove file.
166 2007-07-10  Eric Blake  <ebb9@byu.net>
168         Start 1.4.10a.
169         * configure.ac (AC_INIT): Bump version number.
170         * NEWS: Start changes since 1.4.10.
171         * doc/m4.texinfo (History): Mention 1.4.11.
172         (Copying This Package, Copying This Manual): Add index entries.
173         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
174         updated.
175         * Makefile.am (EXTRA_DIST): Remove dead file.
177 2007-07-09  Eric Blake  <ebb9@byu.net>
179         Release 1.4.10:
180         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
181         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
182         * configure.ac (AC_INIT): Bump version number.
183         * NEWS: Describe changes since 1.4.9.
185         * src/format.c: Missed a GPLv3 conversion.
187         Avoid undefined behavior of %.*c in printf.
188         * src/format.c (format): Special case %c.
189         * TODO: Document that more remains to be done.
190         * NEWS: Document the fix.
192 2007-07-05  Eric Blake  <ebb9@byu.net>
194         Fix up gnulib-tool usage.
195         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
196         * version-etc.c.diff: Move to...
197         * local/lib/version-etc.c.diff: ...here.
198         * gpl-3.0.texi.diff: Move to...
199         * local/doc/gpl-3.0.texi.diff: ...here.
201 2007-07-04  Eric Blake  <ebb9@byu.net>
203         Upgrade to GPL version 3 or later.
204         * bootstrap: Pick up GPLv3.
205         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
206         --local-dir=. --import gpl-3.0'.
207         * doc/m4.texinfo (Copying This Package): New appendix.
208         * NEWS: Mention this change.
209         * README: Mention why some files still claim to be version 2.
210         * version-etc.c.diff: New file, to make sure --version claims
211         correct GPL version.  Temporary until gnulib makes move.
212         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
213         appendix, rather than section, of the manual.
214         * GNUmakefile: Update to new license.
215         * Makefile.am: Likewise.
216         * Makefile.maint: Likewise.
217         * commit: Likewise.
218         * configure.ac: Likewise.
219         * checks/Makefile.in: Likewise.
220         * doc/Makefile.am: Likewise.
221         * examples/Makefile.am: Likewise.
222         * src/Makefile.am: Likewise.
223         * src/builtin.c: Likewise.
224         * src/debug.c: Likewise.
225         * src/eval.c: Likewise.
226         * src/freeze.c: Likewise.
227         * src/input.c: Likewise.
228         * src/m4.c: Likewise.
229         * src/m4.h: Likewise.
230         * src/macro.c: Likewise.
231         * src/output.c: Likewise.
232         * src/path.c: Likewise.
233         * src/stackovf.c: Likewise.
234         * src/symtab.c: Likewise.
236 2007-06-26  Eric Blake  <ebb9@byu.net>
238         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
240 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
242         Match Free Software Directory categories.
243         * doc/m4.texinfo (dircategory): Update.
245 2007-05-31  Eric Blake  <ebb9@byu.net>
247         * src/output.c (output_text): Fix regression from 2007-05-28.
248         * doc/m4.texinfo (History): Mention 1.4.10.
249         (Format): Make testsuite output easier to debug.
251 2007-05-29  Eric Blake  <ebb9@byu.net>
253         Start 1.4.9c.
254         * configure.ac (AC_INIT): Bump version number.
255         * NEWS: Start changes since 1.4.9b, and fix typo.
257         Beta Release 1.4.9b:
258         * configure.ac (AC_INIT): Bump version number.
259         * NEWS: Describe changes since 1.4.9.
261         Improve format support.
262         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
263         vasprintf-posix'.
264         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
265         printf with too few arguments, as in format(%*.*d,-1,-1,1).
266         * doc/m4.texinfo (Format): Expand tests, and improve
267         documentation.
268         * NEWS: Document this change.
270 2007-05-28  Eric Blake  <ebb9@byu.net>
272         Fix large diversion corner cases, including 1.4.8 regression.
273         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
274         (make_room_for): Use NULL, not 0, for pointers.
275         (insert_diversion_helper): Avoid using rewind.
276         (freeze_diversions): Allow freezing large diversions.
277         * NEWS: Document this fix.
279         Also run gnulib unit tests during make check.
280         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
281         --tests-base=tests --with-tests'.
282         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
283         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
285 2007-05-25  Eric Blake  <ebb9@byu.net>
287         Backport prompts in examples from head.
288         * src/macro.c (expand_macro): Shorten message.
289         * doc/m4.texinfo (Manual, Command line files, Comments)
290         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
291         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
292         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
293         (Using frozen files, Improved forloop, Improved foreach): Add
294         prompts to examples.
295         * checks/get-them: Ignore prompts in examples.
297         Fix sync line interaction with multiline comments.
298         * doc/m4.texinfo (Other Incompatibilities): Add example, and
299         document bug in --syncline/divert interaction.
300         (Preprocessor features): Augment test.
301         * src/m4.h (output_text): Export.
302         (shipout_text, next_token): Add parameter.
303         * src/freeze.c (reload_frozen_state): Don't interfere with
304         synclines when reloading state.
305         * src/output.c (output_text): Export.
306         (shipout_text): Take new parameter for start line of token.
307         Output at most one syncline per token.
308         * src/input.c (next_token): Report line where multiline tokens
309         start.
310         * src/macro.c (expand_input, expand_token, expand_argument):
311         Adjust callers so that line is passed from input to output.
312         * NEWS: Document this fix.
313         Reported by Sergey Poznyakoff.
315         Test -s in testsuite.
316         * doc/m4.texinfo (Preprocessor features): Add a test.
317         * checks/get-them: Support extra options in testsuite.
318         * checks/check-them (examples): Use extra options.
319         * THANKS: Update.
320         Reported by Sergey Poznyakoff.
322 2007-05-24  Eric Blake  <ebb9@byu.net>
324         Support POSIX flush semantics on all platforms.
325         * m4/gnulib-cache.m4: Remove closeout, and augment with
326         'gnulib-tool --import closein fflush'.
327         * src/m4.h (includes): Use closein, not closeout.
328         * src/m4.c (main): Ensure stdin is flushed when not all input is
329         consumed.
330         (process_file): No return needed.
331         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
332         than excluding mingw.
333         * NEWS: Document this change.
335         Work around cygwin and mingw fseeko bugs.
336         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
337         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
339 2007-04-25  Eric Blake  <ebb9@byu.net>
341         Fix negative division within eval, regression of 2007-01-06.
342         * doc/m4.texinfo (Eval): Catch this bug.
343         * src/eval.c (mult_term): Fix it.
344         * NEWS: Document this.
345         * THANKS: Update.
346         Reported by Cesar Strauss.
348 2007-04-23  Eric Blake  <ebb9@byu.net>
350         Start 1.4.9a.
351         * configure.ac (AC_INIT): Bump version number.
352         * NEWS: Start changes since 1.4.9.
354 2007-03-23  Eric Blake  <ebb9@byu.net>
356         Release 1.4.9:
357         * configure.ac (AC_INIT): Bump version number.
358         * NEWS: Describe changes since 1.4.8b.
360 2007-03-16  Eric Blake  <ebb9@byu.net>
362         * doc/m4.texinfo (Mkstemp): Tweak wording.
363         * src/output.c (output_init): Adjust to latest gnulib.
365 2007-03-15  Eric Blake  <ebb9@byu.net>
367         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
368         long long, it confuses gnulib).
369         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
370         if unsigned long long doesn't work.
371         * THANKS: Update.
372         Reported by Matthew Woehlke.
374 2007-03-07  Eric Blake  <ebb9@byu.net>
376         * AUTHORS: Update.
377         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
379 2007-03-01  Eric Blake  <ebb9@byu.net>
381         * doc/m4.texinfo: Pick up more index entries from head.  Follow
382         more texinfo recommendations.
383         (Sysval): Improve tests.
385         Avoid overfull \vbox warning from texinfo, due to indices that
386         weren't quite big enough to split across page boundaries.
387         * doc/m4.texinfo: Add lots of concept index entries.
388         (Concept Index): Move to be last, as recommended by texinfo
389         manual.
390         (Define, Arguments, Pseudo Arguments): Add more function entries.
392 2007-02-28  Eric Blake  <ebb9@byu.net>
394         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
395         137.
396         (Pseudo Arguments): Add useful example.
398         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
399         reflect POSIX XCU ERN 118.
401         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
402         * src/m4.c (usage): ...here,...
403         * src/builtin.c (set_macro_sequence): ...and here.
404         (define_user_macro): Fix typo.
405         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
406         inaccuracies.
407         (Shift): Document composite macro argn for portably getting at
408         positional parameters beyond 9.
409         * configure.ac (AC_INIT): Bump version number.
410         * NEWS: Start changes of 1.4.8c.
412 2007-02-24  Eric Blake  <ebb9@byu.net>
414         Beta Release 1.4.8b:
415         * configure.ac (AC_INIT): Bump version number.
416         * NEWS: Describe changes since 1.4.8.
418         Reserve all uses of raw ${} in macro definitions, not just
419         ${<digit>}.
420         * src/builtin.c (set_macro_sequence): Change default macro
421         sequence.
422         * doc/m4.texinfo (Operation modes): Update to match.
423         * src/m4.c (usage): Likewise.
424         * NEWS: Likewise.
426 2007-02-23  Eric Blake  <ebb9@byu.net>
428         * src/m4.h (includes): Update to latest gnulib.
430 2007-02-08  Eric Blake  <ebb9@byu.net>
432         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
433         more flexible, and so that autoconf can use it.
434         * src/m4.h (set_macro_sequence, free_macro_sequence): New
435         prototypes.
436         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
437         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
438         New variables and functions.
439         (define_user_macro): Allow flexibility in regular expression used
440         to trigger warning.
441         * src/m4.c (warn_syntax): Delete.
442         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
443         spelling of option, along with optional argument.
444         * doc/m4.texinfo (Operation modes, Arguments): Document this
445         change.
446         * NEWS: Document this change.
448 2007-02-05  Eric Blake  <ebb9@byu.net>
450         * m4/gnulib-cache.m4: Module strstr no longer exists.
452         Avoid bool bitfields, as they don't work on AIX.
453         * src/m4.h (bool_bitfield): New typedef.
454         (struct symbol, struct builtin): Use it.
455         * src/input.c (struct input_block): Likewise.
456         Reported by Albert Chin.
458         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
459         Reported by Albert Chin.
460         * THANKS: Update.
462 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
464         * doc/m4.texinfo (Input processing): Further clarifications.
466 2007-02-03  Eric Blake  <ebb9@byu.net>
468         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
469         the examples.
470         Reported by Bruno Haible.
472 2007-02-01  Eric Blake  <ebb9@byu.net>
474         * src/m4.c (fatal_warnings): New variable.
475         (usage): Document new -E behavior.
476         (main): Make -E an additive option.
477         (m4_error, m4_error_at_line): Change exit status when required.
478         * NEWS: Document this change.
479         * doc/m4.texinfo (Operation modes): Likewise.
480         Reported by Ralf Wildenhues.
482 2007-01-27  Eric Blake  <ebb9@byu.net>
484         * src/m4.h (warn_syntax): Declare.
485         (init_pattern_buffer): Export.
486         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
487         (long_options, main): Implement new option.
488         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
489         (define_user_macro): Warn on $11 and ${1} if requested.
490         * src/input.c (init_pattern_buffer): Delete duplicate method.
491         * doc/m4.texinfo (Operation modes): Document it.
492         (Arguments): Document future direction of ${11} vs. $11.
493         (Incompatibilities): Fix wording on POSIX limitations.
494         * checks/get-them: Parse @{ and @} correctly.
495         * NEWS: Document this change.
497 2007-01-26  Eric Blake  <ebb9@byu.net>
499         * src/builtin.c (includes): Adjust to gnulib changes.
501 2007-01-15  Eric Blake  <ebb9@byu.net>
503         * doc/m4.texinfo: Pull in various improvements from head.
504         * src/builtin.c (include): Alter exit status on failure.
505         * NEWS: Document this fix.
507 2007-01-13  Eric Blake  <ebb9@byu.net>
509         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
510         assume the fallback of ss_base for BSDI 4.0.1.
511         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
512         ! HAVE_STACK_T_SS_SP]: Use this check.
513         Reported by Chris McGuire.
514         * THANKS: Update.
515         * NEWS: Document the improvement.
517 2007-01-09  Eric Blake  <ebb9@byu.net>
519         * src/eval.c (ASSIGN): New enumerator.
520         (eval_lex): Recognize '='.
521         (equality_term): Treat '=' like '==', but warn that it is
522         deprecated.
523         * doc/m4.texinfo (Eval): Document and test this.
524         (Incompatibilities): Document the POSIX incompatibility.
525         * NEWS: Document this change.
527 2007-01-06  Eric Blake  <ebb9@byu.net>
529         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
530         * checks/check-them: Record expected exit status.
531         * checks/get-them: Check exit status.
532         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
533         instead.
534         * src/builtin.c: All users changed.
535         * src/eval.c: Likewise.  Also document where we are triggering
536         undefined or implementation-defined behavior.
537         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
538         (logical_or_term, logical_and_term, logical_not_term, not_term)
539         (equality_term, unary_term): Port from head to follow POSIX
540         semantics.
541         (exp_term): Reject 0**0 as undefined.
542         * doc/m4.texinfo (History): Mention 1.4.9.
543         (Format, Incompatibilities): Update to document POSIX compliance.
544         * NEWS: Document this change.
546 2007-01-04  Eric Blake  <ebb9@byu.net>
548         * NEWS: Document previous fix.
549         * THANKS: Update.
551 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
553         Fix Debian bug 405594, introduced 2006-11-01 from a bad
554         copy-n-paste from head.
555         * src/m4.c (main): Use correct file name after --.
557 2007-01-04  Eric Blake  <ebb9@byu.net>
559         Fix regression from 1.4.7 in large file handling on some
560         platforms, introduced on 2006-10-13.
561         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
562         will be handled.
563         * NEWS: Document this fix.
565 2007-01-03  Eric Blake  <ebb9@byu.net>
567         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
568         version-etc-fsf'.
569         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
570         it bumps the copyright year).
572 2006-12-27  Eric Blake  <ebb9@byu.net>
574         * doc/m4.texinfo (Patsubst): Fix typo.
576 2006-12-16  Eric Blake  <ebb9@byu.net>
578         * src/m4.c (main): Check for errors when closing stdin.
580 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
582         * doc/m4.texinfo: Fix some typos.
584 2006-12-09  Eric Blake  <ebb9@byu.net>
586         * configure.ac (AC_INIT): Bump version number.
587         * NEWS: Start changes of 1.4.8a.
589 2006-11-20  Eric Blake  <ebb9@byu.net>
591         Release 1.4.8:
592         * configure.ac (AC_INIT): Bump version number.
593         * NEWS: Describe changes since 1.4.7.
595 2006-11-16  Eric Blake  <ebb9@byu.net>
597         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
598         Minor tweaks noticed while porting to head.
600 2006-11-14  Eric Blake  <ebb9@byu.net>
602         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
603         spent iterators.
604         (m4_tmpname): Avoid memory leak.
606 2006-11-13  Eric Blake  <ebb9@byu.net>
608         * src/output.c (cleanup_tmpfile): Avoid double error message when
609         umask is prohibitive.
610         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
611         functions.
612         (m4_tmpfile): Add parameter, move cloexec action here.
613         (make_room_for): Adjust caller.  Don't keep too many files open.
614         (insert_diversion_helper): Unlink emptied temp files.
615         (make_diversion): Don't keep too many files open.
616         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
617         descriptors are no longer a limiting factor.
618         * NEWS: Document this change.
620         Backport sparse diversion handling from head.
621         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
622         avltree-oset'.
623         * src/output.c (struct m4_diversion): Rename from struct
624         diversion, and update members.  All users changed.
625         (diversion_table): Change to an ordered set, instead of an array.
626         (div0): New storage for diversion 0.
627         (diversions): No longer needed.
628         (free_list): New list to allow recycling diversion storage.
629         (diversion_storage): New storage to reduce malloc overhead.
630         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
631         (output_init, output_exit, cleanup_tmpfile, make_room_for)
632         (make_diversion): Handle new diversion storage scheme.
633         (insert_diversion_helper): New function.
634         (insert_diversion, undivert_all, freeze_diversions): Use it.
635         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
636         exhaustion to visible test of large diversion numbers.
637         * NEWS: Document this fix.
639 2006-11-11  Eric Blake  <ebb9@byu.net>
641         * src/builtin.c (m4_translit): Slight optimization.
643         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
645         * src/builtin.c: Remove unnecessary casts.
646         (expand_ranges): Make 8-bit clean.
647         * doc/m4.texinfo (Translit): Add tests and wording.
648         * NEWS: Document this fix.
650 2006-11-07  Eric Blake  <ebb9@byu.net>
652         * src/m4.h (output_exit): New prototype.
653         * src/m4.c (main): Use it.
654         * src/output.c (cleanup_tmpfile): Close files before removing
655         directory.
656         (insert_diversion): Check for failure.
657         (output_exit): Avoid memory leak.
658         * doc/m4.texinfo (Diversions): Test this bug.
660         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
662 2006-11-01  Eric Blake  <ebb9@byu.net>
664         Allow C++ compilation on Linux, as a safety measure in type
665         checking.
666         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
667         stdbool'.
668         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
669         (boolean): Kill this, and use stdbool.h instead.
670         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
671         * src/output.c, src/symtab.c: All users changed.
672         * src/symtab.c (hack_all_symbols): Update prototype.
673         * src/builtin.c (dump_symbol, set_trace): Update signature.
674         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
675         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
676         C++ compilation.
677         * src/debug.c (trace_flush): Likewise.
678         * src/freeze.c (reload_frozen_state): Likewise.
679         * src/input.c (push_file, push_string_finish, push_wrapup):
680         (token_bottom, next_token): Likewise.
681         * src/m4.c (main): Likewise.
683         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
684         draft wording.
685         * src/m4.h (m4_path_search): Tweak signature.
686         * src/path.c (m4_path_search): Likewise.
687         * src/builtin.c (include): Update caller.
688         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
689         with file names.  Don't write to **argv.
690         (process_file): New helper method.
691         * NEWS: Document this fix.
693 2006-10-31  Eric Blake  <ebb9@byu.net>
695         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
696         * doc/m4.texinfo (Translit): Improve the documentation.
697         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
698         algorithm.
699         (m4_index): Simplify, and speed up slightly.
700         * NEWS: Document this fix.
702 2006-10-28  Eric Blake  <ebb9@byu.net>
704         * src/input.c (set_quotes): Don't allow empty end-quote with
705         non-empty start-quote.
706         (set_comment): Likewise for end-comment.
707         * src/builtin.c (m4_changecom): Adjust caller.
708         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
709         match behavior.
710         (Incompatibilities): Document another POSIX bug.
711         * NEWS: Mention this change.
713 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
715         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
716         files.
718 2006-10-26  Eric Blake  <ebb9@byu.net>
720         Silence -Wwrite-strings -Wpointer-arith warnings.
721         * src/builtin.c (define_user_macro): Allow NULL argument.
722         (m4_builtin, m4_indir): Cast away const of "".
723         * src/format.c (format): Likewise.
724         * src/macro.c (collect_arguments): Likewise.
725         (expand_macro): Avoid math on void*.
726         * src/m4.c (main): Adjust caller.
727         * src/output.c (freeze_diversions): Detect off_t overflow.
729         * src/input.c (pop_input): Remove unnecessary code.
731 2006-10-25  Eric Blake  <ebb9@byu.net>
733         * src/symtab.c (symtab_init): Avoid size_t overflow.
734         * src/output.c (make_diversion): Avoid size_t overflow.
735         * doc/m4.texinfo (Diversions): Test this fix.
736         * src/input.c (input_block): Remove unused member.  Reduce size
737         of struct.
738         (push_file, pop_input): Avoid useless assignment.
739         * NEWS: Document the bug fix.
741         Redo location tracking.  Instead of having just files track the
742         line to return to when popping input, now all input blocks track
743         their current line.
744         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
745         needed.
746         (input_block): Have line and file storage for all input types, and
747         rename some members.
748         (input_change): New global flag.
749         (push_file, push_macro, push_string_init, push_wrapup): Store
750         location.
751         (push_string_finish, pop_input, pop_wrapup): Notice changes in
752         input blocks.
753         (peek_input): Adjust to new member names.
754         (next_char, next_char1): Adjust location if needed.
755         (skip_line): Simplify restoring location.
756         * doc/m4.texinfo (Location): Augment the test to catch line
757         location of expansion of multi-line arguments.
758         Reported by Stepan Kasal.
760 2006-10-23  Eric Blake  <ebb9@byu.net>
762         * doc/m4.texinfo (Macro Arguments): Document that leading space
763         in argument collection stops at macro expansion.
764         (Incompatibilities): Document POSIX whitespace wording issue.
766 2006-10-20  Eric Blake  <ebb9@byu.net>
768         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
769         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
770         end of a TeX line splits incorrectly.
771         (Foreach, Improved foreach): Write these sections, borrowing ideas
772         from CVS head and from m4sugar.
773         * checks/get-them: Accomodate new way to show trailing space in
774         examples.
775         * examples/foreach.m4: Make usable in documentation.
776         * examples/foreachq.m4: New file.
777         * examples/foreachq2.m4: New file.
778         * examples/foreach2.m4: New file.
779         * NEWS: Document the documentation updates.
781 2006-10-19  Eric Blake  <ebb9@byu.net>
783         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
784         (m4_maketemp): Provide traditional behavior.
785         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
786         new `mkstemp' macro and the flaws of the old `maketemp'.
787         (Incompatibilities): Move maketemp discussion to...
788         (Extensions): ...here, since -G now supresses the GNU extension.
789         * NEWS: Document this.
791         * examples/forloop.m4: Simplify.
792         * examples/forloop2.m4: New file.
793         * examples/quote.m4: New file.
794         * doc/m4.texinfo (Loops): Rename to...
795         (Shift): ...this node.
796         (Forloop, Foreach, Improved forloop, Improved foreach): New
797         nodes.
799 2006-10-17  Eric Blake  <ebb9@byu.net>
801         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
802         config-h'.
803         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
804         gnulib headers, rather than in top directory.
805         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
806         output clutter.
808 2006-10-16  Eric Blake  <ebb9@byu.net>
810         * doc/m4.texinfo: Backport some minor cleanups from head.
811         (Cleardivert): Rename from cleardiv.
813         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
814         a section of Preliminaries.
815         (Operation modes, Preprocessor features, Limits control)
816         (Frozen state, Debugging options, Command line files): Subdivide
817         into new sections.
818         (Input processing, Quoting Arguments, Define, Arguments)
819         (Cleardiv, Format, M4exit): Fix grammar of references.
820         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
821         (Debug Levels, Debug Output, Include, Search Path, Divert)
822         (Platform macros, Syscmd, Location, Extensions): Point to new
823         sections.
824         (Top, Loops, Include, Undivert, Location, Incompatibilities):
825         Improve file references.
827 2006-10-14  Eric Blake  <ebb9@byu.net>
829         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
830         is not portable.
831         Reported by Ralf Wildenhues.
833         * src/builtin.c (m4_undivert): Check for read error.
835 2006-10-13  Eric Blake  <ebb9@byu.net>
837         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
838         header files are included, since <unistd.h> can affect the tests.
839         * THANKS: Updated.
840         Reported by Martin Koeppe.
842         Backport head's usage of clean-temp module, as it is cleaner than
843         using tmpfile-safer.
844         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
845         clean-temp closeout', and remove tmpfile-safer.
846         * src/m4.h (includes): Adjust.
847         (m4_path_search): Rename from path_search, to avoid collision
848         with gnulib.
849         * src/m4.c (main): Install closeout handler.  Adjust caller.
850         (usage): Now done by closeout module.
851         * src/builtin.c (m4_m4exit): Likewise.
852         (m4_undivert, include): Adjust callers.
853         * src/freeze.c (reload_frozen_state): Likewise.
854         * src/path.c (m4_path_search): Rename from path_search.
855         * src/output.c (output_temp_dir): New variable.
856         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
857         (insert_diversion, make_room_for): Use them.
858         * doc/m4.texinfo (Diversions): Document this, and add a test.
859         (Improved fatal_error): Fix typo.
860         (Maketemp): Port test to mingw, and no longer hide from
861         documentation.
862         * NEWS: Document the change in TMPDIR behavior.
864         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
865         macros, to work with recent gnulib-tool update.
867         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
868         handling of defn results.
869         * doc/m4.texinfo (Builtin, Indir): Add test cases.
870         * NEWS: Document this.
872 2006-10-12  Eric Blake  <ebb9@byu.net>
874         * doc/m4.texinfo (Location): Fix typo in previous commit.
875         (Changeword): Catch one more case.
876         * src/input.c (skip_line): Fix case when outer file used macro to
877         supply the \n.
879 2006-10-11  Eric Blake  <ebb9@byu.net>
881         * src/input.c (enum input_type): Add additional types, to shave
882         time off the common case.
883         (push_wrapup): Wrapped strings remember location.
884         (push_string_finish): Normal strings carry no location.
885         (push_file): Start new files uninitialized.
886         (peek_input, next_char_1): Optimize common cases by updating
887         location only on new input types.
888         (pop_input): Update to honor new input types.
889         (skip_line, push_string_finish): Fix regression in previous patch
890         when dnl is not followed by newline in included file.
891         (push_string_init): Initialize all fields of INPUT_STRING sooner.
892         (peek_token): Simplify.
893         (peek_input): Don't pop input files on peek, so that __file__ and
894         __line__ as last token of include file work correctly.
895         * doc/m4.texinfo (History): Mention 1.4.8.
896         (Answers): Split into sections, one per answer.
897         (Improved exch, Improved cleardivert, Improved fatal_error): New
898         nodes.
899         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
900         new m4wrap location semantics.
901         (Changeword): Add test that caught the regression.
902         * NEWS: Document this.
904         * src/macro.c (expand_macro): In macro expansion errors, report
905         line number at open parenthesis.
906         * src/input.c (next_token): Fix off-by-one bug in reporting end
907         of file in unterminated comment and string.
908         (file_names): New obstack, necessary since expand_macro now hangs
909         on to file names longer than the files remain open.
910         (input_init): Initialize new obstack.
911         (push_file): Use new obstack.  Delay updates to current_file
912         until after expand_macro has restored state.
913         (peek_input, next_char_1): Update current_file if necessary.
914         (pop_wrapup): Release memory.
915         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
916         the off-by-one bug.
917         (Dnl): Update to the new location reporting rules.
918         * NEWS: Document these changes.
920 2006-10-10  Eric Blake  <ebb9@byu.net>
922         * src/macro.c (argc_stack, argv_stack): New variables for sharing
923         obstacks across multiple macro calls.
924         (expand_input): Initialize and tear down stack once per input
925         file, instead of once per macro.
926         (expand_macro): Reuse existing stacks when possible.
927         (collect_arguments): Simplify slightly.
929         * src/path.c (include_env_init): Fix botched patch application.
930         Reported by Ralf Wildenhues.
932 2006-10-09  Eric Blake  <ebb9@byu.net>
934         * src/m4.c (usage, main): Detect write failures to stderr.
935         * src/builtin.c (m4_m4exit): Likewise.
936         * NEWS: Document this.
938         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
939         the limit.
940         * NEWS: Document this.
941         * doc/m4.texinfo (Invoking m4): Likewise.
943 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
945         * src/path.c (include_env_init): Copy the string returned
946         by getenv before overwriting it; POSIX disallows this.
948 2006-10-09  Eric Blake  <ebb9@byu.net>
950         * src/m4.c (main): Defer debugfile until after --help.
951         * configure.ac (AC_INIT): Bump version number.
952         * NEWS: Start changes of 1.4.7a.
954 2006-09-25  Eric Blake  <ebb9@byu.net>
956         Release 1.4.7:
957         * configure.ac (AC_INIT): Bump version number.
958         * NEWS: Describe changes since 1.4.6.
960 2006-09-21  Eric Blake  <ebb9@byu.net>
962         * doc/m4.texinfo (Invoking m4): Add clarification on option
963         processing behavior.
964         * THANKS: Update.
965         Reported by Mikhail Teterin.
967         * bootstrap: Add --force option, based on idea from coreutils.
968         * README: Document that ./bootstrap and autoreconf are for
969         developers, and not lightly done in tarballs.
971 2006-09-20  Eric Blake  <ebb9@byu.net>
973         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
974         deprecation warning on -e.
975         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
976         * NEWS: Document this.
978 2006-09-19  Eric Blake  <ebb9@byu.net>
980         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
981         -o/--error-output to --debugfile, and deprecate the former.  This
982         will allow a future release to be more consistent with other GNU
983         tools, with -o/--output affecting stdout, not debug.
984         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
985         * NEWS: Document this.
987 2006-09-14  Eric Blake  <ebb9@byu.net>
989         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
990         --diversions. `m4 --help --version' now displays help, not
991         version.
992         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
993         smaller scope.
994         (show_help, show_version): No longer needed.
995         (long_options, DIVERSIONS_OPTION): Backport patch from head to
996         distinguish between -N and --diversions in warning.
997         * doc/m4.texinfo (Invoking m4): Document this.
998         * NEWS: Likewise.
1000 2006-09-11  Eric Blake  <ebb9@byu.net>
1002         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
1003         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
1004         seekable.
1005         (debug_set_file): Use STDOUT_FILENO.
1006         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
1007         with POSIX in regards to unread input.
1008         * NEWS: Document this fix.
1009         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
1011 2006-09-07  Eric Blake  <ebb9@byu.net>
1013         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
1014         * src/m4.h (push_file): Change prototype.
1015         * src/input.c (push_file, peek_input, next_char_1): Only call getc
1016         once at EOF, to avoid double ^D on terminal stdin; regression from
1017         2006-09-04.
1018         (push_file, pop_file): Allow reading stdin twice.
1019         * src/m4.c (main): Likewise.
1020         * src/builtin.c (include): Update caller.
1021         * NEWS: Document this change.
1022         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
1023         (Syscmd): Add a test that failed before this patch.
1025 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1027         * checks/check-them: Quote $pwd.
1029 2006-09-05  Eric Blake  <ebb9@byu.net>
1031         * src/builtin.c (define_macro): Warn on invalid macro name.
1032         * NEWS: Document this change.
1033         * doc/m4.texinfo: Fix typos.
1034         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
1035         (Ifelse): Backport some improvements from head.
1037 2006-09-04  Eric Blake  <ebb9@byu.net>
1039         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
1040         native echo is braindead.
1041         * checks/check-them (strip_needed): Ignore \r in output.  Now the
1042         testsuite will pass when cross-compiling from cygwin to mingw.
1044         * src/input.c (peek_input): Fix regression in handling macro
1045         without arguments as last token in file; debian bug 385720.
1046         (next_token): Always consume an input character.
1047         Reported by Andreas Schultz.
1048         * configure.ac (AC_INIT): Bump version number.
1049         * NEWS: Document this fix.
1050         * doc/m4.texinfo (History): Mention next version.
1051         (Changeword): Add example that exposes this bug.
1052         * THANKS: Update.
1054 2006-08-25  Eric Blake  <ebb9@byu.net>
1056         Release 1.4.6:
1057         * configure.ac (AC_INIT): Bump version number.
1058         * NEWS: Describe changes since 1.4.5.
1060         * Makefile.maint (web-manual): Give up on VPATH build during
1061         distribution.  But distributions are made so infrequently that
1062         this is not too much of a hardship.
1063         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1064         exists.
1066 2006-08-24  Eric Blake  <ebb9@byu.net>
1068         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1069         Solaris, produce output on just one argument.
1070         (m4_regexp, m4_patsubst): For consistency, do likewise.
1071         (m4_patsubst): Allow zero-length match at end of string.
1072         * doc/m4.texinfo (Sysval): Fix overfull hbox.
1073         (Bugs, Macro Arguments): Minor fixes.
1074         (Other tokens): Rearrange node order.
1075         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1076         * NEWS: Document these fixes.
1078 2006-08-22  Eric Blake  <ebb9@byu.net>
1080         * src/input.c (pop_input): Avoid empty filename with -di option.
1081         * src/debug.c (debug_message_prefix): Put space before message.
1083         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1085         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1086         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1088         * checks/check-them: State why a test is skipped.
1089         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1091         * ChangeLog: Add copyright.
1092         * AUTHORS: Likewise.
1093         * BACKLOG: Likewise.
1094         * README: Likewise.
1095         * THANKS: Likewise.
1096         * TODO: Likewise.
1097         * examples/COPYING: New file, add copyright for all the examples.
1098         * checks/get-them: Put copyright on testsuite files.
1100 2006-08-18  Eric Blake  <ebb9@byu.net>
1102         Don't let unrelated child processes see too many files.
1103         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1104         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1105         spelling in error message.
1106         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1107         (debug_set_output): Close debug file on exec.
1108         * src/m4.h (includes): Add cloexec.h.
1109         * src/output.c (make_room_for): Close diversions on exec.
1110         * src/path.c (path_search): Close include files on exec.
1111         * NEWS: Document this.
1113         Regular expressions were leaking memory.
1114         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1115         helper methods.
1116         (m4_regexp, m4_patsubst): Avoid memory leak.
1117         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1118         static.
1119         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
1120         from O(n^2) to O(n) for calculating word_start.
1121         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1122         O(1) bitmap, not O(n) search string.
1123         * NEWS: Document this fix.
1125 2006-08-17  Eric Blake  <ebb9@byu.net>
1127         * NEWS: Document previous checkin.
1129         * src/builtin.c (substitute): Avoid core dump when accessing
1130         beyond bound of regular expression.
1131         Reported by Karl Nelson.
1132         * doc/m4.texinfo (Regexp): Add example that causes core dump on
1133         some architectures prior to this patch.
1134         * THANKS: Updated.
1136 2006-08-16  Eric Blake  <ebb9@byu.net>
1138         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1139         clear that dumpdef does not always go to stderr.
1141         * src/builtin.c (m4_errprint): Flush buffers before printing to
1142         stderr.
1143         * THANKS: Updated.
1145 2006-08-15  Eric Blake  <ebb9@byu.net>
1147         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1148         per debian bug 96075.
1149         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1150         (Changeword): Don't use shift as an example of a swallowed word.
1151         (Divert): Discuss fact that divert is an English word.
1152         Reported by Richard A Nelson.
1154 2006-08-14  Eric Blake  <ebb9@byu.net>
1156         * doc/m4.texinfo (Invoking m4): Minor fixes.
1158 2006-08-12  Eric Blake  <ebb9@byu.net>
1160         * doc/m4.texinfo (Arguments): Hint at better exch macro.
1161         (Answers): Provide a better definition.
1163 2006-08-09  Eric Blake  <ebb9@byu.net>
1165         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1166         yet understand locales.
1167         * NEWS: Fix wording of a few items.
1169 2006-08-08  Eric Blake  <ebb9@byu.net>
1171         Avoid printing `NONE:0:' in error messages.
1172         * src/m4.h (m4_error_at_line): New function.
1173         * src/m4.c (m4_error_at_line): Implement.
1174         * src/input.c (skip_line, input_init, next_token): Use "", not
1175         "NONE", for no file, since NONE can be a real file name.
1176         * src/macro.c (expand_argument): Likewise.
1177         * src/debug.c (debug_message_prefix, trace_header): Check for
1178         current file.
1179         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1180         (Location): Document that synclines and internal message format
1181         are not impacted by redefining these macros.
1182         (M4exit): Hint at bug in fatal_error.
1183         (Answers): Provide workaround to match m4 output.
1185         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1186         * src/m4.h (m4_error): New function.
1187         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1188         error module deficiencies.
1189         (reference_error, suppress_line): No longer needed.
1190         * src/m4.c (m4_error): Implement.
1191         (main): No longer need to install error callback.
1193 2006-08-04  Eric Blake  <ebb9@byu.net>
1195         * src/m4.h (program_name): Declare.
1196         (suppress_line): New variable.
1197         (M4ERROR_AT_LINE): New macro.
1198         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1199         for error message format.
1200         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1201         * src/macro.c (expand_argument): Likewise.
1202         * checks/check-them (examples): Adjust to new message format.
1203         * src/builtin.c (m4___program__): New builtin.
1204         * doc/m4.texinfo (Location): Split from Errprint into new node,
1205         and document __program__.
1206         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1207         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1208         format.
1209         (Extensions): Document __program__.
1210         * NEWS: Document this change.
1212 2006-08-03  Eric Blake  <ebb9@byu.net>
1214         Don't confuse leading `(' in comment or quote with start of
1215         argument collection.
1216         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1217         TOKEN_CLOSE.
1218         (peek_input): Make private to input.c.
1219         (peek_token): New prototype.
1220         * src/input.c (default_word_regexp): Reduce ifdefs.
1221         (peek_input): Make static.
1222         (next_token): Return new token types.
1223         (match_input, MATCH): Add argument consume, which controls
1224         whether match should be pushed back.
1225         (peek_token): New function.
1226         (token_type_string) [DEBUG_INPUT]: New function.
1227         * src/macro.c (expand_token, expand_argument, collect_arguments):
1228         Handle new token types.
1229         * doc/m4.texinfo (Changequote, Changecom): Document this.
1230         * NEWS: Document this.
1232         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1234         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1235         overflow detection when sigstack exists but is not implemented.
1236         Fixes debian bug 154053.
1237         * THANKS: Updated.
1238         Reported by David Perlin.
1240 2006-08-02  Eric Blake  <ebb9@byu.net>
1242         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1243         close.
1245 2006-08-01  Eric Blake  <ebb9@byu.net>
1247         * src/input.c (skip_line, next_token): Remember current file in
1248         case input file ends abruptly.  Addresses debian bug 175365.
1249         (pop_input): Defer freeing storage that holds previous file
1250         name...
1251         (pop_wrapup): to here, after error message is issued.
1252         * src/macro.c (expand_argument): Remember current file in case
1253         input file ends abruptly.
1254         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1255         (M4wrap): Adjust testsuite accordingly.
1256         (Errprint): Document line number limitation of m4wrap.
1257         * NEWS: Document this fix.
1258         * THANKS: Update.
1260 2006-07-31  Eric Blake  <ebb9@byu.net>
1262         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1263         clean; fixes debian bug 311378.
1264         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1265         (Changequote, Changecom): Add examples to test this.
1266         * NEWS: Document this fix.
1267         * THANKS: Update.
1268         Reported by Steven Augart.
1270         * doc/m4.texinfo: Whitespace fix.
1271         * checks/get-them: Avoid exceeding 14-char file name limit.
1272         * THANKS: Update.
1274 2006-07-30  Eric Blake  <ebb9@byu.net>
1276         * src/path.c (path_search): Detect allocation failure.
1278         Use native free when it is good enough.
1279         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1280         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1281         Adjust calls.
1282         * src/symtab.c (free_symbol): Likewise.
1283         * src/m4.c (xfree, main): Likewise.
1284         * src/m4.h (obstack_chunk_free): Likewise.
1285         * src/path.c (path_search): Likewise.
1286         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1288         * doc/m4.texinfo (Errprint): Add example for last patch.
1289         * checks/check-them: Account for VPATH in latest example.
1291 2006-07-29  Eric Blake  <ebb9@byu.net>
1293         * src/path.c (path_search): Add result parameter, so that
1294         -I can be accounted for.  Debian bug 53685.
1295         * src/m4.h (path_search): Update prototype.
1296         * src/m4.c (main): Adjust callers.
1297         * src/freeze.c (reload_frozen_state): Likewise.
1298         * src/builtin.c (include, m4_undivert): Likewise.
1299         * NEWS: Document this change.
1300         Reported by Nicolas Lichtmaier.
1302 2006-07-28  Eric Blake  <ebb9@byu.net>
1304         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1305         several non-GNU makes.
1306         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1307         * src/m4.h: Likewise.
1308         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1309         /usr/ccs/bin/ucbcc.
1311 2006-07-27  Eric Blake  <ebb9@byu.net>
1313         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1314         (History): Update for 1.4.6.
1316         * src/m4.h (_): Remove K&R cruft.
1317         * src/builtin.c: Likewise.
1318         * src/debug.c: Likewise.
1319         * src/eval.c: Likewise.
1320         * src/macro.c: Likewise.
1321         * src/stackovf.c: Likewise.
1323         * doc/Makefile.am (m4.1): Improve man page.
1324         * src/m4.c (usage): Improve --help output, including adding the
1325         bug reporting address.
1326         (main): Follow GNU Coding Standards for --version output.
1328 2006-07-26  Eric Blake  <ebb9@byu.net>
1330         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1331         end-comment consistently, to match POSIX.
1333         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1334         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1335         (Incompatibilities): Document incompatibility of changecom
1336         vs. macro names, and of EOF in include.
1337         * src/input.c (next_token): Reject unterminated comments at EOF.
1338         (skip_line): Warn on unterminated dnl at EOF.
1339         * NEWS: Document these changes.
1341 2006-07-25  Eric Blake  <ebb9@byu.net>
1343         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1344         stdio-safer into fopen-safer and tmpfile-safer.
1345         * src/m4.c: Remove redundant include.
1347 2006-07-24  Eric Blake  <ebb9@byu.net>
1349         Fix bugs related to stream handling.
1350         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1351         unlocked-io stdio-safer stdlib-safer close-stream.
1352         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1353         provided by gnulib if needed.
1354         * src/output.c [! HAVE_TMPFILE]: Likewise.
1355         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1356         their safer counterparts.
1357         (retcode): New global variable.
1358         * src/input.c (pop_input): Check for read failure.
1359         * src/freeze.c (reload_frozen_state): Likewise.
1360         (produce_frozen_state): Check for write failure.
1361         * src/debug.c (debug_set_file): Likewise.
1362         * src/m4.c (usage, main): Likewise.
1363         (retcode): Make global.
1364         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1365         status is non-zero except when everything succeeds.
1366         * doc/m4.texinfo (M4exit): Document these changes.
1367         (Incompatibilities): Remove documentation of bug now fixed.
1368         * NEWS: Document these fixes.
1370 2006-07-22  Eric Blake  <ebb9@byu.net>
1372         * src/format.c (format): Avoid compiler warning that str may be
1373         used uninitialized.
1375 2006-07-21  Eric Blake  <ebb9@byu.net>
1377         * src/m4.h [UNIX]: Add more platforms that are close enough to
1378         categorize as UNIX, but which don't predefine __unix__.
1379         Reported by Nelson H. F. Beebe.
1381 2006-07-20  Eric Blake  <ebb9@byu.net>
1383         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1384         to explicitly ask for --assume-autoconf=2.60.
1386 2006-07-19  Eric Blake  <ebb9@byu.net>
1388         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1389         and exits normally with 129.
1390         Reported by Nelson H. F. Beebe.
1391         * THANKS: Update.
1393         * src/m4.h (EXIT_MISMATCH): Define.
1394         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1395         exiting with status 63.
1396         * src/m4.c (usage): Document this.
1397         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1398         * NEWS: Likewise.
1400         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1401         back-cover texts.
1403 2006-07-17  Eric Blake  <ebb9@byu.net>
1405         * src/format.c (format): Support F, g, and G specifiers.
1406         * doc/m4.texinfo (Format): Document this.
1407         * NEWS: Document this addition.
1409         * doc/m4.texinfo (Builtin): Delete redundant text.
1411         * configure.ac (AC_INIT): Bump version number.
1412         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1413         * NEWS: Document this fix.
1415 2006-07-15  Eric Blake  <ebb9@byu.net>
1417         Release 1.4.5:
1418         * configure.ac (AC_INIT): Bump version number.
1419         * NEWS: Describe changes since 1.4.4.
1421         * src/m4.c (usage): Document exit status.
1422         * doc/m4.texinfo: Use `exit status', not `exit code'.
1423         (Invoking m4): Document exit status.
1425         * bootstrap: Backport --help, --version from head.
1426         (func_update): New function, for easily grabbing up-to-date files
1427         from gnulib.
1428         * Makefile.maint (web-manual): Fix for VPATH builds.
1430 2006-07-14  Eric Blake  <ebb9@byu.net>
1432         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1433         looks bad in info.  Use @deffn rather than @example for
1434         describing prototypes.  Fix awkward wording and grammar.
1436         * src/builtin.c (substitute): Warn on bad escape sequences.
1437         Ignore trailing backslash.
1438         * doc/m4.texinfo (Regexp): Add documentation for this.
1439         * NEWS: Document this change.
1441         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1442         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1443         more examples.
1444         (Dnl): Update example to show side effects.
1445         * checks/get-them: Generate three digit test names.
1446         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1448 2006-07-13  Eric Blake  <ebb9@byu.net>
1450         * src/input.c (input_init): Simplify.
1451         (set_word_regexp): Treat empty string as default, since empty
1452         regexp would disable word parsing.
1453         * src/m4.c (user_word_regexp): Default to empty string.
1454         * src/builtin.c (builtin_tab): Make changeword blind.
1455         * doc/m4.texinfo (Changeword): Document this.
1456         * NEWS: Document this.
1457         * TODO: Knock off completed items.
1459         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1460         just the first.
1461         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1462         * NEWS: Document this change.
1464         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1465         warning.  Detect quoted leading space and overflow as warnings.
1466         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1467         Treat width as minimum number of digits, as required by POSIX.
1468         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1469         arguments.
1470         (m4_substr): Likewise.  Silently treat empty start as 0.
1471         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1472         * src/eval.c (eval_lex): Parse radix 1 numbers.
1473         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1474         one type of warning.
1475         (Manual): Document behavior of numeric parsing of empty string.
1476         (Divert, Incr): Document error handling.
1477         (Eval): Document radices better.
1478         (Incompatibilities): Document translit incompatibility.
1479         * NEWS: Document these changes.
1481         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1482         (web-manual): Simplify.
1483         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1484         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1485         (MAINTAINERCLEANFILES): Clean it as well.
1486         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1487         (MAINTAINERCLEANFILES): Clean it as well.
1489 2006-07-12  Eric Blake  <ebb9@byu.net>
1491         * doc/m4.texinfo (Extensions): Document how to overcome
1492         implementation difference in > 9 positional parameters.
1494         * src/m4.c (usage): Sort within sections.
1495         (nesting_limit): Raise default from 250 to 1024.
1496         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1497         standard.  Use @option where appropriate.
1498         (Invoking m4): Sort to match --help output.
1499         (Debug Levels): Sort.
1500         (Frozen files): Sort and break into two nodes.
1502         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1503         * NEWS: Document raised -L limit.
1505 2006-07-11  Eric Blake  <ebb9@byu.net>
1507         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1508         stress-test changeword before a release.
1509         * doc/m4.texinfo: More doc cleanups.
1510         (Copying This Manual): New node; actually include the FDL in the
1511         documentation.
1512         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1513         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1514         * NEWS: Mention documentation improvements.
1516         * src/m4.h (OS2): New platform macro.
1517         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
1518         platform macro.
1519         * doc/m4.texinfo (Platform macros): Document it.
1520         (Sysval): Remove non-portable test of system("").
1521         * NEWS: Document this change.
1522         Reported by Andreas Buening.
1524 2006-07-09  Eric Blake  <ebb9@byu.net>
1526         * doc/m4.texinfo (Undivert): Fix typo in last commit.
1527         * src/m4.c (usage): Document M4PATH.
1528         * src/path.c (path_search): Reject empty string.
1529         * src/output.c (insert_diversion): Ignore diversion 0.
1530         * src/builtin.c (m4_undivert): Ignore empty string.
1531         * NEWS: Document this fix.
1533 2006-07-08  Eric Blake  <ebb9@byu.net>
1535         * checks/get-them: Make filtering easier.
1536         * checks/check-them: Filter non-input lines, so line counts are
1537         more realistic in the documentation, and so changeword tests work
1538         even when dnl is disabled.
1539         * doc/m4.texinfo: Adjust example line numbers.  Clean up
1540         front-matter, following autoconf's example.
1541         (Changeword): Enable tests, skipping if changeword not supported.
1542         (Define, Defn, Ifelse): Backport more examples from head.
1543         (Input processing, Answers): New nodes, backported from head.
1544         (Include): Expand test to cover empty filename.
1545         (Undivert): Add test of undivert(0).
1547 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1549         * doc/m4.texinfo: Fix spelling errors.
1551 2006-07-07  Eric Blake  <ebb9@byu.net>
1553         * THANKS: Update.
1555         * doc/Makefile.am (m4.1): No need to go through a temporary file;
1556         this also ensures timestamps are updated.
1557         * src/m4.h (includes): Require config.h.  Assume string.h,
1558         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
1559         than prototyping ourselves.
1560         (builtin_func): Add parameter type-checking.
1561         (voidstar): Delete, now that we assume C89.
1562         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1563         voidstar changed.
1564         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1565         xfree.
1567 2006-07-06  Eric Blake  <ebb9@byu.net>
1569         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1570         binary-io.
1571         * src/m4.h (includes): Add binary-io.h for O_BINARY.
1572         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1573         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
1574         * NEWS: Mention this fix.
1576         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1577         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1579         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1580         runs first when needed.
1581         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1582         once in srcdir rather than multiple times in VPATH builds.
1584 2006-07-03  Eric Blake  <ebb9@byu.net>
1586         * checks/check-them: Use portable = in test.
1587         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1588         directory, as required by Solaris cc.  Include built headers, as
1589         required by Solaris make in VPATH build.
1590         * checks/Makefile.in: Use $(srcdir) where needed.
1591         (CHECKS): Factor $(srcdir) into macro.
1592         (DISTFILES): Likewise.  Automake takes care of distributing
1593         Makefile.in.
1594         (dist): Simplify.
1595         (Makefile): Use modern syntax of config.status.
1596         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1597         Avoid overfull and underfull hboxes in dvi.
1599         Fix 'make check' in VPATH build.  All files included by testsuite
1600         now live in a single directory.  Use forloop.m4 in testsuite.
1601         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1602         here...
1603         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1604         here.
1605         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1606         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1607         * checks/check-them: Avoid s/// when filename is in pattern.
1608         * examples/forloop.m4: Fix to match documentation.
1609         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1610         new locations.
1611         (Loops, Format): Actually use forloop.m4 in tests.
1613 2006-07-02  Eric Blake  <ebb9@byu.net>
1615         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1616         $(bindir) works in installcheck.
1617         (check, installcheck): No longer change directory, so that
1618         distcheck works with a read-only builddir.
1619         * checks/check-them: Work when pwd is no longer builddir.
1621 2006-07-01  Eric Blake  <ebb9@byu.net>
1623         * GNUmakefile: New file, borrowed from coreutils.
1624         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1625         * Makefile.maint (Makefile): Delete this rule, now that
1626         GNUmakefile includes Makefile.
1628 2006-06-30  Eric Blake  <ebb9@byu.net>
1630         For compatibility with other m4 implementations, sysval returns
1631         signal<<8 rather than 0 if syscmd is terminated by a signal.
1632         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1633         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1634         not provide wait macros.
1635         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1636         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1637         (m4_esyscmd): Set sysval to -1 on failure.
1638         (m4_sysval): Print 127 on failure, and accomodate signals if they
1639         are detectable.
1640         * NEWS: Document this change.
1641         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1642         last commit.
1643         * checks/check-them: Likewise.
1644         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1646         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1647         * src/freeze.c (produce_frozen_state): Use new spelling of
1648         platform macro.
1649         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1650         platforms.
1651         (m4_syscmd, m4_esyscmd): The empty command is successful.
1652         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1653         Document platform-dependence of system().
1654         (Syscmd): Add example.
1655         (Esyscmd): Make example more robust, and actually demonstrate
1656         rescanning.
1657         (Sysval): Expand test to cover esyscmd code path, and to check
1658         that empty command is successful.  Add conditional check for
1659         signal behavior.
1660         (Other Incompatibilities): Move platform macros from here...
1661         (Platform macros): ...to this new node.  Add windows macro.
1662         Check that exactly one platform macro is provided.
1663         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1664         .exe in error messages.  Allow for skipping checks.
1665         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1666         * NEWS: Document platform macros.
1668 2006-06-29  Eric Blake  <ebb9@byu.net>
1670         Fix buffer overrun bug.
1671         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1672         xvasprintf.
1673         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1674         variant instead, since [efg]cvt are obsolete and our use of them
1675         was buggy (savannah sr #104303).
1676         (format): Fix buffer overflow by using xasprintf.
1677         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1678         * NEWS: Document this fix.
1680         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1681         cross-compilation.
1682         (AC_CACHE_CHECK): Cache search for ecvt.
1684 2006-06-27  Eric Blake  <ebb9@byu.net>
1686         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1687         required by POSIX, and add example that exposed core dump on x86
1688         architectures.
1689         (Incompatibilities): Document incompatibility in eval precedence.
1690         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1691         behavior.
1692         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1693         * NEWS: Document this change.
1695         * doc/m4.texinfo: Use @noindent consistently.
1696         (Quoting Arguments): Document that unquoted parentheses group
1697         arguments.
1698         (Pseudo Arguments): Expand tests to show this.
1699         (Incompatibilities): Contrast traditional behavior of
1700         changequote.
1702 2006-06-24  Eric Blake  <ebb9@byu.net>
1704         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1705         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1706         (AC_CHECK_FUNCS_ONCE): Likewise.
1708 2006-06-23  Eric Blake  <ebb9@byu.net>
1710         * doc/m4.texinfo: Quoting cleanup throughout - follow
1711         autoconf-recommended style of one level of quote per parenthesis
1712         in the normal case.  Adjust error messages to match GNU coding
1713         standards (and to allow 'make check' to pass again).
1714         (Quoted strings, Inhibiting Invocation): Turn more examples into
1715         tests.
1716         (Comments): Resolve FIXME by adding example.
1717         (Define): Add example about underquoting.
1718         (Defn): Add example about use of $0.
1719         (Indir, Format): Resolve FIXME done in last commit.
1720         (Ifelse): Add example about creating blind macro.
1721         (Debugging): Fix grammar.
1722         (Dnl): Add example about dnl with arguments.
1723         (M4wrap): Be explicit that LIFO order is non compliant, and will
1724         change in m4 2.0.
1725         (Undivert): Resolve FIXME by adding example.
1726         (Frozen files): Document that m4wrap and sysval will not work
1727         consistently until m4 2.0.
1728         (Incompatibilities): Document another POSIX compliance bug, this
1729         time with changequote.  Document a traditional incompatibility
1730         with partial input spanning file boundaries.
1732         Make error messages more consistent with GNU coding standards -
1733         start with lower case, and don't end sentence with punctuation.
1734         * src/debug.c (trace_pre): Update message wording.
1735         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1736         Likewise.
1737         * src/freeze.c (produce_frozen_state, issue_expect_message),
1738         (reload_frozen_state): Likewise.
1739         * src/input.c (push_string_init, pop_init, init_macro_token),
1740         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1741         * src/m4.c (stackovf_handler, main): Likewise.
1742         * src/macro.c (expand_token, expand_argument, call_macro),
1743         (expand_macro): Likewise.
1744         * src/output.c (make_room_for, output_text, insert_file),
1745         (freeze_diversions): Likewise.
1746         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1748         * src/builtin.c (builtin_tab): Make format and indir blind.
1749         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1750         * NEWS: Mention the change to builtins.
1752 2006-06-22  Eric Blake  <ebb9@byu.net>
1754         Robustify frozen file format.
1755         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1756         macro.  Require V first, and only accept it once.  For F, use
1757         placeholder if builtin is not found, rather than warning.
1758         * src/m4.h (m4_placeholder): New prototype.
1759         * src/builtin.c: Unify error message style.
1760         (m4_placeholder): New function, warn if invoked.
1761         (builtin_tab): Add m4_placeholder.
1762         (m4_defn): Warn if placeholder is encountered.
1763         (find_builtin_by_addr): Handle placeholder.
1764         (find_builtin_by_name): Return placeholder on failure.
1765         (m4_builtin): Treat placeholder as undefined.
1766         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1767         * NEWS: Document this change.
1768         Reported by Bruno Haible.
1770         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1771         (tabchar): New macro, so that 'make check' still works.
1772         (Invoking m4): Document that ignored compatibility options -B, -S,
1773         and -T each consume an argument.
1774         * checks/get-them: Honor @tabchar{}.
1776         Avoid compiler warnings during -DDEBUG.
1777         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1778         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1779         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1780         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1781         (next_token) [DEBUG_INPUT]: Print before returning.
1782         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1783         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1785         Avoid mkstemp bugs on various platforms.
1786         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1787         * src/output.c [! HAVE_MKSTEMP]: Delete.
1788         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1789         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1790         * NEWS: Document this.
1792         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1793         Reported by Bruno Haible.
1795 2006-06-21  Eric Blake  <ebb9@byu.net>
1797         Avoid obsolete sigstack when POSIX sigaltstack is available.
1798         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1799         do likewise.
1800         * configure.ac (AC_CHECK_HEADERS): Likewise.
1801         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1802         obsolete and most hosts now have it in signal.h.
1803         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1804         (AC_CACHE_CHECK): Cache decision to use stackovf.
1805         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1806         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1807         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1808         simplify later code.
1809         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1810         in case of dereferencing a member of a NULL pointer.
1811         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1812         POSIX handler.
1813         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1814         EXIT_FAILURE in error, indent preprocessor directives.
1815         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1816         siginfo.h.
1817         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1818         Reported by Santiago Vila.
1820 2006-06-19  Eric Blake  <ebb9@byu.net>
1822         * THANKS: Update.
1824 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1826         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1827         (check, installcheck): Use it, for OS/2.
1829 2006-06-18  Eric Blake  <ebb9@byu.net>
1831         Consistently use "GNU M4" as package name, "m4" as executable
1832         name.
1833         * NEWS: Document previous fix.
1834         * THANKS: Update.
1835         * README: Fix grammar.  Document that --enable-changeword is on
1836         its last leg.
1837         * doc/m4.texinfo (Top, Changeword): Likewise.
1838         (Sysval): Enhance this test.
1839         (History): Backport this section from CVS head, and update.
1841 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1842             Eric Blake  <ebb9@byu.net>
1844         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1845         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1846         big-endian and little-endian wait status definitions.
1847         (m4_sysval): Use WEXITSTATUS.
1848         Reported by Andreas Buening.
1850 2006-06-18  Eric Blake  <ebb9@byu.net>
1852         * configure.ac (AC_INIT): Bump version number.
1853         * NEWS: Describe changes in 1.4.4c.
1855 2006-06-17  Eric Blake  <ebb9@byu.net>
1857         Beta Release 1.4.4b:
1858         * configure.ac (AC_INIT): Bump version number.
1859         * NEWS: Describe changes since 1.4.4.
1860         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1862         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1863         bootstrap.
1864         * checks/Makefile.in (maintainer-clean): Add missing target.
1865         * COPYING: Remove generated file from CVS.
1867 2006-06-16  Eric Blake  <ebb9@byu.net>
1869         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1871 2006-06-15  Eric Blake  <ebb9@byu.net>
1873         * checks/wrapfifo.m4: New file.  Use it...
1874         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1875         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1877         * src/m4.h (to_uchar): New function.
1878         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1879         isdigit, isalpha, isupper, islower, isspace, isalnum.
1880         * src/builtin.c (expand_user_macro): Likewise.
1881         * src/format.c (format): Likewise.
1882         * src/macro.c (expand_argument): Likewise.
1883         * NEWS: Document this security fix.
1885         Message cleanup.
1886         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1887         * src/freeze.c (reload_frozen_state): Fix typo in message.
1888         (produce_frozen_state): Standardize on builtin, not built-in.
1889         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1891         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1892         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1893         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1894         gnulib.
1895         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1896         * m4/gnulib-cache.m4: New file, from gnulib.
1897         * bootstrap: Invoke gnulib-tool --update.
1898         * src/m4.c (main): Cast away const.
1899         * NEWS: Document that regex is updated.
1900         * THANKS: Update.
1902 2006-06-08  Eric Blake  <ebb9@byu.net>
1904         * configure.ac (changeword): Work even when changeword is not a
1905         macro.
1906         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1907         Delete; now done by automake.
1908         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1910 2006-06-07  Eric Blake  <ebb9@byu.net>
1912         * lib/regex.c (bcmp_translate): Canonicalize type name.
1913         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1914         * configure.ac (changeword): Disable changeword for the creation
1915         of configure, in case of bootstrapping with an m4 configured with
1916         --enable-changeword.
1918         Distribute a rudimentary man page.
1919         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1920         can feed help2man.
1921         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1922         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1924 2006-06-06  Eric Blake  <ebb9@byu.net>
1926         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1927         compiler warnings at -O2.
1928         * lib/getopt.c (_getopt_internal): Likewise.
1930         Cleanup of previous patches.
1931         * src/input.c (struct input_block): Remove traced member.
1932         (push_macro, init_macro_token): Don't pass trace status around.
1933         * src/m4.h (struct token_data): Remove traced member.
1934         (struct symbol, struct builtin): Reduce unused space.
1935         (TOKEN_DATA_FUNC): Simplify.
1936         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1937         (push_macro, define_builtin): Remove unused parameter.
1938         * src/builtin.c (define_builtin, builtin_init, define_macro),
1939         (m4_defn): Don't pass trace status around.
1940         * src/macro.c (expand_argument): Likewise.
1941         * src/freeze.c (reload_frozen_state): Likewise.
1942         * src/symtab.c: Whitespace cleanup.
1943         * NEWS: Clean up wording.
1944         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1945         ensure tests actually expose bugs prior to today's patches.
1947         Trace status of builtins is no longer inherited across
1948         define(...,defn(...)).  Fixes bug that autom4te had been working
1949         around.
1950         * src/builtin.c (define_builtin): Don't override trace status.
1951         * doc/m4.texinfo (Trace): Add test for this.
1952         * NEWS: Document this.
1954         When changing macro definitions inside the arguments to the macro,
1955         consistently preserve the old definition that was in effect before
1956         argument collection, similar to the C pre-processor.
1957         Reported by John Brzustowski.
1958         * NEWS: Document this change.
1959         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1960         this policy, and add tests that expose core dumps prior to this
1961         patch.
1962         * src/m4.h (struct symbol): New members to track when a symbol is
1963         still in use after removal from the symbol table.
1964         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1965         (free_symbol): Prototype.
1966         * src/macro.c (expand_macro): Track pending expansions of a
1967         symbol.  On completion, if a symbol is deleted and no longer
1968         pending, free its memory.
1969         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1970         is still in use.
1971         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1972         is still in use.
1973         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1974         in use as deleted and remove from the table without freeing
1975         memory.
1976         (symtab_print_list) [DEBUG_SYM]: More debug output.
1978         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1979         the symbol table during traversal.
1980         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1981         SYMBOL_POPDEF, since only the latter is safe with
1982         hack_all_symbols.
1984         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1985         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1986         Preserve placeholder when macro is being traced.
1987         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1988         symbol is not defined.
1989         (set_trace): Remove placeholder when no longer traced.
1990         (m4_traceon): On named traces, always reserve a slot in the
1991         symbol table.
1992         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1993         * NEWS: Document new trace behavior.
1994         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1995         no matter whether that macro is currently defined.
1996         (Incompatibilities): Document differences between traditional and
1997         GNU trace.
1999 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2000             Eric Blake  <ebb9@byu.net>
2002         * src/m4.h (hash_table_size): Now size_t instead of int.
2003         * src/m4.c (hash_table_size): Likewise.
2004         (main): Adjust to this; use atol rather than atoi.
2005         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
2006         (symtab_init, lookup_symbol, hack_all_symbols):
2007         Use size_t for sizes and indexes, not int.
2008         (symtab_print_list) [DEBUG_SYM]: Likewise.
2009         (hash): Likewise.  Don't case-fold in the hash function.
2010         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
2011         Don't assume hash word is 32 bits.
2012         * NEWS: Document this change.
2014 2006-06-04  Eric Blake  <ebb9@byu.net>
2016         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
2017         to allow compilation, for use in debugger.
2018         (profiles, current_mode) [DEBUG_SYM]: New variables.
2019         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
2020         determining hash table performance.
2022 2006-05-31  Eric Blake  <ebb9@byu.net>
2023             John Brzustowski  <jbrzusto@fastmail.fm>
2025         * src/input.c (input_stack): Delete; use current_input instead.
2026         (wrapup_stack): Dynamically allocate, so that recursion is handled
2027         properly.
2028         (push_wrapup): Use current wrapup stack.
2029         (pop_wrapup): Rotate wrapup stack to current, and create new
2030         wrapup stack.
2031         (input_init): Dynamically allocate stacks.
2032         * NEWS: Update, now that recursive m4wrap can no longer cause
2033         core dump.
2035 2006-05-31  Eric Blake  <ebb9@byu.net>
2037         * lib/getopt.c: Fix copyright year.
2038         * lib/obstack.c: Ditto.
2039         * src/builtin.c: Ditto.
2041 2006-05-30  Eric Blake  <ebb9@byu.net>
2043         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2044         Reported by John Brzustowski.
2045         (Incompatibilities): Document known POSIX incompatibilities.
2046         * THANKS: Update.
2048 2006-05-29  Eric Blake  <ebb9@byu.net>
2050         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2051         in read-only dir.
2053         Use automake.
2054         * Makefile.am: New file.
2055         * doc/Makefile.am: Ditto.
2056         * examples/Makefile.am: Ditto.
2057         * lib/Makefile.am: Ditto.
2058         * src/Makefile.am: Ditto.
2059         * acinclude.m4: New file, renamed from aclocal.m4.
2060         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2061         (AC_ARG_PROGRAM): Now redundant.
2062         (STACKOVF): Turn into automake conditional.
2063         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2064         * checks/Makefile.in: Converting this dir to automake was not
2065         trivial; for now, just add missing targets demanded by top-level.
2066         * INSTALL: Remove files that are now generated from CVS.
2067         * Makefile.in: Ditto.
2068         * aclocal.m4: Ditto.
2069         * install-sh: Ditto.
2070         * mkinstalldirs: Ditto.
2071         * doc/Makefile.in: Ditto.
2072         * doc/texinfo.tex: Ditto.
2073         * examples/Makefile.in: Ditto.
2074         * lib/Makefile.in: Ditto.
2075         * src/Makefile.in: Ditto.
2077         * AUTHORS: Backport from CVS head, and update.
2078         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2080 2006-05-27  Eric Blake  <ebb9@byu.net>
2082         * lib/regex.c (regex_compile): Kill compiler warnings.
2083         * lib/getopt.c: Likewise.
2084         * lib/obstack.c: Likewise.
2085         * src/builtin.c (builtin_init): Likewise.
2086         * src/path.c (path_search): Likewise.
2088         * doc/m4.texinfo: Fix usage of a vs. an.
2089         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2090         overfull hbox warnings.
2091         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2093         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
2094         quoting.
2095         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2096         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2097         assume C89.
2098         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2099         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2100         * src/Makefile.in: Delete remains of ansi2knr.
2101         * src/ansi2knr.1: Delete.
2102         * src/ansi2knr.c: Delete.
2104 2006-05-25  Eric Blake  <ebb9@byu.net>
2106         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
2107         `illegal'.
2109         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2110         Reported by Karl Berry.
2112 2006-05-24  Eric Blake  <ebb9@byu.net>
2114         * Makefile.in (html): New target.
2115         * doc/Makefile.in (html, m4.html): Likewise.
2116         (MAKEINFOHTML): New macro.
2117         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2118         rendering.
2119         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2120         absolute URL.
2121         Reported by Bob Badour.
2123         * THANKS: Update.  Move reporter's email addresses here, instead
2124         of in ChangeLog.
2126 2006-05-11  Eric Blake  <ebb9@byu.net>
2128         * THANKS: Update.
2129         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2130         patched on 2005-12-04.
2131         Reported by Ilya N. Golubev.
2133         * bootstrap: New file, so that generated files need not be stored
2134         in CVS.
2135         * Makefile.in (DISTFILES): Add bootstrap.
2137         Make testsuite less sensitive to doc changes.
2138         * doc/m4.texinfo: Use m4.input instead of filename.
2139         * checks/check-them (xerr): Turn m4.input into filename.
2140         * checks/Makefile.in (dist): Depend on stamp-checks.
2142         Portability updates for OS/2.
2143         * src/Makefile.in (EXEEXT, OBJEXT): Define.
2144         (LINK): Use CFLAGS.
2145         (.c.obj): Define.
2146         * lib/Makefile.in (OBJEXT): Define.
2147         (.c.obj): Define.
2148         * doc/Makefile.in (install, uninstall): Install info files into
2149         the dir listing.
2150         Reported by Andreas Buening.
2152 2006-05-09  Eric Blake  <ebb9@byu.net>
2154         * install-sh: Update to newer upstream version.
2155         * mkinstalldirs: Likewise.
2156         Reported by Andreas Buening.
2158         * src/m4.c (main): Bump copyright year.
2159         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2160         * doc/Makefile.in (datarootdir): Likewise.
2162 2006-05-08  Eric Blake  <ebb9@byu.net>
2164         * THANKS: Update.
2165         * doc/m4.texinfo (Bugs): Backport bug email address from head.
2166         Reported by Stepan Kasal.
2168 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
2170         * input.c (match_input): Do not pass expression with side effect
2171         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
2172         * NEWS: Updated.
2174 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2176         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2177         Reported by Damian Menscher.
2179 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2181         * configure.ac (AC_INIT): Bump to 1.4.4a.
2183 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2185         Release 1.4.4:
2186         * configure.ac (AC_INIT): Bump to 1.4.4.
2187         * NEWS: Describe 1.4.4's changes.
2188         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2190 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2192         * src/m4.c: fix return code when non-existent files are processed
2194 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2196         * README: update email address for bug reports.
2198 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2200         * doc/m4.info: Generated files are not kept in the repository.
2202 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2204         The FSF are moving offices today.  Changed their contact address
2205         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2206         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2208         Also, some of the files here were never updated from the previous
2209         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2210         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2212 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2214         * Makefile.in (bindir, infodir): Substitute from configure rather
2215         than hardcode.
2216         * doc/Makefile.in (infodir): Ditto.
2217         * src/Makefile.in (bindir): Ditto.
2218         * NEWS: Updated.
2220 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2222         Changes needed to automate the release process for 1.4.3:
2224         * Makefile.in (dist): Make .tar.bz2 tarball too.
2225         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2226         (cvs-news): Look 1 line further down for NEWS release number.
2227         (cvs-dist): We don't use automake, so make dist is fine.
2228         Remove double . before suffixes.
2229         (cvs-release): Don't mention manual.html.
2230         (fetch): Get latest gendocs files.
2231         (web-manual): Rewritten to use gendoc for multiformat manuals.
2232         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2233         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2234         preserving, but case insensitive, so generating html docs per node
2235         clashes between Index.html, the node file, and index.html, the
2236         top-level of the document tree...
2237         (Index macro): ...so renamed to this.  Changed all references.
2239 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2241         * configure.ac (AC_INIT): Bump to 1.4.3a.
2243 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2245         Release 1.4.3:
2246         * configure.in (AC_INIT): Bump to 1.4.3.
2247         * NEWS: Describe 1.4.3's changes.
2249 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2251         * Makefile.maint: New file with release rules, from CVS libtool.
2252         * Makefile.in (DISTFILES): Add Makefile.maint.
2253         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2254         canonical versions.
2256 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2258         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2259         checks/47.patsubst, with a redundant @comment to prevent emacs
2260         from removing it accidentally again.
2261         * checks/get-them: Allow for trailing spaces tucked behind
2262         @comment marks.
2264 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2266         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2267         * src/Makefile.in (install, uninstall): Likewise.
2269 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2271         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2272         on Cygwin.
2273         Reported by Eric Blake.
2275 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2277         * lib/regex.c, lib/regex.h: Updated from gnulib.
2278         * src/input.c (set_word_regexp):  Don't change the word_regexp
2279         unless it compiles correctly.
2280         * NEWS: Updated.
2281         Reported by Frank Schwidom.
2283         * Makefile.in (stamp-h): Regenerate config.h properly.
2285 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2287         * configure.ac (AC_DEFINE): Fix overquoting of description
2288         argument.
2290         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2291         recognition macros.
2292         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2293         on Windows, so that the frozen file reader will work.
2294         Reported by Josef T. Burger.
2296         * src/m4.c (main): Modernise the --version output.
2298 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2300         Modernise the configury a little to prevent spurious errors from
2301         Autoconf-2.59's autoreconf:
2303         * config.h.in: Renamed to...
2304         * config-h.in: ...this to better support DOS 8.3 file systems.
2305         * acconfig.h: Removed.
2306         * configure.in: Renamed to...
2307         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2308         entry comments.  Slight reorganisation and reformatting.
2309         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2310         entry comments.
2311         (AC_INIT): Use a modern 3 argument call.
2312         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2313         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2314         s/PRODUCT/PACKAGE/g.
2315         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2316         config.h.in.  Added configure.ac, config-h.in.
2317         (stamp-h.in): Removed acconfig.h from dependencies.
2318         (configure): Depends on configure.ac, not configure.in.
2319         * doc/Makefile.in (stamp-vti): Ditto.
2320         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2321         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2322         * configure: Regenerated.
2324 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2326         * src/output.c (mkstemp): Make non-static, and build regardless of
2327         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2328         * NEWS: Update.
2330 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2332         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2333         changes from your editor buffer first.
2335         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2336         * src/m4.c: And include them as appropriate.
2337         * NEWS: Updated.
2339 2004-09-09  Andreas Schwab  <schwab@suse.de>
2341         Refactoring of the string read case in next_char provides about a
2342         20% speedup of M4 as typically used by autoconf:
2344         * src/input.c (next_char_1): Renamed from next_char.
2345         (next_char): New macro.
2346         * NEWS: Updated.
2348 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2350         * configure.in (VERSION): Bump to 1.4.2a.
2352 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2354         Release 1.4.2.
2355         * configure.in (VERSION): Bump to 1.4.2.
2356         * News: Describe 1.4.2's changes.
2358         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2359         relies on this.
2360         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2361         (m4_maketemp): Clear errno before calling mkstemp.
2362         * src/path.c (path_search): Don't let "free" trash errno when
2363         returning NULL.
2364         * src/output.c (insert_file): Don't assume errno has a valid
2365         value simply because fread returns zero.  This fixes a
2366         portability bug reported by Marion Hakanson in
2367         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2369 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2371         * configure.in (VERSION): Bump to 1.4.1a.
2372         * NEWS: Place holder for next stable release.
2374 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2376         Release 1.4.1.
2377         * configure.in (VERSION): Bump to 1.4.1.
2378         * NEWS: Describe 1.4.1's changes.
2380         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2381         pacify Autoconf 2.59.
2383         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2384         to pacify Texinfo 4.7.
2385         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2387         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2388         pacify Sun C compilers.
2390 2003-09-28  Akim Demaille  <akim@epita.fr>
2392         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2393         botch.
2395 2003-09-03  Santiago Vila  <sanvila@debian.org>
2397         * examples/stackovf.sh: Use tempfile if available.
2399 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2401         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2402         * src/output.c (m4_insert_file): Do not mix buffered and
2403         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2405 2001-02-01  Santiago Vila  <sanvila@debian.org>
2407         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2408         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2410 2001-02-01  Matt Kraai  <kraai@debian.org>
2412         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2413         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2414         empty file rather than to a nonexistent file.  This closes a common
2415         security hole.
2416         * src/builtin.c (m4_maketemp): Implement the above, by using
2417         mkstemp rather than mktemp.  (trivial change)
2419 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2421         * src/builtin.c (expand_ranges): Added break after trailing dash.
2422         This caused misbehaviors on some systems.
2424 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2426         Release 1.4.
2427         * doc/Makefile.in (realclean): Also remove stamp-vti.
2428         Reported by Eric Backus.
2430 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2432         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2433         be opened, return immediately after producing the error message.
2434         Reported by Andreas Schwab.
2436         * configure.in: Check for const only after having found possible
2437         ANSIfying compiler flags, this is of no use to check it before.
2438         Reported by Alexander Lehmann.
2440 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2442         * src/macro.c (collect_arguments): Cast obstack arguments to
2443         (voidstar), so avoiding compiler warnings.
2444         Reported by Joseph E. Sacco.
2446         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2447         (int) so they correspond to %d format items.
2448         Reported by Joseph E. Sacco.
2450         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2451         * src/symtab.c (free_symbol): Idem.
2452         Reported by Karl Vogel.
2454 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2456         * Makefile.in (DISTFILES): Distribute BACKLOG.
2458         * configure.in: Define PRODUCT and VERSION.
2459         * acconfig.h: Document PRODUCT and VERSION.
2460         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2461         constant string m4 and variable or parameter named version.
2463 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2465         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2466         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2467         defines __STDC__ to 0, for indicating it is *not* ANSI!
2468         Reported by Kaveh R. Ghazi.
2470         * configure.in: Added obsolescent tests for AIX and Minix.
2472         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2473         which texclean does not exist anymore.
2474         Reported by Eric Backus, Jim Meyering, John David Anglin and
2475         Joseph E. Sacco.
2477 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2479         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2480         Reported by John David Anglin.
2482         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2483         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2484         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2485         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2486         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2487         of $U, put underline in extensions rather than in basenames.  Use
2488         implicit rules, now that regularity makes this possible.
2489         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2490         of ansi2knr whenever it is needed.
2491         * configure.in: Adjusted for correct STACKOVF substitution.
2492         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2493         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2494         Reported by David MacKenzie.
2496         * Makefile.in: Remove binprefix.  Use transform_name instead.
2497         Reported by David MacKenzie.
2499         * doc/Makefile.in: Create version.texi, use it, clean it.
2500         Reported by Jim Meyering.
2502 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2504         * Makefile.in (all, install, uninstall): Depend on Makefile.
2506         * Makefile.in: For actions invoking $(MAKE) from within compound
2507         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2508         the top-level make may exit successfully when it should fail.
2509         Reported by Jim Kingdon.
2511         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2513         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2514         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2515         * configure.in: Substitute PRODUCT and VERSION.
2517         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
2519 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
2521         * Makefile.in (mostlyclean-local): Do not remove *~.
2522         * */Makefile.in (mostlyclean): Idem.
2523         Reported by Robert E. Brown and Richard Stallman.
2525 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
2527         * src/m4.h: Get rid of CONFIG_BROKETS.
2529 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
2531         * configure.in: Use AC_ARG_PROGRAM.
2532         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
2533         Reported by David MacKenzie.
2535 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
2537         * configure.in: Do not add -O to CFLAGS for GNU C, now that
2538         configure does it automatically.
2539         Reported by Jim Meyering.
2541 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
2543         * src/stackovf.c: Declare the handler_t typedef earlier in the
2544         code, use it for stackovf_handler.
2545         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2546         casting sigsegv_handler.
2547         Reported by Robert Bernstein.
2549         * src/m4.c (main): Initialize program_name to argv[0] without
2550         basename'ing it.
2551         Reported by Karl Berry.
2553 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
2555         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2556         Reported by Karl Berry.
2558 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
2560         * lib/Makefile.in (mostlyclean): Added.
2561         (TAGS): Make in $(srcdir).
2563         * configure.in: Use `choke me' in test, like everywhere!
2565         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2566         unreacheable and useless.
2568         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2570         * lib/Makefile.in (DISTFILES): Distribute TAGS.
2571         (distclean): Do not remove TAGS.
2572         (realclean): Remove it.
2573         * Makefile.in: Make TAGS in lib also, not just in src.
2574         Reported by Karl Berry.
2576         * Makefile.in (distclean, realclean): Instead of recursively
2577         calling $(MAKE) for the -local part, allow parallel execution of
2578         -recursive and -local, only delay the removal of config.status,
2579         which is repeated in both goals.
2581 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
2583         Release 1.3.
2584         * Makefile.in: Group all *clean-recursive goals in one, using sed
2585         to remove `-recursive' while calling make recursively.  Also, use
2586         a subshell for each recursive $(MAKE).
2587         Reported by Jim Meyering.
2589         * src/m4.h (memcpy): Define with bcopy for BSD systems.
2590         Reported by Kaveh R. Ghazi.
2592         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2593         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2594         specify it.
2596         * configure.in: Use date instead of touch for stamp-h.
2597         * Makefile.in (stamp-h.in): Idem.
2599         * Makefile.in (distclean, realclean): Force serial execution of
2600         both goals, in case parallel makes are being used.
2601         Reported by Jim Meyering.
2603         * src/Makefile.in (DISTFILES): Distribute TAGS.
2604         (distclean): Do not remove TAGS.
2605         (realclean): Remove it.
2606         Reported by Karl Berry.
2608 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
2610         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
2611         to old names, for following Autoconf.
2613 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
2615         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2616         ./install.sh will not be correctly referred to in sub-Makefiles.
2617         Reported by John David Anglin.
2619         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2620         Reported by Eric Backus.
2622         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2623         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2624         config.status into remaking this directory's Makefile only.
2625         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2626         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2627         Reported by Jim Meyering.
2629 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2631         * configure.in: Correct stack overflow detection logic, taking
2632         care of systems having only incomplete implementations (like for
2633         Pyramid 9820 OSx 5.0d).
2634         Reported by Kaveh R. Ghazi.
2636         * src/Makefile.in (TAGS): Remote -t from etags call.
2638 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2640         * lib/Makefile.in (install): Depend on all.
2642 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2644         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2645         Reported by Jim Meyering and John David Anglin.
2647         * Makefile.in (distclean-local): Delete config.log.
2648         Reported by Jim Meyering.
2650         Solidify frozen files with respect to -P:
2651         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2652         calling a function by that name.  Declare the variable.
2653         * src/m4.h: Adjust declaration for prefix_all_buitins.
2654         * src/builtin.c (builtin_init): Merge in functionality from
2655         previous prefix_all_buitins function, while making entries in the
2656         symbol table, but not modifying the builtin description itself.
2658         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2659         because *many* compilers do not accept an empty `default:'.
2660         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2661         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2663         * configure.in: Use AC_TYPE_SIGNAL.
2664         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2665         Reported by Robert Bernstein.
2667         * checks/Makefile.in (check): Modify PATH so check-them will find
2668         m4 in the src directory.
2669         * Makefile.in (check): Don't.
2670         Reported by Akiko Matsushita and Jim Meyering.
2672         * src/output.c (make_room_for, output_character_helper): New
2673         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2674         a per buffer MAXIMUM_BUFFER_SIZE.
2676         * src/output.c (output_text): New function, for optimizing the
2677         output of strings of characters.  Use it.
2679 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2681         * doc, src: New directories reorganizing the distribution.
2682         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2683         files.
2684         * Makefile.in: Adjusted.
2685         * configure.in: Configure new Makefiles.
2687         * m4.h: Declare STRING typedef.  Use it for comment and quote
2688         strings, adjusting all references.  (This is the rudiments of a
2689         beginning for the eventual withdrawal of NUL terminated strings.)
2690         * output.c (shipout_text): Accept a length parameter, and use it.
2691         All callers adjusted.
2693 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2695         * m4.h: Include <unistd.h> if it exists.
2696         * stackovf.c: Don't.
2698         Clean up for current_diversion variable:
2699         * output.c: Move current_diversion from builtin.c.
2700         * m4.h: Declare current_diversion so builtin.c can access it.
2701         * output.c (output_init, make_diversion): Initialize or update
2702         current_diversion.
2703         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2704         alone.
2706         Remove limit on number of diversions:
2707         * output.c: Replace ndiversion by diversions, declare it.
2708         (output_init): Allocate only diversion 0.
2709         (make_diversion): Allocate new diversions as needed.
2710         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2711         * m4.c: Still accept -N, but do nothing with it.
2712         Reported by David MacKenzie.
2714         Freeze diversions:
2715         * output.c (freeze_diversions): New function.
2716         * m4.h: Declare freeze_diversions.
2717         * freeze.c: Document frozen file format, revise it, call
2718         freeze_diversions to add diversions to frozen format, and code to
2719         reload them properly.
2720         * m4.c: Do not undivert automatically at end when status being
2721         frozen.  Do not call builtin_init when reloading frozen state.
2723         Speed up diversion processing:
2724         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2725         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2726         structure and variables, cached variables out of output_diversion,
2727         reallocate_diversion_for and OUTPUT_CHARACTER.
2728         (shipout_text, make_diversion, insert_diversion): Adapted to new
2729         structures.
2730         (insert_file): Use better buffering.
2731         Reported by David MacKenzie.
2733 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2735         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2736         dist works from another build directory.
2738 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2740         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2741         constant HASHMAX, for -H option to work better.
2743         * builtin.c (DECLARE): Simplify by using _ ().
2745         * freeze.c: New file.
2746         * Makefile.in: Compile it, distribute it.
2747         * m4.c: Recognize, document and process --freeze-state (-F) and
2748         --reload-state (-R) options.  Pass a true flag to builtin_init
2749         only if no reloading some state.
2750         * builtin.c (define_builtin): Remove static specifier.
2751         (find_builtin_by_name): Remove static specifier.
2752         (builtin_init): Accept and obey a flag argument.
2753         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2755 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2757         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2758         specifier.
2760         * configure.in: Implement --with-dmalloc.
2761         * acconfig.h: Document WITH_DMALLOC.
2762         * m4.h: Add code for when WITH_DMALLOC.
2764 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2766         * m4.c (long_options): Use "error-output", the dash was missing.
2767         Reported by Akiko Matsushita.
2769 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2771         * m4.h: Include <sys/types.h>.
2772         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2773         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2774         int.
2775         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2776         as size_t, not int.
2777         * builtin.c (dump_args): Declare len as size_t, not int.
2779         * debug.c: Prototype the forward declaration of debug_set_file.
2781         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2782         shadowing of this variable.
2783         * output.c (insert_diversion): Idem.
2785         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2786         (input_init): Duplicate default quote and comment strings.
2787         (set_quotes): Free previous quote strings in all cases.  Duplicate
2788         even default quote strings.
2789         (set_comment): Free previous comment strings in all cases.
2790         Duplicate even default comment strings.
2792         * configure.in: Updated for Autoconf 2.0.
2793         * Makefile.in (distclean-local): Also delete config.cache.
2795         * m4.c (usage): Reorganize the --help output by topic.  Include a
2796         description for debugging flags.
2798 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2800         * configure.in: If sigaction is available and SA_ONSTACK defined,
2801         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2802         defined, use sigvec.  Else don't compile stackovf.c.
2803         * stackovf.c (setup_stackovf_trap): Idem.
2804         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2805         and Simon Leinen.
2807 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2809         * m4.c (usage): Replace printf par fputs.
2811 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2813         * Release 1.2
2815 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2817         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2818         check for RLIMIT_STACK, combine in the checking for getrlimit.
2819         All those things are not universally available.
2820         * stackovf.c: Split setting up the trap handler and catching
2821         signals, for better taking care of various configure outcomes.
2822         * examples/stackovf.sh: Correct a typo.
2823         Reported by Eric Backus, Jim Avera and Jim Meyering.
2825 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2827         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2829 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2831         * Makefile.in: Modify so parallel make will not try making
2832         lib/libm4.a twice simultaneously.
2833         Reported by Jim Meyering.
2835 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2837         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2838         error message, for when no code possibility exists.  Even if this
2839         line is completely #ifdef'ed out, it brings a syntax error.
2840         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2842         * Makefile.in (install): Have install depend on all too, for lib
2843         to be remade as needed.
2845         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2846         providing ulimit, instead of using only ksh.
2847         Reported by Jim Avera and Joseph E. Sacco.
2849 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2851         * Makefile.in (check): Have it depend on all instead of m4.  In
2852         this way, a change in lib will be detected and processed.
2854         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2855         instead of using sscanf which stops as soon as there is a
2856         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2857         and divert(1xyzzy) were all accepted without any warning or error
2858         messages.
2859         * m4.h: Declare strtol as long if not including stdlib.h.
2860         * configure.in: Check for limits.h, and replace strtol if missing.
2861         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2862         * lib/strtol.c: New file, from elsewhere.
2863         Reported by Andreas Schwab.
2865 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2867         * macro.c (expand_macro): Cast value to (boolean) prior to
2868         assigning it to traced.
2869         Reported by Tom McConnell.
2871         * Makefile.in (m4): Always make all in lib first.
2872         Reported by Jim Meyering.
2874 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2876         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2877         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2878         handlers), and a default error message if the fault address is not
2879         available (when neither siginfo.h nor BSD sigcontext are supported).
2880         * configure.in: Changes for stackovf.h: Check for sigcontext,
2881         sigaction, sigstack, and define rlim_t as int if necessary.
2882         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2883         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2884         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2886 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2888         * configure.in: Use AC_SET_MAKE.
2889         * Makefile.in: Use @SET_MAKE@.
2890         Reported by Jim Meyering.
2892         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2893         Reported by Ian Taylor.
2895 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2897         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2898         because siginfo.h is unrelated to standard headers, and siginfo.h
2899         is already checked for.
2900         Reported by Joseph E. Sacco.
2902         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2903         PROTOTYPES.
2904         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2905         AC_PROTOTYPES.
2907 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2909         * builtin.c (substitute): Use \& to represent this part of the
2910         string which was matched by the whole regexp, instead of
2911         representing the whole string.  Any usage of \0 issues a warning
2912         and acts like \&, it will disappear in some subsequent release.
2914 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2916         * m4.c: Complete prototype for forwarded declaration of usage.
2918         * input.c (init_macro_token): Correct own reference in error
2919         message.  Previous name get_macro_func was referred to instead.
2920         (next_char):  Correct own reference in error message.  Previous
2921         name advance_input was referred to instead.
2923         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2924         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2925         and_term, not_term, logical_not_term, cmp_term, shift_term,
2926         add_term, mult_term, exp_term, unary_term, simple_term): Add
2927         prototype to forwarded declarations.  Declare parameter v1 as
2928         eval_t * instead of int *.  Same for local variable v2 in dyadic
2929         functions.  Same for result in exp_term.
2930         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2931         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2932         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2933         (shipout_int): Cast first argument of ntoa to eval_t.
2934         Reported by Thorsten Ohl.
2936         * macro.c: Complete the prototypes of forwarded expand_macro and
2937         expand_token.
2938         Reported by Thorsten Ohl.
2940         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2941         The Ultrix 3.1 compiler cannot do much with void pointers.
2943         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2944         * m4.c (xfree):  Replace void * by voidstar.
2945         Reported by Tom McConnell.
2947         * ansi2knr.1: New, from elsewhere.
2948         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2950         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2951         stamp-h does not exist yet.  This avoids running it a second time
2952         just after the initial ./configure.
2953         Reported by David MacKenzie and Tom McConnell.
2955         * m4.h: Replace the enum debug_info declaration with a series of
2956         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2957         (int) to most references, when used in expressions.
2958         Reported by Tom McConnell.
2960 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2962         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2963         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2964         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2965         the preprocessor; by not being subject to CFLAGS, this was
2966         discouraging those flags asking for ANSI compilation.
2967         * acconfig.h: Document HAVE_PROTOTYPES.
2968         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2969         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2970         Reported by Eric Backus.
2972         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2973         from the environment.  Default CFLAGS to -g if not set.
2974         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2975         * lib/Makefile.in: Have CFLAGS substituted from configure.
2976         Reported by Eric Backus and Tom McConnell.
2978         * configure.in: m4_undefine changeword before using AC_ENABLE.
2980         * m4.h: Declare prototypes for error (for ANSI compilers only),
2981         prefix_all_builtins and reference_error.
2982         Reported by Tom McConnell.
2984         * input.c (set_word_regexp): Do not try to initialize the array
2985         test from a string, this does not work with non-ANSI compilers.
2986         Reported by Eric Backus.
2988         * Makefile.in (dist): Clean examples/ before saving it.
2989         (distclean-local): Also remove stamp-h.
2990         Reported by Eric Backus.
2992         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2993         non ANSI compilers.
2994         Reported by Tom McConnell.
2996         * checks/Makefile.in (clean): Depends on mostlyclean.
2997         (mostlyclean): New goal.
2999 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
3001         * Makefile.in (DISTFILES): Distribute install.sh.
3002         * install.sh: New file, copied from elsewhere.
3003         Reported by Assar Westerlund and Kaveh R. Ghazi.
3005 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
3007         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
3008         * acconfig.h: Explain ENABLE_CHANGEWORD.
3010         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
3011         from code provided by Pete Chown]
3012         * m4.h: Add original_text field to u_t variant of union u.
3013         Declare TOKEN_DATA_FUNC macro.
3014         * builtin.c: Declare changeword.
3015         (m4_changeword): New function.
3016         * input.c: Include "regex.h", define variables with word regexps.
3017         (input_init): Initialize the word regexp.
3018         (set_word_regexp): New.
3019         (next_token): Declare local variables, use the previous code if
3020         default_word_regexp is true.  Else, match using a new code.  Save
3021         the original text.
3022         * macro.c (expand_token): Ship out original text if not a macro
3023         name.
3024         Reported by Krste Asanovic and Pete Chown.
3026         [These modifs all depend upon ENABLE_CHANGEWORD]
3027         * m4.h: Declare external user_word_regexp.
3028         * m4.c: Declare user_word_regexp, and initialize it from
3029         --word-regexp or -W, or NULL if not specified.
3030         * input.c: Use user_word_regexp if specified, instead of
3031         DEFAULT_WORD_REGEXP.
3033         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
3034         agree with it.
3036         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
3037         * checks/Makefile.in: Empty the suffix list.
3038         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
3040         * m4.c: Declare nesting_limit and initialize it to 250.
3041         Implement -LNUMBER or --nesting-limit=NUMBER to change its
3042         value.
3043         * m4.h: Declare nesting_limit as external.
3044         * macro.c (expand_macro): Stop execution whenever nesting limit
3045         is exceeded.
3046         Reported by Bengt Mertensson.
3048         * eval.c (evaluate): Diagnose excess characters in eval input.
3049         Things like `eval(08)' used to return 0 with no diagnostic.
3051         * m4.h: Capitalize first letter of all macro arguments in
3052         definitions.
3054         * m4.c: Declare warning_status, initialize it to 0.  Add new
3055         option -E, or --fatal-warnings, which sets warning_status to
3056         EXIT_FAILURE instead.
3057         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
3058         EXIT_FAILURE if not otherwise done by header files.
3059         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3060         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3061         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3062         argument of all M4ERROR calls.
3063         Reported by Noah Friedman.
3065         * examples/incl-test.m4: Renamed from incl_test.m4.
3066         * examples/include.m4: Include incl-test.m4 instead of
3067         incl_test.m4.
3068         * examples/multiquotes.m4: Renamed from multi-quotes.m.
3070 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
3072         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
3073         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3074         also tested it on a Sun Sparc workstation running SunOS 4.x.
3076         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3077         49.format check, abusing a `union values' argument with sprintf
3078         without selecting the proper field.  Now, save the formatting type
3079         first, delaying the fetch of the corresponding argument.
3080         Reported by Joseph E. Sacco and Tom Quinn.
3082         * format.c (format): Remove const from char *fmt declaration when
3083         not HAVE_EFGCVT, because a NUL may be forced into it.
3085         * m4.h: Declare atof() when not STDC_HEADERS.
3086         Reported by Joseph E. Sacco.
3088         * Regenerate configure using Autoconf 1.11, this corrects a
3089         problem about an incorrect cpp seting on NeXT 3.1.
3090         Reported by Alexander Lehmann.
3092 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
3094         * m4.h (_): Change argument from `x' to `Args'.
3096 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
3098         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3099         bringing more evil than good on a few systems.
3100         Reported by Greg A. Woods.
3102 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
3104         * m4.h: Rename Args() to _().
3105         * m4.h: Remove extern specifier from all function declarations.
3107 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
3109         * stackovf.c: New file implementing stack-overflow detection.
3110         * configure.in: Check for getrlimit, sigaction.  If all of
3111         standard headers, getrlimit and sigaction, define USE_STACKOVF and
3112         substitute ${U}stackovf.o for STACKOVF.
3113         * acconfig.h: Declare USE_STACKOVF.
3114         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3115         * m4.h: Declare setup_stackovf_trap().
3116         * m4.c: Call setup_stackovf_trap().
3117         * tests/stackovf_test.sh: New file.
3119 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
3121         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3123         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3125 Sun Jan 30 14:24:19 1994    (pinard at icule)
3127         * m4.h: Remove definition of volatile, not used anymore.
3128         Reported by Jim Meyering and Joseph E. Sacco.
3130         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3131         of `if ... else /* nothing */' for if macros.
3132         Reported by Jim Meyering.
3134         * builtin.c (m4_regexp): Reorganize the code for avoiding a
3135         warning from gcc about `repl' possibly used before defined.
3136         Reported by Jim Meyering.
3138         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3139         Reported by Jim Meyering.
3141 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
3143         * m4.h: Move the conditional definition of volatile after the
3144         inclusion of system files, because they may define it first.
3146 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
3148         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3149         get around a problem with Alpha make seeing a syntax error, there.
3150         Reported by Vern Paxson.
3152 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
3154         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3155         Reported by Richard Stallman.
3157 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
3159         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3160         instead of AC_HAVE_FUNCS.
3161         Reported by Noah Friedman.
3163 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
3165         * m4.c: Initialize show_help and show_version to zero.
3167         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3168         Use them in exit() and usage() calls.
3170 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
3172         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3173         syserr() macro.  Delete errref, add reference_error and M4ERROR.
3174         * m4.c: Replace errref, which was returning an input reference
3175         string, with reference_error, which prints it on standard error.
3176         * builtin.c, output.c: Use errno as second parameter to error,
3177         instead of using syserr() with %s.
3178         * *.c: Use M4ERROR instead of error: no more errref() with %s.
3179         Doing so, the program name appears after the input reference
3180         instead of before, which eases M-x next-error processing.
3182 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
3184         * checks/get-them: Escape braces with backslashes in patterns,
3185         because HPUX-9.01 awk needs this.
3186         Reported by Jim Meyering.
3188 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
3190         * builtin.c: Declare "FILE *popen ();".
3192         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3193         macros, replace error_message_prefix() declaration by errref()'s.
3194         Declare xrealloc, for use in errref().
3195         * m4.c: Delete error_message_prefix() function, add errref().
3196         * *.c: Use error() systematically in place of all error macros,
3197         now that error() flushes stdout first.  Make needed adjustments.
3199         * m4.h: Remove const in sys_errlist[] declaration, it creates
3200         conflicts on SGI and Alpha.
3201         Reported by Kaveh R. Ghazi.
3203 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3205         * m4.c: Include <getopt.h> instead of "getopt.h".
3207         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3208         * acconfig.h: New, for documenting HAVE_EFGCVT.
3209         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3210         use them wherever appropriate.  Also use -I. for compilations.
3211         * lib/Makefile.in: Use -I.. for compilations.
3212         * *.c: Include <config.h> or "config.h".
3214         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3215         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3217 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3219         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3221         * input.c (input_init): Initialize quote and comment strings
3222         explicitely instead of calling set_quotes and set_comment: by
3223         doing so, we ensure we do not free uninitialized variables.
3225         * checks/check-them: Reverse arguments to both diff, so the
3226         expected is on the left and the obtained on the right.
3228         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3229         macros. Delete declarations for m4error, warning, fatal and
3230         internal_error, add declaration for error_message_prefix.
3231         * m4.c:  Delete m4error, warning, fatal and internal_error
3232         routines, add error_message_prefix routine.
3233         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3234         warning with WARNING*, fatal with FATAL* and internal_error with
3235         INTERNAL_ERROR*.
3236         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3237         this is not needed anymore.
3239         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3240         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3241         and debug_message, add declaration for debug_message_prefix.
3242         * debug.c: Remove static specifier for FILE *debug declaration.
3243         Delete debug_print and debug_message routines, add
3244         debug_message_prefix routine.
3245         * builtin.c, debug.c: Replace debug_print routine calls with
3246         DEBUG_PRINT* macro calls.
3247         * input.c, path.c: Replace debug_message routine calls with
3248         DEBUG_MESSAGE* macro calls.
3250         * m4.h: Remove inclusion of <varargs.h>.
3251         * debug.c: Include <stdarg.h> or <varargs.h>.
3252         (trace_format): Use stdarg instead of varargs if __STDC__.
3254         * configure.in: Remove checks for vfprintf and _doprnt.  These
3255         implementations use varargs tricks which are not portable enough.
3256         * lib/vfprintf.c: Deleted.
3257         * lib/_doprnt.c: Deleted.
3258         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3259         Reported by Joel Sherrill.
3261         * path.c (add_include_directory): Use xstrdup.
3263         * builtin.c (find_builtin_by_name): Declare static.
3265         * *.[ch]: Add const to a few "char *" declarations.
3267         * configure.in: Remove commented tests for fileno() and fstat().
3268         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3270         * debug.c (debug_flush_files): New.
3271         * m4.h: Declares it.
3272         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3273         Reported by Nicolas Pioch.
3275 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3277         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3278         Reported by Joel Sherrill.
3280         * builtin.c (prefix_all_builtins): Instead of the table size, use
3281         the null entry at end for stopping the loop.  It was overwritten.
3282         Reported by Andreas Schwab and Jim Meyering.
3284         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3285         Reported by Kaveh R. Ghazi.
3287         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3288         Reported by Karl Vogel.
3290 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3292         * m4.h: Do not define volatile if already defined.
3293         Reported by Rene' Seindal.
3295         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3297         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3298         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3300 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3302         * m4.h: Define strchr and strrchr in terms of index and rindex,
3303         instead of the other way around.
3304         * builtin.c, m4.c, path.c: Use strchr instead of index.
3306         * input.c (next_char): Remove a "break;" after a "return ...;".
3307         Reported by Tom McConnell.
3309 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3311         * Release 1.1
3313         * configure.in: Do not copy check files in the build hierarchy.
3314         * checks/check-them: Identify the m4 version being checked.  For
3315         finding m4, look in $PATH instead of in the parent directory.
3316         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3317         * checks/Makefile.in (.all-stamp): Always create check files in
3318         the source hierarchy, not anymore in the build hierarchy.
3319         (check): cd to the source hierarchy before performing checks.
3320         Do not copy nor clean COPYING anymore, take it from `..'.
3321         Reported by Tom McConnell.
3323         * Makefile.in (Makefile): Use $(SHELL).
3324         (config.status): Use $(SHELL).  Use "config.status --recheck"
3325         instead of "configure --no-create", which is obsolete.
3326         Reported by Tom McConnell.
3328 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3330         * m4.c (usage): Use "%s" instead of "m4" in format string.
3331         Reported by Jim Meyering.
3333         * Makefile.in: Distribute mkinstalldirs.
3334         Reported by Pierre Gaumond.
3335         Reported by Jim Meyering.
3336         Reported by Tom McConnell.
3337         Reported by Andreas Gustafsson.
3339         * checks/check-them: Renamed from checks/check_them.
3340         * checks/get-them: Renamed from checks/get_them.
3341         * checks/.all-stamp: Renamed from checks/.all_stamp.
3342         * checks/Makefile.in: Changed accordingly.
3343         Reported by Jim Meyering.
3345 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3347         * lib/Makefile.in (dist): Correct permissions on files.
3349         * output.c: Declare tmpfile, some systems don't.
3351 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3353         * checks/Makefile.in (dist): Correct permissions on files.
3355         * Makefile.in (dist): Ensure recursive linking for subdirectory
3356         `examples', also set read/write permissions on all its files.
3358         * mkinstalldirs: New, from elsewhere.
3359         * Makefile.in: Use it.
3361         * debug.c: Synchronize debug messages and regular output when
3362         the debug file and stdout are redirected to the same file.
3363         * configure.in: Add (commented) checks for fileno and fstat.
3364         Reported by Jim Avera.
3366         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3367         etc., arguments, then ignore the superfluous one.  m4 used to
3368         diagnose missing arguments and return the empty string.
3369         Reported by Nick S. Kanakakorn.
3371 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3373         * m4.c (main): At end of all input, ensure all undiverted text
3374         goes to the main output stream.
3375         Reported by Andreas Gustafsson.
3377         * m4.c (main): exit (0), instead of return 0.
3379         * m4.c: Implement -P and --prefix-builtins.
3380         * builtin.c: Delete const specifier on builtin_tab.
3381         (prefix_all_builtins): New.
3382         Reported by Noah Friedman.
3383         Reported by Scott Bartram.
3385         * c-boxes.el: New, from elsewhere.
3386         * Makefile.in: Distribute it.
3388         * m4.h: Do not define bcopy if <string.h> defines it.
3389         Reported by Stephen Perkins.
3391         * builtin.c (define_macro): Allow a missing second argument, in
3392         which case it is implied empty.  Affects define and pushdef.
3393         Reported by Eric Allman.
3395 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3397         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3398         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3399         * builtin.c: Initialize all the blindness fields in builtin_tab.
3400         (define_builtin): Copy the blindness of a builtin into its symbol.
3401         * macro.c (expand_token): Avoid processing a blind builtin if the
3402         next character is not an opening parenthesis.
3403         Reported by David MacKenzie.
3404         Reported by Noah Friedman.
3406         * configure.in: Ensure an exit status of 0 on completion.
3407         Reported by Vivek P. Singhal.
3409         * eval.c (eval_lex): Admit both lower and upper case letters for
3410         bases greater than 10.  Only lower case letters were accepted.
3412         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3413         Reported by Krste Asanovic.
3415         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3416         * eval.c (logical_not_term): New name for not_term.
3417         * eval.c (xor_term): New, between or_term and and_term.
3418         * eval.c (not_term): New, between and_term and logical_not_term.
3419         * eval.c (shift_term): New, between cmp_term and add_term.
3420         Reported by Krste Asanovic: ~, ^, <<, >>.
3421         Reported by Ben A. Mesander: ** vs ^.
3423         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3424         * m4.h: Delete xrealloc.c.
3425         * lib/xmalloc.c: New, from elsewhere.
3426         * lib/xstrdup.c: New, from elsewhere.
3427         * lib/Makefile.in: Distribute and compile them.
3429         * m4.c: Change progname to program_name.
3430         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3431         * lib/error.c: New, from elsewhere.
3432         * lib/Makefile.in: Distribute and compile error.c.
3433         * configure.in: Check AC_VPRINTF and for strerror.
3434         * m4.c: Delete cmd_error.  Use error instead.
3435         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3437         * m4.h: Delete #define const, let Autoconf takes care of this.
3439         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3440         Merge parse_args into main.  Declare argv to be `char *const *',
3441         then remove superfluous casts.
3443         * m4.c: Rename --no-gnu-extensions to --traditional.
3444         Reported by Ben A. Mesander.
3446         * m4.c (usage): Add a status parameter.  Supply one in various
3447         calls.  Add --help processing.  Remove -V for --version.
3449         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3451         * lib/Makefile.in: Have an AR=ar declaration.
3452         Reported by Eric Backus.
3453         Reported by Bjorn R. Bjornsson.
3454         Reported by Tom Tromey.
3455         Reported by Kristine Lund.
3456         Reported by Marion Hakanson.
3458 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3460         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3461         Reported by Noah Friedman.
3463 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3465         * Makefile.in: Remove MDEFINES and cleanup.
3467 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3469         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3470         Create a gzip file.
3472 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3474         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3475         ensure 777 mode for directories, so older tar's will restore file
3476         modes properly.
3478 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3480         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3481         so the installer can override automatically configured choices.
3482         Reported by Karl Berry.
3484 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3486         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3487         previous version was not working properly on m68k-hp-bsd4.3.
3488         Reported by Roland McGrath.
3490         * lib/_doprnt.c: Stolen from Oleo distribution.
3491         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3492         * lib/Makefile.in: Distribute _doprnt.c.
3493         Do not distribute regex.[ch].old anymore.
3495 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3497         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3498         Richard wants it there.
3500 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3502         * Makefile.in: Add DEFS to MDEFINES.
3503         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3504         (libm4.a): Remove the library before creating it.
3505         (distclean): Remove tags and TAGS too.
3507 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3509         * Makefile.in (dvi, m4.dvi): New goals.
3511         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3512         macro.c, output.c, path.c, symtab.c: Change Copyright from
3513         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3515         * examples/divert.m4: Deleted, this bug has been corrected.
3517         * Makefile.in (texclean, mostlyclean): New goals.
3519         * Makefile.in (clean): Remove clutter from ansi2knr.
3520         Reported by Pierre Gaumond.
3521         Reported by Greg A. Woods.
3523 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
3525         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
3526         might well use CFLAGS is s/he needs it.
3528         * Makefile.in: Allow installation of info files from a separate
3529         build directory.
3530         Reported by Jason Merrill.
3531         Reported by David MacKenzie.
3532         Reported by Skip Montanaro.
3533         Reported by Erez Zadok.
3534         Reported by Assar Westerlund.
3536 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
3538         * Release 1.0.3
3539         This is still a beta release for the future GNU m4 version 1.1.
3541         * lib/alloca.c: New, from elsewhere.
3542         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
3544         * m4.h: Do not define index/rindex if already defined.  If
3545         FALSE/TRUE are already defined, do not redefine them, but merely
3546         define boolean typedef to int.
3548         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3549         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3550         because some C compilers do not like connectives with #ifdef.
3551         * m4.h: Define `volatile' only if __GNUC__, instead of once for
3552         __GNUC__ and once for __STDC__.
3553         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3555         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3556         Makefile dependencies.  Without it, make keeps destroying and
3557         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
3559         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3560         to diversion/DIVERSION, this was a spelling error.
3562         * m4.c: Declare version[], remove #include "version.h".
3563         * version.h: Deleted.
3564         * Makefile.in: Remove references to version.h.
3566         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3567         production, by using a simpler and more robust algorithm.  This
3568         solves the problem of synclines sometimes written in the middle of
3569         an output line.  Delete sync_line() and output_lines variable.
3570         * m4.h: Remove sync_line prototype and output_lines declaration.
3571         * input.c (next_char), output.c (shipout_text): Remove references
3572         to output_lines.
3573         * input.c (push_file, pop_file): Merely put the value -1 in
3574         output_current_line instead of calling sync_line, for delaying a
3575         single `#line NUM FILE' before next output line.  Do not test
3576         for sync_output, because this is unnecessary clutter.
3577         * output.c (make_divertion, insert_divertion): Idem.
3578         * input.c: Rename must_advance_line to start_of_input_line, for
3579         consistency.
3581         * debug.c (trace_header): Select a new debug line format, which
3582         better complies with GNU standards for formatting error messages.
3583         With option `-dfl', M-x next-error might be used on the output.
3584         * m4.c (vmesg): Adjust format of error output to GNU standards.
3585         * m4.texinfo: Adjust examples for `make check' to work.
3587         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3588         case for enum debug_info constants, which were all lower case.
3590         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3591         re_search_2.
3592         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3593         collected patches.  I tried a few times using newer regex.[ch], it
3594         mysteriously stopped aborting with this one.  Insecure feeling...
3595         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3597 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
3599         * m4.c: Change `--no-warnings' to `--silent'.
3600         Reported by David MacKenzie.
3602         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3603         leave it off for now.  See comment in m4.c for justification.
3604         Reported by David MacKenzie.
3606         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3607         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3609         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
3611         * Makefile.in: Ensure recursive cleaning is done before local
3612         cleaning for all clean goals.
3614         * builtin.c (ntoa): Ensure the value is always interpreted as a
3615         signed quantity, whatever the radix is.
3617 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
3619         * builtin.c, format.c, input.c: Split long lines.
3620         * m4.c: Use typedef macro_definition instead of struct
3621         macro_definition.
3622         * symtab.c: Use typedef symbol instead of struct symbol.
3624 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
3626         * *.[ch]: Remove all trailing whitespace, in code and comments.
3628         * configure.in: Find some awk.
3629         * Makefile.in: Add $(AWK) to MDEFINES.
3630         * checks/Makefile.in: Transmit $(AWK) to get_them.
3631         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3632         awk script when switching files, because without this, mawk runs
3633         out of file descriptors.
3635 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3637         * Makefile.in (realclean): Delete m4.info*.
3638         Reported by Jim Meyering.
3640         * Makefile.in: Adjust and link with checks/Makefile.
3641         * checks/Makefile.in: New.
3642         * configure.in: Output checks/Makefile.
3644         * checks/get_them: Have the dnl header of each test more
3645         recognizable by next-error, also use a better message.
3647 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3649         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3650         And use that only if __GNUC__ since we're using it's GCC-specific
3651         semantics that tell the compiler the associated function doesn't
3652         return.
3654         * builtin.c (substitute): Don't use character as an array index.
3655         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3656         warnings with gcc -W -Wall on systems with qsort prototype.
3657         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3658         from gcc -W -Wall.
3660         * eval.c (most functions): Add parentheses to assignments used
3661         as truth values go avoid warnings from gcc -Wall.
3663         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3664         any functions that don't need external scope.
3666         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3667         (many functions and arrays): Declare `const'.
3669 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3671         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3672         removing the declaration from m4.h.  Also rename false to FALSE
3673         and true to TRUE.
3675         * lib/Makefile.in (Makefile): New goal.
3677         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3678         so heavily loaded.  It gets more easily overridable, calling make.
3679         Reported by Jim Meyering.
3681         * Makefile.in (dist): Get .fname from the current directory name,
3682         instead of from version.h.  I need updating many files manually,
3683         when the version changes, version.h is just one of them.
3685 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3687         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3688         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3689         Reported by Tom McConnell.
3691 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3693         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3694         39.cleardiv, which were describing missing or spurious newlines.
3695         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3696         do not depend on machine word size, `/bin/false' implementation,
3697         or `wc' output format.  `make check' is more dependable, now.
3699         * checks/check_them: Summarize the failed tests by listing their
3700         name, at end.  If none, issue `All checks successful'.  Output
3701         `Checking' instead of `Input file:'.
3703         * checks/get_them, checks/check_them: Reindented.
3705         * Makefile.in (dist): chmod a+r before making the tar file.
3707 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3709         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3711         * input.c (next_token): Reinitialize token_buttom just after using
3712         it as a watermark with obstack_free.  Or else, a future token, big
3713         enough for triggering reallocation of the obstack chunk, could
3714         void the initialized value of token_buttom, later causing panic in
3715         obstack_free.  Rename token_buttom to token_bottom everywhere.
3717         * m4.h: Before declaring errno, first include <errno.h> and
3718         ensure that it does not define errno.
3719         Reported by Richard Stallman.
3721 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3723         * builtin.c: Define and use DECLARE macro for builtins.
3725         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3726         argument, this is a common idiom for introducing long comments.
3728         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3729         arguments.  The last argument was silently ignored.
3731         * m4.c (cmd_error): Add a missing semicolon before va_end().
3733 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3735         * Makefile.in: Now handle protoized sources.  Define and use U.
3736         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3737         Add `aclocal.m4' to `configure' dependencies.
3738         * ansi2knr.c: New, from Ghostscript distribution.
3739         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3740         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3741         * aclocal.m4: New, provide FP_PROTOTYPES.
3742         * m4.h: Conditionnaly protoized through Args, save for varags.
3743         * builtin.c: Protoized.  Then:
3744         Include <sys/types.h> if size_t is not defined, before "regex.h".
3745         (m4_ifelse): Fetch built-in name properly for diagnostic.
3746         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3747         (m4_regexp): Add const to `msg' declaration.
3748         (m4_patsubst): Add const to `msg' declaration.
3749         * debug.c: Protoized, save for varargs.
3750         * eval.c: Protoized.
3751         * format.c: Protoized.
3752         * input.c: Protoized.
3753         * m4.c: Protoized, save for varargs.  Then:
3754         (xfree): Accept void * instead of char *.
3755         (xmalloc): Return void * instead of char *.
3756         (xrealloc): Accept and return void * instead of char *.
3757         * macro.c: Protoized.
3758         * output.c: Protoized.
3759         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3760         * symtab.c: Protoized.
3762 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3764         * m4.texinfo: Remove directory from diagnostics in 30.include,
3765         51.eval, 56.errprint and 57.m4exit tests.
3767         * m4.h: Remove declarations for int or void system functions, they
3768         cause more conflicting trouble than they make good.
3770         * configure.in: Avoid configuration header file.  Add some tests.
3771         * m4.h: Remove #include "config.h".
3772         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3773         Then, rewritten for better compliance with GNU standards.
3775 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3777         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3778         because of a misplaced #endif.
3780         * Many *.[hc] files: Correct intra-line spacing here and there,
3781         according to GNU indent 1.6 advice.
3783         * configure.in: New, using Autoconf 1.2.
3784         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3785         * Delete old configure.in, configure, etc/configure.in,
3786         etc/configure, lib/configure.in, lib/configure and config/*.
3787         Reported by Jason Merrill.
3789         * symtab.c (hash): Change (char) NULL to '\0'.
3790         Reported by Jason Merrill.
3792         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3793         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3794         * version.h: De-automatize, force value in.
3796         * m4.c: Changes in order to use a newer getopt.h.
3797         Reported by David MacKenzie.
3799         * checks/: New name for examples/.
3800         * checks/get_them: New location for etc/get_examples.
3801         * checks/check_them: New location for etc/check_examples.
3802         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3803         * lib/vfprintf.c: New location for etc/vfprintf.c.
3804         * Delete empty etc/.
3805         * examples/: New name for test/.
3807 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3809         * Makefile.in (check): Add m4 as dependency.
3811         * m4.c: Accept --no-warnings instead of --no_warnings, and
3812         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3813         usage message more informative.
3814         Reported by David MacKenzie.
3816 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3818         * etc/check_examples: New name for check_examples.sh.
3819         * etc/get_examples: New name for get_examples.sh.
3820         * Makefile.in, etc/Makefile.in: Use new names.
3822         * Makefile.in: Transmit $(CC) while making in lib.
3824         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3825         code disposition by hand.
3827 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3829         * m4.h: Delete definitions for abort() and exit().
3830         Reported by Richard Stallman.
3832         * config/hmake-unicos, config/s-unicos.h: New files.
3833         Reported by Hal Peterson.
3835         * eval.c (exp_term): Have N^0 return 1.
3836         Reported by Michael Fetterman.
3838         * eval.c, input.c, m4.h: Remove last comma in enums.
3839         Reported by Mike Lijewski.
3841         * Transfer of maintenance duties from Rene' to Franc,ois.
3843 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3845         * Release 1.0.  Many thanks to those, who provided me with bug
3846         reports and feedback.
3848         * Uses GNU configure, taken from the gdb distribution.
3850         * Uses GNU getopt(), with long option names.
3852         * The -Q/+quiet option is added, which suppresses warnings about
3853         missing or superflous arguments to built-in macros.
3855         * Added default options via the M4OPTS environment variable.
3857         * The built-in format can now be configured to use sprintf as
3858         the formatting engine, for systems without [efg]cvt(3).
3860         * GNU library code is moved to the ./lib subdirectory; other
3861         utility files are now in ./etc.
3863         * Several minor bugs have been fixed.
3865 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3867         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3868         Francois Pinard and Roland H. Pesch for providing me with reports.
3870         * The builtins incr and decr are now implemented without use of
3871         eval.
3873         * The builtin indir is added, to allow for indirect macro calls
3874         (allows use of "illegal" macro names).
3876         * The debugging and tracing facilities has been enhanced
3877         considerably.  See the manual for details.
3879         * The -tMACRO option is added, marks MACRO for tracing as soon
3880         as it is defined.
3882         * Builtins are traced after renaming iff they were before.
3884         * Named files can now be undiverted.
3886         * The -Nnum option can be used to increase the number of
3887         divertions available.
3889         * Calling changecom without arguments now disables all comment
3890         handling.
3892         * The function m4_patsubst() is now consistently declared
3893         static.
3895         * A bug in dnl is fixed.
3897         * A bug in the multi-character quoting code is fixed.
3899         * Several typos in the manual has been corrected.  More probably
3900         persist.
3902         * The m4.info file is now installed along with the program.
3904 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3906         * Updated and enhanced version.  Release 0.75, manual 0.07.
3908         * Implemented search path for include files (-I option and
3909         M4PATH envronment variable).
3911         * Implemented builtin "format" for printf-like formatting.
3913         * Implemented builtin "regexp" for searching for regular
3914         expressions.
3916         * Implemented builtin "patsubst" for substitution with regular
3917         expressions.
3919         * Implemented builtin "esyscmd", which expands to a shell
3920         commands output.
3922         * Implemented "__file__" and "__line__" for use in error
3923         messages.
3925         * Implemented character ranges in "translit".
3927         * Implemented control over debugging output.
3929         * Implemented multi-character quotes.
3931         * Implemented multi-character comment delimiters.
3933         * Changed predefined macro "gnu" to "__gnu__".
3935         * Changed predefined macro "unix" to "__unix__", when the -G
3936         option is not used.  With -G, "unix" is still defined.
3938         * Changed "shift", "$@" and "$*" to not insert spaces afters
3939         commas.
3941         * Added program name to error messages.
3943         * Fixed two missing null bytes bugs.
3945 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3947         * Initial beta release.  Release 0.50, manual 0.05.
3949         -----
3951         $Revision$ $Date$
3953         Local Variables:
3954         coding: utf-8
3955         End:
3957         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3958         2005, 2006, 2007 Free Software Foundation, Inc.
3960         Copying and distribution of this file, with or without
3961         modification, are permitted provided the copyright notice
3962         and this notice are preserved.