Release Version 1.4.11.
[m4/ericb.git] / ChangeLog
blob04dc8fcfbf89d71ac9ce01cf8034f35af30ec4aa
1 2008-04-02  Eric Blake  <ebb9@byu.net>
3         Release Version 1.4.11.
4         * NEWS: Mention the release.
6         Prepare for release.
7         * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
8         remove tag operation.
9         (version-check): Enhance this check.
10         (prev-tarball): Depend on version-check.
11         (this-vc-tag): Delete, and mention need to run tag...
12         * HACKING: ...here, prior to make maintainer-distcheck.
13         Update the instructions to match this particular release process.
14         * Makefile.am (.version, announcement): Allow for VPATH build.
15         * cfg.mk (gnulib_dir): Likewise.
16         * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
17         page.
19 2008-04-01  Eric Blake  <ebb9@byu.net>
21         Speed up index builtin.
22         * m4/gnulib-cache: Import strstr module.
23         * NEWS: Mention the speedup.
25 2008-03-29  Eric Blake  <ebb9@byu.net>
27         Fix testsuite on mingw, OpenBSD.
28         * src/format.c (ARG_DOUBLE): Use strtod, not atof.
29         * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
30         * doc/m4.texinfo (Format): Add hex-float support.
31         * NEWS: Document this.
33 2008-03-27  Eric Blake  <ebb9@byu.net>
35         Pull other useful doc fixes from branch-1.6.
36         * doc/m4.texinfo (Arguments): Enable test of
37         --warn-macro-sequence.
38         (Defn): Test length of builtin token.
39         (Builtin, Ifelse, Changequote): Add more regression tests.
41 2008-03-27  Eric Blake  <ebb9@byu.net>
43         Add test for divert bug on 2007-05-28, patched 2007-07-21.
44         * doc/m4.texinfo (Diversions): Add test.
46 2008-03-24  Eric Blake  <ebb9@byu.net>
48         Pull GNUmakefile from gnulib.
49         * m4/gnulib-cache.m4: Import gnumakefile module.
50         * GNUmakefile: Remove from version control; supplied by gnulib
51         instead.
52         * configure.ac (AC_INIT): Track intra-release version with
53         git-version-gen.
54         (AC_CONFIG_LINKS): Let gnulib do this now.
55         * Makefile.am (distclean-local): Likewise.
56         (EXTRA_DIST): Likewise.  Also handle renamed files.
57         * (.version, dist-hook): Improve version handling.
58         * Makefile.cfg: Rename...
59         * cfg.mk: ...to this.
60         * Makefile.maint: Rename...
61         * maint.mk: ...to this.
62         (ME, makefile-check, m4-check): Use new macro instead of
63         hard-coded name.
64         * HACKING: Mention that maintainer rules should now work in VPATH
65         builds.
67 2008-03-15  Eric Blake  <ebb9@byu.net>
69         Document join, in order to fix bug in m4wrap example.
70         * doc/m4.texinfo (Improved m4wrap): New node.
71         (Defn, Location): Enhance tests.
72         (Shift): Document the composite macro join.
73         (Incompatibilities): Move documentation of LIFO vs. FIFO...
74         (M4wrap): ...here, to match improved example.
76 2008-03-10  Eric Blake  <ebb9@byu.net>
78         Allow 'make installcheck' with './configure --program-prefix'.
79         * checks/Makefile.in (program_transform_name): New macro.
80         (installcheck): Use it to transform name of m4 before testing.
81         * checks/check-them (m4): Add -m option, to allow testing m4 by a
82         different name.
83         * checks/get-them: Allow xout and xerr notation.
85 2008-02-25  Eric Blake  <ebb9@byu.net>
87         Improve release process.
88         * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
89         dist-lzma.
90         * HACKING: Update for git release procedures.
91         * Makefile.cfg: New file.
92         * GNUmakefile: Use it.
93         * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
94         (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
95         (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
96         (makefile-check, news-date-check, changelog-check, m4-check)
97         (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
98         (announcement, alpha, beta, major): New rules, borrowed from
99         coreutils.
100         (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
101         (cvs-dist): Delete.
102         * Makefile.am (EXTRA_DIST): Distribute new file.
104 2008-02-19  Eric Blake  <ebb9@byu.net>
106         Clean up foreach example.
107         * doc/m4.texinfo (Foreach, Improved foreach): Document another
108         shortcoming in foreach.m4.
110 2008-02-16  Eric Blake  <ebb9@byu.net>
112         Add regression test for multi-character quote recursion.
113         * examples/foreach2.m4: Use $0 rather than spelling out name.
114         * examples/foreachq2.m4: Likewise.
115         * examples/forloop2.m4: Likewise.
116         * examples/hanoi.m4: Likewise.
117         * examples/trace.m4: Likewise.
118         * doc/m4.texinfo (Improved forloop): Document advantage of $0.
119         (Improved foreach): Adjust dump from file.
121 2008-02-13  Eric Blake  <ebb9@byu.net>
123         Fix texinfo grammar.
124         * doc/m4.texinfo (Incompatibilities): Use @. after capital.
125         (History): Use @: after abbreviations.
126         (M4exit): Use correct Latin abbreviation.
128 2008-02-11  Eric Blake  <ebb9@byu.net>
130         Document behavior of __gnu__().
131         * doc/m4.texinfo (Platform macros): Enhance test.
132         (Macro expansion): New test.
134 2008-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136         * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
137         than hard-coding /bin/sh.
138         * THANKS: Update.
139         Reported by Lawson Chan.
141 2007-12-13  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
143         * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
144         example.
145         * THANKS: Update.
146         Reported by Giovanni Toffetti.
148 2007-12-07  Eric Blake  <ebb9@byu.net>
150         Minor security fix: Quote output of mkstemp.
151         * src/builtin.c (mkstemp_helper): Produce quoted output.
152         * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
153         * NEWS: Document this change.
155 2007-12-04  Eric Blake  <ebb9@byu.net>
157         Fix builds with OpenBSD make.
158         * doc/Makefile.am (HELP2MAN): New macro.
159         (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
160         * README: Update copyright.
161         * HACKING: Mention help2man and makeinfo dependencies.
163 2007-11-22  Eric Blake  <ebb9@byu.net>
165         Security fix: avoid arbitrary code execution with 'm4 -F'.
166         * src/freeze.c (produce_frozen_state): Never pass raw file name as
167         printf format.
168         * NEWS: Document this fix.
170 2007-11-07  Eric Blake  <ebb9@byu.net>
172         * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
174 2007-11-05  Eric Blake  <ebb9@byu.net>
176         Use build-aux directory.
177         * configure.ac (PACKAGE, VERSION): Delete, since Automake does
178         this now.
179         (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
180         instead of the top level.
181         (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
182         * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
183         * bootstrap: Adjust accordingly.
184         * m4/gnulib-cache.m4: Add --aux-dir option.
185         * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
187 2007-10-31  Eric Blake  <ebb9@byu.net>
189         Test more corner cases.
190         * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
191         (Improved foreach): Document alternate foreachq style.
193 2007-10-28  Eric Blake  <ebb9@byu.net>
195         More test coverage for autoconf usage patterns.
196         * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
197         (Builtin): Add new undocumented tests.
198         (Shift): Document cond macro, and add new test.
200 2007-10-27  Eric Blake  <ebb9@byu.net>
202         Document one use of changequote(`(',`)').
203         * doc/m4.texinfo (Changequote): Add new test, based on recent
204         autoconf addition of m4_expand.
206 2007-10-22  Eric Blake  <ebb9@byu.net>
208         Never let printf failures go undetected.
209         * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
210         intprops, strtod, and xprintf modules.  Remove deprecated free
211         module.  Replace vasprintf-posix and xvasprintf with
212         xvasprintf-posix.
213         * src/m4.h: Include xprintf.h.
214         * src/builtin.c (ntoa): Export.
215         (m4_errprint): Adjust all *printf callers.
216         * src/debug.c (debug_message_prefix, trace_format): Likewise.
217         * src/freeze.c (produce_frozen_state): Likewise.
218         * src/input.c [DEBUG_INPUT]: Likewise.
219         * src/m4.c (usage): Likewise.
220         * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
221         (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
222         * src/output.c (shipout_text, freeze_diversione): Likewise.
223         * src/path.c [DEBUG_INCL]: Likewise.
224         * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
225         * src/symtab.c [DEBUG_SYM]: Likewise.
227 2007-10-17  Eric Blake  <ebb9@byu.net>
229         Fix 'm4 -F file -t undefined'.
230         * src/freeze.c (produce_frozen_state): Avoid core dump.
231         * doc/m4.texinfo (Using frozen files): Test for the bug.
232         * NEWS: Mention the fix.
234 2007-10-09  Eric Blake  <ebb9@byu.net>
236         Avoid regexp regression.
237         * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
239 2007-10-02  Eric Blake  <ebb9@byu.net>
241         Add more examples and tests.
242         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
243         document shortfall.
244         (Improved capitalize): New node.
245         (Index macro, Regexp): Test more code paths.
246         * examples/capitalize.m4: Update to match manual.
247         * examples/capitalize2.m4: New file.
248         * examples/foreachq3.m4: Likewise.
249         * examples/join.m4: Likewise.
250         * examples/loop.m4: Likewise.
251         * examples/wraplifo.m4: Likewise.
252         * examples/wraplifo2.m4: Likewise.
253         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
255 2007-09-24  Eric Blake  <ebb9@byu.net>
257         Create .gitignore alongside .cvsignore.
258         * bootstrap (LC_ALL): Set up front.
259         (version control) Borrow idea from head, to avoid churn in
260         m4/.*ignore files modified by gnulib-tool.
262 2007-09-13  Eric Blake  <ebb9@byu.net>
264         * AUTHORS: Fix typo.
266 2007-09-07  Eric Blake  <ebb9@byu.net>
268         * AUTHORS: Simplify, to match libtool and autoconf layout.
269         * THANKS: Sync with head.
271 2007-08-10  Eric Blake  <ebb9@byu.net>
273         * doc/m4.texinfo (Compatibility): Sync with head.
275 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
276         and Eric Blake  <ebb9@byu.net>
278         * doc/m4.texinfo (Defn): Update wording.
280 2007-08-09  Eric Blake  <ebb9@byu.net>
282         POSIX requires defn(`a',`b') to concatenate definitions.
283         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
284         trying to mix a builtin with anything else.
285         * doc/m4.texinfo (Defn): Document a use for this POSIX
286         requirement.
287         (Incompatibilities): Update to match current status.
288         * NEWS: Document this change.
289         * THANKS: Update.
290         Reported by Konrad Schwarz.
292 2007-08-04  Eric Blake  <ebb9@byu.net>
294         Normalize all GPL license notices.
295         * GNUmakefile: Update license wording.
296         * Makefile.am: Likewise.
297         * Makefile.maint: Likewise.
298         * bootstrap: Likewise.
299         * commit: Likewise.
300         * configure.ac: Likewise.
301         * checks/Makefile.in: Likewise.
302         * doc/Makefile.am: Likewise.
303         * examples/Makefile.am: Likewise.
304         * src/Makefile.am: Likewise.
305         * src/builtin.c: Likewise.
306         * src/debug.c: Likewise.
307         * src/eval.c: Likewise.
308         * src/format.c: Likewise.
309         * src/freeze.c: Likewise.
310         * src/input.c: Likewise.
311         * src/m4.c: Likewise.
312         * src/m4.h: Likewise.
313         * src/macro.c: Likewise.
314         * src/output.c: Likewise.
315         * src/path.c: Likewise.
316         * src/stackovf.c: Likewise.
317         * src/symtab.c: Likewise.
319 2007-07-21  Eric Blake  <ebb9@byu.net>
321         Fix regression on NetBSD from 2007-05-28.
322         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
323         position to byte 0.
324         * NEWS: Document this fix.
325         * THANKS: Update.
326         Reported by Thomas Klausner.
328 2007-07-20  Eric Blake  <ebb9@byu.net>
330         Fix 'make distcheck' issues.
331         * Makefile.am (EXTRA_DIST): No need to distribute
332         gpl-3.0.texi.diff anymore.
333         * m4/gnulib-cache.m4: Update to latest gnulib.
335 2007-07-14  Eric Blake  <ebb9@byu.net>
337         Reflect upstream license .texi changes.
338         * doc/m4.texinfo (Copying): Rename node...
339         (GNU General Public License): ...to this.
340         (GNU Free Documentation License): Adjust node location.
341         * local/doc/gpl-3.0.texi.diff: Remove file.
343 2007-07-10  Eric Blake  <ebb9@byu.net>
345         Start 1.4.10a.
346         * configure.ac (AC_INIT): Bump version number.
347         * NEWS: Start changes since 1.4.10.
348         * doc/m4.texinfo (History): Mention 1.4.11.
349         (Copying This Package, Copying This Manual): Add index entries.
350         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
351         updated.
352         * Makefile.am (EXTRA_DIST): Remove dead file.
354 2007-07-09  Eric Blake  <ebb9@byu.net>
356         Release Version 1.4.10.
357         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
358         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
359         * configure.ac (AC_INIT): Bump version number.
360         * NEWS: Describe changes since 1.4.9.
362         * src/format.c: Missed a GPLv3 conversion.
364         Avoid undefined behavior of %.*c in printf.
365         * src/format.c (format): Special case %c.
366         * TODO: Document that more remains to be done.
367         * NEWS: Document the fix.
369 2007-07-05  Eric Blake  <ebb9@byu.net>
371         Fix up gnulib-tool usage.
372         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
373         * version-etc.c.diff: Move to...
374         * local/lib/version-etc.c.diff: ...here.
375         * gpl-3.0.texi.diff: Move to...
376         * local/doc/gpl-3.0.texi.diff: ...here.
378 2007-07-04  Eric Blake  <ebb9@byu.net>
380         Upgrade to GPL version 3 or later.
381         * bootstrap: Pick up GPLv3.
382         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
383         --local-dir=. --import gpl-3.0'.
384         * doc/m4.texinfo (Copying This Package): New appendix.
385         * NEWS: Mention this change.
386         * README: Mention why some files still claim to be version 2.
387         * version-etc.c.diff: New file, to make sure --version claims
388         correct GPL version.  Temporary until gnulib makes move.
389         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
390         appendix, rather than section, of the manual.
391         * GNUmakefile: Update to new license.
392         * Makefile.am: Likewise.
393         * Makefile.maint: Likewise.
394         * commit: Likewise.
395         * configure.ac: Likewise.
396         * checks/Makefile.in: Likewise.
397         * doc/Makefile.am: Likewise.
398         * examples/Makefile.am: Likewise.
399         * src/Makefile.am: Likewise.
400         * src/builtin.c: Likewise.
401         * src/debug.c: Likewise.
402         * src/eval.c: Likewise.
403         * src/freeze.c: Likewise.
404         * src/input.c: Likewise.
405         * src/m4.c: Likewise.
406         * src/m4.h: Likewise.
407         * src/macro.c: Likewise.
408         * src/output.c: Likewise.
409         * src/path.c: Likewise.
410         * src/stackovf.c: Likewise.
411         * src/symtab.c: Likewise.
413 2007-06-26  Eric Blake  <ebb9@byu.net>
415         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
417 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
419         Match Free Software Directory categories.
420         * doc/m4.texinfo (dircategory): Update.
422 2007-05-31  Eric Blake  <ebb9@byu.net>
424         * src/output.c (output_text): Fix regression from 2007-05-28.
425         * doc/m4.texinfo (History): Mention 1.4.10.
426         (Format): Make testsuite output easier to debug.
428 2007-05-29  Eric Blake  <ebb9@byu.net>
430         Start 1.4.9c.
431         * configure.ac (AC_INIT): Bump version number.
432         * NEWS: Start changes since 1.4.9b, and fix typo.
434         Beta Release Version 1.4.9b.
435         * configure.ac (AC_INIT): Bump version number.
436         * NEWS: Describe changes since 1.4.9.
438         Improve format support.
439         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
440         vasprintf-posix'.
441         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
442         printf with too few arguments, as in format(%*.*d,-1,-1,1).
443         * doc/m4.texinfo (Format): Expand tests, and improve
444         documentation.
445         * NEWS: Document this change.
447 2007-05-28  Eric Blake  <ebb9@byu.net>
449         Fix large diversion corner cases, including 1.4.8 regression.
450         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
451         (make_room_for): Use NULL, not 0, for pointers.
452         (insert_diversion_helper): Avoid using rewind.
453         (freeze_diversions): Allow freezing large diversions.
454         * NEWS: Document this fix.
456         Also run gnulib unit tests during make check.
457         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
458         --tests-base=tests --with-tests'.
459         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
460         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
462 2007-05-25  Eric Blake  <ebb9@byu.net>
464         Backport prompts in examples from head.
465         * src/macro.c (expand_macro): Shorten message.
466         * doc/m4.texinfo (Manual, Command line files, Comments)
467         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
468         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
469         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
470         (Using frozen files, Improved forloop, Improved foreach): Add
471         prompts to examples.
472         * checks/get-them: Ignore prompts in examples.
474         Fix sync line interaction with multiline comments.
475         * doc/m4.texinfo (Other Incompatibilities): Add example, and
476         document bug in --syncline/divert interaction.
477         (Preprocessor features): Augment test.
478         * src/m4.h (output_text): Export.
479         (shipout_text, next_token): Add parameter.
480         * src/freeze.c (reload_frozen_state): Don't interfere with
481         synclines when reloading state.
482         * src/output.c (output_text): Export.
483         (shipout_text): Take new parameter for start line of token.
484         Output at most one syncline per token.
485         * src/input.c (next_token): Report line where multiline tokens
486         start.
487         * src/macro.c (expand_input, expand_token, expand_argument):
488         Adjust callers so that line is passed from input to output.
489         * NEWS: Document this fix.
490         Reported by Sergey Poznyakoff.
492         Test -s in testsuite.
493         * doc/m4.texinfo (Preprocessor features): Add a test.
494         * checks/get-them: Support extra options in testsuite.
495         * checks/check-them (examples): Use extra options.
496         * THANKS: Update.
497         Reported by Sergey Poznyakoff.
499 2007-05-24  Eric Blake  <ebb9@byu.net>
501         Support POSIX flush semantics on all platforms.
502         * m4/gnulib-cache.m4: Remove closeout, and augment with
503         'gnulib-tool --import closein fflush'.
504         * src/m4.h (includes): Use closein, not closeout.
505         * src/m4.c (main): Ensure stdin is flushed when not all input is
506         consumed.
507         (process_file): No return needed.
508         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
509         than excluding mingw.
510         * NEWS: Document this change.
512         Work around cygwin and mingw fseeko bugs.
513         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
514         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
516 2007-04-25  Eric Blake  <ebb9@byu.net>
518         Fix negative division within eval, regression of 2007-01-06.
519         * doc/m4.texinfo (Eval): Catch this bug.
520         * src/eval.c (mult_term): Fix it.
521         * NEWS: Document this.
522         * THANKS: Update.
523         Reported by Cesar Strauss.
525 2007-04-23  Eric Blake  <ebb9@byu.net>
527         Start 1.4.9a.
528         * configure.ac (AC_INIT): Bump version number.
529         * NEWS: Start changes since 1.4.9.
531 2007-03-23  Eric Blake  <ebb9@byu.net>
533         Release 1.4.9:
534         * configure.ac (AC_INIT): Bump version number.
535         * NEWS: Describe changes since 1.4.8b.
537 2007-03-16  Eric Blake  <ebb9@byu.net>
539         * doc/m4.texinfo (Mkstemp): Tweak wording.
540         * src/output.c (output_init): Adjust to latest gnulib.
542 2007-03-15  Eric Blake  <ebb9@byu.net>
544         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
545         long long, it confuses gnulib).
546         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
547         if unsigned long long doesn't work.
548         * THANKS: Update.
549         Reported by Matthew Woehlke.
551 2007-03-07  Eric Blake  <ebb9@byu.net>
553         * AUTHORS: Update.
554         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
556 2007-03-01  Eric Blake  <ebb9@byu.net>
558         * doc/m4.texinfo: Pick up more index entries from head.  Follow
559         more texinfo recommendations.
560         (Sysval): Improve tests.
562         Avoid overfull \vbox warning from texinfo, due to indices that
563         weren't quite big enough to split across page boundaries.
564         * doc/m4.texinfo: Add lots of concept index entries.
565         (Concept Index): Move to be last, as recommended by texinfo
566         manual.
567         (Define, Arguments, Pseudo Arguments): Add more function entries.
569 2007-02-28  Eric Blake  <ebb9@byu.net>
571         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
572         137.
573         (Pseudo Arguments): Add useful example.
575         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
576         reflect POSIX XCU ERN 118.
578         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
579         * src/m4.c (usage): ...here,...
580         * src/builtin.c (set_macro_sequence): ...and here.
581         (define_user_macro): Fix typo.
582         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
583         inaccuracies.
584         (Shift): Document composite macro argn for portably getting at
585         positional parameters beyond 9.
586         * configure.ac (AC_INIT): Bump version number.
587         * NEWS: Start changes of 1.4.8c.
589 2007-02-24  Eric Blake  <ebb9@byu.net>
591         Beta Release 1.4.8b:
592         * configure.ac (AC_INIT): Bump version number.
593         * NEWS: Describe changes since 1.4.8.
595         Reserve all uses of raw ${} in macro definitions, not just
596         ${<digit>}.
597         * src/builtin.c (set_macro_sequence): Change default macro
598         sequence.
599         * doc/m4.texinfo (Operation modes): Update to match.
600         * src/m4.c (usage): Likewise.
601         * NEWS: Likewise.
603 2007-02-23  Eric Blake  <ebb9@byu.net>
605         * src/m4.h (includes): Update to latest gnulib.
607 2007-02-08  Eric Blake  <ebb9@byu.net>
609         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
610         more flexible, and so that autoconf can use it.
611         * src/m4.h (set_macro_sequence, free_macro_sequence): New
612         prototypes.
613         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
614         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
615         New variables and functions.
616         (define_user_macro): Allow flexibility in regular expression used
617         to trigger warning.
618         * src/m4.c (warn_syntax): Delete.
619         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
620         spelling of option, along with optional argument.
621         * doc/m4.texinfo (Operation modes, Arguments): Document this
622         change.
623         * NEWS: Document this change.
625 2007-02-05  Eric Blake  <ebb9@byu.net>
627         * m4/gnulib-cache.m4: Module strstr no longer exists.
629         Avoid bool bitfields, as they don't work on AIX.
630         * src/m4.h (bool_bitfield): New typedef.
631         (struct symbol, struct builtin): Use it.
632         * src/input.c (struct input_block): Likewise.
633         Reported by Albert Chin.
635         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
636         Reported by Albert Chin.
637         * THANKS: Update.
639 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
641         * doc/m4.texinfo (Input processing): Further clarifications.
643 2007-02-03  Eric Blake  <ebb9@byu.net>
645         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
646         the examples.
647         Reported by Bruno Haible.
649 2007-02-01  Eric Blake  <ebb9@byu.net>
651         * src/m4.c (fatal_warnings): New variable.
652         (usage): Document new -E behavior.
653         (main): Make -E an additive option.
654         (m4_error, m4_error_at_line): Change exit status when required.
655         * NEWS: Document this change.
656         * doc/m4.texinfo (Operation modes): Likewise.
657         Reported by Ralf Wildenhues.
659 2007-01-27  Eric Blake  <ebb9@byu.net>
661         * src/m4.h (warn_syntax): Declare.
662         (init_pattern_buffer): Export.
663         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
664         (long_options, main): Implement new option.
665         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
666         (define_user_macro): Warn on $11 and ${1} if requested.
667         * src/input.c (init_pattern_buffer): Delete duplicate method.
668         * doc/m4.texinfo (Operation modes): Document it.
669         (Arguments): Document future direction of ${11} vs. $11.
670         (Incompatibilities): Fix wording on POSIX limitations.
671         * checks/get-them: Parse @{ and @} correctly.
672         * NEWS: Document this change.
674 2007-01-26  Eric Blake  <ebb9@byu.net>
676         * src/builtin.c (includes): Adjust to gnulib changes.
678 2007-01-15  Eric Blake  <ebb9@byu.net>
680         * doc/m4.texinfo: Pull in various improvements from head.
681         * src/builtin.c (include): Alter exit status on failure.
682         * NEWS: Document this fix.
684 2007-01-13  Eric Blake  <ebb9@byu.net>
686         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
687         assume the fallback of ss_base for BSDI 4.0.1.
688         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
689         ! HAVE_STACK_T_SS_SP]: Use this check.
690         Reported by Chris McGuire.
691         * THANKS: Update.
692         * NEWS: Document the improvement.
694 2007-01-09  Eric Blake  <ebb9@byu.net>
696         * src/eval.c (ASSIGN): New enumerator.
697         (eval_lex): Recognize '='.
698         (equality_term): Treat '=' like '==', but warn that it is
699         deprecated.
700         * doc/m4.texinfo (Eval): Document and test this.
701         (Incompatibilities): Document the POSIX incompatibility.
702         * NEWS: Document this change.
704 2007-01-06  Eric Blake  <ebb9@byu.net>
706         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
707         * checks/check-them: Record expected exit status.
708         * checks/get-them: Check exit status.
709         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
710         instead.
711         * src/builtin.c: All users changed.
712         * src/eval.c: Likewise.  Also document where we are triggering
713         undefined or implementation-defined behavior.
714         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
715         (logical_or_term, logical_and_term, logical_not_term, not_term)
716         (equality_term, unary_term): Port from head to follow POSIX
717         semantics.
718         (exp_term): Reject 0**0 as undefined.
719         * doc/m4.texinfo (History): Mention 1.4.9.
720         (Format, Incompatibilities): Update to document POSIX compliance.
721         * NEWS: Document this change.
723 2007-01-04  Eric Blake  <ebb9@byu.net>
725         * NEWS: Document previous fix.
726         * THANKS: Update.
728 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
730         Fix Debian bug 405594, introduced 2006-11-01 from a bad
731         copy-n-paste from head.
732         * src/m4.c (main): Use correct file name after --.
734 2007-01-04  Eric Blake  <ebb9@byu.net>
736         Fix regression from 1.4.7 in large file handling on some
737         platforms, introduced on 2006-10-13.
738         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
739         will be handled.
740         * NEWS: Document this fix.
742 2007-01-03  Eric Blake  <ebb9@byu.net>
744         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
745         version-etc-fsf'.
746         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
747         it bumps the copyright year).
749 2006-12-27  Eric Blake  <ebb9@byu.net>
751         * doc/m4.texinfo (Patsubst): Fix typo.
753 2006-12-16  Eric Blake  <ebb9@byu.net>
755         * src/m4.c (main): Check for errors when closing stdin.
757 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
759         * doc/m4.texinfo: Fix some typos.
761 2006-12-09  Eric Blake  <ebb9@byu.net>
763         * configure.ac (AC_INIT): Bump version number.
764         * NEWS: Start changes of 1.4.8a.
766 2006-11-20  Eric Blake  <ebb9@byu.net>
768         Release 1.4.8:
769         * configure.ac (AC_INIT): Bump version number.
770         * NEWS: Describe changes since 1.4.7.
772 2006-11-16  Eric Blake  <ebb9@byu.net>
774         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
775         Minor tweaks noticed while porting to head.
777 2006-11-14  Eric Blake  <ebb9@byu.net>
779         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
780         spent iterators.
781         (m4_tmpname): Avoid memory leak.
783 2006-11-13  Eric Blake  <ebb9@byu.net>
785         * src/output.c (cleanup_tmpfile): Avoid double error message when
786         umask is prohibitive.
787         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
788         functions.
789         (m4_tmpfile): Add parameter, move cloexec action here.
790         (make_room_for): Adjust caller.  Don't keep too many files open.
791         (insert_diversion_helper): Unlink emptied temp files.
792         (make_diversion): Don't keep too many files open.
793         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
794         descriptors are no longer a limiting factor.
795         * NEWS: Document this change.
797         Backport sparse diversion handling from head.
798         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
799         avltree-oset'.
800         * src/output.c (struct m4_diversion): Rename from struct
801         diversion, and update members.  All users changed.
802         (diversion_table): Change to an ordered set, instead of an array.
803         (div0): New storage for diversion 0.
804         (diversions): No longer needed.
805         (free_list): New list to allow recycling diversion storage.
806         (diversion_storage): New storage to reduce malloc overhead.
807         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
808         (output_init, output_exit, cleanup_tmpfile, make_room_for)
809         (make_diversion): Handle new diversion storage scheme.
810         (insert_diversion_helper): New function.
811         (insert_diversion, undivert_all, freeze_diversions): Use it.
812         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
813         exhaustion to visible test of large diversion numbers.
814         * NEWS: Document this fix.
816 2006-11-11  Eric Blake  <ebb9@byu.net>
818         * src/builtin.c (m4_translit): Slight optimization.
820         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
822         * src/builtin.c: Remove unnecessary casts.
823         (expand_ranges): Make 8-bit clean.
824         * doc/m4.texinfo (Translit): Add tests and wording.
825         * NEWS: Document this fix.
827 2006-11-07  Eric Blake  <ebb9@byu.net>
829         * src/m4.h (output_exit): New prototype.
830         * src/m4.c (main): Use it.
831         * src/output.c (cleanup_tmpfile): Close files before removing
832         directory.
833         (insert_diversion): Check for failure.
834         (output_exit): Avoid memory leak.
835         * doc/m4.texinfo (Diversions): Test this bug.
837         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
839 2006-11-01  Eric Blake  <ebb9@byu.net>
841         Allow C++ compilation on Linux, as a safety measure in type
842         checking.
843         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
844         stdbool'.
845         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
846         (boolean): Kill this, and use stdbool.h instead.
847         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
848         * src/output.c, src/symtab.c: All users changed.
849         * src/symtab.c (hack_all_symbols): Update prototype.
850         * src/builtin.c (dump_symbol, set_trace): Update signature.
851         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
852         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
853         C++ compilation.
854         * src/debug.c (trace_flush): Likewise.
855         * src/freeze.c (reload_frozen_state): Likewise.
856         * src/input.c (push_file, push_string_finish, push_wrapup):
857         (token_bottom, next_token): Likewise.
858         * src/m4.c (main): Likewise.
860         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
861         draft wording.
862         * src/m4.h (m4_path_search): Tweak signature.
863         * src/path.c (m4_path_search): Likewise.
864         * src/builtin.c (include): Update caller.
865         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
866         with file names.  Don't write to **argv.
867         (process_file): New helper method.
868         * NEWS: Document this fix.
870 2006-10-31  Eric Blake  <ebb9@byu.net>
872         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
873         * doc/m4.texinfo (Translit): Improve the documentation.
874         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
875         algorithm.
876         (m4_index): Simplify, and speed up slightly.
877         * NEWS: Document this fix.
879 2006-10-28  Eric Blake  <ebb9@byu.net>
881         * src/input.c (set_quotes): Don't allow empty end-quote with
882         non-empty start-quote.
883         (set_comment): Likewise for end-comment.
884         * src/builtin.c (m4_changecom): Adjust caller.
885         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
886         match behavior.
887         (Incompatibilities): Document another POSIX bug.
888         * NEWS: Mention this change.
890 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
892         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
893         files.
895 2006-10-26  Eric Blake  <ebb9@byu.net>
897         Silence -Wwrite-strings -Wpointer-arith warnings.
898         * src/builtin.c (define_user_macro): Allow NULL argument.
899         (m4_builtin, m4_indir): Cast away const of "".
900         * src/format.c (format): Likewise.
901         * src/macro.c (collect_arguments): Likewise.
902         (expand_macro): Avoid math on void*.
903         * src/m4.c (main): Adjust caller.
904         * src/output.c (freeze_diversions): Detect off_t overflow.
906         * src/input.c (pop_input): Remove unnecessary code.
908 2006-10-25  Eric Blake  <ebb9@byu.net>
910         * src/symtab.c (symtab_init): Avoid size_t overflow.
911         * src/output.c (make_diversion): Avoid size_t overflow.
912         * doc/m4.texinfo (Diversions): Test this fix.
913         * src/input.c (input_block): Remove unused member.  Reduce size
914         of struct.
915         (push_file, pop_input): Avoid useless assignment.
916         * NEWS: Document the bug fix.
918         Redo location tracking.  Instead of having just files track the
919         line to return to when popping input, now all input blocks track
920         their current line.
921         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
922         needed.
923         (input_block): Have line and file storage for all input types, and
924         rename some members.
925         (input_change): New global flag.
926         (push_file, push_macro, push_string_init, push_wrapup): Store
927         location.
928         (push_string_finish, pop_input, pop_wrapup): Notice changes in
929         input blocks.
930         (peek_input): Adjust to new member names.
931         (next_char, next_char1): Adjust location if needed.
932         (skip_line): Simplify restoring location.
933         * doc/m4.texinfo (Location): Augment the test to catch line
934         location of expansion of multi-line arguments.
935         Reported by Stepan Kasal.
937 2006-10-23  Eric Blake  <ebb9@byu.net>
939         * doc/m4.texinfo (Macro Arguments): Document that leading space
940         in argument collection stops at macro expansion.
941         (Incompatibilities): Document POSIX whitespace wording issue.
943 2006-10-20  Eric Blake  <ebb9@byu.net>
945         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
946         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
947         end of a TeX line splits incorrectly.
948         (Foreach, Improved foreach): Write these sections, borrowing ideas
949         from CVS head and from m4sugar.
950         * checks/get-them: Accomodate new way to show trailing space in
951         examples.
952         * examples/foreach.m4: Make usable in documentation.
953         * examples/foreachq.m4: New file.
954         * examples/foreachq2.m4: New file.
955         * examples/foreach2.m4: New file.
956         * NEWS: Document the documentation updates.
958 2006-10-19  Eric Blake  <ebb9@byu.net>
960         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
961         (m4_maketemp): Provide traditional behavior.
962         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
963         new `mkstemp' macro and the flaws of the old `maketemp'.
964         (Incompatibilities): Move maketemp discussion to...
965         (Extensions): ...here, since -G now supresses the GNU extension.
966         * NEWS: Document this.
968         * examples/forloop.m4: Simplify.
969         * examples/forloop2.m4: New file.
970         * examples/quote.m4: New file.
971         * doc/m4.texinfo (Loops): Rename to...
972         (Shift): ...this node.
973         (Forloop, Foreach, Improved forloop, Improved foreach): New
974         nodes.
976 2006-10-17  Eric Blake  <ebb9@byu.net>
978         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
979         config-h'.
980         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
981         gnulib headers, rather than in top directory.
982         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
983         output clutter.
985 2006-10-16  Eric Blake  <ebb9@byu.net>
987         * doc/m4.texinfo: Backport some minor cleanups from head.
988         (Cleardivert): Rename from cleardiv.
990         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
991         a section of Preliminaries.
992         (Operation modes, Preprocessor features, Limits control)
993         (Frozen state, Debugging options, Command line files): Subdivide
994         into new sections.
995         (Input processing, Quoting Arguments, Define, Arguments)
996         (Cleardiv, Format, M4exit): Fix grammar of references.
997         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
998         (Debug Levels, Debug Output, Include, Search Path, Divert)
999         (Platform macros, Syscmd, Location, Extensions): Point to new
1000         sections.
1001         (Top, Loops, Include, Undivert, Location, Incompatibilities):
1002         Improve file references.
1004 2006-10-14  Eric Blake  <ebb9@byu.net>
1006         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
1007         is not portable.
1008         Reported by Ralf Wildenhues.
1010         * src/builtin.c (m4_undivert): Check for read error.
1012 2006-10-13  Eric Blake  <ebb9@byu.net>
1014         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
1015         header files are included, since <unistd.h> can affect the tests.
1016         * THANKS: Updated.
1017         Reported by Martin Koeppe.
1019         Backport head's usage of clean-temp module, as it is cleaner than
1020         using tmpfile-safer.
1021         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1022         clean-temp closeout', and remove tmpfile-safer.
1023         * src/m4.h (includes): Adjust.
1024         (m4_path_search): Rename from path_search, to avoid collision
1025         with gnulib.
1026         * src/m4.c (main): Install closeout handler.  Adjust caller.
1027         (usage): Now done by closeout module.
1028         * src/builtin.c (m4_m4exit): Likewise.
1029         (m4_undivert, include): Adjust callers.
1030         * src/freeze.c (reload_frozen_state): Likewise.
1031         * src/path.c (m4_path_search): Rename from path_search.
1032         * src/output.c (output_temp_dir): New variable.
1033         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
1034         (insert_diversion, make_room_for): Use them.
1035         * doc/m4.texinfo (Diversions): Document this, and add a test.
1036         (Improved fatal_error): Fix typo.
1037         (Maketemp): Port test to mingw, and no longer hide from
1038         documentation.
1039         * NEWS: Document the change in TMPDIR behavior.
1041         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
1042         macros, to work with recent gnulib-tool update.
1044         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
1045         handling of defn results.
1046         * doc/m4.texinfo (Builtin, Indir): Add test cases.
1047         * NEWS: Document this.
1049 2006-10-12  Eric Blake  <ebb9@byu.net>
1051         * doc/m4.texinfo (Location): Fix typo in previous commit.
1052         (Changeword): Catch one more case.
1053         * src/input.c (skip_line): Fix case when outer file used macro to
1054         supply the \n.
1056 2006-10-11  Eric Blake  <ebb9@byu.net>
1058         * src/input.c (enum input_type): Add additional types, to shave
1059         time off the common case.
1060         (push_wrapup): Wrapped strings remember location.
1061         (push_string_finish): Normal strings carry no location.
1062         (push_file): Start new files uninitialized.
1063         (peek_input, next_char_1): Optimize common cases by updating
1064         location only on new input types.
1065         (pop_input): Update to honor new input types.
1066         (skip_line, push_string_finish): Fix regression in previous patch
1067         when dnl is not followed by newline in included file.
1068         (push_string_init): Initialize all fields of INPUT_STRING sooner.
1069         (peek_token): Simplify.
1070         (peek_input): Don't pop input files on peek, so that __file__ and
1071         __line__ as last token of include file work correctly.
1072         * doc/m4.texinfo (History): Mention 1.4.8.
1073         (Answers): Split into sections, one per answer.
1074         (Improved exch, Improved cleardivert, Improved fatal_error): New
1075         nodes.
1076         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
1077         new m4wrap location semantics.
1078         (Changeword): Add test that caught the regression.
1079         * NEWS: Document this.
1081         * src/macro.c (expand_macro): In macro expansion errors, report
1082         line number at open parenthesis.
1083         * src/input.c (next_token): Fix off-by-one bug in reporting end
1084         of file in unterminated comment and string.
1085         (file_names): New obstack, necessary since expand_macro now hangs
1086         on to file names longer than the files remain open.
1087         (input_init): Initialize new obstack.
1088         (push_file): Use new obstack.  Delay updates to current_file
1089         until after expand_macro has restored state.
1090         (peek_input, next_char_1): Update current_file if necessary.
1091         (pop_wrapup): Release memory.
1092         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
1093         the off-by-one bug.
1094         (Dnl): Update to the new location reporting rules.
1095         * NEWS: Document these changes.
1097 2006-10-10  Eric Blake  <ebb9@byu.net>
1099         * src/macro.c (argc_stack, argv_stack): New variables for sharing
1100         obstacks across multiple macro calls.
1101         (expand_input): Initialize and tear down stack once per input
1102         file, instead of once per macro.
1103         (expand_macro): Reuse existing stacks when possible.
1104         (collect_arguments): Simplify slightly.
1106         * src/path.c (include_env_init): Fix botched patch application.
1107         Reported by Ralf Wildenhues.
1109 2006-10-09  Eric Blake  <ebb9@byu.net>
1111         * src/m4.c (usage, main): Detect write failures to stderr.
1112         * src/builtin.c (m4_m4exit): Likewise.
1113         * NEWS: Document this.
1115         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
1116         the limit.
1117         * NEWS: Document this.
1118         * doc/m4.texinfo (Invoking m4): Likewise.
1120 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1122         * src/path.c (include_env_init): Copy the string returned
1123         by getenv before overwriting it; POSIX disallows this.
1125 2006-10-09  Eric Blake  <ebb9@byu.net>
1127         * src/m4.c (main): Defer debugfile until after --help.
1128         * configure.ac (AC_INIT): Bump version number.
1129         * NEWS: Start changes of 1.4.7a.
1131 2006-09-25  Eric Blake  <ebb9@byu.net>
1133         Release 1.4.7:
1134         * configure.ac (AC_INIT): Bump version number.
1135         * NEWS: Describe changes since 1.4.6.
1137 2006-09-21  Eric Blake  <ebb9@byu.net>
1139         * doc/m4.texinfo (Invoking m4): Add clarification on option
1140         processing behavior.
1141         * THANKS: Update.
1142         Reported by Mikhail Teterin.
1144         * bootstrap: Add --force option, based on idea from coreutils.
1145         * README: Document that ./bootstrap and autoreconf are for
1146         developers, and not lightly done in tarballs.
1148 2006-09-20  Eric Blake  <ebb9@byu.net>
1150         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
1151         deprecation warning on -e.
1152         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
1153         * NEWS: Document this.
1155 2006-09-19  Eric Blake  <ebb9@byu.net>
1157         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
1158         -o/--error-output to --debugfile, and deprecate the former.  This
1159         will allow a future release to be more consistent with other GNU
1160         tools, with -o/--output affecting stdout, not debug.
1161         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
1162         * NEWS: Document this.
1164 2006-09-14  Eric Blake  <ebb9@byu.net>
1166         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
1167         --diversions. `m4 --help --version' now displays help, not
1168         version.
1169         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
1170         smaller scope.
1171         (show_help, show_version): No longer needed.
1172         (long_options, DIVERSIONS_OPTION): Backport patch from head to
1173         distinguish between -N and --diversions in warning.
1174         * doc/m4.texinfo (Invoking m4): Document this.
1175         * NEWS: Likewise.
1177 2006-09-11  Eric Blake  <ebb9@byu.net>
1179         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
1180         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
1181         seekable.
1182         (debug_set_file): Use STDOUT_FILENO.
1183         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
1184         with POSIX in regards to unread input.
1185         * NEWS: Document this fix.
1186         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
1188 2006-09-07  Eric Blake  <ebb9@byu.net>
1190         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
1191         * src/m4.h (push_file): Change prototype.
1192         * src/input.c (push_file, peek_input, next_char_1): Only call getc
1193         once at EOF, to avoid double ^D on terminal stdin; regression from
1194         2006-09-04.
1195         (push_file, pop_file): Allow reading stdin twice.
1196         * src/m4.c (main): Likewise.
1197         * src/builtin.c (include): Update caller.
1198         * NEWS: Document this change.
1199         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
1200         (Syscmd): Add a test that failed before this patch.
1202 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1204         * checks/check-them: Quote $pwd.
1206 2006-09-05  Eric Blake  <ebb9@byu.net>
1208         * src/builtin.c (define_macro): Warn on invalid macro name.
1209         * NEWS: Document this change.
1210         * doc/m4.texinfo: Fix typos.
1211         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
1212         (Ifelse): Backport some improvements from head.
1214 2006-09-04  Eric Blake  <ebb9@byu.net>
1216         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
1217         native echo is braindead.
1218         * checks/check-them (strip_needed): Ignore \r in output.  Now the
1219         testsuite will pass when cross-compiling from cygwin to mingw.
1221         * src/input.c (peek_input): Fix regression in handling macro
1222         without arguments as last token in file; debian bug 385720.
1223         (next_token): Always consume an input character.
1224         Reported by Andreas Schultz.
1225         * configure.ac (AC_INIT): Bump version number.
1226         * NEWS: Document this fix.
1227         * doc/m4.texinfo (History): Mention next version.
1228         (Changeword): Add example that exposes this bug.
1229         * THANKS: Update.
1231 2006-08-25  Eric Blake  <ebb9@byu.net>
1233         Release 1.4.6:
1234         * configure.ac (AC_INIT): Bump version number.
1235         * NEWS: Describe changes since 1.4.5.
1237         * Makefile.maint (web-manual): Give up on VPATH build during
1238         distribution.  But distributions are made so infrequently that
1239         this is not too much of a hardship.
1240         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1241         exists.
1243 2006-08-24  Eric Blake  <ebb9@byu.net>
1245         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1246         Solaris, produce output on just one argument.
1247         (m4_regexp, m4_patsubst): For consistency, do likewise.
1248         (m4_patsubst): Allow zero-length match at end of string.
1249         * doc/m4.texinfo (Sysval): Fix overfull hbox.
1250         (Bugs, Macro Arguments): Minor fixes.
1251         (Other tokens): Rearrange node order.
1252         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1253         * NEWS: Document these fixes.
1255 2006-08-22  Eric Blake  <ebb9@byu.net>
1257         * src/input.c (pop_input): Avoid empty filename with -di option.
1258         * src/debug.c (debug_message_prefix): Put space before message.
1260         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1262         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1263         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1265         * checks/check-them: State why a test is skipped.
1266         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1268         * ChangeLog: Add copyright.
1269         * AUTHORS: Likewise.
1270         * BACKLOG: Likewise.
1271         * README: Likewise.
1272         * THANKS: Likewise.
1273         * TODO: Likewise.
1274         * examples/COPYING: New file, add copyright for all the examples.
1275         * checks/get-them: Put copyright on testsuite files.
1277 2006-08-18  Eric Blake  <ebb9@byu.net>
1279         Don't let unrelated child processes see too many files.
1280         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1281         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1282         spelling in error message.
1283         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1284         (debug_set_output): Close debug file on exec.
1285         * src/m4.h (includes): Add cloexec.h.
1286         * src/output.c (make_room_for): Close diversions on exec.
1287         * src/path.c (path_search): Close include files on exec.
1288         * NEWS: Document this.
1290         Regular expressions were leaking memory.
1291         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1292         helper methods.
1293         (m4_regexp, m4_patsubst): Avoid memory leak.
1294         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1295         static.
1296         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
1297         from O(n^2) to O(n) for calculating word_start.
1298         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1299         O(1) bitmap, not O(n) search string.
1300         * NEWS: Document this fix.
1302 2006-08-17  Eric Blake  <ebb9@byu.net>
1304         * NEWS: Document previous checkin.
1306         * src/builtin.c (substitute): Avoid core dump when accessing
1307         beyond bound of regular expression.
1308         Reported by Karl Nelson.
1309         * doc/m4.texinfo (Regexp): Add example that causes core dump on
1310         some architectures prior to this patch.
1311         * THANKS: Updated.
1313 2006-08-16  Eric Blake  <ebb9@byu.net>
1315         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1316         clear that dumpdef does not always go to stderr.
1318         * src/builtin.c (m4_errprint): Flush buffers before printing to
1319         stderr.
1320         * THANKS: Updated.
1322 2006-08-15  Eric Blake  <ebb9@byu.net>
1324         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1325         per debian bug 96075.
1326         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1327         (Changeword): Don't use shift as an example of a swallowed word.
1328         (Divert): Discuss fact that divert is an English word.
1329         Reported by Richard A Nelson.
1331 2006-08-14  Eric Blake  <ebb9@byu.net>
1333         * doc/m4.texinfo (Invoking m4): Minor fixes.
1335 2006-08-12  Eric Blake  <ebb9@byu.net>
1337         * doc/m4.texinfo (Arguments): Hint at better exch macro.
1338         (Answers): Provide a better definition.
1340 2006-08-09  Eric Blake  <ebb9@byu.net>
1342         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1343         yet understand locales.
1344         * NEWS: Fix wording of a few items.
1346 2006-08-08  Eric Blake  <ebb9@byu.net>
1348         Avoid printing `NONE:0:' in error messages.
1349         * src/m4.h (m4_error_at_line): New function.
1350         * src/m4.c (m4_error_at_line): Implement.
1351         * src/input.c (skip_line, input_init, next_token): Use "", not
1352         "NONE", for no file, since NONE can be a real file name.
1353         * src/macro.c (expand_argument): Likewise.
1354         * src/debug.c (debug_message_prefix, trace_header): Check for
1355         current file.
1356         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1357         (Location): Document that synclines and internal message format
1358         are not impacted by redefining these macros.
1359         (M4exit): Hint at bug in fatal_error.
1360         (Answers): Provide workaround to match m4 output.
1362         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1363         * src/m4.h (m4_error): New function.
1364         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1365         error module deficiencies.
1366         (reference_error, suppress_line): No longer needed.
1367         * src/m4.c (m4_error): Implement.
1368         (main): No longer need to install error callback.
1370 2006-08-04  Eric Blake  <ebb9@byu.net>
1372         * src/m4.h (program_name): Declare.
1373         (suppress_line): New variable.
1374         (M4ERROR_AT_LINE): New macro.
1375         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1376         for error message format.
1377         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1378         * src/macro.c (expand_argument): Likewise.
1379         * checks/check-them (examples): Adjust to new message format.
1380         * src/builtin.c (m4___program__): New builtin.
1381         * doc/m4.texinfo (Location): Split from Errprint into new node,
1382         and document __program__.
1383         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1384         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1385         format.
1386         (Extensions): Document __program__.
1387         * NEWS: Document this change.
1389 2006-08-03  Eric Blake  <ebb9@byu.net>
1391         Don't confuse leading `(' in comment or quote with start of
1392         argument collection.
1393         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1394         TOKEN_CLOSE.
1395         (peek_input): Make private to input.c.
1396         (peek_token): New prototype.
1397         * src/input.c (default_word_regexp): Reduce ifdefs.
1398         (peek_input): Make static.
1399         (next_token): Return new token types.
1400         (match_input, MATCH): Add argument consume, which controls
1401         whether match should be pushed back.
1402         (peek_token): New function.
1403         (token_type_string) [DEBUG_INPUT]: New function.
1404         * src/macro.c (expand_token, expand_argument, collect_arguments):
1405         Handle new token types.
1406         * doc/m4.texinfo (Changequote, Changecom): Document this.
1407         * NEWS: Document this.
1409         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1411         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1412         overflow detection when sigstack exists but is not implemented.
1413         Fixes debian bug 154053.
1414         * THANKS: Updated.
1415         Reported by David Perlin.
1417 2006-08-02  Eric Blake  <ebb9@byu.net>
1419         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1420         close.
1422 2006-08-01  Eric Blake  <ebb9@byu.net>
1424         * src/input.c (skip_line, next_token): Remember current file in
1425         case input file ends abruptly.  Addresses debian bug 175365.
1426         (pop_input): Defer freeing storage that holds previous file
1427         name...
1428         (pop_wrapup): to here, after error message is issued.
1429         * src/macro.c (expand_argument): Remember current file in case
1430         input file ends abruptly.
1431         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1432         (M4wrap): Adjust testsuite accordingly.
1433         (Errprint): Document line number limitation of m4wrap.
1434         * NEWS: Document this fix.
1435         * THANKS: Update.
1437 2006-07-31  Eric Blake  <ebb9@byu.net>
1439         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1440         clean; fixes debian bug 311378.
1441         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1442         (Changequote, Changecom): Add examples to test this.
1443         * NEWS: Document this fix.
1444         * THANKS: Update.
1445         Reported by Steven Augart.
1447         * doc/m4.texinfo: Whitespace fix.
1448         * checks/get-them: Avoid exceeding 14-char file name limit.
1449         * THANKS: Update.
1451 2006-07-30  Eric Blake  <ebb9@byu.net>
1453         * src/path.c (path_search): Detect allocation failure.
1455         Use native free when it is good enough.
1456         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1457         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1458         Adjust calls.
1459         * src/symtab.c (free_symbol): Likewise.
1460         * src/m4.c (xfree, main): Likewise.
1461         * src/m4.h (obstack_chunk_free): Likewise.
1462         * src/path.c (path_search): Likewise.
1463         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1465         * doc/m4.texinfo (Errprint): Add example for last patch.
1466         * checks/check-them: Account for VPATH in latest example.
1468 2006-07-29  Eric Blake  <ebb9@byu.net>
1470         * src/path.c (path_search): Add result parameter, so that
1471         -I can be accounted for.  Debian bug 53685.
1472         * src/m4.h (path_search): Update prototype.
1473         * src/m4.c (main): Adjust callers.
1474         * src/freeze.c (reload_frozen_state): Likewise.
1475         * src/builtin.c (include, m4_undivert): Likewise.
1476         * NEWS: Document this change.
1477         Reported by Nicolas Lichtmaier.
1479 2006-07-28  Eric Blake  <ebb9@byu.net>
1481         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1482         several non-GNU makes.
1483         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1484         * src/m4.h: Likewise.
1485         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1486         /usr/ccs/bin/ucbcc.
1488 2006-07-27  Eric Blake  <ebb9@byu.net>
1490         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1491         (History): Update for 1.4.6.
1493         * src/m4.h (_): Remove K&R cruft.
1494         * src/builtin.c: Likewise.
1495         * src/debug.c: Likewise.
1496         * src/eval.c: Likewise.
1497         * src/macro.c: Likewise.
1498         * src/stackovf.c: Likewise.
1500         * doc/Makefile.am (m4.1): Improve man page.
1501         * src/m4.c (usage): Improve --help output, including adding the
1502         bug reporting address.
1503         (main): Follow GNU Coding Standards for --version output.
1505 2006-07-26  Eric Blake  <ebb9@byu.net>
1507         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1508         end-comment consistently, to match POSIX.
1510         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1511         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1512         (Incompatibilities): Document incompatibility of changecom
1513         vs. macro names, and of EOF in include.
1514         * src/input.c (next_token): Reject unterminated comments at EOF.
1515         (skip_line): Warn on unterminated dnl at EOF.
1516         * NEWS: Document these changes.
1518 2006-07-25  Eric Blake  <ebb9@byu.net>
1520         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1521         stdio-safer into fopen-safer and tmpfile-safer.
1522         * src/m4.c: Remove redundant include.
1524 2006-07-24  Eric Blake  <ebb9@byu.net>
1526         Fix bugs related to stream handling.
1527         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1528         unlocked-io stdio-safer stdlib-safer close-stream.
1529         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1530         provided by gnulib if needed.
1531         * src/output.c [! HAVE_TMPFILE]: Likewise.
1532         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1533         their safer counterparts.
1534         (retcode): New global variable.
1535         * src/input.c (pop_input): Check for read failure.
1536         * src/freeze.c (reload_frozen_state): Likewise.
1537         (produce_frozen_state): Check for write failure.
1538         * src/debug.c (debug_set_file): Likewise.
1539         * src/m4.c (usage, main): Likewise.
1540         (retcode): Make global.
1541         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1542         status is non-zero except when everything succeeds.
1543         * doc/m4.texinfo (M4exit): Document these changes.
1544         (Incompatibilities): Remove documentation of bug now fixed.
1545         * NEWS: Document these fixes.
1547 2006-07-22  Eric Blake  <ebb9@byu.net>
1549         * src/format.c (format): Avoid compiler warning that str may be
1550         used uninitialized.
1552 2006-07-21  Eric Blake  <ebb9@byu.net>
1554         * src/m4.h [UNIX]: Add more platforms that are close enough to
1555         categorize as UNIX, but which don't predefine __unix__.
1556         Reported by Nelson H. F. Beebe.
1558 2006-07-20  Eric Blake  <ebb9@byu.net>
1560         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1561         to explicitly ask for --assume-autoconf=2.60.
1563 2006-07-19  Eric Blake  <ebb9@byu.net>
1565         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1566         and exits normally with 129.
1567         Reported by Nelson H. F. Beebe.
1568         * THANKS: Update.
1570         * src/m4.h (EXIT_MISMATCH): Define.
1571         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1572         exiting with status 63.
1573         * src/m4.c (usage): Document this.
1574         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1575         * NEWS: Likewise.
1577         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1578         back-cover texts.
1580 2006-07-17  Eric Blake  <ebb9@byu.net>
1582         * src/format.c (format): Support F, g, and G specifiers.
1583         * doc/m4.texinfo (Format): Document this.
1584         * NEWS: Document this addition.
1586         * doc/m4.texinfo (Builtin): Delete redundant text.
1588         * configure.ac (AC_INIT): Bump version number.
1589         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1590         * NEWS: Document this fix.
1592 2006-07-15  Eric Blake  <ebb9@byu.net>
1594         Release 1.4.5:
1595         * configure.ac (AC_INIT): Bump version number.
1596         * NEWS: Describe changes since 1.4.4.
1598         * src/m4.c (usage): Document exit status.
1599         * doc/m4.texinfo: Use `exit status', not `exit code'.
1600         (Invoking m4): Document exit status.
1602         * bootstrap: Backport --help, --version from head.
1603         (func_update): New function, for easily grabbing up-to-date files
1604         from gnulib.
1605         * Makefile.maint (web-manual): Fix for VPATH builds.
1607 2006-07-14  Eric Blake  <ebb9@byu.net>
1609         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1610         looks bad in info.  Use @deffn rather than @example for
1611         describing prototypes.  Fix awkward wording and grammar.
1613         * src/builtin.c (substitute): Warn on bad escape sequences.
1614         Ignore trailing backslash.
1615         * doc/m4.texinfo (Regexp): Add documentation for this.
1616         * NEWS: Document this change.
1618         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1619         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1620         more examples.
1621         (Dnl): Update example to show side effects.
1622         * checks/get-them: Generate three digit test names.
1623         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1625 2006-07-13  Eric Blake  <ebb9@byu.net>
1627         * src/input.c (input_init): Simplify.
1628         (set_word_regexp): Treat empty string as default, since empty
1629         regexp would disable word parsing.
1630         * src/m4.c (user_word_regexp): Default to empty string.
1631         * src/builtin.c (builtin_tab): Make changeword blind.
1632         * doc/m4.texinfo (Changeword): Document this.
1633         * NEWS: Document this.
1634         * TODO: Knock off completed items.
1636         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1637         just the first.
1638         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1639         * NEWS: Document this change.
1641         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1642         warning.  Detect quoted leading space and overflow as warnings.
1643         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1644         Treat width as minimum number of digits, as required by POSIX.
1645         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1646         arguments.
1647         (m4_substr): Likewise.  Silently treat empty start as 0.
1648         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1649         * src/eval.c (eval_lex): Parse radix 1 numbers.
1650         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1651         one type of warning.
1652         (Manual): Document behavior of numeric parsing of empty string.
1653         (Divert, Incr): Document error handling.
1654         (Eval): Document radices better.
1655         (Incompatibilities): Document translit incompatibility.
1656         * NEWS: Document these changes.
1658         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1659         (web-manual): Simplify.
1660         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1661         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1662         (MAINTAINERCLEANFILES): Clean it as well.
1663         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1664         (MAINTAINERCLEANFILES): Clean it as well.
1666 2006-07-12  Eric Blake  <ebb9@byu.net>
1668         * doc/m4.texinfo (Extensions): Document how to overcome
1669         implementation difference in > 9 positional parameters.
1671         * src/m4.c (usage): Sort within sections.
1672         (nesting_limit): Raise default from 250 to 1024.
1673         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1674         standard.  Use @option where appropriate.
1675         (Invoking m4): Sort to match --help output.
1676         (Debug Levels): Sort.
1677         (Frozen files): Sort and break into two nodes.
1679         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1680         * NEWS: Document raised -L limit.
1682 2006-07-11  Eric Blake  <ebb9@byu.net>
1684         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1685         stress-test changeword before a release.
1686         * doc/m4.texinfo: More doc cleanups.
1687         (Copying This Manual): New node; actually include the FDL in the
1688         documentation.
1689         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1690         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1691         * NEWS: Mention documentation improvements.
1693         * src/m4.h (OS2): New platform macro.
1694         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
1695         platform macro.
1696         * doc/m4.texinfo (Platform macros): Document it.
1697         (Sysval): Remove non-portable test of system("").
1698         * NEWS: Document this change.
1699         Reported by Andreas Buening.
1701 2006-07-09  Eric Blake  <ebb9@byu.net>
1703         * doc/m4.texinfo (Undivert): Fix typo in last commit.
1704         * src/m4.c (usage): Document M4PATH.
1705         * src/path.c (path_search): Reject empty string.
1706         * src/output.c (insert_diversion): Ignore diversion 0.
1707         * src/builtin.c (m4_undivert): Ignore empty string.
1708         * NEWS: Document this fix.
1710 2006-07-08  Eric Blake  <ebb9@byu.net>
1712         * checks/get-them: Make filtering easier.
1713         * checks/check-them: Filter non-input lines, so line counts are
1714         more realistic in the documentation, and so changeword tests work
1715         even when dnl is disabled.
1716         * doc/m4.texinfo: Adjust example line numbers.  Clean up
1717         front-matter, following autoconf's example.
1718         (Changeword): Enable tests, skipping if changeword not supported.
1719         (Define, Defn, Ifelse): Backport more examples from head.
1720         (Input processing, Answers): New nodes, backported from head.
1721         (Include): Expand test to cover empty filename.
1722         (Undivert): Add test of undivert(0).
1724 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1726         * doc/m4.texinfo: Fix spelling errors.
1728 2006-07-07  Eric Blake  <ebb9@byu.net>
1730         * THANKS: Update.
1732         * doc/Makefile.am (m4.1): No need to go through a temporary file;
1733         this also ensures timestamps are updated.
1734         * src/m4.h (includes): Require config.h.  Assume string.h,
1735         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
1736         than prototyping ourselves.
1737         (builtin_func): Add parameter type-checking.
1738         (voidstar): Delete, now that we assume C89.
1739         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1740         voidstar changed.
1741         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1742         xfree.
1744 2006-07-06  Eric Blake  <ebb9@byu.net>
1746         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1747         binary-io.
1748         * src/m4.h (includes): Add binary-io.h for O_BINARY.
1749         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1750         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
1751         * NEWS: Mention this fix.
1753         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1754         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1756         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1757         runs first when needed.
1758         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1759         once in srcdir rather than multiple times in VPATH builds.
1761 2006-07-03  Eric Blake  <ebb9@byu.net>
1763         * checks/check-them: Use portable = in test.
1764         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1765         directory, as required by Solaris cc.  Include built headers, as
1766         required by Solaris make in VPATH build.
1767         * checks/Makefile.in: Use $(srcdir) where needed.
1768         (CHECKS): Factor $(srcdir) into macro.
1769         (DISTFILES): Likewise.  Automake takes care of distributing
1770         Makefile.in.
1771         (dist): Simplify.
1772         (Makefile): Use modern syntax of config.status.
1773         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1774         Avoid overfull and underfull hboxes in dvi.
1776         Fix 'make check' in VPATH build.  All files included by testsuite
1777         now live in a single directory.  Use forloop.m4 in testsuite.
1778         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1779         here...
1780         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1781         here.
1782         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1783         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1784         * checks/check-them: Avoid s/// when filename is in pattern.
1785         * examples/forloop.m4: Fix to match documentation.
1786         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1787         new locations.
1788         (Loops, Format): Actually use forloop.m4 in tests.
1790 2006-07-02  Eric Blake  <ebb9@byu.net>
1792         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1793         $(bindir) works in installcheck.
1794         (check, installcheck): No longer change directory, so that
1795         distcheck works with a read-only builddir.
1796         * checks/check-them: Work when pwd is no longer builddir.
1798 2006-07-01  Eric Blake  <ebb9@byu.net>
1800         * GNUmakefile: New file, borrowed from coreutils.
1801         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1802         * Makefile.maint (Makefile): Delete this rule, now that
1803         GNUmakefile includes Makefile.
1805 2006-06-30  Eric Blake  <ebb9@byu.net>
1807         For compatibility with other m4 implementations, sysval returns
1808         signal<<8 rather than 0 if syscmd is terminated by a signal.
1809         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1810         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1811         not provide wait macros.
1812         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1813         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1814         (m4_esyscmd): Set sysval to -1 on failure.
1815         (m4_sysval): Print 127 on failure, and accomodate signals if they
1816         are detectable.
1817         * NEWS: Document this change.
1818         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1819         last commit.
1820         * checks/check-them: Likewise.
1821         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1823         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1824         * src/freeze.c (produce_frozen_state): Use new spelling of
1825         platform macro.
1826         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1827         platforms.
1828         (m4_syscmd, m4_esyscmd): The empty command is successful.
1829         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1830         Document platform-dependence of system().
1831         (Syscmd): Add example.
1832         (Esyscmd): Make example more robust, and actually demonstrate
1833         rescanning.
1834         (Sysval): Expand test to cover esyscmd code path, and to check
1835         that empty command is successful.  Add conditional check for
1836         signal behavior.
1837         (Other Incompatibilities): Move platform macros from here...
1838         (Platform macros): ...to this new node.  Add windows macro.
1839         Check that exactly one platform macro is provided.
1840         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1841         .exe in error messages.  Allow for skipping checks.
1842         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1843         * NEWS: Document platform macros.
1845 2006-06-29  Eric Blake  <ebb9@byu.net>
1847         Fix buffer overrun bug.
1848         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1849         xvasprintf.
1850         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1851         variant instead, since [efg]cvt are obsolete and our use of them
1852         was buggy (savannah sr #104303).
1853         (format): Fix buffer overflow by using xasprintf.
1854         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1855         * NEWS: Document this fix.
1857         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1858         cross-compilation.
1859         (AC_CACHE_CHECK): Cache search for ecvt.
1861 2006-06-27  Eric Blake  <ebb9@byu.net>
1863         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1864         required by POSIX, and add example that exposed core dump on x86
1865         architectures.
1866         (Incompatibilities): Document incompatibility in eval precedence.
1867         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1868         behavior.
1869         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1870         * NEWS: Document this change.
1872         * doc/m4.texinfo: Use @noindent consistently.
1873         (Quoting Arguments): Document that unquoted parentheses group
1874         arguments.
1875         (Pseudo Arguments): Expand tests to show this.
1876         (Incompatibilities): Contrast traditional behavior of
1877         changequote.
1879 2006-06-24  Eric Blake  <ebb9@byu.net>
1881         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1882         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1883         (AC_CHECK_FUNCS_ONCE): Likewise.
1885 2006-06-23  Eric Blake  <ebb9@byu.net>
1887         * doc/m4.texinfo: Quoting cleanup throughout - follow
1888         autoconf-recommended style of one level of quote per parenthesis
1889         in the normal case.  Adjust error messages to match GNU coding
1890         standards (and to allow 'make check' to pass again).
1891         (Quoted strings, Inhibiting Invocation): Turn more examples into
1892         tests.
1893         (Comments): Resolve FIXME by adding example.
1894         (Define): Add example about underquoting.
1895         (Defn): Add example about use of $0.
1896         (Indir, Format): Resolve FIXME done in last commit.
1897         (Ifelse): Add example about creating blind macro.
1898         (Debugging): Fix grammar.
1899         (Dnl): Add example about dnl with arguments.
1900         (M4wrap): Be explicit that LIFO order is non compliant, and will
1901         change in m4 2.0.
1902         (Undivert): Resolve FIXME by adding example.
1903         (Frozen files): Document that m4wrap and sysval will not work
1904         consistently until m4 2.0.
1905         (Incompatibilities): Document another POSIX compliance bug, this
1906         time with changequote.  Document a traditional incompatibility
1907         with partial input spanning file boundaries.
1909         Make error messages more consistent with GNU coding standards -
1910         start with lower case, and don't end sentence with punctuation.
1911         * src/debug.c (trace_pre): Update message wording.
1912         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1913         Likewise.
1914         * src/freeze.c (produce_frozen_state, issue_expect_message),
1915         (reload_frozen_state): Likewise.
1916         * src/input.c (push_string_init, pop_init, init_macro_token),
1917         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1918         * src/m4.c (stackovf_handler, main): Likewise.
1919         * src/macro.c (expand_token, expand_argument, call_macro),
1920         (expand_macro): Likewise.
1921         * src/output.c (make_room_for, output_text, insert_file),
1922         (freeze_diversions): Likewise.
1923         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1925         * src/builtin.c (builtin_tab): Make format and indir blind.
1926         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1927         * NEWS: Mention the change to builtins.
1929 2006-06-22  Eric Blake  <ebb9@byu.net>
1931         Robustify frozen file format.
1932         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1933         macro.  Require V first, and only accept it once.  For F, use
1934         placeholder if builtin is not found, rather than warning.
1935         * src/m4.h (m4_placeholder): New prototype.
1936         * src/builtin.c: Unify error message style.
1937         (m4_placeholder): New function, warn if invoked.
1938         (builtin_tab): Add m4_placeholder.
1939         (m4_defn): Warn if placeholder is encountered.
1940         (find_builtin_by_addr): Handle placeholder.
1941         (find_builtin_by_name): Return placeholder on failure.
1942         (m4_builtin): Treat placeholder as undefined.
1943         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1944         * NEWS: Document this change.
1945         Reported by Bruno Haible.
1947         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1948         (tabchar): New macro, so that 'make check' still works.
1949         (Invoking m4): Document that ignored compatibility options -B, -S,
1950         and -T each consume an argument.
1951         * checks/get-them: Honor @tabchar{}.
1953         Avoid compiler warnings during -DDEBUG.
1954         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1955         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1956         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1957         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1958         (next_token) [DEBUG_INPUT]: Print before returning.
1959         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1960         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1962         Avoid mkstemp bugs on various platforms.
1963         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1964         * src/output.c [! HAVE_MKSTEMP]: Delete.
1965         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1966         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1967         * NEWS: Document this.
1969         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1970         Reported by Bruno Haible.
1972 2006-06-21  Eric Blake  <ebb9@byu.net>
1974         Avoid obsolete sigstack when POSIX sigaltstack is available.
1975         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1976         do likewise.
1977         * configure.ac (AC_CHECK_HEADERS): Likewise.
1978         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1979         obsolete and most hosts now have it in signal.h.
1980         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1981         (AC_CACHE_CHECK): Cache decision to use stackovf.
1982         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1983         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1984         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1985         simplify later code.
1986         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1987         in case of dereferencing a member of a NULL pointer.
1988         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1989         POSIX handler.
1990         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1991         EXIT_FAILURE in error, indent preprocessor directives.
1992         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1993         siginfo.h.
1994         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1995         Reported by Santiago Vila.
1997 2006-06-19  Eric Blake  <ebb9@byu.net>
1999         * THANKS: Update.
2001 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
2003         * checks/Makefile.in (PATH_SEPARATOR): New macro.
2004         (check, installcheck): Use it, for OS/2.
2006 2006-06-18  Eric Blake  <ebb9@byu.net>
2008         Consistently use "GNU M4" as package name, "m4" as executable
2009         name.
2010         * NEWS: Document previous fix.
2011         * THANKS: Update.
2012         * README: Fix grammar.  Document that --enable-changeword is on
2013         its last leg.
2014         * doc/m4.texinfo (Top, Changeword): Likewise.
2015         (Sysval): Enhance this test.
2016         (History): Backport this section from CVS head, and update.
2018 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
2019             Eric Blake  <ebb9@byu.net>
2021         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
2022         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
2023         big-endian and little-endian wait status definitions.
2024         (m4_sysval): Use WEXITSTATUS.
2025         Reported by Andreas Buening.
2027 2006-06-18  Eric Blake  <ebb9@byu.net>
2029         * configure.ac (AC_INIT): Bump version number.
2030         * NEWS: Describe changes in 1.4.4c.
2032 2006-06-17  Eric Blake  <ebb9@byu.net>
2034         Beta Release 1.4.4b:
2035         * configure.ac (AC_INIT): Bump version number.
2036         * NEWS: Describe changes since 1.4.4.
2037         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
2039         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
2040         bootstrap.
2041         * checks/Makefile.in (maintainer-clean): Add missing target.
2042         * COPYING: Remove generated file from CVS.
2044 2006-06-16  Eric Blake  <ebb9@byu.net>
2046         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
2048 2006-06-15  Eric Blake  <ebb9@byu.net>
2050         * checks/wrapfifo.m4: New file.  Use it...
2051         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
2052         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
2054         * src/m4.h (to_uchar): New function.
2055         * src/eval.c (eval_lex): Use it to avoid passing signed char to
2056         isdigit, isalpha, isupper, islower, isspace, isalnum.
2057         * src/builtin.c (expand_user_macro): Likewise.
2058         * src/format.c (format): Likewise.
2059         * src/macro.c (expand_argument): Likewise.
2060         * NEWS: Document this security fix.
2062         Message cleanup.
2063         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
2064         * src/freeze.c (reload_frozen_state): Fix typo in message.
2065         (produce_frozen_state): Standardize on builtin, not built-in.
2066         * src/builtin.c (numeric_arg, bad_argc): Likewise.
2068         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
2069         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
2070         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
2071         gnulib.
2072         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
2073         * m4/gnulib-cache.m4: New file, from gnulib.
2074         * bootstrap: Invoke gnulib-tool --update.
2075         * src/m4.c (main): Cast away const.
2076         * NEWS: Document that regex is updated.
2077         * THANKS: Update.
2079 2006-06-08  Eric Blake  <ebb9@byu.net>
2081         * configure.ac (changeword): Work even when changeword is not a
2082         macro.
2083         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
2084         Delete; now done by automake.
2085         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
2087 2006-06-07  Eric Blake  <ebb9@byu.net>
2089         * lib/regex.c (bcmp_translate): Canonicalize type name.
2090         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
2091         * configure.ac (changeword): Disable changeword for the creation
2092         of configure, in case of bootstrapping with an m4 configured with
2093         --enable-changeword.
2095         Distribute a rudimentary man page.
2096         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
2097         can feed help2man.
2098         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
2099         (SUFFIXES, m4.1): New macros and rules to build m4.1.
2101 2006-06-06  Eric Blake  <ebb9@byu.net>
2103         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
2104         compiler warnings at -O2.
2105         * lib/getopt.c (_getopt_internal): Likewise.
2107         Cleanup of previous patches.
2108         * src/input.c (struct input_block): Remove traced member.
2109         (push_macro, init_macro_token): Don't pass trace status around.
2110         * src/m4.h (struct token_data): Remove traced member.
2111         (struct symbol, struct builtin): Reduce unused space.
2112         (TOKEN_DATA_FUNC): Simplify.
2113         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
2114         (push_macro, define_builtin): Remove unused parameter.
2115         * src/builtin.c (define_builtin, builtin_init, define_macro),
2116         (m4_defn): Don't pass trace status around.
2117         * src/macro.c (expand_argument): Likewise.
2118         * src/freeze.c (reload_frozen_state): Likewise.
2119         * src/symtab.c: Whitespace cleanup.
2120         * NEWS: Clean up wording.
2121         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
2122         ensure tests actually expose bugs prior to today's patches.
2124         Trace status of builtins is no longer inherited across
2125         define(...,defn(...)).  Fixes bug that autom4te had been working
2126         around.
2127         * src/builtin.c (define_builtin): Don't override trace status.
2128         * doc/m4.texinfo (Trace): Add test for this.
2129         * NEWS: Document this.
2131         When changing macro definitions inside the arguments to the macro,
2132         consistently preserve the old definition that was in effect before
2133         argument collection, similar to the C pre-processor.
2134         Reported by John Brzustowski.
2135         * NEWS: Document this change.
2136         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
2137         this policy, and add tests that expose core dumps prior to this
2138         patch.
2139         * src/m4.h (struct symbol): New members to track when a symbol is
2140         still in use after removal from the symbol table.
2141         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
2142         (free_symbol): Prototype.
2143         * src/macro.c (expand_macro): Track pending expansions of a
2144         symbol.  On completion, if a symbol is deleted and no longer
2145         pending, free its memory.
2146         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
2147         is still in use.
2148         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
2149         is still in use.
2150         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
2151         in use as deleted and remove from the table without freeing
2152         memory.
2153         (symtab_print_list) [DEBUG_SYM]: More debug output.
2155         * src/symtab.c (hack_all_symbols): Allow certain modifications of
2156         the symbol table during traversal.
2157         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
2158         SYMBOL_POPDEF, since only the latter is safe with
2159         hack_all_symbols.
2161         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
2162         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
2163         Preserve placeholder when macro is being traced.
2164         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
2165         symbol is not defined.
2166         (set_trace): Remove placeholder when no longer traced.
2167         (m4_traceon): On named traces, always reserve a slot in the
2168         symbol table.
2169         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
2170         * NEWS: Document new trace behavior.
2171         * doc/m4.texinfo (Trace): Tracing by name now consistently works
2172         no matter whether that macro is currently defined.
2173         (Incompatibilities): Document differences between traditional and
2174         GNU trace.
2176 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2177             Eric Blake  <ebb9@byu.net>
2179         * src/m4.h (hash_table_size): Now size_t instead of int.
2180         * src/m4.c (hash_table_size): Likewise.
2181         (main): Adjust to this; use atol rather than atoi.
2182         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
2183         (symtab_init, lookup_symbol, hack_all_symbols):
2184         Use size_t for sizes and indexes, not int.
2185         (symtab_print_list) [DEBUG_SYM]: Likewise.
2186         (hash): Likewise.  Don't case-fold in the hash function.
2187         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
2188         Don't assume hash word is 32 bits.
2189         * NEWS: Document this change.
2191 2006-06-04  Eric Blake  <ebb9@byu.net>
2193         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
2194         to allow compilation, for use in debugger.
2195         (profiles, current_mode) [DEBUG_SYM]: New variables.
2196         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
2197         determining hash table performance.
2199 2006-05-31  Eric Blake  <ebb9@byu.net>
2200             John Brzustowski  <jbrzusto@fastmail.fm>
2202         * src/input.c (input_stack): Delete; use current_input instead.
2203         (wrapup_stack): Dynamically allocate, so that recursion is handled
2204         properly.
2205         (push_wrapup): Use current wrapup stack.
2206         (pop_wrapup): Rotate wrapup stack to current, and create new
2207         wrapup stack.
2208         (input_init): Dynamically allocate stacks.
2209         * NEWS: Update, now that recursive m4wrap can no longer cause
2210         core dump.
2212 2006-05-31  Eric Blake  <ebb9@byu.net>
2214         * lib/getopt.c: Fix copyright year.
2215         * lib/obstack.c: Ditto.
2216         * src/builtin.c: Ditto.
2218 2006-05-30  Eric Blake  <ebb9@byu.net>
2220         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2221         Reported by John Brzustowski.
2222         (Incompatibilities): Document known POSIX incompatibilities.
2223         * THANKS: Update.
2225 2006-05-29  Eric Blake  <ebb9@byu.net>
2227         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2228         in read-only dir.
2230         Use automake.
2231         * Makefile.am: New file.
2232         * doc/Makefile.am: Ditto.
2233         * examples/Makefile.am: Ditto.
2234         * lib/Makefile.am: Ditto.
2235         * src/Makefile.am: Ditto.
2236         * acinclude.m4: New file, renamed from aclocal.m4.
2237         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2238         (AC_ARG_PROGRAM): Now redundant.
2239         (STACKOVF): Turn into automake conditional.
2240         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2241         * checks/Makefile.in: Converting this dir to automake was not
2242         trivial; for now, just add missing targets demanded by top-level.
2243         * INSTALL: Remove files that are now generated from CVS.
2244         * Makefile.in: Ditto.
2245         * aclocal.m4: Ditto.
2246         * install-sh: Ditto.
2247         * mkinstalldirs: Ditto.
2248         * doc/Makefile.in: Ditto.
2249         * doc/texinfo.tex: Ditto.
2250         * examples/Makefile.in: Ditto.
2251         * lib/Makefile.in: Ditto.
2252         * src/Makefile.in: Ditto.
2254         * AUTHORS: Backport from CVS head, and update.
2255         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2257 2006-05-27  Eric Blake  <ebb9@byu.net>
2259         * lib/regex.c (regex_compile): Kill compiler warnings.
2260         * lib/getopt.c: Likewise.
2261         * lib/obstack.c: Likewise.
2262         * src/builtin.c (builtin_init): Likewise.
2263         * src/path.c (path_search): Likewise.
2265         * doc/m4.texinfo: Fix usage of a vs. an.
2266         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2267         overfull hbox warnings.
2268         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2270         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
2271         quoting.
2272         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2273         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2274         assume C89.
2275         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2276         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2277         * src/Makefile.in: Delete remains of ansi2knr.
2278         * src/ansi2knr.1: Delete.
2279         * src/ansi2knr.c: Delete.
2281 2006-05-25  Eric Blake  <ebb9@byu.net>
2283         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
2284         `illegal'.
2286         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2287         Reported by Karl Berry.
2289 2006-05-24  Eric Blake  <ebb9@byu.net>
2291         * Makefile.in (html): New target.
2292         * doc/Makefile.in (html, m4.html): Likewise.
2293         (MAKEINFOHTML): New macro.
2294         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2295         rendering.
2296         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2297         absolute URL.
2298         Reported by Bob Badour.
2300         * THANKS: Update.  Move reporter's email addresses here, instead
2301         of in ChangeLog.
2303 2006-05-11  Eric Blake  <ebb9@byu.net>
2305         * THANKS: Update.
2306         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2307         patched on 2005-12-04.
2308         Reported by Ilya N. Golubev.
2310         * bootstrap: New file, so that generated files need not be stored
2311         in CVS.
2312         * Makefile.in (DISTFILES): Add bootstrap.
2314         Make testsuite less sensitive to doc changes.
2315         * doc/m4.texinfo: Use m4.input instead of filename.
2316         * checks/check-them (xerr): Turn m4.input into filename.
2317         * checks/Makefile.in (dist): Depend on stamp-checks.
2319         Portability updates for OS/2.
2320         * src/Makefile.in (EXEEXT, OBJEXT): Define.
2321         (LINK): Use CFLAGS.
2322         (.c.obj): Define.
2323         * lib/Makefile.in (OBJEXT): Define.
2324         (.c.obj): Define.
2325         * doc/Makefile.in (install, uninstall): Install info files into
2326         the dir listing.
2327         Reported by Andreas Buening.
2329 2006-05-09  Eric Blake  <ebb9@byu.net>
2331         * install-sh: Update to newer upstream version.
2332         * mkinstalldirs: Likewise.
2333         Reported by Andreas Buening.
2335         * src/m4.c (main): Bump copyright year.
2336         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2337         * doc/Makefile.in (datarootdir): Likewise.
2339 2006-05-08  Eric Blake  <ebb9@byu.net>
2341         * THANKS: Update.
2342         * doc/m4.texinfo (Bugs): Backport bug email address from head.
2343         Reported by Stepan Kasal.
2345 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
2347         * input.c (match_input): Do not pass expression with side effect
2348         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
2349         * NEWS: Updated.
2351 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2353         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2354         Reported by Damian Menscher.
2356 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2358         * configure.ac (AC_INIT): Bump to 1.4.4a.
2360 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2362         Release 1.4.4:
2363         * configure.ac (AC_INIT): Bump to 1.4.4.
2364         * NEWS: Describe 1.4.4's changes.
2365         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2367 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2369         * src/m4.c: fix return code when non-existent files are processed
2371 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2373         * README: update email address for bug reports.
2375 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2377         * doc/m4.info: Generated files are not kept in the repository.
2379 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2381         The FSF are moving offices today.  Changed their contact address
2382         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2383         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2385         Also, some of the files here were never updated from the previous
2386         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2387         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2389 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2391         * Makefile.in (bindir, infodir): Substitute from configure rather
2392         than hardcode.
2393         * doc/Makefile.in (infodir): Ditto.
2394         * src/Makefile.in (bindir): Ditto.
2395         * NEWS: Updated.
2397 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2399         Changes needed to automate the release process for 1.4.3:
2401         * Makefile.in (dist): Make .tar.bz2 tarball too.
2402         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2403         (cvs-news): Look 1 line further down for NEWS release number.
2404         (cvs-dist): We don't use automake, so make dist is fine.
2405         Remove double . before suffixes.
2406         (cvs-release): Don't mention manual.html.
2407         (fetch): Get latest gendocs files.
2408         (web-manual): Rewritten to use gendoc for multiformat manuals.
2409         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2410         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2411         preserving, but case insensitive, so generating html docs per node
2412         clashes between Index.html, the node file, and index.html, the
2413         top-level of the document tree...
2414         (Index macro): ...so renamed to this.  Changed all references.
2416 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2418         * configure.ac (AC_INIT): Bump to 1.4.3a.
2420 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2422         Release 1.4.3:
2423         * configure.in (AC_INIT): Bump to 1.4.3.
2424         * NEWS: Describe 1.4.3's changes.
2426 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2428         * Makefile.maint: New file with release rules, from CVS libtool.
2429         * Makefile.in (DISTFILES): Add Makefile.maint.
2430         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2431         canonical versions.
2433 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2435         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2436         checks/47.patsubst, with a redundant @comment to prevent emacs
2437         from removing it accidentally again.
2438         * checks/get-them: Allow for trailing spaces tucked behind
2439         @comment marks.
2441 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2443         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2444         * src/Makefile.in (install, uninstall): Likewise.
2446 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2448         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2449         on Cygwin.
2450         Reported by Eric Blake.
2452 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2454         * lib/regex.c, lib/regex.h: Updated from gnulib.
2455         * src/input.c (set_word_regexp):  Don't change the word_regexp
2456         unless it compiles correctly.
2457         * NEWS: Updated.
2458         Reported by Frank Schwidom.
2460         * Makefile.in (stamp-h): Regenerate config.h properly.
2462 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2464         * configure.ac (AC_DEFINE): Fix overquoting of description
2465         argument.
2467         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2468         recognition macros.
2469         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2470         on Windows, so that the frozen file reader will work.
2471         Reported by Josef T. Burger.
2473         * src/m4.c (main): Modernise the --version output.
2475 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2477         Modernise the configury a little to prevent spurious errors from
2478         Autoconf-2.59's autoreconf:
2480         * config.h.in: Renamed to...
2481         * config-h.in: ...this to better support DOS 8.3 file systems.
2482         * acconfig.h: Removed.
2483         * configure.in: Renamed to...
2484         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2485         entry comments.  Slight reorganisation and reformatting.
2486         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2487         entry comments.
2488         (AC_INIT): Use a modern 3 argument call.
2489         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2490         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2491         s/PRODUCT/PACKAGE/g.
2492         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2493         config.h.in.  Added configure.ac, config-h.in.
2494         (stamp-h.in): Removed acconfig.h from dependencies.
2495         (configure): Depends on configure.ac, not configure.in.
2496         * doc/Makefile.in (stamp-vti): Ditto.
2497         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2498         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2499         * configure: Regenerated.
2501 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2503         * src/output.c (mkstemp): Make non-static, and build regardless of
2504         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2505         * NEWS: Update.
2507 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2509         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2510         changes from your editor buffer first.
2512         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2513         * src/m4.c: And include them as appropriate.
2514         * NEWS: Updated.
2516 2004-09-09  Andreas Schwab  <schwab@suse.de>
2518         Refactoring of the string read case in next_char provides about a
2519         20% speedup of M4 as typically used by autoconf:
2521         * src/input.c (next_char_1): Renamed from next_char.
2522         (next_char): New macro.
2523         * NEWS: Updated.
2525 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2527         * configure.in (VERSION): Bump to 1.4.2a.
2529 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2531         Release 1.4.2.
2532         * configure.in (VERSION): Bump to 1.4.2.
2533         * News: Describe 1.4.2's changes.
2535         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2536         relies on this.
2537         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2538         (m4_maketemp): Clear errno before calling mkstemp.
2539         * src/path.c (path_search): Don't let "free" trash errno when
2540         returning NULL.
2541         * src/output.c (insert_file): Don't assume errno has a valid
2542         value simply because fread returns zero.  This fixes a
2543         portability bug reported by Marion Hakanson in
2544         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2546 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2548         * configure.in (VERSION): Bump to 1.4.1a.
2549         * NEWS: Place holder for next stable release.
2551 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2553         Release 1.4.1.
2554         * configure.in (VERSION): Bump to 1.4.1.
2555         * NEWS: Describe 1.4.1's changes.
2557         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2558         pacify Autoconf 2.59.
2560         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2561         to pacify Texinfo 4.7.
2562         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2564         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2565         pacify Sun C compilers.
2567 2003-09-28  Akim Demaille  <akim@epita.fr>
2569         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2570         botch.
2572 2003-09-03  Santiago Vila  <sanvila@debian.org>
2574         * examples/stackovf.sh: Use tempfile if available.
2576 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2578         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2579         * src/output.c (m4_insert_file): Do not mix buffered and
2580         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2582 2001-02-01  Santiago Vila  <sanvila@debian.org>
2584         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2585         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2587 2001-02-01  Matt Kraai  <kraai@debian.org>
2589         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2590         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2591         empty file rather than to a nonexistent file.  This closes a common
2592         security hole.
2593         * src/builtin.c (m4_maketemp): Implement the above, by using
2594         mkstemp rather than mktemp.  (trivial change)
2596 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2598         * src/builtin.c (expand_ranges): Added break after trailing dash.
2599         This caused misbehaviors on some systems.
2601 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2603         Release 1.4.
2604         * doc/Makefile.in (realclean): Also remove stamp-vti.
2605         Reported by Eric Backus.
2607 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2609         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2610         be opened, return immediately after producing the error message.
2611         Reported by Andreas Schwab.
2613         * configure.in: Check for const only after having found possible
2614         ANSIfying compiler flags, this is of no use to check it before.
2615         Reported by Alexander Lehmann.
2617 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2619         * src/macro.c (collect_arguments): Cast obstack arguments to
2620         (voidstar), so avoiding compiler warnings.
2621         Reported by Joseph E. Sacco.
2623         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2624         (int) so they correspond to %d format items.
2625         Reported by Joseph E. Sacco.
2627         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2628         * src/symtab.c (free_symbol): Idem.
2629         Reported by Karl Vogel.
2631 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2633         * Makefile.in (DISTFILES): Distribute BACKLOG.
2635         * configure.in: Define PRODUCT and VERSION.
2636         * acconfig.h: Document PRODUCT and VERSION.
2637         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2638         constant string m4 and variable or parameter named version.
2640 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2642         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2643         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2644         defines __STDC__ to 0, for indicating it is *not* ANSI!
2645         Reported by Kaveh R. Ghazi.
2647         * configure.in: Added obsolescent tests for AIX and Minix.
2649         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2650         which texclean does not exist anymore.
2651         Reported by Eric Backus, Jim Meyering, John David Anglin and
2652         Joseph E. Sacco.
2654 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2656         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2657         Reported by John David Anglin.
2659         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2660         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2661         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2662         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2663         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2664         of $U, put underline in extensions rather than in basenames.  Use
2665         implicit rules, now that regularity makes this possible.
2666         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2667         of ansi2knr whenever it is needed.
2668         * configure.in: Adjusted for correct STACKOVF substitution.
2669         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2670         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2671         Reported by David MacKenzie.
2673         * Makefile.in: Remove binprefix.  Use transform_name instead.
2674         Reported by David MacKenzie.
2676         * doc/Makefile.in: Create version.texi, use it, clean it.
2677         Reported by Jim Meyering.
2679 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2681         * Makefile.in (all, install, uninstall): Depend on Makefile.
2683         * Makefile.in: For actions invoking $(MAKE) from within compound
2684         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2685         the top-level make may exit successfully when it should fail.
2686         Reported by Jim Kingdon.
2688         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2690         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2691         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2692         * configure.in: Substitute PRODUCT and VERSION.
2694         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
2696 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
2698         * Makefile.in (mostlyclean-local): Do not remove *~.
2699         * */Makefile.in (mostlyclean): Idem.
2700         Reported by Robert E. Brown and Richard Stallman.
2702 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
2704         * src/m4.h: Get rid of CONFIG_BROKETS.
2706 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
2708         * configure.in: Use AC_ARG_PROGRAM.
2709         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
2710         Reported by David MacKenzie.
2712 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
2714         * configure.in: Do not add -O to CFLAGS for GNU C, now that
2715         configure does it automatically.
2716         Reported by Jim Meyering.
2718 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
2720         * src/stackovf.c: Declare the handler_t typedef earlier in the
2721         code, use it for stackovf_handler.
2722         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2723         casting sigsegv_handler.
2724         Reported by Robert Bernstein.
2726         * src/m4.c (main): Initialize program_name to argv[0] without
2727         basename'ing it.
2728         Reported by Karl Berry.
2730 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
2732         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2733         Reported by Karl Berry.
2735 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
2737         * lib/Makefile.in (mostlyclean): Added.
2738         (TAGS): Make in $(srcdir).
2740         * configure.in: Use `choke me' in test, like everywhere!
2742         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2743         unreacheable and useless.
2745         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2747         * lib/Makefile.in (DISTFILES): Distribute TAGS.
2748         (distclean): Do not remove TAGS.
2749         (realclean): Remove it.
2750         * Makefile.in: Make TAGS in lib also, not just in src.
2751         Reported by Karl Berry.
2753         * Makefile.in (distclean, realclean): Instead of recursively
2754         calling $(MAKE) for the -local part, allow parallel execution of
2755         -recursive and -local, only delay the removal of config.status,
2756         which is repeated in both goals.
2758 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
2760         Release 1.3.
2761         * Makefile.in: Group all *clean-recursive goals in one, using sed
2762         to remove `-recursive' while calling make recursively.  Also, use
2763         a subshell for each recursive $(MAKE).
2764         Reported by Jim Meyering.
2766         * src/m4.h (memcpy): Define with bcopy for BSD systems.
2767         Reported by Kaveh R. Ghazi.
2769         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2770         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2771         specify it.
2773         * configure.in: Use date instead of touch for stamp-h.
2774         * Makefile.in (stamp-h.in): Idem.
2776         * Makefile.in (distclean, realclean): Force serial execution of
2777         both goals, in case parallel makes are being used.
2778         Reported by Jim Meyering.
2780         * src/Makefile.in (DISTFILES): Distribute TAGS.
2781         (distclean): Do not remove TAGS.
2782         (realclean): Remove it.
2783         Reported by Karl Berry.
2785 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
2787         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
2788         to old names, for following Autoconf.
2790 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
2792         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2793         ./install.sh will not be correctly referred to in sub-Makefiles.
2794         Reported by John David Anglin.
2796         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2797         Reported by Eric Backus.
2799         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2800         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2801         config.status into remaking this directory's Makefile only.
2802         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2803         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2804         Reported by Jim Meyering.
2806 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2808         * configure.in: Correct stack overflow detection logic, taking
2809         care of systems having only incomplete implementations (like for
2810         Pyramid 9820 OSx 5.0d).
2811         Reported by Kaveh R. Ghazi.
2813         * src/Makefile.in (TAGS): Remote -t from etags call.
2815 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2817         * lib/Makefile.in (install): Depend on all.
2819 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2821         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2822         Reported by Jim Meyering and John David Anglin.
2824         * Makefile.in (distclean-local): Delete config.log.
2825         Reported by Jim Meyering.
2827         Solidify frozen files with respect to -P:
2828         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2829         calling a function by that name.  Declare the variable.
2830         * src/m4.h: Adjust declaration for prefix_all_buitins.
2831         * src/builtin.c (builtin_init): Merge in functionality from
2832         previous prefix_all_buitins function, while making entries in the
2833         symbol table, but not modifying the builtin description itself.
2835         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2836         because *many* compilers do not accept an empty `default:'.
2837         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2838         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2840         * configure.in: Use AC_TYPE_SIGNAL.
2841         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2842         Reported by Robert Bernstein.
2844         * checks/Makefile.in (check): Modify PATH so check-them will find
2845         m4 in the src directory.
2846         * Makefile.in (check): Don't.
2847         Reported by Akiko Matsushita and Jim Meyering.
2849         * src/output.c (make_room_for, output_character_helper): New
2850         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2851         a per buffer MAXIMUM_BUFFER_SIZE.
2853         * src/output.c (output_text): New function, for optimizing the
2854         output of strings of characters.  Use it.
2856 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2858         * doc, src: New directories reorganizing the distribution.
2859         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2860         files.
2861         * Makefile.in: Adjusted.
2862         * configure.in: Configure new Makefiles.
2864         * m4.h: Declare STRING typedef.  Use it for comment and quote
2865         strings, adjusting all references.  (This is the rudiments of a
2866         beginning for the eventual withdrawal of NUL terminated strings.)
2867         * output.c (shipout_text): Accept a length parameter, and use it.
2868         All callers adjusted.
2870 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2872         * m4.h: Include <unistd.h> if it exists.
2873         * stackovf.c: Don't.
2875         Clean up for current_diversion variable:
2876         * output.c: Move current_diversion from builtin.c.
2877         * m4.h: Declare current_diversion so builtin.c can access it.
2878         * output.c (output_init, make_diversion): Initialize or update
2879         current_diversion.
2880         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2881         alone.
2883         Remove limit on number of diversions:
2884         * output.c: Replace ndiversion by diversions, declare it.
2885         (output_init): Allocate only diversion 0.
2886         (make_diversion): Allocate new diversions as needed.
2887         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2888         * m4.c: Still accept -N, but do nothing with it.
2889         Reported by David MacKenzie.
2891         Freeze diversions:
2892         * output.c (freeze_diversions): New function.
2893         * m4.h: Declare freeze_diversions.
2894         * freeze.c: Document frozen file format, revise it, call
2895         freeze_diversions to add diversions to frozen format, and code to
2896         reload them properly.
2897         * m4.c: Do not undivert automatically at end when status being
2898         frozen.  Do not call builtin_init when reloading frozen state.
2900         Speed up diversion processing:
2901         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2902         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2903         structure and variables, cached variables out of output_diversion,
2904         reallocate_diversion_for and OUTPUT_CHARACTER.
2905         (shipout_text, make_diversion, insert_diversion): Adapted to new
2906         structures.
2907         (insert_file): Use better buffering.
2908         Reported by David MacKenzie.
2910 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2912         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2913         dist works from another build directory.
2915 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2917         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2918         constant HASHMAX, for -H option to work better.
2920         * builtin.c (DECLARE): Simplify by using _ ().
2922         * freeze.c: New file.
2923         * Makefile.in: Compile it, distribute it.
2924         * m4.c: Recognize, document and process --freeze-state (-F) and
2925         --reload-state (-R) options.  Pass a true flag to builtin_init
2926         only if no reloading some state.
2927         * builtin.c (define_builtin): Remove static specifier.
2928         (find_builtin_by_name): Remove static specifier.
2929         (builtin_init): Accept and obey a flag argument.
2930         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2932 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2934         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2935         specifier.
2937         * configure.in: Implement --with-dmalloc.
2938         * acconfig.h: Document WITH_DMALLOC.
2939         * m4.h: Add code for when WITH_DMALLOC.
2941 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2943         * m4.c (long_options): Use "error-output", the dash was missing.
2944         Reported by Akiko Matsushita.
2946 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2948         * m4.h: Include <sys/types.h>.
2949         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2950         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2951         int.
2952         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2953         as size_t, not int.
2954         * builtin.c (dump_args): Declare len as size_t, not int.
2956         * debug.c: Prototype the forward declaration of debug_set_file.
2958         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2959         shadowing of this variable.
2960         * output.c (insert_diversion): Idem.
2962         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2963         (input_init): Duplicate default quote and comment strings.
2964         (set_quotes): Free previous quote strings in all cases.  Duplicate
2965         even default quote strings.
2966         (set_comment): Free previous comment strings in all cases.
2967         Duplicate even default comment strings.
2969         * configure.in: Updated for Autoconf 2.0.
2970         * Makefile.in (distclean-local): Also delete config.cache.
2972         * m4.c (usage): Reorganize the --help output by topic.  Include a
2973         description for debugging flags.
2975 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2977         * configure.in: If sigaction is available and SA_ONSTACK defined,
2978         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2979         defined, use sigvec.  Else don't compile stackovf.c.
2980         * stackovf.c (setup_stackovf_trap): Idem.
2981         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2982         and Simon Leinen.
2984 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2986         * m4.c (usage): Replace printf par fputs.
2988 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2990         * Release 1.2
2992 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2994         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2995         check for RLIMIT_STACK, combine in the checking for getrlimit.
2996         All those things are not universally available.
2997         * stackovf.c: Split setting up the trap handler and catching
2998         signals, for better taking care of various configure outcomes.
2999         * examples/stackovf.sh: Correct a typo.
3000         Reported by Eric Backus, Jim Avera and Jim Meyering.
3002 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
3004         * ansi2knr.c: New version sent by its author, Peter Deutsch.
3006 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
3008         * Makefile.in: Modify so parallel make will not try making
3009         lib/libm4.a twice simultaneously.
3010         Reported by Jim Meyering.
3012 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
3014         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
3015         error message, for when no code possibility exists.  Even if this
3016         line is completely #ifdef'ed out, it brings a syntax error.
3017         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
3019         * Makefile.in (install): Have install depend on all too, for lib
3020         to be remade as needed.
3022         * examples/stackovf.sh: Try ksh, bsh and bash for shells
3023         providing ulimit, instead of using only ksh.
3024         Reported by Jim Avera and Joseph E. Sacco.
3026 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
3028         * Makefile.in (check): Have it depend on all instead of m4.  In
3029         this way, a change in lib will be detected and processed.
3031         * builtin.c (numeric_arg): Use strtol and verify the conversion,
3032         instead of using sscanf which stops as soon as there is a
3033         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
3034         and divert(1xyzzy) were all accepted without any warning or error
3035         messages.
3036         * m4.h: Declare strtol as long if not including stdlib.h.
3037         * configure.in: Check for limits.h, and replace strtol if missing.
3038         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
3039         * lib/strtol.c: New file, from elsewhere.
3040         Reported by Andreas Schwab.
3042 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
3044         * macro.c (expand_macro): Cast value to (boolean) prior to
3045         assigning it to traced.
3046         Reported by Tom McConnell.
3048         * Makefile.in (m4): Always make all in lib first.
3049         Reported by Jim Meyering.
3051 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
3053         * stackovf.c: Isolated OS-dependent sections; Improved portability,
3054         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
3055         handlers), and a default error message if the fault address is not
3056         available (when neither siginfo.h nor BSD sigcontext are supported).
3057         * configure.in: Changes for stackovf.h: Check for sigcontext,
3058         sigaction, sigstack, and define rlim_t as int if necessary.
3059         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
3060         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
3061         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
3063 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
3065         * configure.in: Use AC_SET_MAKE.
3066         * Makefile.in: Use @SET_MAKE@.
3067         Reported by Jim Meyering.
3069         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
3070         Reported by Ian Taylor.
3072 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
3074         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
3075         because siginfo.h is unrelated to standard headers, and siginfo.h
3076         is already checked for.
3077         Reported by Joseph E. Sacco.
3079         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
3080         PROTOTYPES.
3081         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
3082         AC_PROTOTYPES.
3084 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
3086         * builtin.c (substitute): Use \& to represent this part of the
3087         string which was matched by the whole regexp, instead of
3088         representing the whole string.  Any usage of \0 issues a warning
3089         and acts like \&, it will disappear in some subsequent release.
3091 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
3093         * m4.c: Complete prototype for forwarded declaration of usage.
3095         * input.c (init_macro_token): Correct own reference in error
3096         message.  Previous name get_macro_func was referred to instead.
3097         (next_char):  Correct own reference in error message.  Previous
3098         name advance_input was referred to instead.
3100         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
3101         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
3102         and_term, not_term, logical_not_term, cmp_term, shift_term,
3103         add_term, mult_term, exp_term, unary_term, simple_term): Add
3104         prototype to forwarded declarations.  Declare parameter v1 as
3105         eval_t * instead of int *.  Same for local variable v2 in dyadic
3106         functions.  Same for result in exp_term.
3107         * builtin.c (m4_eval): Declare value as eval_t instead of int.
3108         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
3109         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
3110         (shipout_int): Cast first argument of ntoa to eval_t.
3111         Reported by Thorsten Ohl.
3113         * macro.c: Complete the prototypes of forwarded expand_macro and
3114         expand_token.
3115         Reported by Thorsten Ohl.
3117         * m4.h: Define voidstar as void * or char * depending on __STDC__.
3118         The Ultrix 3.1 compiler cannot do much with void pointers.
3120         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
3121         * m4.c (xfree):  Replace void * by voidstar.
3122         Reported by Tom McConnell.
3124         * ansi2knr.1: New, from elsewhere.
3125         * Makefile.in (DISTFILES): Distribute ansi2knr.1
3127         * Makefile.in (stamp-h.in): Avoid running ./config.status if
3128         stamp-h does not exist yet.  This avoids running it a second time
3129         just after the initial ./configure.
3130         Reported by David MacKenzie and Tom McConnell.
3132         * m4.h: Replace the enum debug_info declaration with a series of
3133         #define's.  The Ultrix 3.1 compiler would otherwise need casting
3134         (int) to most references, when used in expressions.
3135         Reported by Tom McConnell.
3137 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
3139         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
3140         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
3141         calls the compiler.  Previously, FP_PROTOTYPES was only calling
3142         the preprocessor; by not being subject to CFLAGS, this was
3143         discouraging those flags asking for ANSI compilation.
3144         * acconfig.h: Document HAVE_PROTOTYPES.
3145         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
3146         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
3147         Reported by Eric Backus.
3149         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
3150         from the environment.  Default CFLAGS to -g if not set.
3151         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
3152         * lib/Makefile.in: Have CFLAGS substituted from configure.
3153         Reported by Eric Backus and Tom McConnell.
3155         * configure.in: m4_undefine changeword before using AC_ENABLE.
3157         * m4.h: Declare prototypes for error (for ANSI compilers only),
3158         prefix_all_builtins and reference_error.
3159         Reported by Tom McConnell.
3161         * input.c (set_word_regexp): Do not try to initialize the array
3162         test from a string, this does not work with non-ANSI compilers.
3163         Reported by Eric Backus.
3165         * Makefile.in (dist): Clean examples/ before saving it.
3166         (distclean-local): Also remove stamp-h.
3167         Reported by Eric Backus.
3169         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
3170         non ANSI compilers.
3171         Reported by Tom McConnell.
3173         * checks/Makefile.in (clean): Depends on mostlyclean.
3174         (mostlyclean): New goal.
3176 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
3178         * Makefile.in (DISTFILES): Distribute install.sh.
3179         * install.sh: New file, copied from elsewhere.
3180         Reported by Assar Westerlund and Kaveh R. Ghazi.
3182 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
3184         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
3185         * acconfig.h: Explain ENABLE_CHANGEWORD.
3187         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
3188         from code provided by Pete Chown]
3189         * m4.h: Add original_text field to u_t variant of union u.
3190         Declare TOKEN_DATA_FUNC macro.
3191         * builtin.c: Declare changeword.
3192         (m4_changeword): New function.
3193         * input.c: Include "regex.h", define variables with word regexps.
3194         (input_init): Initialize the word regexp.
3195         (set_word_regexp): New.
3196         (next_token): Declare local variables, use the previous code if
3197         default_word_regexp is true.  Else, match using a new code.  Save
3198         the original text.
3199         * macro.c (expand_token): Ship out original text if not a macro
3200         name.
3201         Reported by Krste Asanovic and Pete Chown.
3203         [These modifs all depend upon ENABLE_CHANGEWORD]
3204         * m4.h: Declare external user_word_regexp.
3205         * m4.c: Declare user_word_regexp, and initialize it from
3206         --word-regexp or -W, or NULL if not specified.
3207         * input.c: Use user_word_regexp if specified, instead of
3208         DEFAULT_WORD_REGEXP.
3210         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
3211         agree with it.
3213         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
3214         * checks/Makefile.in: Empty the suffix list.
3215         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
3217         * m4.c: Declare nesting_limit and initialize it to 250.
3218         Implement -LNUMBER or --nesting-limit=NUMBER to change its
3219         value.
3220         * m4.h: Declare nesting_limit as external.
3221         * macro.c (expand_macro): Stop execution whenever nesting limit
3222         is exceeded.
3223         Reported by Bengt Mertensson.
3225         * eval.c (evaluate): Diagnose excess characters in eval input.
3226         Things like `eval(08)' used to return 0 with no diagnostic.
3228         * m4.h: Capitalize first letter of all macro arguments in
3229         definitions.
3231         * m4.c: Declare warning_status, initialize it to 0.  Add new
3232         option -E, or --fatal-warnings, which sets warning_status to
3233         EXIT_FAILURE instead.
3234         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
3235         EXIT_FAILURE if not otherwise done by header files.
3236         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3237         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3238         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3239         argument of all M4ERROR calls.
3240         Reported by Noah Friedman.
3242         * examples/incl-test.m4: Renamed from incl_test.m4.
3243         * examples/include.m4: Include incl-test.m4 instead of
3244         incl_test.m4.
3245         * examples/multiquotes.m4: Renamed from multi-quotes.m.
3247 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
3249         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
3250         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3251         also tested it on a Sun Sparc workstation running SunOS 4.x.
3253         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3254         49.format check, abusing a `union values' argument with sprintf
3255         without selecting the proper field.  Now, save the formatting type
3256         first, delaying the fetch of the corresponding argument.
3257         Reported by Joseph E. Sacco and Tom Quinn.
3259         * format.c (format): Remove const from char *fmt declaration when
3260         not HAVE_EFGCVT, because a NUL may be forced into it.
3262         * m4.h: Declare atof() when not STDC_HEADERS.
3263         Reported by Joseph E. Sacco.
3265         * Regenerate configure using Autoconf 1.11, this corrects a
3266         problem about an incorrect cpp seting on NeXT 3.1.
3267         Reported by Alexander Lehmann.
3269 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
3271         * m4.h (_): Change argument from `x' to `Args'.
3273 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
3275         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3276         bringing more evil than good on a few systems.
3277         Reported by Greg A. Woods.
3279 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
3281         * m4.h: Rename Args() to _().
3282         * m4.h: Remove extern specifier from all function declarations.
3284 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
3286         * stackovf.c: New file implementing stack-overflow detection.
3287         * configure.in: Check for getrlimit, sigaction.  If all of
3288         standard headers, getrlimit and sigaction, define USE_STACKOVF and
3289         substitute ${U}stackovf.o for STACKOVF.
3290         * acconfig.h: Declare USE_STACKOVF.
3291         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3292         * m4.h: Declare setup_stackovf_trap().
3293         * m4.c: Call setup_stackovf_trap().
3294         * tests/stackovf_test.sh: New file.
3296 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
3298         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3300         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3302 Sun Jan 30 14:24:19 1994    (pinard at icule)
3304         * m4.h: Remove definition of volatile, not used anymore.
3305         Reported by Jim Meyering and Joseph E. Sacco.
3307         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3308         of `if ... else /* nothing */' for if macros.
3309         Reported by Jim Meyering.
3311         * builtin.c (m4_regexp): Reorganize the code for avoiding a
3312         warning from gcc about `repl' possibly used before defined.
3313         Reported by Jim Meyering.
3315         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3316         Reported by Jim Meyering.
3318 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
3320         * m4.h: Move the conditional definition of volatile after the
3321         inclusion of system files, because they may define it first.
3323 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
3325         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3326         get around a problem with Alpha make seeing a syntax error, there.
3327         Reported by Vern Paxson.
3329 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
3331         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3332         Reported by Richard Stallman.
3334 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
3336         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3337         instead of AC_HAVE_FUNCS.
3338         Reported by Noah Friedman.
3340 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
3342         * m4.c: Initialize show_help and show_version to zero.
3344         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3345         Use them in exit() and usage() calls.
3347 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
3349         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3350         syserr() macro.  Delete errref, add reference_error and M4ERROR.
3351         * m4.c: Replace errref, which was returning an input reference
3352         string, with reference_error, which prints it on standard error.
3353         * builtin.c, output.c: Use errno as second parameter to error,
3354         instead of using syserr() with %s.
3355         * *.c: Use M4ERROR instead of error: no more errref() with %s.
3356         Doing so, the program name appears after the input reference
3357         instead of before, which eases M-x next-error processing.
3359 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
3361         * checks/get-them: Escape braces with backslashes in patterns,
3362         because HPUX-9.01 awk needs this.
3363         Reported by Jim Meyering.
3365 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
3367         * builtin.c: Declare "FILE *popen ();".
3369         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3370         macros, replace error_message_prefix() declaration by errref()'s.
3371         Declare xrealloc, for use in errref().
3372         * m4.c: Delete error_message_prefix() function, add errref().
3373         * *.c: Use error() systematically in place of all error macros,
3374         now that error() flushes stdout first.  Make needed adjustments.
3376         * m4.h: Remove const in sys_errlist[] declaration, it creates
3377         conflicts on SGI and Alpha.
3378         Reported by Kaveh R. Ghazi.
3380 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3382         * m4.c: Include <getopt.h> instead of "getopt.h".
3384         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3385         * acconfig.h: New, for documenting HAVE_EFGCVT.
3386         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3387         use them wherever appropriate.  Also use -I. for compilations.
3388         * lib/Makefile.in: Use -I.. for compilations.
3389         * *.c: Include <config.h> or "config.h".
3391         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3392         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3394 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3396         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3398         * input.c (input_init): Initialize quote and comment strings
3399         explicitely instead of calling set_quotes and set_comment: by
3400         doing so, we ensure we do not free uninitialized variables.
3402         * checks/check-them: Reverse arguments to both diff, so the
3403         expected is on the left and the obtained on the right.
3405         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3406         macros. Delete declarations for m4error, warning, fatal and
3407         internal_error, add declaration for error_message_prefix.
3408         * m4.c:  Delete m4error, warning, fatal and internal_error
3409         routines, add error_message_prefix routine.
3410         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3411         warning with WARNING*, fatal with FATAL* and internal_error with
3412         INTERNAL_ERROR*.
3413         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3414         this is not needed anymore.
3416         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3417         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3418         and debug_message, add declaration for debug_message_prefix.
3419         * debug.c: Remove static specifier for FILE *debug declaration.
3420         Delete debug_print and debug_message routines, add
3421         debug_message_prefix routine.
3422         * builtin.c, debug.c: Replace debug_print routine calls with
3423         DEBUG_PRINT* macro calls.
3424         * input.c, path.c: Replace debug_message routine calls with
3425         DEBUG_MESSAGE* macro calls.
3427         * m4.h: Remove inclusion of <varargs.h>.
3428         * debug.c: Include <stdarg.h> or <varargs.h>.
3429         (trace_format): Use stdarg instead of varargs if __STDC__.
3431         * configure.in: Remove checks for vfprintf and _doprnt.  These
3432         implementations use varargs tricks which are not portable enough.
3433         * lib/vfprintf.c: Deleted.
3434         * lib/_doprnt.c: Deleted.
3435         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3436         Reported by Joel Sherrill.
3438         * path.c (add_include_directory): Use xstrdup.
3440         * builtin.c (find_builtin_by_name): Declare static.
3442         * *.[ch]: Add const to a few "char *" declarations.
3444         * configure.in: Remove commented tests for fileno() and fstat().
3445         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3447         * debug.c (debug_flush_files): New.
3448         * m4.h: Declares it.
3449         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3450         Reported by Nicolas Pioch.
3452 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3454         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3455         Reported by Joel Sherrill.
3457         * builtin.c (prefix_all_builtins): Instead of the table size, use
3458         the null entry at end for stopping the loop.  It was overwritten.
3459         Reported by Andreas Schwab and Jim Meyering.
3461         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3462         Reported by Kaveh R. Ghazi.
3464         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3465         Reported by Karl Vogel.
3467 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3469         * m4.h: Do not define volatile if already defined.
3470         Reported by Rene' Seindal.
3472         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3474         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3475         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3477 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3479         * m4.h: Define strchr and strrchr in terms of index and rindex,
3480         instead of the other way around.
3481         * builtin.c, m4.c, path.c: Use strchr instead of index.
3483         * input.c (next_char): Remove a "break;" after a "return ...;".
3484         Reported by Tom McConnell.
3486 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3488         * Release 1.1
3490         * configure.in: Do not copy check files in the build hierarchy.
3491         * checks/check-them: Identify the m4 version being checked.  For
3492         finding m4, look in $PATH instead of in the parent directory.
3493         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3494         * checks/Makefile.in (.all-stamp): Always create check files in
3495         the source hierarchy, not anymore in the build hierarchy.
3496         (check): cd to the source hierarchy before performing checks.
3497         Do not copy nor clean COPYING anymore, take it from `..'.
3498         Reported by Tom McConnell.
3500         * Makefile.in (Makefile): Use $(SHELL).
3501         (config.status): Use $(SHELL).  Use "config.status --recheck"
3502         instead of "configure --no-create", which is obsolete.
3503         Reported by Tom McConnell.
3505 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3507         * m4.c (usage): Use "%s" instead of "m4" in format string.
3508         Reported by Jim Meyering.
3510         * Makefile.in: Distribute mkinstalldirs.
3511         Reported by Pierre Gaumond.
3512         Reported by Jim Meyering.
3513         Reported by Tom McConnell.
3514         Reported by Andreas Gustafsson.
3516         * checks/check-them: Renamed from checks/check_them.
3517         * checks/get-them: Renamed from checks/get_them.
3518         * checks/.all-stamp: Renamed from checks/.all_stamp.
3519         * checks/Makefile.in: Changed accordingly.
3520         Reported by Jim Meyering.
3522 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3524         * lib/Makefile.in (dist): Correct permissions on files.
3526         * output.c: Declare tmpfile, some systems don't.
3528 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3530         * checks/Makefile.in (dist): Correct permissions on files.
3532         * Makefile.in (dist): Ensure recursive linking for subdirectory
3533         `examples', also set read/write permissions on all its files.
3535         * mkinstalldirs: New, from elsewhere.
3536         * Makefile.in: Use it.
3538         * debug.c: Synchronize debug messages and regular output when
3539         the debug file and stdout are redirected to the same file.
3540         * configure.in: Add (commented) checks for fileno and fstat.
3541         Reported by Jim Avera.
3543         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3544         etc., arguments, then ignore the superfluous one.  m4 used to
3545         diagnose missing arguments and return the empty string.
3546         Reported by Nick S. Kanakakorn.
3548 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3550         * m4.c (main): At end of all input, ensure all undiverted text
3551         goes to the main output stream.
3552         Reported by Andreas Gustafsson.
3554         * m4.c (main): exit (0), instead of return 0.
3556         * m4.c: Implement -P and --prefix-builtins.
3557         * builtin.c: Delete const specifier on builtin_tab.
3558         (prefix_all_builtins): New.
3559         Reported by Noah Friedman.
3560         Reported by Scott Bartram.
3562         * c-boxes.el: New, from elsewhere.
3563         * Makefile.in: Distribute it.
3565         * m4.h: Do not define bcopy if <string.h> defines it.
3566         Reported by Stephen Perkins.
3568         * builtin.c (define_macro): Allow a missing second argument, in
3569         which case it is implied empty.  Affects define and pushdef.
3570         Reported by Eric Allman.
3572 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3574         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3575         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3576         * builtin.c: Initialize all the blindness fields in builtin_tab.
3577         (define_builtin): Copy the blindness of a builtin into its symbol.
3578         * macro.c (expand_token): Avoid processing a blind builtin if the
3579         next character is not an opening parenthesis.
3580         Reported by David MacKenzie.
3581         Reported by Noah Friedman.
3583         * configure.in: Ensure an exit status of 0 on completion.
3584         Reported by Vivek P. Singhal.
3586         * eval.c (eval_lex): Admit both lower and upper case letters for
3587         bases greater than 10.  Only lower case letters were accepted.
3589         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3590         Reported by Krste Asanovic.
3592         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3593         * eval.c (logical_not_term): New name for not_term.
3594         * eval.c (xor_term): New, between or_term and and_term.
3595         * eval.c (not_term): New, between and_term and logical_not_term.
3596         * eval.c (shift_term): New, between cmp_term and add_term.
3597         Reported by Krste Asanovic: ~, ^, <<, >>.
3598         Reported by Ben A. Mesander: ** vs ^.
3600         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3601         * m4.h: Delete xrealloc.c.
3602         * lib/xmalloc.c: New, from elsewhere.
3603         * lib/xstrdup.c: New, from elsewhere.
3604         * lib/Makefile.in: Distribute and compile them.
3606         * m4.c: Change progname to program_name.
3607         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3608         * lib/error.c: New, from elsewhere.
3609         * lib/Makefile.in: Distribute and compile error.c.
3610         * configure.in: Check AC_VPRINTF and for strerror.
3611         * m4.c: Delete cmd_error.  Use error instead.
3612         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3614         * m4.h: Delete #define const, let Autoconf takes care of this.
3616         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3617         Merge parse_args into main.  Declare argv to be `char *const *',
3618         then remove superfluous casts.
3620         * m4.c: Rename --no-gnu-extensions to --traditional.
3621         Reported by Ben A. Mesander.
3623         * m4.c (usage): Add a status parameter.  Supply one in various
3624         calls.  Add --help processing.  Remove -V for --version.
3626         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3628         * lib/Makefile.in: Have an AR=ar declaration.
3629         Reported by Eric Backus.
3630         Reported by Bjorn R. Bjornsson.
3631         Reported by Tom Tromey.
3632         Reported by Kristine Lund.
3633         Reported by Marion Hakanson.
3635 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3637         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3638         Reported by Noah Friedman.
3640 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3642         * Makefile.in: Remove MDEFINES and cleanup.
3644 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3646         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3647         Create a gzip file.
3649 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3651         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3652         ensure 777 mode for directories, so older tar's will restore file
3653         modes properly.
3655 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3657         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3658         so the installer can override automatically configured choices.
3659         Reported by Karl Berry.
3661 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3663         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3664         previous version was not working properly on m68k-hp-bsd4.3.
3665         Reported by Roland McGrath.
3667         * lib/_doprnt.c: Stolen from Oleo distribution.
3668         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3669         * lib/Makefile.in: Distribute _doprnt.c.
3670         Do not distribute regex.[ch].old anymore.
3672 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3674         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3675         Richard wants it there.
3677 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3679         * Makefile.in: Add DEFS to MDEFINES.
3680         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3681         (libm4.a): Remove the library before creating it.
3682         (distclean): Remove tags and TAGS too.
3684 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3686         * Makefile.in (dvi, m4.dvi): New goals.
3688         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3689         macro.c, output.c, path.c, symtab.c: Change Copyright from
3690         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3692         * examples/divert.m4: Deleted, this bug has been corrected.
3694         * Makefile.in (texclean, mostlyclean): New goals.
3696         * Makefile.in (clean): Remove clutter from ansi2knr.
3697         Reported by Pierre Gaumond.
3698         Reported by Greg A. Woods.
3700 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
3702         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
3703         might well use CFLAGS is s/he needs it.
3705         * Makefile.in: Allow installation of info files from a separate
3706         build directory.
3707         Reported by Jason Merrill.
3708         Reported by David MacKenzie.
3709         Reported by Skip Montanaro.
3710         Reported by Erez Zadok.
3711         Reported by Assar Westerlund.
3713 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
3715         * Release 1.0.3
3716         This is still a beta release for the future GNU m4 version 1.1.
3718         * lib/alloca.c: New, from elsewhere.
3719         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
3721         * m4.h: Do not define index/rindex if already defined.  If
3722         FALSE/TRUE are already defined, do not redefine them, but merely
3723         define boolean typedef to int.
3725         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3726         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3727         because some C compilers do not like connectives with #ifdef.
3728         * m4.h: Define `volatile' only if __GNUC__, instead of once for
3729         __GNUC__ and once for __STDC__.
3730         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3732         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3733         Makefile dependencies.  Without it, make keeps destroying and
3734         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
3736         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3737         to diversion/DIVERSION, this was a spelling error.
3739         * m4.c: Declare version[], remove #include "version.h".
3740         * version.h: Deleted.
3741         * Makefile.in: Remove references to version.h.
3743         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3744         production, by using a simpler and more robust algorithm.  This
3745         solves the problem of synclines sometimes written in the middle of
3746         an output line.  Delete sync_line() and output_lines variable.
3747         * m4.h: Remove sync_line prototype and output_lines declaration.
3748         * input.c (next_char), output.c (shipout_text): Remove references
3749         to output_lines.
3750         * input.c (push_file, pop_file): Merely put the value -1 in
3751         output_current_line instead of calling sync_line, for delaying a
3752         single `#line NUM FILE' before next output line.  Do not test
3753         for sync_output, because this is unnecessary clutter.
3754         * output.c (make_divertion, insert_divertion): Idem.
3755         * input.c: Rename must_advance_line to start_of_input_line, for
3756         consistency.
3758         * debug.c (trace_header): Select a new debug line format, which
3759         better complies with GNU standards for formatting error messages.
3760         With option `-dfl', M-x next-error might be used on the output.
3761         * m4.c (vmesg): Adjust format of error output to GNU standards.
3762         * m4.texinfo: Adjust examples for `make check' to work.
3764         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3765         case for enum debug_info constants, which were all lower case.
3767         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3768         re_search_2.
3769         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3770         collected patches.  I tried a few times using newer regex.[ch], it
3771         mysteriously stopped aborting with this one.  Insecure feeling...
3772         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3774 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
3776         * m4.c: Change `--no-warnings' to `--silent'.
3777         Reported by David MacKenzie.
3779         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3780         leave it off for now.  See comment in m4.c for justification.
3781         Reported by David MacKenzie.
3783         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3784         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3786         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
3788         * Makefile.in: Ensure recursive cleaning is done before local
3789         cleaning for all clean goals.
3791         * builtin.c (ntoa): Ensure the value is always interpreted as a
3792         signed quantity, whatever the radix is.
3794 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
3796         * builtin.c, format.c, input.c: Split long lines.
3797         * m4.c: Use typedef macro_definition instead of struct
3798         macro_definition.
3799         * symtab.c: Use typedef symbol instead of struct symbol.
3801 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
3803         * *.[ch]: Remove all trailing whitespace, in code and comments.
3805         * configure.in: Find some awk.
3806         * Makefile.in: Add $(AWK) to MDEFINES.
3807         * checks/Makefile.in: Transmit $(AWK) to get_them.
3808         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3809         awk script when switching files, because without this, mawk runs
3810         out of file descriptors.
3812 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3814         * Makefile.in (realclean): Delete m4.info*.
3815         Reported by Jim Meyering.
3817         * Makefile.in: Adjust and link with checks/Makefile.
3818         * checks/Makefile.in: New.
3819         * configure.in: Output checks/Makefile.
3821         * checks/get_them: Have the dnl header of each test more
3822         recognizable by next-error, also use a better message.
3824 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3826         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3827         And use that only if __GNUC__ since we're using it's GCC-specific
3828         semantics that tell the compiler the associated function doesn't
3829         return.
3831         * builtin.c (substitute): Don't use character as an array index.
3832         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3833         warnings with gcc -W -Wall on systems with qsort prototype.
3834         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3835         from gcc -W -Wall.
3837         * eval.c (most functions): Add parentheses to assignments used
3838         as truth values go avoid warnings from gcc -Wall.
3840         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3841         any functions that don't need external scope.
3843         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3844         (many functions and arrays): Declare `const'.
3846 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3848         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3849         removing the declaration from m4.h.  Also rename false to FALSE
3850         and true to TRUE.
3852         * lib/Makefile.in (Makefile): New goal.
3854         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3855         so heavily loaded.  It gets more easily overridable, calling make.
3856         Reported by Jim Meyering.
3858         * Makefile.in (dist): Get .fname from the current directory name,
3859         instead of from version.h.  I need updating many files manually,
3860         when the version changes, version.h is just one of them.
3862 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3864         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3865         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3866         Reported by Tom McConnell.
3868 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3870         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3871         39.cleardiv, which were describing missing or spurious newlines.
3872         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3873         do not depend on machine word size, `/bin/false' implementation,
3874         or `wc' output format.  `make check' is more dependable, now.
3876         * checks/check_them: Summarize the failed tests by listing their
3877         name, at end.  If none, issue `All checks successful'.  Output
3878         `Checking' instead of `Input file:'.
3880         * checks/get_them, checks/check_them: Reindented.
3882         * Makefile.in (dist): chmod a+r before making the tar file.
3884 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3886         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3888         * input.c (next_token): Reinitialize token_buttom just after using
3889         it as a watermark with obstack_free.  Or else, a future token, big
3890         enough for triggering reallocation of the obstack chunk, could
3891         void the initialized value of token_buttom, later causing panic in
3892         obstack_free.  Rename token_buttom to token_bottom everywhere.
3894         * m4.h: Before declaring errno, first include <errno.h> and
3895         ensure that it does not define errno.
3896         Reported by Richard Stallman.
3898 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3900         * builtin.c: Define and use DECLARE macro for builtins.
3902         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3903         argument, this is a common idiom for introducing long comments.
3905         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3906         arguments.  The last argument was silently ignored.
3908         * m4.c (cmd_error): Add a missing semicolon before va_end().
3910 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3912         * Makefile.in: Now handle protoized sources.  Define and use U.
3913         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3914         Add `aclocal.m4' to `configure' dependencies.
3915         * ansi2knr.c: New, from Ghostscript distribution.
3916         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3917         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3918         * aclocal.m4: New, provide FP_PROTOTYPES.
3919         * m4.h: Conditionnaly protoized through Args, save for varags.
3920         * builtin.c: Protoized.  Then:
3921         Include <sys/types.h> if size_t is not defined, before "regex.h".
3922         (m4_ifelse): Fetch built-in name properly for diagnostic.
3923         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3924         (m4_regexp): Add const to `msg' declaration.
3925         (m4_patsubst): Add const to `msg' declaration.
3926         * debug.c: Protoized, save for varargs.
3927         * eval.c: Protoized.
3928         * format.c: Protoized.
3929         * input.c: Protoized.
3930         * m4.c: Protoized, save for varargs.  Then:
3931         (xfree): Accept void * instead of char *.
3932         (xmalloc): Return void * instead of char *.
3933         (xrealloc): Accept and return void * instead of char *.
3934         * macro.c: Protoized.
3935         * output.c: Protoized.
3936         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3937         * symtab.c: Protoized.
3939 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3941         * m4.texinfo: Remove directory from diagnostics in 30.include,
3942         51.eval, 56.errprint and 57.m4exit tests.
3944         * m4.h: Remove declarations for int or void system functions, they
3945         cause more conflicting trouble than they make good.
3947         * configure.in: Avoid configuration header file.  Add some tests.
3948         * m4.h: Remove #include "config.h".
3949         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3950         Then, rewritten for better compliance with GNU standards.
3952 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3954         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3955         because of a misplaced #endif.
3957         * Many *.[hc] files: Correct intra-line spacing here and there,
3958         according to GNU indent 1.6 advice.
3960         * configure.in: New, using Autoconf 1.2.
3961         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3962         * Delete old configure.in, configure, etc/configure.in,
3963         etc/configure, lib/configure.in, lib/configure and config/*.
3964         Reported by Jason Merrill.
3966         * symtab.c (hash): Change (char) NULL to '\0'.
3967         Reported by Jason Merrill.
3969         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3970         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3971         * version.h: De-automatize, force value in.
3973         * m4.c: Changes in order to use a newer getopt.h.
3974         Reported by David MacKenzie.
3976         * checks/: New name for examples/.
3977         * checks/get_them: New location for etc/get_examples.
3978         * checks/check_them: New location for etc/check_examples.
3979         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3980         * lib/vfprintf.c: New location for etc/vfprintf.c.
3981         * Delete empty etc/.
3982         * examples/: New name for test/.
3984 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3986         * Makefile.in (check): Add m4 as dependency.
3988         * m4.c: Accept --no-warnings instead of --no_warnings, and
3989         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3990         usage message more informative.
3991         Reported by David MacKenzie.
3993 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3995         * etc/check_examples: New name for check_examples.sh.
3996         * etc/get_examples: New name for get_examples.sh.
3997         * Makefile.in, etc/Makefile.in: Use new names.
3999         * Makefile.in: Transmit $(CC) while making in lib.
4001         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
4002         code disposition by hand.
4004 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
4006         * m4.h: Delete definitions for abort() and exit().
4007         Reported by Richard Stallman.
4009         * config/hmake-unicos, config/s-unicos.h: New files.
4010         Reported by Hal Peterson.
4012         * eval.c (exp_term): Have N^0 return 1.
4013         Reported by Michael Fetterman.
4015         * eval.c, input.c, m4.h: Remove last comma in enums.
4016         Reported by Mike Lijewski.
4018         * Transfer of maintenance duties from Rene' to Franc,ois.
4020 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
4022         * Release 1.0.  Many thanks to those, who provided me with bug
4023         reports and feedback.
4025         * Uses GNU configure, taken from the gdb distribution.
4027         * Uses GNU getopt(), with long option names.
4029         * The -Q/+quiet option is added, which suppresses warnings about
4030         missing or superflous arguments to built-in macros.
4032         * Added default options via the M4OPTS environment variable.
4034         * The built-in format can now be configured to use sprintf as
4035         the formatting engine, for systems without [efg]cvt(3).
4037         * GNU library code is moved to the ./lib subdirectory; other
4038         utility files are now in ./etc.
4040         * Several minor bugs have been fixed.
4042 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
4044         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
4045         Francois Pinard and Roland H. Pesch for providing me with reports.
4047         * The builtins incr and decr are now implemented without use of
4048         eval.
4050         * The builtin indir is added, to allow for indirect macro calls
4051         (allows use of "illegal" macro names).
4053         * The debugging and tracing facilities has been enhanced
4054         considerably.  See the manual for details.
4056         * The -tMACRO option is added, marks MACRO for tracing as soon
4057         as it is defined.
4059         * Builtins are traced after renaming iff they were before.
4061         * Named files can now be undiverted.
4063         * The -Nnum option can be used to increase the number of
4064         divertions available.
4066         * Calling changecom without arguments now disables all comment
4067         handling.
4069         * The function m4_patsubst() is now consistently declared
4070         static.
4072         * A bug in dnl is fixed.
4074         * A bug in the multi-character quoting code is fixed.
4076         * Several typos in the manual has been corrected.  More probably
4077         persist.
4079         * The m4.info file is now installed along with the program.
4081 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
4083         * Updated and enhanced version.  Release 0.75, manual 0.07.
4085         * Implemented search path for include files (-I option and
4086         M4PATH envronment variable).
4088         * Implemented builtin "format" for printf-like formatting.
4090         * Implemented builtin "regexp" for searching for regular
4091         expressions.
4093         * Implemented builtin "patsubst" for substitution with regular
4094         expressions.
4096         * Implemented builtin "esyscmd", which expands to a shell
4097         commands output.
4099         * Implemented "__file__" and "__line__" for use in error
4100         messages.
4102         * Implemented character ranges in "translit".
4104         * Implemented control over debugging output.
4106         * Implemented multi-character quotes.
4108         * Implemented multi-character comment delimiters.
4110         * Changed predefined macro "gnu" to "__gnu__".
4112         * Changed predefined macro "unix" to "__unix__", when the -G
4113         option is not used.  With -G, "unix" is still defined.
4115         * Changed "shift", "$@" and "$*" to not insert spaces afters
4116         commas.
4118         * Added program name to error messages.
4120         * Fixed two missing null bytes bugs.
4122 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
4124         * Initial beta release.  Release 0.50, manual 0.05.
4126         -----
4128         Local Variables:
4129         coding: utf-8
4130         End:
4132         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
4133         2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4135         Copying and distribution of this file, with or without
4136         modification, are permitted provided the copyright notice
4137         and this notice are preserved.