add packaging
[platform/upstream/m4.git] / ChangeLog
1 2013-09-15  Gary V. Vaughan  <gary@gnu.org>
2
3         configury: specify subdir-objects for future automake releases.
4         Latest automake warns about future incompatibility if
5         subdir-objects is not specified by AM_INIT_AUTOMAKE.
6         * configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects.
7
8         bootstrap: require newer texinfo release.
9         * bootstrap.conf (buildreq): Bump required makeinfo binary
10         release number to 4.13 to support --bulid-dir option.
11
12         bootstrap: don't double-specify --no-changelog to gnulib-tool.
13         * bootstrap.conf (gnulib_tool_option_extras): Rename from
14         this...
15         (gnulib_tool_options): ...this, and append options rather than
16         overwrite.
17
18         bootstrap: sync with upstream.
19         * gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
20         gl/build-aux/funclib.sh, gl/build-aux/options-parser: Update
21         from upstream to pick up recent improvements.
22         * bootstrap: Regenerate.
23
24 2013-08-17  Michael Witten  <mfwitten@gmail.com>  (tiny change)
25
26         Clean up documentation
27         * doc/m4.texinfo: Note that m4 is mostly compatible with SVR4.
28
29 2013-08-17  Eric Blake  <eblake@redhat.com>
30
31         maint: update to latest gnulib
32         * gnulib: Update to latest, for various fixes.
33
34 2013-04-18  Eric Blake  <eblake@redhat.com>
35
36         maint: update to latest gnulib
37         * gnulib: Update to latest, for regex fixes.
38
39 2013-03-15  Eric Blake  <eblake@redhat.com>
40
41         build: avoid test failure on HPUX
42         * doc/m4.texi (Command line files): Skip tests on systems where it
43         is impossible to start with stdin/out closed.
44         Reported by Gary V. Vaughan.
45
46 2013-03-12  Eric Blake  <eblake@redhat.com>
47
48         maint: update to latest gnulib
49         * gnulib: Update to latest, for mingw compile fixes.
50
51 2013-03-11  Eric Blake  <eblake@redhat.com>
52
53         build: fix large diversions on mingw
54         * gl/lib/clean-temp.c.diff: New file.
55         * NEWS: Mention the fix.
56
57 2013-03-08  Gary V. Vaughan  <gary@gnu.org>
58
59         bootstrap: remove reintroduced CVS cruft.
60         * bootstrap.conf (m4_ignore_gnulib_ignore): Remove.
61         The code this was factored from was removed between making the
62         bootstrap branch, and merging, so this function is actually
63         obsolete.
64
65         maint: automake 1.11.5 and earlier generate insecure dist
66         rules.
67         * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.5 or newer.
68
69 2010-09-17  Gary V. Vaughan  <gary@gnu.org>
70
71         bootstrap: upgrade to canonical upstream version.
72         * bootstrap.conf: New file to configure gnulib bootstrap.
73         * gl: New gnulib overrides directory.
74         * gl/modules/bootstrap, gl/modules/extract-trace,
75         gl/modules/funclib.sh, gl/modules/inline-source,
76         gl/modules/options-parser: Import canonical bootstrap modules.
77         * gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
78         gl/build-aux/funclib.sh, gl/build-aix/inline-source,
79         gl/build-aux/options-parser: Import module implementations.
80         * bootstrap: Regenerate.
81         * m4/gnulib-cache.m4: Regenerate.
82
83 2013-01-02  Eric Blake  <eblake@redhat.com>
84
85         maint: automake recommends *.texi now
86         * doc/m4.texinfo: Move...
87         * doc/m4.texi: ...here, for the eventual automake 1.14.
88         * HACKING: Reflect the rename.
89         * doc/Makefile.am (info_TEXINFOS): Likewise.
90         * checks/Makefile.am ($(srcdir)/stamp-checks): Likewise.
91
92 2013-01-01  Eric Blake  <eblake@redhat.com>
93
94         maint: bump copyright year
95         * all files: Version control now has a commit in 2013.
96
97         maint: update to latest gnulib
98         * gnulib: Update to latest, for rational range regex, build fixes,
99         copyright update.
100         * NEWS: Document this.
101
102 2012-12-22  Eric Blake  <eblake@redhat.com>
103
104         maint: enable tight_scope syntax check
105         * src/Makefile.am (m4_SOURCES): Move m4.h...
106         (noinst_HEADERS): ...into separate listing for syntax check.
107         * src/m4.h: Add 'extern' to function declarations.
108         (expansion_level): Declare extern variable here...
109         * src/debug.c: ...not here.
110
111         maint: move syntax check exemptions into cfg.mk
112         * .x-sc_prohibit_tab_based_indentation: Delete file.
113         * .x-update-copyright: Likewise.
114         * Makefile.am (syntax_check_exceptions): Delete rule.
115         * cfg.mk (exclude_file_name_regexp): Move exemptions here.
116         (local-checks-to-skip): Re-enable copyright check.
117
118         build: update to latest gnulib
119         * gnulib: Update to latest.
120
121 2012-11-19  Eric Blake  <eblake@redhat.com>
122
123         build: avoid problematic gcc 4.4 warnings
124         * configure.ac (nw): Disable gcc warnings that cause build
125         failures under RHEL 6.3.
126         * gnulib: Update to latest.
127
128 2012-11-14  Paul Eggert  <eggert@cs.ucla.edu>
129
130         doc: improve prehistory discussion
131         * doc/m4.texinfo (History): Describe M6 and related processors.
132         From a suggestion by Doug McIlroy in
133         <http://lists.gnu.org/archive/html/m4-discuss/2012-05/msg00004.html>.
134         Also, improve citation quality by giving URLs and so forth.
135
136 2012-09-21  Eric Blake  <eblake@redhat.com>
137
138         maint: drop more CVS cruft
139         * bootstrap (Version control): Don't generate .cvsignore or
140         prepopulate m4/.gitignore.
141         * .gitignore: Allow m4/gnulib-cache.m4 manually.
142
143 2012-09-06  Eric Blake  <eblake@redhat.com>
144
145         maint: enable gcc warnings during git development
146         * configure.ac (gl_gcc_warnings): Alter default based on environment.
147
148 2012-09-05  Stefanno Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
149
150         maint: convert the last hand-written Makefile to automake
151         * checks/Makefile.in: Rename ...
152         * checks/Makefile.am: ... like this, and simplify and adjust to
153         make it proper as Automake input.
154
155 2012-09-04  Eric Blake  <eblake@redhat.com>
156
157         maint: merge gitignore files
158         * build-aux/.gitignore: Delete.
159         * checks/.gitignore: Likewise.
160         * doc/.gitignore: Likewise.
161         * examples/.gitignore: Likewise.
162         * src/.gitignore: Likewise.
163         * .gitignore: Cover rules from deleted files.
164
165         maint: drop CVS cruft
166         * .cvsignore: Remove.
167         * build-aux/.cvsignore: Likewise.
168         * checks/.cvsignore: Likewise.
169         * doc/.cvsignore: Likewise.
170         * examples/.cvsignore: Likewise.
171         * src/.cvsignore: Likewise.
172
173         build: add more compiler checking
174         * configure.ac (nw): Turn on some warnings that no longer trigger
175         a gcc warning, or where we reduce the scope of unwarned code.
176         * src/m4.h (progname): Drop redundant declaration.
177         * src/builtin.c (includes): Use header for program_name.
178
179         build: pick up latest gnulib fixes
180         * gnulib: Update to latest.
181         * m4/gnulib-cache.m4: Regenerate.
182         * missing: Break symlink in order to work around automake version
183         mismatch issue.
184         * .gitignore: Update.
185         * .cvsignore: Likewise.
186
187         build: mark several pure functions
188         * src/m4.h (M4_GNUC_PURE): New macro.
189         * src/m4.c (fault_handler): Mark pure.
190         * src/builtin.c (find_builtin_by_addr, find_builtin_by_name):
191         Likewise.
192         * src/symtab.c (hash): Likewise.
193
194 2012-09-01  Eric Blake  <eblake@redhat.com>
195
196         build: silence gcc warning
197         * configure.ac (M4_cv_gcc_pragma_push_works): New test.
198         (-Wformat-nonliteral): Disable for older gcc.
199         * src/format.c (expand_format): Mark our only uses of nonliteral
200         format as being safe.
201
202         doc: fix misuse of @xref
203         * doc/m4.texinfo (Inhibiting Invocation): Reword.
204
205 2012-07-21  Eric Blake  <eblake@redhat.com>
206
207         bootstrap: avoid undefined variables
208         * bootstrap (func_fatal_error, func_usage, func_help)
209         (func_version): Use constants, not undefined variables; propagate
210         any write failures.
211         (func_missing_arg): Drop duplicate declaration.  Preinitialize
212         exit_cmd.
213         Reported by Stefano Lattarini.
214
215 2012-06-26  Eric Blake  <eblake@redhat.com>
216
217         build: get missing from automake, not gnulib
218         * build-aux/missing: Break link to gnulib.
219         * .gitignore: Reflect this.
220
221 2012-06-25  Eric Blake  <eblake@redhat.com>
222
223         maint: update copyright year
224         * all files: Run 'make update-copyright'.
225
226         build: deal with newer glibc vs. FORTIFY_SOURCE
227         * configure.ac (FORTIFY_SOURCE): Make conditional on optimization.
228
229 2011-05-02  Eric Blake  <eblake@redhat.com>
230
231         build: pick up latest gnulib fixes
232         * gnulib: Update to latest, for fclose improvements.
233
234 2011-04-30  Eric Blake  <eblake@redhat.com>
235
236         build: improve SIGPIPE emulation on mingw
237         * gnulib: Update to latest.
238         * m4/gnulib-cache.m4: Import sigpipe module, drop strtol.
239
240 2011-04-29  Eric Blake  <eblake@redhat.com>
241
242         m4_defn: avoid compiler warning
243         * src/builtin.c (m4_defn): Nuke redundant condition.
244
245         m4_error: fix missing va_end
246         * src/m4.c (m4_error, m4_error_at_line): Add missing va_end.
247
248 2011-03-01  Eric Blake  <eblake@redhat.com>
249
250         Release Version 1.4.16.
251         * gnulib: Update to latest.
252         * NEWS: Mention the release.
253         * src/builtin.c (m4_defn): Silence spurious -Wstrict-overflow
254         warnings from gcc 4.5.1 at -O2.
255
256 2011-02-28  Eric Blake  <eblake@redhat.com>
257
258         index: fix typo in previous commit
259         * doc/m4.texinfo (Index macro): Actually expose the bug.
260
261 2011-02-26  Eric Blake  <eblake@redhat.com>
262
263         index: fix another regression from faulty strstr
264         * gnulib: Update to latest, for strstr fix.
265         * doc/m4.texinfo (Index macro): Test for the bug.
266         * NEWS: Document the fix.
267         * THANKS: Update.
268         Reported by Mike Stump, with additional analysis from Ralf
269         Wildenhues and Jim Meyering.
270
271 2011-02-07  Eric Blake  <eblake@redhat.com>
272
273         maint: speed up configure, using latest gnulib
274         * gnulib: Update to latest.
275         * m4/gnulib-cache.m4: Import fclose and rename modules.
276         * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Speed up normal
277         configure runs (and document how to rerun GNULIB_POSIXCHECK).
278         * HACKING: Document GNULIB_POSIXCHECK.
279
280         maint: update http git cloning instructions
281         * HACKING: Git http doesn't like the redirect at git.sv.gnu.org.
282         * THANKS: Update.
283         Reported by Mike Dupont.
284
285 2011-02-01  Eric Blake  <eblake@redhat.com>
286
287         maint: update to latest gnulib
288         * gnulib: Update to latest.
289         * m4/gnulib-cache.m4: Regenerate.
290         * src/builtin.c (m4_ifelse): Use STREQ.
291
292 2011-01-25  Eric Blake  <eblake@redhat.com>
293
294         maint: reflect recent copyright assignments
295         * AUTHORS: Update.
296
297 2011-01-03  Eric Blake  <eblake@redhat.com>
298
299         maint: update copyright year
300         * gnulib: Update to latest.
301         * m4/gnulib-cache.m4: Regenerate.
302         * all other files: Run 'make update-copyright'.
303
304         maint: document use of copyright ranges
305         * README: Copy coreutils wording for allowing copyright year
306         ranges.  Also mention libsigsegv 2.9.
307         * cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding
308         Standards permit it, prefer shorthand copyright.
309         * HACKING: Update libsigsegv preference.
310         * NEWS: 1.4.16 will be in 2011.
311         * doc/m4.texinfo (History): Likewise.
312
313 2010-12-31  Eric Blake  <eblake@redhat.com>
314
315         main: avoid leaking string on Haiku
316         * src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV.
317         * THANKS: Update.
318         Reported by Scott McCreary.
319
320 2010-12-24  Eric Blake  <eblake@redhat.com>
321
322         build: pull in various gnulib fixes
323         * gnulib: Update to latest.
324         * m4/gnulib-cache.m4: Reflect spawn-pipe module name change.
325         * src/builtin.c (includes): Likewise.
326         (define_user_macro): Alter comment to appease syntax-check.
327         * src/input.c (pop_wrapup): Likewise.
328         * src/output.c (undivert_all): Likewise.
329         * cfg.mk (local-checks-to-skip): Skip new rule.
330
331         maint: reflect recent copyright assignment
332         * AUTHORS: Add Raphael Poss.
333
334 2010-10-21  Eric Blake  <eblake@redhat.com>
335
336         build: work around glibc and libsigsegv bugs
337         * gnulib: Update to latest.
338         * m4/gnulib-cache.m4: Regenerate.
339         * docs/m4.texinfo (Index macro): Expose strstr bug.
340         * NEWS: Mention fixes.
341
342         docs: mention more history
343         * doc/m4.texinfo (History): Add upcoming 1.4.16 release.
344
345 2010-08-31  Eric Blake  <eblake@redhat.com>
346
347         Release Version 1.4.15.
348         * gnulib: Update to latest.
349         * NEWS: Mention the release.
350
351 2010-08-30  Eric Blake  <eblake@redhat.com>
352
353         Clean up compiler warnings.
354         * src/builtin.c (m4_patsubst): Drop dead store.
355         * src/eval.c (unary_term): Likewise.
356         * src/input.c (match_input): Likewise.  Also drop useless casts to
357         void.
358         * src/symtab.c (symtab_debug): Drop useless casts.
359
360         Test previous commit.
361         * doc/m4.texinfo (Format): Add a test.
362         * NEWS: Document the fix.
363         * THANKS: Update.
364
365 2010-08-30  Carlo Teubner  <carlo.teubner@gmail.com>  (tiny change)
366
367         Avoid a crash with bad format string.
368         * src/format.c (expand_format): Fix off-by-one error.
369
370 2010-08-30  Eric Blake  <eblake@redhat.com>
371
372         Document recent bug fixes.
373         * NEWS: Add some entries.
374         * gnulib: Update to latest, for more AIX fixes.
375
376 2010-07-30  Eric Blake  <eblake@redhat.com>
377
378         Update to newer gnulib.
379         * gnulib: Update to latest, for strtod fix.
380         * src/Makefile.am (m4_LDADD): Update link libraries accordingly.
381         * cfg.mk (local-checks-to-skip): Skip broken check.
382         * doc/m4.texinfo: Drop all use of @acronym{}.
383         * THANKS: Update.
384         Reported by Rainer Tammer.
385
386 2010-06-04  Eric Blake  <eblake@redhat.com>
387
388         Reflect recent copyright assignment.
389         * AUTHORS: Add David Warme.
390
391         Update to newer gnulib.
392         * gnulib: Update to latest, and include C++ tests.
393         * configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
394         tests be disabled...
395         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
396         building package.
397         * m4/gnulib-cache.m4: Regenerate.
398         * build-aux/.cvsignore: Likewise.
399         * build-aux/.gitignore: Likewise.
400
401         Fix build on newer glibc.
402         * src/m4.h (includes): Add <sys/stat.h>.
403         * THANKS: Update.
404         Reported by Todd Rinaldo.
405
406 2010-03-02  Giuseppe Scrivano  <gscrivano@gnu.org>  (tiny change)
407
408         Support bootstrap --gnulib-srcdir=DIR.
409         * bootstrap: Add --gnulib-srcdir option, which overrides
410         GNULIB_SRCDIR, for consistency with gnulib bootstrap.
411
412 2010-02-24  Eric Blake  <eblake@redhat.com>
413
414         Release Version 1.4.14.
415         * gnulib: Update to latest.
416         * README: Increase libsigsegv recommendation.
417         * HACKING: Likewise.  Tweak release instructions.
418         * NEWS: Mention the release.
419
420         Improve parsing example.
421         * doc/m4.texinfo (Input processing): Double-quote argument to
422         translit, for robustness.
423         * THANKS: Update.
424         Reported by Chris Penev.
425
426 2010-01-29  Eric Blake  <ebb9@byu.net>
427
428         Document upcoming release.
429         * gnulib: Update to latest.
430         * doc/m4.texinfo (History): Mention 1.4.14.
431
432 2010-01-06  Eric Blake  <ebb9@byu.net>
433
434         Use correct license on auxiliary documentation.
435         * gnulib: Update to latest.
436         * AUTHORS: Use GFDL 1.3, not 1.2.
437         * BACKLOG: Likewise.
438         * README: Likewise.
439         * THANKS: Likewise.
440         * TODO: Likewise.
441         * NEWS: Place under GFDL.
442         * cfg.mk (old_NEWS_hash): Update.
443
444 2010-01-05  Eric Blake  <ebb9@byu.net>
445
446         Remove more TAB characters.
447         * THANKS: Use space for alignment.
448         * bootstrap: Likewise.
449         * checks/stackovf.test: Likewise.
450         * configure.ac: Likewise.
451         * src/builtin.c: Likewise.  Also update some stale comments.
452         * src/debug.c: Likewise.
453         * src/eval.c: Likewise.
454         * src/format.c: Likewise.
455         * src/freeze.c: Likewise.
456         * src/input.c: Likewise.
457         * src/m4.c: Likewise.
458         * src/m4.h: Likewise.
459         * src/macro.c: Likewise.
460         * src/output.c: Likewise.
461         * src/path.c: Likewise.
462         * src/symtab.c: Likewise.
463
464         Clarify minimum bootstrap requirements.
465         * bootstrap: Avoid out-of-date duplicated data.
466
467         Security fix by requiring newer automake features.
468         * configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
469         parallel-tests, and silent-rules.
470         (AC_PREREQ): Bump autoconf requirement to 2.62, per automake.
471         * HACKING: Update minimum requirements.
472         * NEWS: Document the fix.
473
474         Drop hard-coding of GPG id.
475         * gnulib: Update to latest.
476         * m4/gnulib-cache.m4: Regenerate.
477         * cfg.mk (gpg_key_ID): Delete, now that maint.mk provides a
478         sensible default.
479         (update-copyright-env): Don't let environment interfere with wrap
480         column.
481
482 2010-01-01  Eric Blake  <ebb9@byu.net>
483
484         Update copyright year.
485         All files impacted, via 'make update-copyright'.  Additionally:
486         * .gitignore: Ignore backup files.
487
488 2009-12-29  Eric Blake  <ebb9@byu.net>
489
490         Document new indentation policy.
491         * HACKING: Document indentation policy.
492         * .x-sc_prohibit_tab_based_indentation: New file.
493         * cfg.mk (sc_prohibit_tab_based_indentation): New rule.
494         * Makefile.am (syntax_check_exceptions): New macro.
495         (EXTRA_DIST): Distribute exception files, and .prev-version.
496
497         Switch to indentation by space, not tab.
498         * .gitmodules: Convert leading tabs to spaces.
499         * TODO: Likewise.
500         * bootstrap: Likewise.
501         * c-boxes.el: Likewise.
502         * checks/check-them: Likewise.
503         * checks/get-them: Likewise.
504         * checks/stackovf.test: Likewise.
505         * configure.ac: Likewise.
506         * src/builtin.c: Likewise.
507         * src/debug.c: Likewise.
508         * src/eval.c: Likewise.
509         * src/format.c: Likewise.
510         * src/freeze.c: Likewise.
511         * src/input.c: Likewise.
512         * src/m4.c: Likewise.
513         * src/m4.h: Likewise.
514         * src/macro.c: Likewise.
515         * src/output.c: Likewise.
516         * src/path.c: Likewise.
517         * src/symtab.c: Likewise.
518
519         Update to latest gnulib.
520         * gnulib: Update.
521         * m4/gnulib-cache.m4: Import xoset.
522         * src/output.c (includes): Ensure that gnulib oset usage will
523         call xalloc_die on memory failure.
524         * build-aux/.cvsignore: Regenerate.
525         * build-aux/.gitignore: Likewise.
526
527 2009-11-28  Eric Blake  <ebb9@byu.net>
528
529         Work around BSD getopt bug.
530         * gnulib: Update.
531         * doc/m4.texinfo (Command line files): Add test.
532
533         Use fastmap for better regex performance.
534         * src/input.c (word_start): Delete.
535         (pop_wrapup): Free memory on exit.
536         (set_word_regexp): Compile a fastmap instead.
537         (peek_token, next_token): Use the fastmap.
538
539 2009-11-26  Eric Blake  <ebb9@byu.net>
540
541         Ignore write failures before stack overflow exit.
542         * m4/gnulib-cache.m4: Import ignore-value module.
543         * src/m4.c (fault_handler): Use it to avoid compiler warning.
544
545 2009-11-25  Eric Blake  <ebb9@byu.net>
546
547         Allow use of compiler warnings.
548         * m4/gnulib-cache.m4: Import manywarnings module.
549         * configure.ac (WERROR_CFLAGS, WARN_CFLAGS): New variables.
550         * src/Makefile.am (AM_CFLAGS): Use them.
551         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Turn on warnings during
552         distcheck.
553         * src/m4.h (M4_GNUC_NORETURN): New macro.
554         (trace_post): Delete unused parameter.
555         * src/m4.c (usage): Mark as noreturn.
556         (main): Remove unused parameter.
557         * src/debug.c (trace_post): Likewise.
558         (trace_pre): Cover all enum values.
559         * src/symtab.c (lookup_symbol): Likewise.
560         * src/builtin.c (define_macro, m4_dumpdef): Likewise.
561         (m4_define, m4_undefine, m4_pushdef, m4_popdef, m4_sysval)
562         (m4_divert, m4_undivert, m4_dnl, m4_changequote, m4_changecom)
563         (m4_changeword, m4_syscmd, m4_include, m4_sinclude, m4_m4exit)
564         (m4_debugmode, m4_debugfile, m4_placeholder): Mark unused
565         parameters.
566         (mkstemp_helper): Use parameter.
567         (substitute): Avoid signed vs. unsigned comparison.
568         * src/format.c (arg_int, arg_long, arg_double): Likewise.
569         * src/input.c (next_token): Likewise.
570         * src/output.c (freeze_diversions): Likewise.
571         (m4_tmpname): Allow C++ compilation.
572         * src/freeze.c (produce_frozen_state, GET_NUMBER): Use correct
573         type.
574         * src/macro.c (call_macro): Cover all enum values.
575         (expand_macro): Update caller.
576         * src/path.c (m4_fopen): Remove unused parameter.
577         (m4_path_search): Update caller.
578
579         Silence syntax-check warnings.
580         * src/m4.h (STREQ): New macro.
581         * src/builtin.c (find_builtin_by_name): Use it.
582         * src/input.c (set_word_regexp): Likewise.
583         * src/m4.c (process_file): Likewise.
584         (main): Consistently spell warning, and mark output strings.
585         Avoid unsafe parsing functions.
586         (process_file): Mark output strings.
587         * src/output.c (make_diversion): Likewise.
588         * src/format.c (arg_int, arg_long, arg_double): New helpers.
589         (ARG_INT, ARG_LONG, ARG_DOUBLE): Use them to detect parse errors.
590         * BACKLOG: Avoid whitespace problems.
591         * TODO: Likewise.
592         * HACKING: Likewise.
593         * examples/esyscmd.m4: Likewise.
594         * examples/file.m4: Likewise.
595         * examples/fstab.m4: Likewise.
596         * examples/patsubst.m4: Likewise.
597
598         Use gnulib maintainer-makefile module.
599         * m4/gnulib-cache.m4: Import maintainer-makefile module.
600         * cfg.mk (local-checks-to-skip): Drop changelog-check; add
601         sc_cast_of_x_alloc_return_value.
602         (gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
603         maint.mk.
604         (config_h_header, old_NEWS_hash): New macros.
605         * .prev-version: New file.
606         * maint.mk: Remove from version control; use gnulib instead.
607         * .gitignore: Update.
608         * HACKING: Update.
609
610         Update from gnulib.
611         * gnulib: Update.
612         * m4/gnulib-cache.m4: Use --makefile-name.
613         * lib/Makefile.am: Wrap the gnulib-generated file.
614         * tests/Makefile.am: Likewise.
615         * .gitignore: Track our wrappers.
616         * doc/m4.texinfo (Improved capitalize): Fix typo.
617
618 2009-10-05  Eric Blake  <ebb9@byu.net>
619
620         Update from gnulib.
621         * gnulib: Update.
622         * m4/gnulib-cache.m4: Import gnu-web-doc-update module.
623         * build-aux/.gitignore: Ignore new file.
624         * build-aux/.cvsignore: Likewise.
625
626 2009-08-20  Eric Blake  <ebb9@byu.net>
627
628         Update from gnulib.
629         * gnulib: Update.
630         * AUTHORS: Mention recent copyright assignment.
631
632 2009-08-17  Eric Blake  <ebb9@byu.net>
633
634         Enhance test with closed descriptors.
635         * doc/m4.texinfo (Command line files): Enhance test from
636         2009-07-20 to actually test the bug being fixed.
637
638         Update copyright year.
639         * AUTHORS: Run UPDATE_COPYRIGHT_FORCE=1 make update-copyright.
640         * BACKLOG: Likewise.
641         * Makefile.am: Likewise.
642         * TODO: Likewise.
643         * acinclude.m4: Likewise.
644         * c-boxes.el: Likewise.
645         * cfg.mk: Likewise.
646         * checks/Makefile.in: Likewise.
647         * checks/check-them: Likewise.
648         * checks/stackovf.test: Likewise.
649         * doc/Makefile.am: Likewise.
650         * examples/Makefile.am: Likewise.
651         * src/Makefile.am: Likewise.
652         * src/debug.c: Likewise.
653         * src/eval.c: Likewise.
654         * src/freeze.c: Likewise.
655         * src/m4.h: Likewise.
656         * src/macro.c: Likewise.
657         * src/path.c: Likewise.
658         * src/symtab.c: Likewise.
659
660         Prepare to bulk update copyright year.
661         * gnulib: Update.
662         * m4/gnulib-cache.m4: Import update-copyright and vc-list-files
663         modules.
664         * maint.mk: Fix copyright.
665         (build_aux, VC_LIST, VC_LIST_EXCEPT, update-copyright): New macros
666         and rules borrowed from gnulib.
667         * cfg.mk (update-copyright-env): Enforce longhand behavior.
668         * .cvsignore: Reflect these changes.
669         * .gitignore: Likewise.
670         * .x-update-copyright: New file.
671
672 2009-08-14  Eric Blake  <ebb9@byu.net>
673
674         Explicitly request GNU getopt extensions.
675         * gnulib: Update.
676         * m4/gnulib-cache.m4: Use getopt-gnu, not obsolete getopt module.
677
678 2009-07-22  Eric Blake  <ebb9@byu.net>
679
680         Fix testsuite on Solaris.
681         * doc/m4.texinfo (Command line files): Tolerate different spelling
682         of EBADF.
683         * src/builtin.c (m4_esyscmd): Clear errno before reaping.
684
685 2009-07-21  Eric Blake  <ebb9@byu.net>
686
687         Fix testsuite on mingw.
688         * gnulib: Update.
689
690 2009-07-20  Eric Blake  <ebb9@byu.net>
691
692         Pick up gnulib fixes for sub-process execution.
693         * gnulib: Update.
694         * doc/m4.texinfo (Command line files): Add test; regression
695         introduced 2009-03-05.
696         * NEWS: Document the change.
697
698         Avoid cygwin 1.7 crash with closed stdout.
699         * gnulib: Update.
700         * doc/m4.texinfo (Command line files): Add test; regression
701         introduced 2008-07-17.
702         * NEWS: Document the change.
703
704         A status of 127 does not always imply esyscmd failure.
705         * src/builtin.c (m4_esyscmd): Silence gnulib message; regression
706         introduced 2009-03-05.
707         * doc/m4.texinfo (Sysval): Test this.
708         * NEWS: Document the change.
709
710 2009-06-25  Eric Blake  <ebb9@byu.net>
711
712         Fix description of limits on diversions.
713         * doc/m4.texinfo (Diversions): Fix grammar.  Be less pessimistic
714         about limitations.
715         * THANKS: Update.
716         Reported by Elias Benali.
717
718 2009-06-17  Eric Blake  <ebb9@byu.net>
719
720         Update to latest gnulib.
721         * gnulib: Import fixes for Interix compilation.
722         * THANKS: Update.
723         Reported by Jay Krell.
724
725 2009-05-22  Eric Blake  <ebb9@byu.net>
726
727         Update to latest gnulib.
728         * gnulib: Import fixes for AIX compilation.
729         * THANKS: Update.
730         Reported by Jens Rehsack.
731
732 2009-04-13  Eric Blake  <ebb9@byu.net>
733
734         Fix GFDL usage.
735         * doc/m4.texinfo (copying): Complete transition to GFDL 1.3,
736         started 2008-12-12.
737         Reported by Santiago Vila.
738
739 2009-04-01  Eric Blake  <ebb9@byu.net>
740
741         Release Version 1.4.13.
742         * NEWS: Mention the release.
743
744 2009-03-31  Eric Blake  <ebb9@byu.net>
745
746         Tweak submodule instructions.
747         * HACKING: Improve directions.
748         * gnulib: Update to latest version.
749
750 2009-03-23  Eric Blake  <ebb9@byu.net>
751
752         Don't force file overwrites during bootstrap.
753         * bootstrap: Ensure that rerunning bootstrap doesn't alter tree.
754
755         Drop dist-lzma, now that xz replaces lzma.
756         * configure.ac (AM_INIT_AUTOMAKE): Drop dist-lzma.  Until a stable
757         automake release includes dist-xz, the release process will just
758         manually create a .xz tarball.
759         * gnulib: Update to latest gnulib.
760
761 2009-03-19  Eric Blake  <ebb9@byu.net>
762
763         Exploit git submodule by adding appropriate symlinks.
764         * bootstrap: No longer copy files from gnulib.
765         * COPYING: Change to symlink pointing into gnulib.
766         * INSTALL: Likewise.
767         * build-aux/compile: Likewise.
768         * build-aux/config.guess: Likewise.
769         * build-aux/config.sub: Likewise.
770         * build-aux/depcomp: Likewise.
771         * build-aux/install-sh: Likewise.
772         * build-aux/mdate-sh: Likewise.
773         * build-aux/missing: Likewise.
774         * build-aux/texinfo.tex: Likewise.
775         * .cvsignore: Reflect these changes.
776         * .gitignore: Likewise.
777         * build-aux/.cvsignore: New file.
778         * build-aux/.gitignore: Likewise.
779
780 2009-03-18  Eric Blake  <ebb9@byu.net>
781
782         Make gnulib a git submodule.
783         * .gitmodules: New file.
784         * gnulib: Record which version of gnulib has been tested.
785         * bootstrap: Aid in submodule usage.
786         * cfg.mk (gnulib_dir): Alter default location of gnulib.
787         * HACKING: Mention how to use submodule.
788
789         Use latest compile script, even with stable automake.
790         * bootstrap: Also sync build-aux/compile.
791
792 2009-03-12  Eric Blake  <ebb9@byu.net>
793
794         Fix awk script portability.
795         * checks/get-them: In gsub, properly escape {.  Close all files
796         before exiting.
797         Reported by Gary V. Vaughan.
798
799 2009-03-05  Eric Blake  <ebb9@byu.net>
800
801         Allow configuration choice in syscmd shell.
802         * configure.ac (SYSCMD_SHELL): New test.
803         * src/builtin.c (m4_syscmd, m4_esyscmd): Use it to avoid
804         hard-coding the shell location.
805         * doc/m4.texinfo (Syscmd, Esyscmd): Document this.
806         * README: Document new configure option.
807         * NEWS: Likewise.
808
809         Remove cruft now that gnulib modules do the work.
810         * configure.ac (M4_cv_func_system_consistent): Delete.
811         * src/builtin.c (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS):
812         Delete.
813
814         Use gnulib pipe module instead of popen(3).
815         * m4/gnulib-cache.m4: Import pipe and wait-process modules.
816         * src/builtin.c (m4_esyscmd): Rewrite with pipe module.
817         Resolves a failure on AIX, reported by Gary V. Vaughan.
818
819         Use gnulib execute module instead of system(3).
820         * m4/gnulib-cache.m4: Import execute module.
821         * src/builtin.c (m4_sysval): Move computation...
822         (m4_esyscmd): ...into caller.
823         (m4_syscmd): Rewrite with execute module.
824         Resolves a failure on AIX, reported by Gary V. Vaughan.
825
826 2009-03-03  Eric Blake  <ebb9@byu.net>
827
828         Try to tolerate spaces in directory names in testsuite.
829         * doc/m4.texinfo (Diversions, Using frozen files): Provide shell
830         quoting, in case __program__ contains spaces.
831
832         Improve web-manual maintainer rule.
833         * maint.mk (web-manual): Work with VPATH builds.  Factor
834         package-specific detail...
835         * cfg.mk (manual_title): ...to new variable.
836
837 2009-02-26  Eric Blake  <ebb9@byu.net>
838
839         Make bootstrap easier on Solaris.
840         * bootstrap: Add GNULIB_SRCDIR.  Useful when a wrapper script
841         gnulib-tool exists earlier on the path to work around /bin/sh
842         failure in parsing $GNULIB_SRCDIR/gnulib-tool.
843
844 2009-02-19  Eric Blake  <ebb9@byu.net>
845
846         Fix regression in translit.
847         * src/builtin.c (m4_translit): Use correct comparison.
848         * doc/m4.texinfo (Translit): Enhance test.
849
850         Speed up input engine, by searching for quotes by buffer.
851         * src/input.c (struct input_block): Add end pointer to string.
852         (push_string_finish, push_wrapup): Populate it.
853         (next_token): For quotes, attempt a buffer search.
854         * NEWS: Document this.
855
856 2009-02-18  Eric Blake  <ebb9@byu.net>
857
858         Speed up translit when from argument is short.
859         * m4/gnulib-cache.m4: Import memchr2 module.
860         * src/builtin.c (m4_translit): Use memchr2 when possible.
861         * doc/m4.texinfo (Translit): Add tests.
862         * NEWS: Document this.
863
864         Update copyright year.
865         * THANKS: Mention 2009 in copyright year.
866
867         Prefer buffer over byte operations.
868         * src/format.c (expand_format): Use strchr for speed.
869         * src/builtin.c (substitute, expand_user_macro): Likewise.
870
871         Speed up esyscmd with buffer reads.
872         * src/builtin.c (m4_esyscmd): Read blocks directly into obstack,
873         rather than repeatedly reading bytes.  Detect read errors.
874
875         Avoid risk of stack overflow.
876         * src/output.c (insert_file): Avoid stack allocation of large
877         buffer.
878         (freeze_diversions): Avoid spurious semicolon.
879
880 2009-02-16  Eric Blake  <ebb9@byu.net>
881
882         Avoid test failure due to different errno.
883         * doc/m4.texinfo (Using frozen files): Ignore stdout, since
884         hardened systems can prevent attempts to read /.
885         * THANKS: Update.
886         Reported by Ronny Peine, in Gentoo bug 259184.
887
888         Avoid tests that make no sense, because m4 is single-threaded.
889         * m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
890
891 2009-02-12  Eric Blake  <ebb9@byu.net>
892
893         Avoid quadratic code when walking definition stack.
894         * examples/stack_sep.m4: Use linear, not quadratic
895         implementation.
896         * doc/m4.texinfo (Improved copy): Fix documentation and add test,
897         based on recent autoconf bug fix.
898
899 2009-01-24  Eric Blake  <ebb9@byu.net>
900
901         Add URLs to --help output.
902         * src/m4.c (usage): Use enhanced version-etc features.
903
904 2009-01-02  Eric Blake  <ebb9@byu.net>
905
906         Use nicer email address in web manual.
907         * maint.mk (web-manual): Use new option in gendocs.sh.
908
909         Nuke xdelta diffs at release time; no one reported using them.
910         * maint.mk (got-xdelta, delta-xdelta): Delete.
911         * HACKING: Likewise.
912
913 2009-01-01  Eric Blake  <ebb9@byu.net>
914
915         Update copyright year.
916         * NEWS: M4 1.4.13 will occur in 2009.
917         * doc/m4.texinfo (History): Likewise.
918
919 2008-12-24  Eric Blake  <ebb9@byu.net>
920
921         Prepare for eventual release.
922         * doc/m4.texinfo (History): Mention 1.4.13.
923
924 2008-12-22  Eric Blake  <ebb9@byu.net>
925
926         Make --debugfile argument optional.
927         * src/builtin.c (m4_debugfile): Make error message consistent.
928         * src/m4.c (long_options): Make the argument optional, to allow
929         setting debug file back to stderr.
930         (main): Make --debugfile order-dependent.
931         (usage): Document this.
932         * doc/m4.texinfo (Debugging options): Likewise.
933         * NEWS: Likewise.
934
935         Use @var correctly.
936         * doc/m4.texinfo (Operation modes, Preprocessor features)
937         (Limits control, Frozen state, Debugging options): Use lower case
938         names in @var.
939         (Improved copy): Use @code, not @var, as appropriate.
940
941 2008-12-18  Eric Blake  <ebb9@byu.net>
942
943         Document optimized forloop.
944         * doc/m4.texinfo (Improved forloop): Mention alternate style that
945         avoids define overhead.
946         * examples/forloop3.m4: New file.
947         * examples/Makefile.am (EXTRA_DIST): Distribute it.
948
949         Deal with M4 1.4.x limitation on builtin tokens.
950         * doc/m4.texinfo (Composition): Mention limitation on curry.
951         (Improved copy): New node.
952         * examples/stack_sep.m4: New file.
953         * examples/Makefile.am (EXTRA_DIST): Distribute it.
954
955         Document copy composite using stack_foreach and curry.
956         * doc/m4.texinfo (Stacks): New node, to document pushdef stack
957         manipulation.
958         (Ifelse): Move define_blind...
959         (Composition): ...to this new node.  Document currying, then use
960         it to implement copy and rename.
961         * examples/curry.m4: New file.
962         * examples/stack.m4: Likewise.
963         * examples/Makefile.am (EXTRA_DIST): Distribute them.
964
965 2008-12-17  Eric Blake  <ebb9@byu.net>
966
967         Don't override signal handlers installed by c-stack.
968         * src/m4.c (main): Reorder installation of signal handlers, so we
969         don't trash a SIGBUS handler installed by c-stack.  Also provide a
970         SIGSEGV fallback, for platforms where c-stack combined with
971         libsigsegv uses something lower level than SIGSEGV.
972
973 2008-12-12  Eric Blake  <ebb9@byu.net>
974
975         Double size of temp file cache.
976         * src/output.c (tmp_file, tmp_file_owner): Split...
977         (tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into
978         two variables.
979         (tmp_file2_recent): New variable.
980         (m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename)
981         (output_exit): Adjust callers.
982
983         Use fewer seeks on cached files.
984         * src/output.c (m4_tmpfile): Use write, not append mode.
985         (m4_tmpopen): Add parameter to decide when to skip seeks.
986         (m4_tmprename, make_diversion, insert_diversion_helper)
987         (freeze_diversions): Adjust callers.
988
989         Cache most recently spilled diversion.
990         * src/output.c (tmp_file, tmp_file_owner): New variables, for
991         1-deep cache of spilled diversions.
992         (m4_tmpfile): Open in append mode, since we might revisit
993         diversion without closing it now.
994         (m4_tmpopen): Check cache first.
995         (m4_tmpclose): Update cache, rather than closing.  Add parameter.
996         (m4_tmpremove): Close cache before removing.
997         (m4_tmprename): Deal with open files when renaming.
998         (output_exit): Close cache before exiting.
999         (make_room_for, make_diversion, insert_diversion_helper): Adjust
1000         callers.
1001         * configure.ac (RENAME_OPEN_FILE_WORKS): New configure test.
1002
1003         Correctly track size of in-memory diversions.
1004         * src/output.c (insert_diversion_helper): Correctly track total
1005         in-memory diversion size after undivert.
1006
1007         Avoid quadratic behavior for some cases of divert/undivert.
1008         * src/output.c (struct m4_diversion): Improve comments.
1009         (m4_tmpname, make_diversion): Strengthen preconditions.
1010         (m4_tmprename): New function.
1011         (output_init, output_exit): Move after internal functions.
1012         (make_room_for): Don't bother copying uninitialized bytes.
1013         (insert_diversion_helper): Transfer metadata, rather than copying
1014         contents, when undiverting into a previously unused diversion.
1015         * src/m4.h (includes): Add assert.h.
1016         * doc/m4.texinfo (Diversions): Add test.
1017         (Undivert): Enhance test.
1018         * NEWS: Document the speedup.
1019
1020 2008-12-12  Eric Blake  <ebb9@byu.net>
1021
1022         Upgrade to FDL 1.3, keep COPYING in repository.
1023         * Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING.
1024         * .cvsignore: Don't ignore it.
1025         * .gitignore: Likewise.
1026         * COPYING: Store in repository, per automake 1.10.2
1027         recommendation.
1028         * m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
1029         * doc/m4.texinfo (GNU Free Documentation License): Upgrade
1030         license.
1031         * doc/Makefile.am (m4_TEXINFOS): Likewise.
1032         * NEWS: Mention the documentation license change.
1033
1034 2008-10-10  Eric Blake  <ebb9@byu.net>
1035
1036         Release Version 1.4.12.
1037         * NEWS: Mention the release.
1038
1039 2008-10-06  Eric Blake  <ebb9@byu.net>
1040
1041         Work around Solaris' sed inability to process NUL.
1042         * checks/check-them (SED): Allow user to override.
1043
1044 2008-09-25  Eric Blake  <ebb9@byu.net>
1045
1046         Tweak error message on command line failure.
1047         * src/m4.c (process_file): Match wording of include builtin.
1048         * src/freeze.c (produce_frozen_state): Likewise.
1049         * m4/gnulib-cache.m4: Regenerate.
1050         * doc/m4.texinfo (Command line files, Using frozen files): Update
1051         tests accordingly.
1052
1053 2008-09-24  Eric Blake  <ebb9@byu.net>
1054
1055         Unify error handling for reading directories.
1056         * src/path.c (m4_path_search): Factor open attempts...
1057         (m4_fopen): ...into new function, to reject directories.
1058         * doc/m4.texinfo (Include): Document that directories cannot be
1059         input files.
1060
1061         Avoid bugs on platforms that mishandle trailing /.
1062         * m4/gnulib-cache.m4: Import fopen module.
1063         * doc/m4.texinfo (Command line files, Include): Add tests.
1064         (Using frozen files): This test now works on mingw.
1065         * checks/check-them (examples): Expand xerr to allow ignoring
1066         error output because of differences in platform errno values.
1067
1068 2008-09-22  Eric Blake  <ebb9@byu.net>
1069
1070         Support alternate path separator.
1071         * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
1072         * src/m4.h (includes): Add headers.
1073         * src/path.c (m4_path_search): Avoid literal use of '/' as path
1074         separator and when detecting absolute paths.
1075
1076 2008-09-16  Eric Blake  <ebb9@byu.net>
1077
1078         Fix bootstrap for Solaris /bin/sh.
1079         * bootstrap: Avoid shell quoting pitfall.
1080
1081 2008-09-01  Eric Blake  <ebb9@byu.net>
1082
1083         Fix building with -DDEBUG=1.
1084         * src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
1085         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
1086         * src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
1087         Reported by Tom G. Christensen.
1088
1089 2008-09-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1090
1091         Typos in source code comments.
1092         * src/builtin.c: Fix typos in comments.
1093         * src/input.c: Likewise.
1094
1095 2008-08-29  Eric Blake  <ebb9@byu.net>
1096
1097         Fix manual date information.
1098         * doc/m4.texinfo: UPDATED refers to the day the manual was built,
1099         not the release date of M4.
1100         Based on a bison patch by Akim Demaille.
1101
1102 2008-08-27  Eric Blake  <ebb9@byu.net>
1103
1104         Fix typo.
1105         * doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
1106         branch.
1107
1108 2008-08-25  Eric Blake  <ebb9@byu.net>
1109
1110         Update recommendation now that libsigsegv 2.6 is released.
1111         * NEWS: Recommend libsigsegv 2.6+.
1112         * README: Likewise.
1113
1114 2008-08-21  Eric Blake  <ebb9@byu.net>
1115
1116         Fix crash with traced defn(undef), regression from 2007-08-09.
1117         * src/builtin.c (m4_defn): Handle traced but undefined macros.
1118         * doc/m4.texinfo (Trace): Test it.
1119         * NEWS: Document it.
1120
1121 2008-08-18  Eric Blake  <ebb9@byu.net>
1122
1123         Fix crash with 'm4 -N9', regression from 2006-09-14.
1124         * src/m4.c (main): Add missing break.
1125         * NEWS: Document it.
1126
1127 2008-08-15  Eric Blake  <ebb9@byu.net>
1128
1129         Documentation updates.
1130         * doc/m4.texinfo (History): Mention 1.4.12.
1131         (Builtin): Enhance regression tests.
1132         (Debug Levels): Mention effect of -l.  Enhance regression tests.
1133         (Incompatibilities): Fix typo, and mention trace output.
1134         (Improved capitalize): Simplify example.
1135
1136         Avoid compiler warning.
1137         * src/builtin.c (m4_ifelse): Avoid unused variable.
1138         * THANKS: Update.
1139         Reported by Tom G. Christensen.
1140
1141         Improve 'git diff' of manual source.
1142         * .gitattributes (*.texi*): Add diff attribute.
1143         * bootstrap: Tell git how to use it.
1144         Inspired by Jim Meyering's similar patch for coreutils.
1145
1146 2008-08-11  Eric Blake  <ebb9@byu.net>
1147
1148         Avoid triggering OS/2 bug in testsuite.
1149         * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
1150         Reported by Elbert Pol.
1151
1152 2008-08-03  Eric Blake  <ebb9@byu.net>
1153
1154         Increase ulimit stack value to be larger than SIGSTKSZ.
1155         * checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
1156         at least OpenBSD's sh died early from an undersized stack limit.
1157
1158 2008-07-17  Eric Blake  <ebb9@byu.net>
1159
1160         Remove redundant examples/stackovf.sh.
1161         * examples/stackovf.sh: Delete, now that checks has better
1162         version.
1163         * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
1164
1165 2008-07-17  Eric Blake  <ebb9@byu.net>
1166
1167         Adjust to c-stack changes in gnulib.
1168         * src/Makefile.am (m4_LDADD): Use libsigsegv when available and
1169         necessary, via LIBCSTACK.
1170         * src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
1171         handlers.
1172         * checks/stackovf.test: New file.
1173         * checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
1174         (DOC_CHECKS): ...generated documentation tests into new macro.
1175         (DISTFILES): Distribute stackovf.test.
1176         * checks/check-them: Special-case stackovf.test.
1177         * NEWS: Enhance the NEWS item for -L improvements.
1178         * README: Mention the optional dependency.
1179         * HACKING: Mention maintenance burden added by libsigsegv.
1180
1181 2008-06-21  Eric Blake  <ebb9@byu.net>
1182
1183         Use new sigaction module.
1184         * m4/gnulib-cache.m4: Import sigaction module.
1185         * src/m4.c (main): Drop signal() calls.
1186
1187 2008-06-18  Eric Blake  <ebb9@byu.net>
1188
1189         Also trap SIGILL, SIGFPE, SIGBUS.
1190         * m4/gnulib-cache.m4: Import strsignal module.
1191         * src/m4.c (main): Register more handlers, and prefer sigaction
1192         when available.
1193         (SIGBUS, NSIG): Provide fallback when lacking.
1194         (signal_message): New variable, to keep async-safety.
1195         (fault_handler): Display faulting signal description.
1196         * configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
1197         optimize for single-threaded operation.
1198
1199 2008-06-06  Eric Blake  <ebb9@byu.net>
1200
1201         Inform users what to do in case of programmer error.
1202         * src/m4.h (EXIT_INTERNAL_ERROR): New macro.
1203         * configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
1204         * src/m4.c (fault_handler): New method.
1205         (program_error_message): New variable, for async-safety.
1206         (main): Print bug reporting address rather than dump core on any
1207         failed assertions or detected non-stack-overflow faults.
1208
1209 2008-06-06  Eric Blake  <ebb9@byu.net>
1210
1211         Replace stackovf with gnulib c-stack.
1212         * m4/gnulib.cache.m4: Import c-stack module.
1213         * configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
1214         siginfo.h, sys/wait.h.
1215         (AC_CHECK_TYPES): Likewise for siginfo_t.
1216         (AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
1217         (AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
1218         sigstack, sigvec, strerror.
1219         (M4_cv_use_stackovf): Likewise for stack overflow detection.
1220         * src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
1221         * src/stackovf.c: Delete.
1222         * src/m4.h (setup_stackovf_trap): Delete.
1223         * src/m4.c (stackovf_handler): Delete.
1224         (main): Use c_stack_action instead of setup_stackovf_trap.  If
1225         stack overflow is detectable, don't limit -L artificially.
1226         (usage): Document unlimited default on supported systems.
1227         * doc/m4.texinfo (Limits control): Document new default nesting
1228         limit.
1229         * NEWS: Document this change.
1230
1231 2008-07-30  Eric Blake  <ebb9@byu.net>
1232
1233         Avoid regressions in trace and comment output.
1234         * doc/m4.texinfo (Trace): Add test.
1235         (Comments): Likewise.
1236
1237 2008-07-28  Eric Blake  <ebb9@byu.net>
1238
1239         Optimize iteration examples.
1240         * examples/forloop2.m4: Avoid excess indir, by passing current
1241         counter value as parameter.
1242         * examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
1243         ignored argument.
1244         * doc/m4.texinfo (Improved forloop, Improved foreach): Update the
1245         documentation to match.
1246
1247 2008-07-26  Eric Blake  <ebb9@byu.net>
1248
1249         Give example for O(n) foreach on m4 1.4.x.
1250         * examples/foreachq4.m4: New file.
1251         * examples/Makefile.am (EXTRA_DIST): Distribute it.
1252         * doc/m4.texinfo (Improved foreach): Document linear foreach with
1253         m4 1.4.5 and greater.
1254
1255 2008-07-17  Eric Blake  <ebb9@byu.net>
1256
1257         Fix missing copyright notices.
1258         * acinclude.m4: Add copyright license details.
1259         * c-boxes.el: Likewise.
1260         * checks/get-them: Likewise.
1261         * checks/check-them: Likewise.
1262
1263 2008-07-13  Eric Blake  <ebb9@byu.net>
1264
1265         Add -g/--gnu command line argument.
1266         * src/m4.c (usage): Mention the new option.
1267         (long_options, OPTSTRING): Add new option.
1268         (main): Use it.
1269         * NEWS: Document this addition.
1270         * doc/m4.texinfo (Limits control): Likewise.
1271         (Incompatibilities): Mention future use of POSIXLY_CORRECT.
1272         * THANKS: Update.
1273         Reported by Joel E. Denny.
1274
1275 2008-07-11  Eric Blake  <ebb9@byu.net>
1276
1277         Avoid bogus whitespace in @ovar, @dvar.
1278         * doc/m4.texinfo (ovar, dvar): Add @c.
1279         Based on patch by Ralf Wildenhues to Autoconf manual.
1280
1281 2008-06-16  Eric Blake  <ebb9@byu.net>
1282
1283         Add missing const qualifications.
1284         * src/builtin.c (builtin_tab): Declare array elements as const.
1285
1286 2008-06-03  Eric Blake  <ebb9@byu.net>
1287
1288         Use progname module rather than rolling our own program_name.
1289         * m4/gnulib-cache.m4: Import progname module.
1290         * src/m4.c (program_name): Replace...
1291         (main): ...with a call to set_program_name.
1292
1293 2008-06-02  Eric Blake  <ebb9@byu.net>
1294
1295         Allow autobuild usage.
1296         * m4/gnulib.cache: Import autobuild module.
1297
1298 2008-05-23  Eric Blake  <ebb9@byu.net>
1299
1300         Make closing files be consistent.
1301         * src/freeze.c (reload_frozen_state): Use close_stream.
1302         Reported by Jean-Charles Longuet.
1303
1304 2008-05-22  Eric Blake  <ebb9@byu.net>
1305
1306         Don't allow failure to freeze give exit status of 0.
1307         * src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
1308         fopen failure.
1309         * doc/m4.texinfo (Using frozen files): Test the fix.
1310         * THANKS: Update.
1311         Reported by Jean-Charles Longuet.
1312
1313 2008-05-09  Eric Blake  <ebb9@byu.net>
1314
1315         Improve error message when frozen file is invalid.
1316         * src/freeze.c (reload_frozen_state): Track current line.
1317         [GET_STRING]: New helper macro.
1318
1319 2008-05-09  Eric Blake  <ebb9@byu.net>
1320
1321         Detect integer overflow when loading frozen file.
1322         * src/m4.h (includes): Add limits.h.
1323         (_): Define as a no-op placeholder for now.
1324         * src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
1325         immediately on overflow.
1326         Reported by Jim Meyering.
1327
1328 2008-05-07  Eric Blake  <ebb9@byu.net>
1329
1330         Fix traceon regression introduced 2006-06-06.
1331         * src/builtin.m4 (traceon): Only perform insertion if lookup
1332         fails.
1333         * doc/m4.texinfo (Trace): Test for the bug.
1334         * NEWS: Document it.
1335
1336 2008-05-03  Eric Blake  <ebb9@byu.net>
1337
1338         Document define_blind.
1339         * doc/m4.texinfo (Ifelse): Add a new composite macro.
1340         * THANKS: Update.
1341         Suggested by Mike R.
1342
1343 2008-04-24  Eric Blake  <ebb9@byu.net>
1344
1345         Add debugmode test.
1346         * doc/m4.texinfo (Debug Levels): Test -di behavior.
1347         (Changeword, Location): Correct examples.
1348         * checks/check-them (examples): Update to account for recommended
1349         location for running tests.
1350         * doc/m4.texinfo (Debug Levels): Test this behavior.
1351
1352 2008-04-21  Eric Blake  <ebb9@byu.net>
1353
1354         Fix spelling of attribution to Christopher Strachey.
1355         * doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
1356         * THANKS: Update.
1357         Reported by Fernando Carrijo.
1358
1359 2008-04-17  Eric Blake  <ebb9@byu.net>
1360
1361         Fix buildbot failure.
1362         * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
1363         SIGPIPE is ignored.
1364         * THANKS: Update.
1365         Detected by Bob Proulx's buildbot.
1366
1367 2008-04-17  Eric Blake  <ebb9@byu.net>
1368
1369         Avoid gcc shadowing warnings.
1370         * src/builtin.c (m4_format): s/format/expand_format, so local
1371         variables can be named format.
1372         * src/format.c (format): Rename...
1373         (expand_format): ...to this, and avoid the name index.
1374         * src/input.c (push_file): Avoid the name close.
1375         * src/m4.h (expand_format): Adjust prototype.
1376         * src/output.c (threshold_diversion_CB): Avoid the name div.
1377
1378 2008-04-15  Eric Blake  <ebb9@byu.net>
1379
1380         Another 'make installcheck' fix.
1381         * doc/m4.texinfo (Diversions): s/m4/__program__/ in case
1382         --program-prefix was active.
1383
1384 2008-04-11  Eric Blake  <ebb9@byu.net>
1385
1386         Ensure --program-prefix doesn't regress.
1387         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
1388         2008-03-10 by testing it at 'make distcheck' time.
1389
1390 2008-04-11  Eric Blake  <ebb9@byu.net>
1391
1392         Improve OS/2+emx build.
1393         * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
1394         system(3), no matter what other macros it pre-defined.
1395         * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
1396         on OS/2.
1397         * src/builtin.c (predefined_tab): Ensure all possible system
1398         identifiers are defined, not just the first; the testsuite will
1399         catch if multiple identifiers mistakenly made it through.
1400         * THANKS: Update.
1401         Reported by Elbert Pol.
1402
1403 2008-04-09  Eric Blake  <ebb9@byu.net>
1404
1405         Remove redundant configure macros.
1406         * configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
1407         (AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
1408         this.
1409         (AC_CHECK_HEADERS_ONCE): Remove limits.h.
1410
1411 2008-08-07  Bruno Haible  <bruno@clisp.org>  (tiny change)
1412
1413         Run m4 tests prior to gnulib unit tests.
1414         * Makefile.am (SUBDIRS): Swap order of directories.
1415
1416 2008-04-02  Eric Blake  <ebb9@byu.net>
1417
1418         Release Version 1.4.11.
1419         * NEWS: Mention the release.
1420
1421         Prepare for release.
1422         * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
1423         remove tag operation.
1424         (version-check): Enhance this check.
1425         (prev-tarball): Depend on version-check.
1426         (this-vc-tag): Delete, and mention need to run tag...
1427         * HACKING: ...here, prior to make maintainer-distcheck.
1428         Update the instructions to match this particular release process.
1429         * Makefile.am (.version, announcement): Allow for VPATH build.
1430         * cfg.mk (gnulib_dir): Likewise.
1431         * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
1432         page.
1433
1434 2008-04-01  Eric Blake  <ebb9@byu.net>
1435
1436         Speed up index builtin.
1437         * m4/gnulib-cache: Import strstr module.
1438         * NEWS: Mention the speedup.
1439
1440 2008-03-29  Eric Blake  <ebb9@byu.net>
1441
1442         Fix testsuite on mingw, OpenBSD.
1443         * src/format.c (ARG_DOUBLE): Use strtod, not atof.
1444         * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
1445         * doc/m4.texinfo (Format): Add hex-float support.
1446         * NEWS: Document this.
1447
1448 2008-03-27  Eric Blake  <ebb9@byu.net>
1449
1450         Pull other useful doc fixes from branch-1.6.
1451         * doc/m4.texinfo (Arguments): Enable test of
1452         --warn-macro-sequence.
1453         (Defn): Test length of builtin token.
1454         (Builtin, Ifelse, Changequote): Add more regression tests.
1455
1456 2008-03-27  Eric Blake  <ebb9@byu.net>
1457
1458         Add test for divert bug on 2007-05-28, patched 2007-07-21.
1459         * doc/m4.texinfo (Diversions): Add test.
1460
1461 2008-03-24  Eric Blake  <ebb9@byu.net>
1462
1463         Pull GNUmakefile from gnulib.
1464         * m4/gnulib-cache.m4: Import gnumakefile module.
1465         * GNUmakefile: Remove from version control; supplied by gnulib
1466         instead.
1467         * configure.ac (AC_INIT): Track intra-release version with
1468         git-version-gen.
1469         (AC_CONFIG_LINKS): Let gnulib do this now.
1470         * Makefile.am (distclean-local): Likewise.
1471         (EXTRA_DIST): Likewise.  Also handle renamed files.
1472         * (.version, dist-hook): Improve version handling.
1473         * Makefile.cfg: Rename...
1474         * cfg.mk: ...to this.
1475         * Makefile.maint: Rename...
1476         * maint.mk: ...to this.
1477         (ME, makefile-check, m4-check): Use new macro instead of
1478         hard-coded name.
1479         * HACKING: Mention that maintainer rules should now work in VPATH
1480         builds.
1481
1482 2008-03-15  Eric Blake  <ebb9@byu.net>
1483
1484         Document join, in order to fix bug in m4wrap example.
1485         * doc/m4.texinfo (Improved m4wrap): New node.
1486         (Defn, Location): Enhance tests.
1487         (Shift): Document the composite macro join.
1488         (Incompatibilities): Move documentation of LIFO vs. FIFO...
1489         (M4wrap): ...here, to match improved example.
1490
1491 2008-03-10  Eric Blake  <ebb9@byu.net>
1492
1493         Allow 'make installcheck' with './configure --program-prefix'.
1494         * checks/Makefile.in (program_transform_name): New macro.
1495         (installcheck): Use it to transform name of m4 before testing.
1496         * checks/check-them (m4): Add -m option, to allow testing m4 by a
1497         different name.
1498         * checks/get-them: Allow xout and xerr notation.
1499
1500 2008-02-25  Eric Blake  <ebb9@byu.net>
1501
1502         Improve release process.
1503         * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
1504         dist-lzma.
1505         * HACKING: Update for git release procedures.
1506         * Makefile.cfg: New file.
1507         * GNUmakefile: Use it.
1508         * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
1509         (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
1510         (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
1511         (makefile-check, news-date-check, changelog-check, m4-check)
1512         (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
1513         (announcement, alpha, beta, major): New rules, borrowed from
1514         coreutils.
1515         (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
1516         (cvs-dist): Delete.
1517         * Makefile.am (EXTRA_DIST): Distribute new file.
1518
1519 2008-02-19  Eric Blake  <ebb9@byu.net>
1520
1521         Clean up foreach example.
1522         * doc/m4.texinfo (Foreach, Improved foreach): Document another
1523         shortcoming in foreach.m4.
1524
1525 2008-02-16  Eric Blake  <ebb9@byu.net>
1526
1527         Add regression test for multi-character quote recursion.
1528         * examples/foreach2.m4: Use $0 rather than spelling out name.
1529         * examples/foreachq2.m4: Likewise.
1530         * examples/forloop2.m4: Likewise.
1531         * examples/hanoi.m4: Likewise.
1532         * examples/trace.m4: Likewise.
1533         * doc/m4.texinfo (Improved forloop): Document advantage of $0.
1534         (Improved foreach): Adjust dump from file.
1535
1536 2008-02-13  Eric Blake  <ebb9@byu.net>
1537
1538         Fix texinfo grammar.
1539         * doc/m4.texinfo (Incompatibilities): Use @. after capital.
1540         (History): Use @: after abbreviations.
1541         (M4exit): Use correct Latin abbreviation.
1542
1543 2008-02-11  Eric Blake  <ebb9@byu.net>
1544
1545         Document behavior of __gnu__().
1546         * doc/m4.texinfo (Platform macros): Enhance test.
1547         (Macro expansion): New test.
1548
1549 2008-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1550
1551         * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
1552         than hard-coding /bin/sh.
1553         * THANKS: Update.
1554         Reported by Lawson Chan.
1555
1556 2007-12-13  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
1557
1558         * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
1559         example.
1560         * THANKS: Update.
1561         Reported by Giovanni Toffetti.
1562
1563 2007-12-07  Eric Blake  <ebb9@byu.net>
1564
1565         Minor security fix: Quote output of mkstemp.
1566         * src/builtin.c (mkstemp_helper): Produce quoted output.
1567         * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
1568         * NEWS: Document this change.
1569
1570 2007-12-04  Eric Blake  <ebb9@byu.net>
1571
1572         Fix builds with OpenBSD make.
1573         * doc/Makefile.am (HELP2MAN): New macro.
1574         (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
1575         * README: Update copyright.
1576         * HACKING: Mention help2man and makeinfo dependencies.
1577
1578 2007-11-22  Eric Blake  <ebb9@byu.net>
1579
1580         Security fix: avoid arbitrary code execution with 'm4 -F'.
1581         * src/freeze.c (produce_frozen_state): Never pass raw file name as
1582         printf format.
1583         * NEWS: Document this fix.
1584
1585 2007-11-07  Eric Blake  <ebb9@byu.net>
1586
1587         * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
1588
1589 2007-11-05  Eric Blake  <ebb9@byu.net>
1590
1591         Use build-aux directory.
1592         * configure.ac (PACKAGE, VERSION): Delete, since Automake does
1593         this now.
1594         (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
1595         instead of the top level.
1596         (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
1597         * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
1598         * bootstrap: Adjust accordingly.
1599         * m4/gnulib-cache.m4: Add --aux-dir option.
1600         * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
1601
1602 2007-10-31  Eric Blake  <ebb9@byu.net>
1603
1604         Test more corner cases.
1605         * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
1606         (Improved foreach): Document alternate foreachq style.
1607
1608 2007-10-28  Eric Blake  <ebb9@byu.net>
1609
1610         More test coverage for autoconf usage patterns.
1611         * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
1612         (Builtin): Add new undocumented tests.
1613         (Shift): Document cond macro, and add new test.
1614
1615 2007-10-27  Eric Blake  <ebb9@byu.net>
1616
1617         Document one use of changequote(`(',`)').
1618         * doc/m4.texinfo (Changequote): Add new test, based on recent
1619         autoconf addition of m4_expand.
1620
1621 2007-10-22  Eric Blake  <ebb9@byu.net>
1622
1623         Never let printf failures go undetected.
1624         * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
1625         intprops, strtod, and xprintf modules.  Remove deprecated free
1626         module.  Replace vasprintf-posix and xvasprintf with
1627         xvasprintf-posix.
1628         * src/m4.h: Include xprintf.h.
1629         * src/builtin.c (ntoa): Export.
1630         (m4_errprint): Adjust all *printf callers.
1631         * src/debug.c (debug_message_prefix, trace_format): Likewise.
1632         * src/freeze.c (produce_frozen_state): Likewise.
1633         * src/input.c [DEBUG_INPUT]: Likewise.
1634         * src/m4.c (usage): Likewise.
1635         * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
1636         (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
1637         * src/output.c (shipout_text, freeze_diversione): Likewise.
1638         * src/path.c [DEBUG_INCL]: Likewise.
1639         * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
1640         * src/symtab.c [DEBUG_SYM]: Likewise.
1641
1642 2007-10-17  Eric Blake  <ebb9@byu.net>
1643
1644         Fix 'm4 -F file -t undefined'.
1645         * src/freeze.c (produce_frozen_state): Avoid core dump.
1646         * doc/m4.texinfo (Using frozen files): Test for the bug.
1647         * NEWS: Mention the fix.
1648
1649 2007-10-09  Eric Blake  <ebb9@byu.net>
1650
1651         Avoid regexp regression.
1652         * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
1653
1654 2007-10-02  Eric Blake  <ebb9@byu.net>
1655
1656         Add more examples and tests.
1657         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
1658         document shortfall.
1659         (Improved capitalize): New node.
1660         (Index macro, Regexp): Test more code paths.
1661         * examples/capitalize.m4: Update to match manual.
1662         * examples/capitalize2.m4: New file.
1663         * examples/foreachq3.m4: Likewise.
1664         * examples/join.m4: Likewise.
1665         * examples/loop.m4: Likewise.
1666         * examples/wraplifo.m4: Likewise.
1667         * examples/wraplifo2.m4: Likewise.
1668         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1669
1670 2007-09-24  Eric Blake  <ebb9@byu.net>
1671
1672         Create .gitignore alongside .cvsignore.
1673         * bootstrap (LC_ALL): Set up front.
1674         (version control) Borrow idea from head, to avoid churn in
1675         m4/.*ignore files modified by gnulib-tool.
1676
1677 2007-09-13  Eric Blake  <ebb9@byu.net>
1678
1679         * AUTHORS: Fix typo.
1680
1681 2007-09-07  Eric Blake  <ebb9@byu.net>
1682
1683         * AUTHORS: Simplify, to match libtool and autoconf layout.
1684         * THANKS: Sync with head.
1685
1686 2007-08-10  Eric Blake  <ebb9@byu.net>
1687
1688         * doc/m4.texinfo (Compatibility): Sync with head.
1689
1690 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
1691         and Eric Blake  <ebb9@byu.net>
1692
1693         * doc/m4.texinfo (Defn): Update wording.
1694
1695 2007-08-09  Eric Blake  <ebb9@byu.net>
1696
1697         POSIX requires defn(`a',`b') to concatenate definitions.
1698         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
1699         trying to mix a builtin with anything else.
1700         * doc/m4.texinfo (Defn): Document a use for this POSIX
1701         requirement.
1702         (Incompatibilities): Update to match current status.
1703         * NEWS: Document this change.
1704         * THANKS: Update.
1705         Reported by Konrad Schwarz.
1706
1707 2007-08-04  Eric Blake  <ebb9@byu.net>
1708
1709         Normalize all GPL license notices.
1710         * GNUmakefile: Update license wording.
1711         * Makefile.am: Likewise.
1712         * Makefile.maint: Likewise.
1713         * bootstrap: Likewise.
1714         * commit: Likewise.
1715         * configure.ac: Likewise.
1716         * checks/Makefile.in: Likewise.
1717         * doc/Makefile.am: Likewise.
1718         * examples/Makefile.am: Likewise.
1719         * src/Makefile.am: Likewise.
1720         * src/builtin.c: Likewise.
1721         * src/debug.c: Likewise.
1722         * src/eval.c: Likewise.
1723         * src/format.c: Likewise.
1724         * src/freeze.c: Likewise.
1725         * src/input.c: Likewise.
1726         * src/m4.c: Likewise.
1727         * src/m4.h: Likewise.
1728         * src/macro.c: Likewise.
1729         * src/output.c: Likewise.
1730         * src/path.c: Likewise.
1731         * src/stackovf.c: Likewise.
1732         * src/symtab.c: Likewise.
1733
1734 2007-07-21  Eric Blake  <ebb9@byu.net>
1735
1736         Fix regression on NetBSD from 2007-05-28.
1737         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
1738         position to byte 0.
1739         * NEWS: Document this fix.
1740         * THANKS: Update.
1741         Reported by Thomas Klausner.
1742
1743 2007-07-20  Eric Blake  <ebb9@byu.net>
1744
1745         Fix 'make distcheck' issues.
1746         * Makefile.am (EXTRA_DIST): No need to distribute
1747         gpl-3.0.texi.diff anymore.
1748         * m4/gnulib-cache.m4: Update to latest gnulib.
1749
1750 2007-07-14  Eric Blake  <ebb9@byu.net>
1751
1752         Reflect upstream license .texi changes.
1753         * doc/m4.texinfo (Copying): Rename node...
1754         (GNU General Public License): ...to this.
1755         (GNU Free Documentation License): Adjust node location.
1756         * local/doc/gpl-3.0.texi.diff: Remove file.
1757
1758 2007-07-10  Eric Blake  <ebb9@byu.net>
1759
1760         Start 1.4.10a.
1761         * configure.ac (AC_INIT): Bump version number.
1762         * NEWS: Start changes since 1.4.10.
1763         * doc/m4.texinfo (History): Mention 1.4.11.
1764         (Copying This Package, Copying This Manual): Add index entries.
1765         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
1766         updated.
1767         * Makefile.am (EXTRA_DIST): Remove dead file.
1768
1769 2007-07-09  Eric Blake  <ebb9@byu.net>
1770
1771         Release Version 1.4.10.
1772         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
1773         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
1774         * configure.ac (AC_INIT): Bump version number.
1775         * NEWS: Describe changes since 1.4.9.
1776
1777         * src/format.c: Missed a GPLv3 conversion.
1778
1779         Avoid undefined behavior of %.*c in printf.
1780         * src/format.c (format): Special case %c.
1781         * TODO: Document that more remains to be done.
1782         * NEWS: Document the fix.
1783
1784 2007-07-05  Eric Blake  <ebb9@byu.net>
1785
1786         Fix up gnulib-tool usage.
1787         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
1788         * version-etc.c.diff: Move to...
1789         * local/lib/version-etc.c.diff: ...here.
1790         * gpl-3.0.texi.diff: Move to...
1791         * local/doc/gpl-3.0.texi.diff: ...here.
1792
1793 2007-07-04  Eric Blake  <ebb9@byu.net>
1794
1795         Upgrade to GPL version 3 or later.
1796         * bootstrap: Pick up GPLv3.
1797         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
1798         --local-dir=. --import gpl-3.0'.
1799         * doc/m4.texinfo (Copying This Package): New appendix.
1800         * NEWS: Mention this change.
1801         * README: Mention why some files still claim to be version 2.
1802         * version-etc.c.diff: New file, to make sure --version claims
1803         correct GPL version.  Temporary until gnulib makes move.
1804         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
1805         appendix, rather than section, of the manual.
1806         * GNUmakefile: Update to new license.
1807         * Makefile.am: Likewise.
1808         * Makefile.maint: Likewise.
1809         * commit: Likewise.
1810         * configure.ac: Likewise.
1811         * checks/Makefile.in: Likewise.
1812         * doc/Makefile.am: Likewise.
1813         * examples/Makefile.am: Likewise.
1814         * src/Makefile.am: Likewise.
1815         * src/builtin.c: Likewise.
1816         * src/debug.c: Likewise.
1817         * src/eval.c: Likewise.
1818         * src/freeze.c: Likewise.
1819         * src/input.c: Likewise.
1820         * src/m4.c: Likewise.
1821         * src/m4.h: Likewise.
1822         * src/macro.c: Likewise.
1823         * src/output.c: Likewise.
1824         * src/path.c: Likewise.
1825         * src/stackovf.c: Likewise.
1826         * src/symtab.c: Likewise.
1827
1828 2007-06-26  Eric Blake  <ebb9@byu.net>
1829
1830         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
1831
1832 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
1833
1834         Match Free Software Directory categories.
1835         * doc/m4.texinfo (dircategory): Update.
1836
1837 2007-05-31  Eric Blake  <ebb9@byu.net>
1838
1839         * src/output.c (output_text): Fix regression from 2007-05-28.
1840         * doc/m4.texinfo (History): Mention 1.4.10.
1841         (Format): Make testsuite output easier to debug.
1842
1843 2007-05-29  Eric Blake  <ebb9@byu.net>
1844
1845         Start 1.4.9c.
1846         * configure.ac (AC_INIT): Bump version number.
1847         * NEWS: Start changes since 1.4.9b, and fix typo.
1848
1849         Beta Release Version 1.4.9b.
1850         * configure.ac (AC_INIT): Bump version number.
1851         * NEWS: Describe changes since 1.4.9.
1852
1853         Improve format support.
1854         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1855         vasprintf-posix'.
1856         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
1857         printf with too few arguments, as in format(%*.*d,-1,-1,1).
1858         * doc/m4.texinfo (Format): Expand tests, and improve
1859         documentation.
1860         * NEWS: Document this change.
1861
1862 2007-05-28  Eric Blake  <ebb9@byu.net>
1863
1864         Fix large diversion corner cases, including 1.4.8 regression.
1865         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
1866         (make_room_for): Use NULL, not 0, for pointers.
1867         (insert_diversion_helper): Avoid using rewind.
1868         (freeze_diversions): Allow freezing large diversions.
1869         * NEWS: Document this fix.
1870
1871         Also run gnulib unit tests during make check.
1872         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
1873         --tests-base=tests --with-tests'.
1874         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
1875         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
1876
1877 2007-05-25  Eric Blake  <ebb9@byu.net>
1878
1879         Backport prompts in examples from head.
1880         * src/macro.c (expand_macro): Shorten message.
1881         * doc/m4.texinfo (Manual, Command line files, Comments)
1882         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
1883         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
1884         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
1885         (Using frozen files, Improved forloop, Improved foreach): Add
1886         prompts to examples.
1887         * checks/get-them: Ignore prompts in examples.
1888
1889         Fix sync line interaction with multiline comments.
1890         * doc/m4.texinfo (Other Incompatibilities): Add example, and
1891         document bug in --syncline/divert interaction.
1892         (Preprocessor features): Augment test.
1893         * src/m4.h (output_text): Export.
1894         (shipout_text, next_token): Add parameter.
1895         * src/freeze.c (reload_frozen_state): Don't interfere with
1896         synclines when reloading state.
1897         * src/output.c (output_text): Export.
1898         (shipout_text): Take new parameter for start line of token.
1899         Output at most one syncline per token.
1900         * src/input.c (next_token): Report line where multiline tokens
1901         start.
1902         * src/macro.c (expand_input, expand_token, expand_argument):
1903         Adjust callers so that line is passed from input to output.
1904         * NEWS: Document this fix.
1905         Reported by Sergey Poznyakoff.
1906
1907         Test -s in testsuite.
1908         * doc/m4.texinfo (Preprocessor features): Add a test.
1909         * checks/get-them: Support extra options in testsuite.
1910         * checks/check-them (examples): Use extra options.
1911         * THANKS: Update.
1912         Reported by Sergey Poznyakoff.
1913
1914 2007-05-24  Eric Blake  <ebb9@byu.net>
1915
1916         Support POSIX flush semantics on all platforms.
1917         * m4/gnulib-cache.m4: Remove closeout, and augment with
1918         'gnulib-tool --import closein fflush'.
1919         * src/m4.h (includes): Use closein, not closeout.
1920         * src/m4.c (main): Ensure stdin is flushed when not all input is
1921         consumed.
1922         (process_file): No return needed.
1923         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
1924         than excluding mingw.
1925         * NEWS: Document this change.
1926
1927         Work around cygwin and mingw fseeko bugs.
1928         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
1929         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
1930
1931 2007-04-25  Eric Blake  <ebb9@byu.net>
1932
1933         Fix negative division within eval, regression of 2007-01-06.
1934         * doc/m4.texinfo (Eval): Catch this bug.
1935         * src/eval.c (mult_term): Fix it.
1936         * NEWS: Document this.
1937         * THANKS: Update.
1938         Reported by Cesar Strauss.
1939
1940 2007-04-23  Eric Blake  <ebb9@byu.net>
1941
1942         Start 1.4.9a.
1943         * configure.ac (AC_INIT): Bump version number.
1944         * NEWS: Start changes since 1.4.9.
1945
1946 2007-03-23  Eric Blake  <ebb9@byu.net>
1947
1948         Release 1.4.9:
1949         * configure.ac (AC_INIT): Bump version number.
1950         * NEWS: Describe changes since 1.4.8b.
1951
1952 2007-03-16  Eric Blake  <ebb9@byu.net>
1953
1954         * doc/m4.texinfo (Mkstemp): Tweak wording.
1955         * src/output.c (output_init): Adjust to latest gnulib.
1956
1957 2007-03-15  Eric Blake  <ebb9@byu.net>
1958
1959         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
1960         long long, it confuses gnulib).
1961         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
1962         if unsigned long long doesn't work.
1963         * THANKS: Update.
1964         Reported by Matthew Woehlke.
1965
1966 2007-03-07  Eric Blake  <ebb9@byu.net>
1967
1968         * AUTHORS: Update.
1969         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
1970
1971 2007-03-01  Eric Blake  <ebb9@byu.net>
1972
1973         * doc/m4.texinfo: Pick up more index entries from head.  Follow
1974         more texinfo recommendations.
1975         (Sysval): Improve tests.
1976
1977         Avoid overfull \vbox warning from texinfo, due to indices that
1978         weren't quite big enough to split across page boundaries.
1979         * doc/m4.texinfo: Add lots of concept index entries.
1980         (Concept Index): Move to be last, as recommended by texinfo
1981         manual.
1982         (Define, Arguments, Pseudo Arguments): Add more function entries.
1983
1984 2007-02-28  Eric Blake  <ebb9@byu.net>
1985
1986         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
1987         137.
1988         (Pseudo Arguments): Add useful example.
1989
1990         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
1991         reflect POSIX XCU ERN 118.
1992
1993         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
1994         * src/m4.c (usage): ...here,...
1995         * src/builtin.c (set_macro_sequence): ...and here.
1996         (define_user_macro): Fix typo.
1997         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
1998         inaccuracies.
1999         (Shift): Document composite macro argn for portably getting at
2000         positional parameters beyond 9.
2001         * configure.ac (AC_INIT): Bump version number.
2002         * NEWS: Start changes of 1.4.8c.
2003
2004 2007-02-24  Eric Blake  <ebb9@byu.net>
2005
2006         Beta Release 1.4.8b:
2007         * configure.ac (AC_INIT): Bump version number.
2008         * NEWS: Describe changes since 1.4.8.
2009
2010         Reserve all uses of raw ${} in macro definitions, not just
2011         ${<digit>}.
2012         * src/builtin.c (set_macro_sequence): Change default macro
2013         sequence.
2014         * doc/m4.texinfo (Operation modes): Update to match.
2015         * src/m4.c (usage): Likewise.
2016         * NEWS: Likewise.
2017
2018 2007-02-23  Eric Blake  <ebb9@byu.net>
2019
2020         * src/m4.h (includes): Update to latest gnulib.
2021
2022 2007-02-08  Eric Blake  <ebb9@byu.net>
2023
2024         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
2025         more flexible, and so that autoconf can use it.
2026         * src/m4.h (set_macro_sequence, free_macro_sequence): New
2027         prototypes.
2028         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
2029         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
2030         New variables and functions.
2031         (define_user_macro): Allow flexibility in regular expression used
2032         to trigger warning.
2033         * src/m4.c (warn_syntax): Delete.
2034         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
2035         spelling of option, along with optional argument.
2036         * doc/m4.texinfo (Operation modes, Arguments): Document this
2037         change.
2038         * NEWS: Document this change.
2039
2040 2007-02-05  Eric Blake  <ebb9@byu.net>
2041
2042         * m4/gnulib-cache.m4: Module strstr no longer exists.
2043
2044         Avoid bool bitfields, as they don't work on AIX.
2045         * src/m4.h (bool_bitfield): New typedef.
2046         (struct symbol, struct builtin): Use it.
2047         * src/input.c (struct input_block): Likewise.
2048         Reported by Albert Chin.
2049
2050         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
2051         Reported by Albert Chin.
2052         * THANKS: Update.
2053
2054 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
2055
2056         * doc/m4.texinfo (Input processing): Further clarifications.
2057
2058 2007-02-03  Eric Blake  <ebb9@byu.net>
2059
2060         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
2061         the examples.
2062         Reported by Bruno Haible.
2063
2064 2007-02-01  Eric Blake  <ebb9@byu.net>
2065
2066         * src/m4.c (fatal_warnings): New variable.
2067         (usage): Document new -E behavior.
2068         (main): Make -E an additive option.
2069         (m4_error, m4_error_at_line): Change exit status when required.
2070         * NEWS: Document this change.
2071         * doc/m4.texinfo (Operation modes): Likewise.
2072         Reported by Ralf Wildenhues.
2073
2074 2007-01-27  Eric Blake  <ebb9@byu.net>
2075
2076         * src/m4.h (warn_syntax): Declare.
2077         (init_pattern_buffer): Export.
2078         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
2079         (long_options, main): Implement new option.
2080         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
2081         (define_user_macro): Warn on $11 and ${1} if requested.
2082         * src/input.c (init_pattern_buffer): Delete duplicate method.
2083         * doc/m4.texinfo (Operation modes): Document it.
2084         (Arguments): Document future direction of ${11} vs. $11.
2085         (Incompatibilities): Fix wording on POSIX limitations.
2086         * checks/get-them: Parse @{ and @} correctly.
2087         * NEWS: Document this change.
2088
2089 2007-01-26  Eric Blake  <ebb9@byu.net>
2090
2091         * src/builtin.c (includes): Adjust to gnulib changes.
2092
2093 2007-01-15  Eric Blake  <ebb9@byu.net>
2094
2095         * doc/m4.texinfo: Pull in various improvements from head.
2096         * src/builtin.c (include): Alter exit status on failure.
2097         * NEWS: Document this fix.
2098
2099 2007-01-13  Eric Blake  <ebb9@byu.net>
2100
2101         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
2102         assume the fallback of ss_base for BSDI 4.0.1.
2103         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
2104         ! HAVE_STACK_T_SS_SP]: Use this check.
2105         Reported by Chris McGuire.
2106         * THANKS: Update.
2107         * NEWS: Document the improvement.
2108
2109 2007-01-09  Eric Blake  <ebb9@byu.net>
2110
2111         * src/eval.c (ASSIGN): New enumerator.
2112         (eval_lex): Recognize '='.
2113         (equality_term): Treat '=' like '==', but warn that it is
2114         deprecated.
2115         * doc/m4.texinfo (Eval): Document and test this.
2116         (Incompatibilities): Document the POSIX incompatibility.
2117         * NEWS: Document this change.
2118
2119 2007-01-06  Eric Blake  <ebb9@byu.net>
2120
2121         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
2122         * checks/check-them: Record expected exit status.
2123         * checks/get-them: Check exit status.
2124         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
2125         instead.
2126         * src/builtin.c: All users changed.
2127         * src/eval.c: Likewise.  Also document where we are triggering
2128         undefined or implementation-defined behavior.
2129         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
2130         (logical_or_term, logical_and_term, logical_not_term, not_term)
2131         (equality_term, unary_term): Port from head to follow POSIX
2132         semantics.
2133         (exp_term): Reject 0**0 as undefined.
2134         * doc/m4.texinfo (History): Mention 1.4.9.
2135         (Format, Incompatibilities): Update to document POSIX compliance.
2136         * NEWS: Document this change.
2137
2138 2007-01-04  Eric Blake  <ebb9@byu.net>
2139
2140         * NEWS: Document previous fix.
2141         * THANKS: Update.
2142
2143 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
2144
2145         Fix Debian bug 405594, introduced 2006-11-01 from a bad
2146         copy-n-paste from head.
2147         * src/m4.c (main): Use correct file name after --.
2148
2149 2007-01-04  Eric Blake  <ebb9@byu.net>
2150
2151         Fix regression from 1.4.7 in large file handling on some
2152         platforms, introduced on 2006-10-13.
2153         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
2154         will be handled.
2155         * NEWS: Document this fix.
2156
2157 2007-01-03  Eric Blake  <ebb9@byu.net>
2158
2159         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2160         version-etc-fsf'.
2161         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
2162         it bumps the copyright year).
2163
2164 2006-12-27  Eric Blake  <ebb9@byu.net>
2165
2166         * doc/m4.texinfo (Patsubst): Fix typo.
2167
2168 2006-12-16  Eric Blake  <ebb9@byu.net>
2169
2170         * src/m4.c (main): Check for errors when closing stdin.
2171
2172 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2173
2174         * doc/m4.texinfo: Fix some typos.
2175
2176 2006-12-09  Eric Blake  <ebb9@byu.net>
2177
2178         * configure.ac (AC_INIT): Bump version number.
2179         * NEWS: Start changes of 1.4.8a.
2180
2181 2006-11-20  Eric Blake  <ebb9@byu.net>
2182
2183         Release 1.4.8:
2184         * configure.ac (AC_INIT): Bump version number.
2185         * NEWS: Describe changes since 1.4.7.
2186
2187 2006-11-16  Eric Blake  <ebb9@byu.net>
2188
2189         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
2190         Minor tweaks noticed while porting to head.
2191
2192 2006-11-14  Eric Blake  <ebb9@byu.net>
2193
2194         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
2195         spent iterators.
2196         (m4_tmpname): Avoid memory leak.
2197
2198 2006-11-13  Eric Blake  <ebb9@byu.net>
2199
2200         * src/output.c (cleanup_tmpfile): Avoid double error message when
2201         umask is prohibitive.
2202         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
2203         functions.
2204         (m4_tmpfile): Add parameter, move cloexec action here.
2205         (make_room_for): Adjust caller.  Don't keep too many files open.
2206         (insert_diversion_helper): Unlink emptied temp files.
2207         (make_diversion): Don't keep too many files open.
2208         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
2209         descriptors are no longer a limiting factor.
2210         * NEWS: Document this change.
2211
2212         Backport sparse diversion handling from head.
2213         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2214         avltree-oset'.
2215         * src/output.c (struct m4_diversion): Rename from struct
2216         diversion, and update members.  All users changed.
2217         (diversion_table): Change to an ordered set, instead of an array.
2218         (div0): New storage for diversion 0.
2219         (diversions): No longer needed.
2220         (free_list): New list to allow recycling diversion storage.
2221         (diversion_storage): New storage to reduce malloc overhead.
2222         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
2223         (output_init, output_exit, cleanup_tmpfile, make_room_for)
2224         (make_diversion): Handle new diversion storage scheme.
2225         (insert_diversion_helper): New function.
2226         (insert_diversion, undivert_all, freeze_diversions): Use it.
2227         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
2228         exhaustion to visible test of large diversion numbers.
2229         * NEWS: Document this fix.
2230
2231 2006-11-11  Eric Blake  <ebb9@byu.net>
2232
2233         * src/builtin.c (m4_translit): Slight optimization.
2234
2235         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
2236
2237         * src/builtin.c: Remove unnecessary casts.
2238         (expand_ranges): Make 8-bit clean.
2239         * doc/m4.texinfo (Translit): Add tests and wording.
2240         * NEWS: Document this fix.
2241
2242 2006-11-07  Eric Blake  <ebb9@byu.net>
2243
2244         * src/m4.h (output_exit): New prototype.
2245         * src/m4.c (main): Use it.
2246         * src/output.c (cleanup_tmpfile): Close files before removing
2247         directory.
2248         (insert_diversion): Check for failure.
2249         (output_exit): Avoid memory leak.
2250         * doc/m4.texinfo (Diversions): Test this bug.
2251
2252         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
2253
2254 2006-11-01  Eric Blake  <ebb9@byu.net>
2255
2256         Allow C++ compilation on Linux, as a safety measure in type
2257         checking.
2258         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2259         stdbool'.
2260         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
2261         (boolean): Kill this, and use stdbool.h instead.
2262         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
2263         * src/output.c, src/symtab.c: All users changed.
2264         * src/symtab.c (hack_all_symbols): Update prototype.
2265         * src/builtin.c (dump_symbol, set_trace): Update signature.
2266         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
2267         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
2268         C++ compilation.
2269         * src/debug.c (trace_flush): Likewise.
2270         * src/freeze.c (reload_frozen_state): Likewise.
2271         * src/input.c (push_file, push_string_finish, push_wrapup):
2272         (token_bottom, next_token): Likewise.
2273         * src/m4.c (main): Likewise.
2274
2275         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
2276         draft wording.
2277         * src/m4.h (m4_path_search): Tweak signature.
2278         * src/path.c (m4_path_search): Likewise.
2279         * src/builtin.c (include): Update caller.
2280         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
2281         with file names.  Don't write to **argv.
2282         (process_file): New helper method.
2283         * NEWS: Document this fix.
2284
2285 2006-10-31  Eric Blake  <ebb9@byu.net>
2286
2287         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
2288         * doc/m4.texinfo (Translit): Improve the documentation.
2289         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
2290         algorithm.
2291         (m4_index): Simplify, and speed up slightly.
2292         * NEWS: Document this fix.
2293
2294 2006-10-28  Eric Blake  <ebb9@byu.net>
2295
2296         * src/input.c (set_quotes): Don't allow empty end-quote with
2297         non-empty start-quote.
2298         (set_comment): Likewise for end-comment.
2299         * src/builtin.c (m4_changecom): Adjust caller.
2300         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
2301         match behavior.
2302         (Incompatibilities): Document another POSIX bug.
2303         * NEWS: Mention this change.
2304
2305 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2306
2307         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
2308         files.
2309
2310 2006-10-26  Eric Blake  <ebb9@byu.net>
2311
2312         Silence -Wwrite-strings -Wpointer-arith warnings.
2313         * src/builtin.c (define_user_macro): Allow NULL argument.
2314         (m4_builtin, m4_indir): Cast away const of "".
2315         * src/format.c (format): Likewise.
2316         * src/macro.c (collect_arguments): Likewise.
2317         (expand_macro): Avoid math on void*.
2318         * src/m4.c (main): Adjust caller.
2319         * src/output.c (freeze_diversions): Detect off_t overflow.
2320
2321         * src/input.c (pop_input): Remove unnecessary code.
2322
2323 2006-10-25  Eric Blake  <ebb9@byu.net>
2324
2325         * src/symtab.c (symtab_init): Avoid size_t overflow.
2326         * src/output.c (make_diversion): Avoid size_t overflow.
2327         * doc/m4.texinfo (Diversions): Test this fix.
2328         * src/input.c (input_block): Remove unused member.  Reduce size
2329         of struct.
2330         (push_file, pop_input): Avoid useless assignment.
2331         * NEWS: Document the bug fix.
2332
2333         Redo location tracking.  Instead of having just files track the
2334         line to return to when popping input, now all input blocks track
2335         their current line.
2336         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
2337         needed.
2338         (input_block): Have line and file storage for all input types, and
2339         rename some members.
2340         (input_change): New global flag.
2341         (push_file, push_macro, push_string_init, push_wrapup): Store
2342         location.
2343         (push_string_finish, pop_input, pop_wrapup): Notice changes in
2344         input blocks.
2345         (peek_input): Adjust to new member names.
2346         (next_char, next_char1): Adjust location if needed.
2347         (skip_line): Simplify restoring location.
2348         * doc/m4.texinfo (Location): Augment the test to catch line
2349         location of expansion of multi-line arguments.
2350         Reported by Stepan Kasal.
2351
2352 2006-10-23  Eric Blake  <ebb9@byu.net>
2353
2354         * doc/m4.texinfo (Macro Arguments): Document that leading space
2355         in argument collection stops at macro expansion.
2356         (Incompatibilities): Document POSIX whitespace wording issue.
2357
2358 2006-10-20  Eric Blake  <ebb9@byu.net>
2359
2360         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
2361         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
2362         end of a TeX line splits incorrectly.
2363         (Foreach, Improved foreach): Write these sections, borrowing ideas
2364         from CVS head and from m4sugar.
2365         * checks/get-them: Accomodate new way to show trailing space in
2366         examples.
2367         * examples/foreach.m4: Make usable in documentation.
2368         * examples/foreachq.m4: New file.
2369         * examples/foreachq2.m4: New file.
2370         * examples/foreach2.m4: New file.
2371         * NEWS: Document the documentation updates.
2372
2373 2006-10-19  Eric Blake  <ebb9@byu.net>
2374
2375         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
2376         (m4_maketemp): Provide traditional behavior.
2377         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
2378         new `mkstemp' macro and the flaws of the old `maketemp'.
2379         (Incompatibilities): Move maketemp discussion to...
2380         (Extensions): ...here, since -G now supresses the GNU extension.
2381         * NEWS: Document this.
2382
2383         * examples/forloop.m4: Simplify.
2384         * examples/forloop2.m4: New file.
2385         * examples/quote.m4: New file.
2386         * doc/m4.texinfo (Loops): Rename to...
2387         (Shift): ...this node.
2388         (Forloop, Foreach, Improved forloop, Improved foreach): New
2389         nodes.
2390
2391 2006-10-17  Eric Blake  <ebb9@byu.net>
2392
2393         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
2394         config-h'.
2395         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
2396         gnulib headers, rather than in top directory.
2397         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
2398         output clutter.
2399
2400 2006-10-16  Eric Blake  <ebb9@byu.net>
2401
2402         * doc/m4.texinfo: Backport some minor cleanups from head.
2403         (Cleardivert): Rename from cleardiv.
2404
2405         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
2406         a section of Preliminaries.
2407         (Operation modes, Preprocessor features, Limits control)
2408         (Frozen state, Debugging options, Command line files): Subdivide
2409         into new sections.
2410         (Input processing, Quoting Arguments, Define, Arguments)
2411         (Cleardiv, Format, M4exit): Fix grammar of references.
2412         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
2413         (Debug Levels, Debug Output, Include, Search Path, Divert)
2414         (Platform macros, Syscmd, Location, Extensions): Point to new
2415         sections.
2416         (Top, Loops, Include, Undivert, Location, Incompatibilities):
2417         Improve file references.
2418
2419 2006-10-14  Eric Blake  <ebb9@byu.net>
2420
2421         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
2422         is not portable.
2423         Reported by Ralf Wildenhues.
2424
2425         * src/builtin.c (m4_undivert): Check for read error.
2426
2427 2006-10-13  Eric Blake  <ebb9@byu.net>
2428
2429         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
2430         header files are included, since <unistd.h> can affect the tests.
2431         * THANKS: Updated.
2432         Reported by Martin Koeppe.
2433
2434         Backport head's usage of clean-temp module, as it is cleaner than
2435         using tmpfile-safer.
2436         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2437         clean-temp closeout', and remove tmpfile-safer.
2438         * src/m4.h (includes): Adjust.
2439         (m4_path_search): Rename from path_search, to avoid collision
2440         with gnulib.
2441         * src/m4.c (main): Install closeout handler.  Adjust caller.
2442         (usage): Now done by closeout module.
2443         * src/builtin.c (m4_m4exit): Likewise.
2444         (m4_undivert, include): Adjust callers.
2445         * src/freeze.c (reload_frozen_state): Likewise.
2446         * src/path.c (m4_path_search): Rename from path_search.
2447         * src/output.c (output_temp_dir): New variable.
2448         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
2449         (insert_diversion, make_room_for): Use them.
2450         * doc/m4.texinfo (Diversions): Document this, and add a test.
2451         (Improved fatal_error): Fix typo.
2452         (Maketemp): Port test to mingw, and no longer hide from
2453         documentation.
2454         * NEWS: Document the change in TMPDIR behavior.
2455
2456         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
2457         macros, to work with recent gnulib-tool update.
2458
2459         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
2460         handling of defn results.
2461         * doc/m4.texinfo (Builtin, Indir): Add test cases.
2462         * NEWS: Document this.
2463
2464 2006-10-12  Eric Blake  <ebb9@byu.net>
2465
2466         * doc/m4.texinfo (Location): Fix typo in previous commit.
2467         (Changeword): Catch one more case.
2468         * src/input.c (skip_line): Fix case when outer file used macro to
2469         supply the \n.
2470
2471 2006-10-11  Eric Blake  <ebb9@byu.net>
2472
2473         * src/input.c (enum input_type): Add additional types, to shave
2474         time off the common case.
2475         (push_wrapup): Wrapped strings remember location.
2476         (push_string_finish): Normal strings carry no location.
2477         (push_file): Start new files uninitialized.
2478         (peek_input, next_char_1): Optimize common cases by updating
2479         location only on new input types.
2480         (pop_input): Update to honor new input types.
2481         (skip_line, push_string_finish): Fix regression in previous patch
2482         when dnl is not followed by newline in included file.
2483         (push_string_init): Initialize all fields of INPUT_STRING sooner.
2484         (peek_token): Simplify.
2485         (peek_input): Don't pop input files on peek, so that __file__ and
2486         __line__ as last token of include file work correctly.
2487         * doc/m4.texinfo (History): Mention 1.4.8.
2488         (Answers): Split into sections, one per answer.
2489         (Improved exch, Improved cleardivert, Improved fatal_error): New
2490         nodes.
2491         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
2492         new m4wrap location semantics.
2493         (Changeword): Add test that caught the regression.
2494         * NEWS: Document this.
2495
2496         * src/macro.c (expand_macro): In macro expansion errors, report
2497         line number at open parenthesis.
2498         * src/input.c (next_token): Fix off-by-one bug in reporting end
2499         of file in unterminated comment and string.
2500         (file_names): New obstack, necessary since expand_macro now hangs
2501         on to file names longer than the files remain open.
2502         (input_init): Initialize new obstack.
2503         (push_file): Use new obstack.  Delay updates to current_file
2504         until after expand_macro has restored state.
2505         (peek_input, next_char_1): Update current_file if necessary.
2506         (pop_wrapup): Release memory.
2507         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
2508         the off-by-one bug.
2509         (Dnl): Update to the new location reporting rules.
2510         * NEWS: Document these changes.
2511
2512 2006-10-10  Eric Blake  <ebb9@byu.net>
2513
2514         * src/macro.c (argc_stack, argv_stack): New variables for sharing
2515         obstacks across multiple macro calls.
2516         (expand_input): Initialize and tear down stack once per input
2517         file, instead of once per macro.
2518         (expand_macro): Reuse existing stacks when possible.
2519         (collect_arguments): Simplify slightly.
2520
2521         * src/path.c (include_env_init): Fix botched patch application.
2522         Reported by Ralf Wildenhues.
2523
2524 2006-10-09  Eric Blake  <ebb9@byu.net>
2525
2526         * src/m4.c (usage, main): Detect write failures to stderr.
2527         * src/builtin.c (m4_m4exit): Likewise.
2528         * NEWS: Document this.
2529
2530         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
2531         the limit.
2532         * NEWS: Document this.
2533         * doc/m4.texinfo (Invoking m4): Likewise.
2534
2535 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2536
2537         * src/path.c (include_env_init): Copy the string returned
2538         by getenv before overwriting it; POSIX disallows this.
2539
2540 2006-10-09  Eric Blake  <ebb9@byu.net>
2541
2542         * src/m4.c (main): Defer debugfile until after --help.
2543         * configure.ac (AC_INIT): Bump version number.
2544         * NEWS: Start changes of 1.4.7a.
2545
2546 2006-09-25  Eric Blake  <ebb9@byu.net>
2547
2548         Release 1.4.7:
2549         * configure.ac (AC_INIT): Bump version number.
2550         * NEWS: Describe changes since 1.4.6.
2551
2552 2006-09-21  Eric Blake  <ebb9@byu.net>
2553
2554         * doc/m4.texinfo (Invoking m4): Add clarification on option
2555         processing behavior.
2556         * THANKS: Update.
2557         Reported by Mikhail Teterin.
2558
2559         * bootstrap: Add --force option, based on idea from coreutils.
2560         * README: Document that ./bootstrap and autoreconf are for
2561         developers, and not lightly done in tarballs.
2562
2563 2006-09-20  Eric Blake  <ebb9@byu.net>
2564
2565         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
2566         deprecation warning on -e.
2567         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
2568         * NEWS: Document this.
2569
2570 2006-09-19  Eric Blake  <ebb9@byu.net>
2571
2572         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
2573         -o/--error-output to --debugfile, and deprecate the former.  This
2574         will allow a future release to be more consistent with other GNU
2575         tools, with -o/--output affecting stdout, not debug.
2576         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
2577         * NEWS: Document this.
2578
2579 2006-09-14  Eric Blake  <ebb9@byu.net>
2580
2581         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
2582         --diversions. `m4 --help --version' now displays help, not
2583         version.
2584         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
2585         smaller scope.
2586         (show_help, show_version): No longer needed.
2587         (long_options, DIVERSIONS_OPTION): Backport patch from head to
2588         distinguish between -N and --diversions in warning.
2589         * doc/m4.texinfo (Invoking m4): Document this.
2590         * NEWS: Likewise.
2591
2592 2006-09-11  Eric Blake  <ebb9@byu.net>
2593
2594         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
2595         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
2596         seekable.
2597         (debug_set_file): Use STDOUT_FILENO.
2598         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
2599         with POSIX in regards to unread input.
2600         * NEWS: Document this fix.
2601         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
2602
2603 2006-09-07  Eric Blake  <ebb9@byu.net>
2604
2605         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
2606         * src/m4.h (push_file): Change prototype.
2607         * src/input.c (push_file, peek_input, next_char_1): Only call getc
2608         once at EOF, to avoid double ^D on terminal stdin; regression from
2609         2006-09-04.
2610         (push_file, pop_file): Allow reading stdin twice.
2611         * src/m4.c (main): Likewise.
2612         * src/builtin.c (include): Update caller.
2613         * NEWS: Document this change.
2614         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
2615         (Syscmd): Add a test that failed before this patch.
2616
2617 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2618
2619         * checks/check-them: Quote $pwd.
2620
2621 2006-09-05  Eric Blake  <ebb9@byu.net>
2622
2623         * src/builtin.c (define_macro): Warn on invalid macro name.
2624         * NEWS: Document this change.
2625         * doc/m4.texinfo: Fix typos.
2626         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
2627         (Ifelse): Backport some improvements from head.
2628
2629 2006-09-04  Eric Blake  <ebb9@byu.net>
2630
2631         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
2632         native echo is braindead.
2633         * checks/check-them (strip_needed): Ignore \r in output.  Now the
2634         testsuite will pass when cross-compiling from cygwin to mingw.
2635
2636         * src/input.c (peek_input): Fix regression in handling macro
2637         without arguments as last token in file; debian bug 385720.
2638         (next_token): Always consume an input character.
2639         Reported by Andreas Schultz.
2640         * configure.ac (AC_INIT): Bump version number.
2641         * NEWS: Document this fix.
2642         * doc/m4.texinfo (History): Mention next version.
2643         (Changeword): Add example that exposes this bug.
2644         * THANKS: Update.
2645
2646 2006-08-25  Eric Blake  <ebb9@byu.net>
2647
2648         Release 1.4.6:
2649         * configure.ac (AC_INIT): Bump version number.
2650         * NEWS: Describe changes since 1.4.5.
2651
2652         * Makefile.maint (web-manual): Give up on VPATH build during
2653         distribution.  But distributions are made so infrequently that
2654         this is not too much of a hardship.
2655         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
2656         exists.
2657
2658 2006-08-24  Eric Blake  <ebb9@byu.net>
2659
2660         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
2661         Solaris, produce output on just one argument.
2662         (m4_regexp, m4_patsubst): For consistency, do likewise.
2663         (m4_patsubst): Allow zero-length match at end of string.
2664         * doc/m4.texinfo (Sysval): Fix overfull hbox.
2665         (Bugs, Macro Arguments): Minor fixes.
2666         (Other tokens): Rearrange node order.
2667         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
2668         * NEWS: Document these fixes.
2669
2670 2006-08-22  Eric Blake  <ebb9@byu.net>
2671
2672         * src/input.c (pop_input): Avoid empty filename with -di option.
2673         * src/debug.c (debug_message_prefix): Put space before message.
2674
2675         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
2676
2677         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
2678         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
2679
2680         * checks/check-them: State why a test is skipped.
2681         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
2682
2683         * ChangeLog: Add copyright.
2684         * AUTHORS: Likewise.
2685         * BACKLOG: Likewise.
2686         * README: Likewise.
2687         * THANKS: Likewise.
2688         * TODO: Likewise.
2689         * examples/COPYING: New file, add copyright for all the examples.
2690         * checks/get-them: Put copyright on testsuite files.
2691
2692 2006-08-18  Eric Blake  <ebb9@byu.net>
2693
2694         Don't let unrelated child processes see too many files.
2695         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
2696         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
2697         spelling in error message.
2698         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
2699         (debug_set_output): Close debug file on exec.
2700         * src/m4.h (includes): Add cloexec.h.
2701         * src/output.c (make_room_for): Close diversions on exec.
2702         * src/path.c (path_search): Close include files on exec.
2703         * NEWS: Document this.
2704
2705         Regular expressions were leaking memory.
2706         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
2707         helper methods.
2708         (m4_regexp, m4_patsubst): Avoid memory leak.
2709         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
2710         static.
2711         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
2712         from O(n^2) to O(n) for calculating word_start.
2713         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
2714         O(1) bitmap, not O(n) search string.
2715         * NEWS: Document this fix.
2716
2717 2006-08-17  Eric Blake  <ebb9@byu.net>
2718
2719         * NEWS: Document previous checkin.
2720
2721         * src/builtin.c (substitute): Avoid core dump when accessing
2722         beyond bound of regular expression.
2723         Reported by Karl Nelson.
2724         * doc/m4.texinfo (Regexp): Add example that causes core dump on
2725         some architectures prior to this patch.
2726         * THANKS: Updated.
2727
2728 2006-08-16  Eric Blake  <ebb9@byu.net>
2729
2730         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
2731         clear that dumpdef does not always go to stderr.
2732
2733         * src/builtin.c (m4_errprint): Flush buffers before printing to
2734         stderr.
2735         * THANKS: Updated.
2736
2737 2006-08-15  Eric Blake  <ebb9@byu.net>
2738
2739         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
2740         per debian bug 96075.
2741         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
2742         (Changeword): Don't use shift as an example of a swallowed word.
2743         (Divert): Discuss fact that divert is an English word.
2744         Reported by Richard A Nelson.
2745
2746 2006-08-14  Eric Blake  <ebb9@byu.net>
2747
2748         * doc/m4.texinfo (Invoking m4): Minor fixes.
2749
2750 2006-08-12  Eric Blake  <ebb9@byu.net>
2751
2752         * doc/m4.texinfo (Arguments): Hint at better exch macro.
2753         (Answers): Provide a better definition.
2754
2755 2006-08-09  Eric Blake  <ebb9@byu.net>
2756
2757         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
2758         yet understand locales.
2759         * NEWS: Fix wording of a few items.
2760
2761 2006-08-08  Eric Blake  <ebb9@byu.net>
2762
2763         Avoid printing `NONE:0:' in error messages.
2764         * src/m4.h (m4_error_at_line): New function.
2765         * src/m4.c (m4_error_at_line): Implement.
2766         * src/input.c (skip_line, input_init, next_token): Use "", not
2767         "NONE", for no file, since NONE can be a real file name.
2768         * src/macro.c (expand_argument): Likewise.
2769         * src/debug.c (debug_message_prefix, trace_header): Check for
2770         current file.
2771         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
2772         (Location): Document that synclines and internal message format
2773         are not impacted by redefining these macros.
2774         (M4exit): Hint at bug in fatal_error.
2775         (Answers): Provide workaround to match m4 output.
2776
2777         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
2778         * src/m4.h (m4_error): New function.
2779         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
2780         error module deficiencies.
2781         (reference_error, suppress_line): No longer needed.
2782         * src/m4.c (m4_error): Implement.
2783         (main): No longer need to install error callback.
2784
2785 2006-08-04  Eric Blake  <ebb9@byu.net>
2786
2787         * src/m4.h (program_name): Declare.
2788         (suppress_line): New variable.
2789         (M4ERROR_AT_LINE): New macro.
2790         * src/m4.c (reference_error, main): Follow GNU Coding Standards
2791         for error message format.
2792         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
2793         * src/macro.c (expand_argument): Likewise.
2794         * checks/check-them (examples): Adjust to new message format.
2795         * src/builtin.c (m4___program__): New builtin.
2796         * doc/m4.texinfo (Location): Split from Errprint into new node,
2797         and document __program__.
2798         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
2799         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
2800         format.
2801         (Extensions): Document __program__.
2802         * NEWS: Document this change.
2803
2804 2006-08-03  Eric Blake  <ebb9@byu.net>
2805
2806         Don't confuse leading `(' in comment or quote with start of
2807         argument collection.
2808         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
2809         TOKEN_CLOSE.
2810         (peek_input): Make private to input.c.
2811         (peek_token): New prototype.
2812         * src/input.c (default_word_regexp): Reduce ifdefs.
2813         (peek_input): Make static.
2814         (next_token): Return new token types.
2815         (match_input, MATCH): Add argument consume, which controls
2816         whether match should be pushed back.
2817         (peek_token): New function.
2818         (token_type_string) [DEBUG_INPUT]: New function.
2819         * src/macro.c (expand_token, expand_argument, collect_arguments):
2820         Handle new token types.
2821         * doc/m4.texinfo (Changequote, Changecom): Document this.
2822         * NEWS: Document this.
2823
2824         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
2825
2826         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
2827         overflow detection when sigstack exists but is not implemented.
2828         Fixes debian bug 154053.
2829         * THANKS: Updated.
2830         Reported by David Perlin.
2831
2832 2006-08-02  Eric Blake  <ebb9@byu.net>
2833
2834         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
2835         close.
2836
2837 2006-08-01  Eric Blake  <ebb9@byu.net>
2838
2839         * src/input.c (skip_line, next_token): Remember current file in
2840         case input file ends abruptly.  Addresses debian bug 175365.
2841         (pop_input): Defer freeing storage that holds previous file
2842         name...
2843         (pop_wrapup): to here, after error message is issued.
2844         * src/macro.c (expand_argument): Remember current file in case
2845         input file ends abruptly.
2846         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
2847         (M4wrap): Adjust testsuite accordingly.
2848         (Errprint): Document line number limitation of m4wrap.
2849         * NEWS: Document this fix.
2850         * THANKS: Update.
2851
2852 2006-07-31  Eric Blake  <ebb9@byu.net>
2853
2854         * src/input.c (peek_input, next_char, match_input): Be eight-bit
2855         clean; fixes debian bug 311378.
2856         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
2857         (Changequote, Changecom): Add examples to test this.
2858         * NEWS: Document this fix.
2859         * THANKS: Update.
2860         Reported by Steven Augart.
2861
2862         * doc/m4.texinfo: Whitespace fix.
2863         * checks/get-them: Avoid exceeding 14-char file name limit.
2864         * THANKS: Update.
2865
2866 2006-07-30  Eric Blake  <ebb9@byu.net>
2867
2868         * src/path.c (path_search): Detect allocation failure.
2869
2870         Use native free when it is good enough.
2871         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
2872         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
2873         Adjust calls.
2874         * src/symtab.c (free_symbol): Likewise.
2875         * src/m4.c (xfree, main): Likewise.
2876         * src/m4.h (obstack_chunk_free): Likewise.
2877         * src/path.c (path_search): Likewise.
2878         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
2879
2880         * doc/m4.texinfo (Errprint): Add example for last patch.
2881         * checks/check-them: Account for VPATH in latest example.
2882
2883 2006-07-29  Eric Blake  <ebb9@byu.net>
2884
2885         * src/path.c (path_search): Add result parameter, so that
2886         -I can be accounted for.  Debian bug 53685.
2887         * src/m4.h (path_search): Update prototype.
2888         * src/m4.c (main): Adjust callers.
2889         * src/freeze.c (reload_frozen_state): Likewise.
2890         * src/builtin.c (include, m4_undivert): Likewise.
2891         * NEWS: Document this change.
2892         Reported by Nicolas Lichtmaier.
2893
2894 2006-07-28  Eric Blake  <ebb9@byu.net>
2895
2896         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
2897         several non-GNU makes.
2898         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
2899         * src/m4.h: Likewise.
2900         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
2901         /usr/ccs/bin/ucbcc.
2902
2903 2006-07-27  Eric Blake  <ebb9@byu.net>
2904
2905         * doc/m4.texinfo: Use @acronym{GNU} throughout.
2906         (History): Update for 1.4.6.
2907
2908         * src/m4.h (_): Remove K&R cruft.
2909         * src/builtin.c: Likewise.
2910         * src/debug.c: Likewise.
2911         * src/eval.c: Likewise.
2912         * src/macro.c: Likewise.
2913         * src/stackovf.c: Likewise.
2914
2915         * doc/Makefile.am (m4.1): Improve man page.
2916         * src/m4.c (usage): Improve --help output, including adding the
2917         bug reporting address.
2918         (main): Follow GNU Coding Standards for --version output.
2919
2920 2006-07-26  Eric Blake  <ebb9@byu.net>
2921
2922         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
2923         end-comment consistently, to match POSIX.
2924
2925         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
2926         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
2927         (Incompatibilities): Document incompatibility of changecom
2928         vs. macro names, and of EOF in include.
2929         * src/input.c (next_token): Reject unterminated comments at EOF.
2930         (skip_line): Warn on unterminated dnl at EOF.
2931         * NEWS: Document these changes.
2932
2933 2006-07-25  Eric Blake  <ebb9@byu.net>
2934
2935         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
2936         stdio-safer into fopen-safer and tmpfile-safer.
2937         * src/m4.c: Remove redundant include.
2938
2939 2006-07-24  Eric Blake  <ebb9@byu.net>
2940
2941         Fix bugs related to stream handling.
2942         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2943         unlocked-io stdio-safer stdlib-safer close-stream.
2944         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
2945         provided by gnulib if needed.
2946         * src/output.c [! HAVE_TMPFILE]: Likewise.
2947         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
2948         their safer counterparts.
2949         (retcode): New global variable.
2950         * src/input.c (pop_input): Check for read failure.
2951         * src/freeze.c (reload_frozen_state): Likewise.
2952         (produce_frozen_state): Check for write failure.
2953         * src/debug.c (debug_set_file): Likewise.
2954         * src/m4.c (usage, main): Likewise.
2955         (retcode): Make global.
2956         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
2957         status is non-zero except when everything succeeds.
2958         * doc/m4.texinfo (M4exit): Document these changes.
2959         (Incompatibilities): Remove documentation of bug now fixed.
2960         * NEWS: Document these fixes.
2961
2962 2006-07-22  Eric Blake  <ebb9@byu.net>
2963
2964         * src/format.c (format): Avoid compiler warning that str may be
2965         used uninitialized.
2966
2967 2006-07-21  Eric Blake  <ebb9@byu.net>
2968
2969         * src/m4.h [UNIX]: Add more platforms that are close enough to
2970         categorize as UNIX, but which don't predefine __unix__.
2971         Reported by Nelson H. F. Beebe.
2972
2973 2006-07-20  Eric Blake  <ebb9@byu.net>
2974
2975         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
2976         to explicitly ask for --assume-autoconf=2.60.
2977
2978 2006-07-19  Eric Blake  <ebb9@byu.net>
2979
2980         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
2981         and exits normally with 129.
2982         Reported by Nelson H. F. Beebe.
2983         * THANKS: Update.
2984
2985         * src/m4.h (EXIT_MISMATCH): Define.
2986         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
2987         exiting with status 63.
2988         * src/m4.c (usage): Document this.
2989         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
2990         * NEWS: Likewise.
2991
2992         * doc/m4.texinfo (copying): Relax restriction on front-cover and
2993         back-cover texts.
2994
2995 2006-07-17  Eric Blake  <ebb9@byu.net>
2996
2997         * src/format.c (format): Support F, g, and G specifiers.
2998         * doc/m4.texinfo (Format): Document this.
2999         * NEWS: Document this addition.
3000
3001         * doc/m4.texinfo (Builtin): Delete redundant text.
3002
3003         * configure.ac (AC_INIT): Bump version number.
3004         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
3005         * NEWS: Document this fix.
3006
3007 2006-07-15  Eric Blake  <ebb9@byu.net>
3008
3009         Release 1.4.5:
3010         * configure.ac (AC_INIT): Bump version number.
3011         * NEWS: Describe changes since 1.4.4.
3012
3013         * src/m4.c (usage): Document exit status.
3014         * doc/m4.texinfo: Use `exit status', not `exit code'.
3015         (Invoking m4): Document exit status.
3016
3017         * bootstrap: Backport --help, --version from head.
3018         (func_update): New function, for easily grabbing up-to-date files
3019         from gnulib.
3020         * Makefile.maint (web-manual): Fix for VPATH builds.
3021
3022 2006-07-14  Eric Blake  <ebb9@byu.net>
3023
3024         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
3025         looks bad in info.  Use @deffn rather than @example for
3026         describing prototypes.  Fix awkward wording and grammar.
3027
3028         * src/builtin.c (substitute): Warn on bad escape sequences.
3029         Ignore trailing backslash.
3030         * doc/m4.texinfo (Regexp): Add documentation for this.
3031         * NEWS: Document this change.
3032
3033         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
3034         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
3035         more examples.
3036         (Dnl): Update example to show side effects.
3037         * checks/get-them: Generate three digit test names.
3038         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
3039
3040 2006-07-13  Eric Blake  <ebb9@byu.net>
3041
3042         * src/input.c (input_init): Simplify.
3043         (set_word_regexp): Treat empty string as default, since empty
3044         regexp would disable word parsing.
3045         * src/m4.c (user_word_regexp): Default to empty string.
3046         * src/builtin.c (builtin_tab): Make changeword blind.
3047         * doc/m4.texinfo (Changeword): Document this.
3048         * NEWS: Document this.
3049         * TODO: Knock off completed items.
3050
3051         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
3052         just the first.
3053         * doc/m4.texinfo (Undefine, Pushdef): Test this.
3054         * NEWS: Document this change.
3055
3056         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
3057         warning.  Detect quoted leading space and overflow as warnings.
3058         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
3059         Treat width as minimum number of digits, as required by POSIX.
3060         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
3061         arguments.
3062         (m4_substr): Likewise.  Silently treat empty start as 0.
3063         (m4_undivert): Treat ` 1a' as file, not diversion 1.
3064         * src/eval.c (eval_lex): Parse radix 1 numbers.
3065         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
3066         one type of warning.
3067         (Manual): Document behavior of numeric parsing of empty string.
3068         (Divert, Incr): Document error handling.
3069         (Eval): Document radices better.
3070         (Incompatibilities): Document translit incompatibility.
3071         * NEWS: Document these changes.
3072
3073         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
3074         (web-manual): Simplify.
3075         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
3076         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
3077         (MAINTAINERCLEANFILES): Clean it as well.
3078         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
3079         (MAINTAINERCLEANFILES): Clean it as well.
3080
3081 2006-07-12  Eric Blake  <ebb9@byu.net>
3082
3083         * doc/m4.texinfo (Extensions): Document how to overcome
3084         implementation difference in > 9 positional parameters.
3085
3086         * src/m4.c (usage): Sort within sections.
3087         (nesting_limit): Raise default from 250 to 1024.
3088         * doc/m4.texinfo: Use file name, not filename, per GNU coding
3089         standard.  Use @option where appropriate.
3090         (Invoking m4): Sort to match --help output.
3091         (Debug Levels): Sort.
3092         (Frozen files): Sort and break into two nodes.
3093
3094         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
3095         * NEWS: Document raised -L limit.
3096
3097 2006-07-11  Eric Blake  <ebb9@byu.net>
3098
3099         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
3100         stress-test changeword before a release.
3101         * doc/m4.texinfo: More doc cleanups.
3102         (Copying This Manual): New node; actually include the FDL in the
3103         documentation.
3104         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
3105         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
3106         * NEWS: Mention documentation improvements.
3107
3108         * src/m4.h (OS2): New platform macro.
3109         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
3110         platform macro.
3111         * doc/m4.texinfo (Platform macros): Document it.
3112         (Sysval): Remove non-portable test of system("").
3113         * NEWS: Document this change.
3114         Reported by Andreas Buening.
3115
3116 2006-07-09  Eric Blake  <ebb9@byu.net>
3117
3118         * doc/m4.texinfo (Undivert): Fix typo in last commit.
3119         * src/m4.c (usage): Document M4PATH.
3120         * src/path.c (path_search): Reject empty string.
3121         * src/output.c (insert_diversion): Ignore diversion 0.
3122         * src/builtin.c (m4_undivert): Ignore empty string.
3123         * NEWS: Document this fix.
3124
3125 2006-07-08  Eric Blake  <ebb9@byu.net>
3126
3127         * checks/get-them: Make filtering easier.
3128         * checks/check-them: Filter non-input lines, so line counts are
3129         more realistic in the documentation, and so changeword tests work
3130         even when dnl is disabled.
3131         * doc/m4.texinfo: Adjust example line numbers.  Clean up
3132         front-matter, following autoconf's example.
3133         (Changeword): Enable tests, skipping if changeword not supported.
3134         (Define, Defn, Ifelse): Backport more examples from head.
3135         (Input processing, Answers): New nodes, backported from head.
3136         (Include): Expand test to cover empty filename.
3137         (Undivert): Add test of undivert(0).
3138
3139 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3140
3141         * doc/m4.texinfo: Fix spelling errors.
3142
3143 2006-07-07  Eric Blake  <ebb9@byu.net>
3144
3145         * THANKS: Update.
3146
3147         * doc/Makefile.am (m4.1): No need to go through a temporary file;
3148         this also ensures timestamps are updated.
3149         * src/m4.h (includes): Require config.h.  Assume string.h,
3150         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
3151         than prototyping ourselves.
3152         (builtin_func): Add parameter type-checking.
3153         (voidstar): Delete, now that we assume C89.
3154         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
3155         voidstar changed.
3156         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
3157         xfree.
3158
3159 2006-07-06  Eric Blake  <ebb9@byu.net>
3160
3161         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
3162         binary-io.
3163         * src/m4.h (includes): Add binary-io.h for O_BINARY.
3164         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
3165         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
3166         * NEWS: Mention this fix.
3167
3168         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
3169         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
3170
3171         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
3172         runs first when needed.
3173         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
3174         once in srcdir rather than multiple times in VPATH builds.
3175
3176 2006-07-03  Eric Blake  <ebb9@byu.net>
3177
3178         * checks/check-them: Use portable = in test.
3179         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
3180         directory, as required by Solaris cc.  Include built headers, as
3181         required by Solaris make in VPATH build.
3182         * checks/Makefile.in: Use $(srcdir) where needed.
3183         (CHECKS): Factor $(srcdir) into macro.
3184         (DISTFILES): Likewise.  Automake takes care of distributing
3185         Makefile.in.
3186         (dist): Simplify.
3187         (Makefile): Use modern syntax of config.status.
3188         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
3189         Avoid overfull and underfull hboxes in dvi.
3190
3191         Fix 'make check' in VPATH build.  All files included by testsuite
3192         now live in a single directory.  Use forloop.m4 in testsuite.
3193         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
3194         here...
3195         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
3196         here.
3197         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
3198         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
3199         * checks/check-them: Avoid s/// when filename is in pattern.
3200         * examples/forloop.m4: Fix to match documentation.
3201         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
3202         new locations.
3203         (Loops, Format): Actually use forloop.m4 in tests.
3204
3205 2006-07-02  Eric Blake  <ebb9@byu.net>
3206
3207         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
3208         $(bindir) works in installcheck.
3209         (check, installcheck): No longer change directory, so that
3210         distcheck works with a read-only builddir.
3211         * checks/check-them: Work when pwd is no longer builddir.
3212
3213 2006-07-01  Eric Blake  <ebb9@byu.net>
3214
3215         * GNUmakefile: New file, borrowed from coreutils.
3216         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
3217         * Makefile.maint (Makefile): Delete this rule, now that
3218         GNUmakefile includes Makefile.
3219
3220 2006-06-30  Eric Blake  <ebb9@byu.net>
3221
3222         For compatibility with other m4 implementations, sysval returns
3223         signal<<8 rather than 0 if syscmd is terminated by a signal.
3224         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
3225         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
3226         not provide wait macros.
3227         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
3228         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
3229         (m4_esyscmd): Set sysval to -1 on failure.
3230         (m4_sysval): Print 127 on failure, and accomodate signals if they
3231         are detectable.
3232         * NEWS: Document this change.
3233         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
3234         last commit.
3235         * checks/check-them: Likewise.
3236         * src/debug.c (debug_set_file): Work around mingw fstat bug.
3237
3238         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
3239         * src/freeze.c (produce_frozen_state): Use new spelling of
3240         platform macro.
3241         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
3242         platforms.
3243         (m4_syscmd, m4_esyscmd): The empty command is successful.
3244         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
3245         Document platform-dependence of system().
3246         (Syscmd): Add example.
3247         (Esyscmd): Make example more robust, and actually demonstrate
3248         rescanning.
3249         (Sysval): Expand test to cover esyscmd code path, and to check
3250         that empty command is successful.  Add conditional check for
3251         signal behavior.
3252         (Other Incompatibilities): Move platform macros from here...
3253         (Platform macros): ...to this new node.  Add windows macro.
3254         Check that exactly one platform macro is provided.
3255         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
3256         .exe in error messages.  Allow for skipping checks.
3257         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
3258         * NEWS: Document platform macros.
3259
3260 2006-06-29  Eric Blake  <ebb9@byu.net>
3261
3262         Fix buffer overrun bug.
3263         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
3264         xvasprintf.
3265         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
3266         variant instead, since [efg]cvt are obsolete and our use of them
3267         was buggy (savannah sr #104303).
3268         (format): Fix buffer overflow by using xasprintf.
3269         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
3270         * NEWS: Document this fix.
3271
3272         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
3273         cross-compilation.
3274         (AC_CACHE_CHECK): Cache search for ecvt.
3275
3276 2006-06-27  Eric Blake  <ebb9@byu.net>
3277
3278         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
3279         required by POSIX, and add example that exposed core dump on x86
3280         architectures.
3281         (Incompatibilities): Document incompatibility in eval precedence.
3282         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
3283         behavior.
3284         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
3285         * NEWS: Document this change.
3286
3287         * doc/m4.texinfo: Use @noindent consistently.
3288         (Quoting Arguments): Document that unquoted parentheses group
3289         arguments.
3290         (Pseudo Arguments): Expand tests to show this.
3291         (Incompatibilities): Contrast traditional behavior of
3292         changequote.
3293
3294 2006-06-24  Eric Blake  <ebb9@byu.net>
3295
3296         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
3297         (AC_CHECK_HEADERS_ONCE): Use this new feature.
3298         (AC_CHECK_FUNCS_ONCE): Likewise.
3299
3300 2006-06-23  Eric Blake  <ebb9@byu.net>
3301
3302         * doc/m4.texinfo: Quoting cleanup throughout - follow
3303         autoconf-recommended style of one level of quote per parenthesis
3304         in the normal case.  Adjust error messages to match GNU coding
3305         standards (and to allow 'make check' to pass again).
3306         (Quoted strings, Inhibiting Invocation): Turn more examples into
3307         tests.
3308         (Comments): Resolve FIXME by adding example.
3309         (Define): Add example about underquoting.
3310         (Defn): Add example about use of $0.
3311         (Indir, Format): Resolve FIXME done in last commit.
3312         (Ifelse): Add example about creating blind macro.
3313         (Debugging): Fix grammar.
3314         (Dnl): Add example about dnl with arguments.
3315         (M4wrap): Be explicit that LIFO order is non compliant, and will
3316         change in m4 2.0.
3317         (Undivert): Resolve FIXME by adding example.
3318         (Frozen files): Document that m4wrap and sysval will not work
3319         consistently until m4 2.0.
3320         (Incompatibilities): Document another POSIX compliance bug, this
3321         time with changequote.  Document a traditional incompatibility
3322         with partial input spanning file boundaries.
3323
3324         Make error messages more consistent with GNU coding standards -
3325         start with lower case, and don't end sentence with punctuation.
3326         * src/debug.c (trace_pre): Update message wording.
3327         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
3328         Likewise.
3329         * src/freeze.c (produce_frozen_state, issue_expect_message),
3330         (reload_frozen_state): Likewise.
3331         * src/input.c (push_string_init, pop_init, init_macro_token),
3332         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
3333         * src/m4.c (stackovf_handler, main): Likewise.
3334         * src/macro.c (expand_token, expand_argument, call_macro),
3335         (expand_macro): Likewise.
3336         * src/output.c (make_room_for, output_text, insert_file),
3337         (freeze_diversions): Likewise.
3338         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
3339
3340         * src/builtin.c (builtin_tab): Make format and indir blind.
3341         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
3342         * NEWS: Mention the change to builtins.
3343
3344 2006-06-22  Eric Blake  <ebb9@byu.net>
3345
3346         Robustify frozen file format.
3347         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
3348         macro.  Require V first, and only accept it once.  For F, use
3349         placeholder if builtin is not found, rather than warning.
3350         * src/m4.h (m4_placeholder): New prototype.
3351         * src/builtin.c: Unify error message style.
3352         (m4_placeholder): New function, warn if invoked.
3353         (builtin_tab): Add m4_placeholder.
3354         (m4_defn): Warn if placeholder is encountered.
3355         (find_builtin_by_addr): Handle placeholder.
3356         (find_builtin_by_name): Return placeholder on failure.
3357         (m4_builtin): Treat placeholder as undefined.
3358         * doc/m4.texinfo (Frozen files): Document changes in V and F.
3359         * NEWS: Document this change.
3360         Reported by Bruno Haible.
3361
3362         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
3363         (tabchar): New macro, so that 'make check' still works.
3364         (Invoking m4): Document that ignored compatibility options -B, -S,
3365         and -T each consume an argument.
3366         * checks/get-them: Honor @tabchar{}.
3367
3368         Avoid compiler warnings during -DDEBUG.
3369         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
3370         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
3371         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
3372         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
3373         (next_token) [DEBUG_INPUT]: Print before returning.
3374         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
3375         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
3376
3377         Avoid mkstemp bugs on various platforms.
3378         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
3379         * src/output.c [! HAVE_MKSTEMP]: Delete.
3380         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
3381         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
3382         * NEWS: Document this.
3383
3384         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
3385         Reported by Bruno Haible.
3386
3387 2006-06-21  Eric Blake  <ebb9@byu.net>
3388
3389         Avoid obsolete sigstack when POSIX sigaltstack is available.
3390         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
3391         do likewise.
3392         * configure.ac (AC_CHECK_HEADERS): Likewise.
3393         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
3394         obsolete and most hosts now have it in signal.h.
3395         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
3396         (AC_CACHE_CHECK): Cache decision to use stackovf.
3397         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
3398         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
3399         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
3400         simplify later code.
3401         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
3402         in case of dereferencing a member of a NULL pointer.
3403         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
3404         POSIX handler.
3405         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
3406         EXIT_FAILURE in error, indent preprocessor directives.
3407         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
3408         siginfo.h.
3409         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
3410         Reported by Santiago Vila.
3411
3412 2006-06-19  Eric Blake  <ebb9@byu.net>
3413
3414         * THANKS: Update.
3415
3416 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
3417
3418         * checks/Makefile.in (PATH_SEPARATOR): New macro.
3419         (check, installcheck): Use it, for OS/2.
3420
3421 2006-06-18  Eric Blake  <ebb9@byu.net>
3422
3423         Consistently use "GNU M4" as package name, "m4" as executable
3424         name.
3425         * NEWS: Document previous fix.
3426         * THANKS: Update.
3427         * README: Fix grammar.  Document that --enable-changeword is on
3428         its last leg.
3429         * doc/m4.texinfo (Top, Changeword): Likewise.
3430         (Sysval): Enhance this test.
3431         (History): Backport this section from CVS head, and update.
3432
3433 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
3434             Eric Blake  <ebb9@byu.net>
3435
3436         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
3437         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
3438         big-endian and little-endian wait status definitions.
3439         (m4_sysval): Use WEXITSTATUS.
3440         Reported by Andreas Buening.
3441
3442 2006-06-18  Eric Blake  <ebb9@byu.net>
3443
3444         * configure.ac (AC_INIT): Bump version number.
3445         * NEWS: Describe changes in 1.4.4c.
3446
3447 2006-06-17  Eric Blake  <ebb9@byu.net>
3448
3449         Beta Release 1.4.4b:
3450         * configure.ac (AC_INIT): Bump version number.
3451         * NEWS: Describe changes since 1.4.4.
3452         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
3453
3454         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
3455         bootstrap.
3456         * checks/Makefile.in (maintainer-clean): Add missing target.
3457         * COPYING: Remove generated file from CVS.
3458
3459 2006-06-16  Eric Blake  <ebb9@byu.net>
3460
3461         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
3462
3463 2006-06-15  Eric Blake  <ebb9@byu.net>
3464
3465         * checks/wrapfifo.m4: New file.  Use it...
3466         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
3467         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
3468
3469         * src/m4.h (to_uchar): New function.
3470         * src/eval.c (eval_lex): Use it to avoid passing signed char to
3471         isdigit, isalpha, isupper, islower, isspace, isalnum.
3472         * src/builtin.c (expand_user_macro): Likewise.
3473         * src/format.c (format): Likewise.
3474         * src/macro.c (expand_argument): Likewise.
3475         * NEWS: Document this security fix.
3476
3477         Message cleanup.
3478         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
3479         * src/freeze.c (reload_frozen_state): Fix typo in message.
3480         (produce_frozen_state): Standardize on builtin, not built-in.
3481         * src/builtin.c (numeric_arg, bad_argc): Likewise.
3482
3483         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
3484         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
3485         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
3486         gnulib.
3487         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
3488         * m4/gnulib-cache.m4: New file, from gnulib.
3489         * bootstrap: Invoke gnulib-tool --update.
3490         * src/m4.c (main): Cast away const.
3491         * NEWS: Document that regex is updated.
3492         * THANKS: Update.
3493
3494 2006-06-08  Eric Blake  <ebb9@byu.net>
3495
3496         * configure.ac (changeword): Work even when changeword is not a
3497         macro.
3498         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
3499         Delete; now done by automake.
3500         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
3501
3502 2006-06-07  Eric Blake  <ebb9@byu.net>
3503
3504         * lib/regex.c (bcmp_translate): Canonicalize type name.
3505         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
3506         * configure.ac (changeword): Disable changeword for the creation
3507         of configure, in case of bootstrapping with an m4 configured with
3508         --enable-changeword.
3509
3510         Distribute a rudimentary man page.
3511         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
3512         can feed help2man.
3513         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
3514         (SUFFIXES, m4.1): New macros and rules to build m4.1.
3515
3516 2006-06-06  Eric Blake  <ebb9@byu.net>
3517
3518         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
3519         compiler warnings at -O2.
3520         * lib/getopt.c (_getopt_internal): Likewise.
3521
3522         Cleanup of previous patches.
3523         * src/input.c (struct input_block): Remove traced member.
3524         (push_macro, init_macro_token): Don't pass trace status around.
3525         * src/m4.h (struct token_data): Remove traced member.
3526         (struct symbol, struct builtin): Reduce unused space.
3527         (TOKEN_DATA_FUNC): Simplify.
3528         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
3529         (push_macro, define_builtin): Remove unused parameter.
3530         * src/builtin.c (define_builtin, builtin_init, define_macro),
3531         (m4_defn): Don't pass trace status around.
3532         * src/macro.c (expand_argument): Likewise.
3533         * src/freeze.c (reload_frozen_state): Likewise.
3534         * src/symtab.c: Whitespace cleanup.
3535         * NEWS: Clean up wording.
3536         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
3537         ensure tests actually expose bugs prior to today's patches.
3538
3539         Trace status of builtins is no longer inherited across
3540         define(...,defn(...)).  Fixes bug that autom4te had been working
3541         around.
3542         * src/builtin.c (define_builtin): Don't override trace status.
3543         * doc/m4.texinfo (Trace): Add test for this.
3544         * NEWS: Document this.
3545
3546         When changing macro definitions inside the arguments to the macro,
3547         consistently preserve the old definition that was in effect before
3548         argument collection, similar to the C pre-processor.
3549         Reported by John Brzustowski.
3550         * NEWS: Document this change.
3551         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
3552         this policy, and add tests that expose core dumps prior to this
3553         patch.
3554         * src/m4.h (struct symbol): New members to track when a symbol is
3555         still in use after removal from the symbol table.
3556         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
3557         (free_symbol): Prototype.
3558         * src/macro.c (expand_macro): Track pending expansions of a
3559         symbol.  On completion, if a symbol is deleted and no longer
3560         pending, free its memory.
3561         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
3562         is still in use.
3563         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
3564         is still in use.
3565         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
3566         in use as deleted and remove from the table without freeing
3567         memory.
3568         (symtab_print_list) [DEBUG_SYM]: More debug output.
3569
3570         * src/symtab.c (hack_all_symbols): Allow certain modifications of
3571         the symbol table during traversal.
3572         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
3573         SYMBOL_POPDEF, since only the latter is safe with
3574         hack_all_symbols.
3575
3576         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
3577         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
3578         Preserve placeholder when macro is being traced.
3579         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
3580         symbol is not defined.
3581         (set_trace): Remove placeholder when no longer traced.
3582         (m4_traceon): On named traces, always reserve a slot in the
3583         symbol table.
3584         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
3585         * NEWS: Document new trace behavior.
3586         * doc/m4.texinfo (Trace): Tracing by name now consistently works
3587         no matter whether that macro is currently defined.
3588         (Incompatibilities): Document differences between traditional and
3589         GNU trace.
3590
3591 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3592             Eric Blake  <ebb9@byu.net>
3593
3594         * src/m4.h (hash_table_size): Now size_t instead of int.
3595         * src/m4.c (hash_table_size): Likewise.
3596         (main): Adjust to this; use atol rather than atoi.
3597         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
3598         (symtab_init, lookup_symbol, hack_all_symbols):
3599         Use size_t for sizes and indexes, not int.
3600         (symtab_print_list) [DEBUG_SYM]: Likewise.
3601         (hash): Likewise.  Don't case-fold in the hash function.
3602         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
3603         Don't assume hash word is 32 bits.
3604         * NEWS: Document this change.
3605
3606 2006-06-04  Eric Blake  <ebb9@byu.net>
3607
3608         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
3609         to allow compilation, for use in debugger.
3610         (profiles, current_mode) [DEBUG_SYM]: New variables.
3611         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
3612         determining hash table performance.
3613
3614 2006-05-31  Eric Blake  <ebb9@byu.net>
3615             John Brzustowski  <jbrzusto@fastmail.fm>
3616
3617         * src/input.c (input_stack): Delete; use current_input instead.
3618         (wrapup_stack): Dynamically allocate, so that recursion is handled
3619         properly.
3620         (push_wrapup): Use current wrapup stack.
3621         (pop_wrapup): Rotate wrapup stack to current, and create new
3622         wrapup stack.
3623         (input_init): Dynamically allocate stacks.
3624         * NEWS: Update, now that recursive m4wrap can no longer cause
3625         core dump.
3626
3627 2006-05-31  Eric Blake  <ebb9@byu.net>
3628
3629         * lib/getopt.c: Fix copyright year.
3630         * lib/obstack.c: Ditto.
3631         * src/builtin.c: Ditto.
3632
3633 2006-05-30  Eric Blake  <ebb9@byu.net>
3634
3635         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
3636         Reported by John Brzustowski.
3637         (Incompatibilities): Document known POSIX incompatibilities.
3638         * THANKS: Update.
3639
3640 2006-05-29  Eric Blake  <ebb9@byu.net>
3641
3642         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
3643         in read-only dir.
3644
3645         Use automake.
3646         * Makefile.am: New file.
3647         * doc/Makefile.am: Ditto.
3648         * examples/Makefile.am: Ditto.
3649         * lib/Makefile.am: Ditto.
3650         * src/Makefile.am: Ditto.
3651         * acinclude.m4: New file, renamed from aclocal.m4.
3652         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
3653         (AC_ARG_PROGRAM): Now redundant.
3654         (STACKOVF): Turn into automake conditional.
3655         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
3656         * checks/Makefile.in: Converting this dir to automake was not
3657         trivial; for now, just add missing targets demanded by top-level.
3658         * INSTALL: Remove files that are now generated from CVS.
3659         * Makefile.in: Ditto.
3660         * aclocal.m4: Ditto.
3661         * install-sh: Ditto.
3662         * mkinstalldirs: Ditto.
3663         * doc/Makefile.in: Ditto.
3664         * doc/texinfo.tex: Ditto.
3665         * examples/Makefile.in: Ditto.
3666         * lib/Makefile.in: Ditto.
3667         * src/Makefile.in: Ditto.
3668
3669         * AUTHORS: Backport from CVS head, and update.
3670         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
3671
3672 2006-05-27  Eric Blake  <ebb9@byu.net>
3673
3674         * lib/regex.c (regex_compile): Kill compiler warnings.
3675         * lib/getopt.c: Likewise.
3676         * lib/obstack.c: Likewise.
3677         * src/builtin.c (builtin_init): Likewise.
3678         * src/path.c (path_search): Likewise.
3679
3680         * doc/m4.texinfo: Fix usage of a vs. an.
3681         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
3682         overfull hbox warnings.
3683         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
3684
3685         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
3686         quoting.
3687         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
3688         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
3689         assume C89.
3690         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
3691         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
3692         * src/Makefile.in: Delete remains of ansi2knr.
3693         * src/ansi2knr.1: Delete.
3694         * src/ansi2knr.c: Delete.
3695
3696 2006-05-25  Eric Blake  <ebb9@byu.net>
3697
3698         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
3699         `illegal'.
3700
3701         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
3702         Reported by Karl Berry.
3703
3704 2006-05-24  Eric Blake  <ebb9@byu.net>
3705
3706         * Makefile.in (html): New target.
3707         * doc/Makefile.in (html, m4.html): Likewise.
3708         (MAKEINFOHTML): New macro.
3709         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
3710         rendering.
3711         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
3712         absolute URL.
3713         Reported by Bob Badour.
3714
3715         * THANKS: Update.  Move reporter's email addresses here, instead
3716         of in ChangeLog.
3717
3718 2006-05-11  Eric Blake  <ebb9@byu.net>
3719
3720         * THANKS: Update.
3721         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
3722         patched on 2005-12-04.
3723         Reported by Ilya N. Golubev.
3724
3725         * bootstrap: New file, so that generated files need not be stored
3726         in CVS.
3727         * Makefile.in (DISTFILES): Add bootstrap.
3728
3729         Make testsuite less sensitive to doc changes.
3730         * doc/m4.texinfo: Use m4.input instead of filename.
3731         * checks/check-them (xerr): Turn m4.input into filename.
3732         * checks/Makefile.in (dist): Depend on stamp-checks.
3733
3734         Portability updates for OS/2.
3735         * src/Makefile.in (EXEEXT, OBJEXT): Define.
3736         (LINK): Use CFLAGS.
3737         (.c.obj): Define.
3738         * lib/Makefile.in (OBJEXT): Define.
3739         (.c.obj): Define.
3740         * doc/Makefile.in (install, uninstall): Install info files into
3741         the dir listing.
3742         Reported by Andreas Buening.
3743
3744 2006-05-09  Eric Blake  <ebb9@byu.net>
3745
3746         * install-sh: Update to newer upstream version.
3747         * mkinstalldirs: Likewise.
3748         Reported by Andreas Buening.
3749
3750         * src/m4.c (main): Bump copyright year.
3751         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
3752         * doc/Makefile.in (datarootdir): Likewise.
3753
3754 2006-05-08  Eric Blake  <ebb9@byu.net>
3755
3756         * THANKS: Update.
3757         * doc/m4.texinfo (Bugs): Backport bug email address from head.
3758         Reported by Stepan Kasal.
3759
3760 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
3761
3762         * input.c (match_input): Do not pass expression with side effect
3763         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
3764         * NEWS: Updated.
3765
3766 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
3767
3768         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
3769         Reported by Damian Menscher.
3770
3771 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
3772
3773         * configure.ac (AC_INIT): Bump to 1.4.4a.
3774
3775 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
3776
3777         Release 1.4.4:
3778         * configure.ac (AC_INIT): Bump to 1.4.4.
3779         * NEWS: Describe 1.4.4's changes.
3780         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
3781
3782 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
3783
3784         * src/m4.c: fix return code when non-existent files are processed
3785
3786 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
3787
3788         * README: update email address for bug reports.
3789
3790 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
3791
3792         * doc/m4.info: Generated files are not kept in the repository.
3793
3794 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
3795
3796         The FSF are moving offices today.  Changed their contact address
3797         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
3798         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
3799
3800         Also, some of the files here were never updated from the previous
3801         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
3802         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
3803
3804 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
3805
3806         * Makefile.in (bindir, infodir): Substitute from configure rather
3807         than hardcode.
3808         * doc/Makefile.in (infodir): Ditto.
3809         * src/Makefile.in (bindir): Ditto.
3810         * NEWS: Updated.
3811
3812 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
3813
3814         Changes needed to automate the release process for 1.4.3:
3815
3816         * Makefile.in (dist): Make .tar.bz2 tarball too.
3817         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
3818         (cvs-news): Look 1 line further down for NEWS release number.
3819         (cvs-dist): We don't use automake, so make dist is fine.
3820         Remove double . before suffixes.
3821         (cvs-release): Don't mention manual.html.
3822         (fetch): Get latest gendocs files.
3823         (web-manual): Rewritten to use gendoc for multiformat manuals.
3824         * doc/gendocs.sh: Don't save an old version in m4 CVS!
3825         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
3826         preserving, but case insensitive, so generating html docs per node
3827         clashes between Index.html, the node file, and index.html, the
3828         top-level of the document tree...
3829         (Index macro): ...so renamed to this.  Changed all references.
3830
3831 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
3832
3833         * configure.ac (AC_INIT): Bump to 1.4.3a.
3834
3835 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
3836
3837         Release 1.4.3:
3838         * configure.in (AC_INIT): Bump to 1.4.3.
3839         * NEWS: Describe 1.4.3's changes.
3840
3841 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
3842
3843         * Makefile.maint: New file with release rules, from CVS libtool.
3844         * Makefile.in (DISTFILES): Add Makefile.maint.
3845         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
3846         canonical versions.
3847
3848 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
3849
3850         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
3851         checks/47.patsubst, with a redundant @comment to prevent emacs
3852         from removing it accidentally again.
3853         * checks/get-them: Allow for trailing spaces tucked behind
3854         @comment marks.
3855
3856 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
3857
3858         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
3859         * src/Makefile.in (install, uninstall): Likewise.
3860
3861 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
3862
3863         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
3864         on Cygwin.
3865         Reported by Eric Blake.
3866
3867 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
3868
3869         * lib/regex.c, lib/regex.h: Updated from gnulib.
3870         * src/input.c (set_word_regexp):  Don't change the word_regexp
3871         unless it compiles correctly.
3872         * NEWS: Updated.
3873         Reported by Frank Schwidom.
3874
3875         * Makefile.in (stamp-h): Regenerate config.h properly.
3876
3877 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
3878
3879         * configure.ac (AC_DEFINE): Fix overquoting of description
3880         argument.
3881
3882         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
3883         recognition macros.
3884         * src/freeze.c (produce_frozen_state): Use \n line-endings even
3885         on Windows, so that the frozen file reader will work.
3886         Reported by Josef T. Burger.
3887
3888         * src/m4.c (main): Modernise the --version output.
3889
3890 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
3891
3892         Modernise the configury a little to prevent spurious errors from
3893         Autoconf-2.59's autoreconf:
3894
3895         * config.h.in: Renamed to...
3896         * config-h.in: ...this to better support DOS 8.3 file systems.
3897         * acconfig.h: Removed.
3898         * configure.in: Renamed to...
3899         * configure.ac: ...this, and AC_DEFINE used to declare config.h
3900         entry comments.  Slight reorganisation and reformatting.
3901         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
3902         entry comments.
3903         (AC_INIT): Use a modern 3 argument call.
3904         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3905         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
3906         s/PRODUCT/PACKAGE/g.
3907         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
3908         config.h.in.  Added configure.ac, config-h.in.
3909         (stamp-h.in): Removed acconfig.h from dependencies.
3910         (configure): Depends on configure.ac, not configure.in.
3911         * doc/Makefile.in (stamp-vti): Ditto.
3912         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
3913         difference between PRODUCT="m4" and PACKAGE="GNU M4".
3914         * configure: Regenerated.
3915
3916 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
3917
3918         * src/output.c (mkstemp): Make non-static, and build regardless of
3919         HAVE_TMPFILE; src/builtin.c also needs this replacement.
3920         * NEWS: Update.
3921
3922 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
3923
3924         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
3925         changes from your editor buffer first.
3926
3927         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
3928         * src/m4.c: And include them as appropriate.
3929         * NEWS: Updated.
3930
3931 2004-09-09  Andreas Schwab  <schwab@suse.de>
3932
3933         Refactoring of the string read case in next_char provides about a
3934         20% speedup of M4 as typically used by autoconf:
3935
3936         * src/input.c (next_char_1): Renamed from next_char.
3937         (next_char): New macro.
3938         * NEWS: Updated.
3939
3940 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
3941
3942         * configure.in (VERSION): Bump to 1.4.2a.
3943
3944 2004-08-19  Paul Eggert  <eggert@twinsun.com>
3945
3946         Release 1.4.2.
3947         * configure.in (VERSION): Bump to 1.4.2.
3948         * News: Describe 1.4.2's changes.
3949
3950         * src/m4.c (reference_error): Preserve errno, since M4ERROR
3951         relies on this.
3952         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
3953         (m4_maketemp): Clear errno before calling mkstemp.
3954         * src/path.c (path_search): Don't let "free" trash errno when
3955         returning NULL.
3956         * src/output.c (insert_file): Don't assume errno has a valid
3957         value simply because fread returns zero.  This fixes a
3958         portability bug reported by Marion Hakanson in
3959         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
3960
3961 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
3962
3963         * configure.in (VERSION): Bump to 1.4.1a.
3964         * NEWS: Place holder for next stable release.
3965
3966 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
3967
3968         Release 1.4.1.
3969         * configure.in (VERSION): Bump to 1.4.1.
3970         * NEWS: Describe 1.4.1's changes.
3971
3972         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
3973         pacify Autoconf 2.59.
3974
3975         * doc/m4.texinfo: Insert commas after @xref's that lack them,
3976         to pacify Texinfo 4.7.
3977         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
3978
3979         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
3980         pacify Sun C compilers.
3981
3982 2003-09-28  Akim Demaille  <akim@epita.fr>
3983
3984         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
3985         botch.
3986
3987 2003-09-03  Santiago Vila  <sanvila@debian.org>
3988
3989         * examples/stackovf.sh: Use tempfile if available.
3990
3991 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
3992
3993         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
3994         * src/output.c (m4_insert_file): Do not mix buffered and
3995         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
3996
3997 2001-02-01  Santiago Vila  <sanvila@debian.org>
3998
3999         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
4000         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
4001
4002 2001-02-01  Matt Kraai  <kraai@debian.org>
4003
4004         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
4005         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
4006         empty file rather than to a nonexistent file.  This closes a common
4007         security hole.
4008         * src/builtin.c (m4_maketemp): Implement the above, by using
4009         mkstemp rather than mktemp.  (trivial change)
4010
4011 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
4012
4013         * src/builtin.c (expand_ranges): Added break after trailing dash.
4014         This caused misbehaviors on some systems.
4015
4016 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
4017
4018         Release 1.4.
4019         * doc/Makefile.in (realclean): Also remove stamp-vti.
4020         Reported by Eric Backus.
4021
4022 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
4023
4024         * src/freeze.c (produce_frozen_state): If the frozen file cannot
4025         be opened, return immediately after producing the error message.
4026         Reported by Andreas Schwab.
4027
4028         * configure.in: Check for const only after having found possible
4029         ANSIfying compiler flags, this is of no use to check it before.
4030         Reported by Alexander Lehmann.
4031
4032 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
4033
4034         * src/macro.c (collect_arguments): Cast obstack arguments to
4035         (voidstar), so avoiding compiler warnings.
4036         Reported by Joseph E. Sacco.
4037
4038         * src/freeze.c (produce_frozen_state): Cast printed lengths to
4039         (int) so they correspond to %d format items.
4040         Reported by Joseph E. Sacco.
4041
4042         * src/m4.c (main): Cast the argument to xfree to (voidstar).
4043         * src/symtab.c (free_symbol): Idem.
4044         Reported by Karl Vogel.
4045
4046 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
4047
4048         * Makefile.in (DISTFILES): Distribute BACKLOG.
4049
4050         * configure.in: Define PRODUCT and VERSION.
4051         * acconfig.h: Document PRODUCT and VERSION.
4052         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
4053         constant string m4 and variable or parameter named version.
4054
4055 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
4056
4057         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
4058         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
4059         defines __STDC__ to 0, for indicating it is *not* ANSI!
4060         Reported by Kaveh R. Ghazi.
4061
4062         * configure.in: Added obsolescent tests for AIX and Minix.
4063
4064         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
4065         which texclean does not exist anymore.
4066         Reported by Eric Backus, Jim Meyering, John David Anglin and
4067         Joseph E. Sacco.
4068
4069 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
4070
4071         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
4072         Reported by John David Anglin.
4073
4074         * src/ansi2knr.c: New version, sent by Peter Deutsch.
4075         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
4076         ANSI2KNR, depending on the fact the compiler is ANSI or not.
4077         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
4078         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
4079         of $U, put underline in extensions rather than in basenames.  Use
4080         implicit rules, now that regularity makes this possible.
4081         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
4082         of ansi2knr whenever it is needed.
4083         * configure.in: Adjusted for correct STACKOVF substitution.
4084         * src/debug.c (trace_format): When not __STDC__, use (...) as a
4085         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
4086         Reported by David MacKenzie.
4087
4088         * Makefile.in: Remove binprefix.  Use transform_name instead.
4089         Reported by David MacKenzie.
4090
4091         * doc/Makefile.in: Create version.texi, use it, clean it.
4092         Reported by Jim Meyering.
4093
4094 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
4095
4096         * Makefile.in (all, install, uninstall): Depend on Makefile.
4097
4098         * Makefile.in: For actions invoking $(MAKE) from within compound
4099         sh statements, exit non-zero if the sub-make fails.  Otherwise,
4100         the top-level make may exit successfully when it should fail.
4101         Reported by Jim Kingdon.
4102
4103         * {,/*}Makefile.in: Use && after all cd, in case they fail.
4104
4105         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
4106         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
4107         * configure.in: Substitute PRODUCT and VERSION.
4108
4109         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
4110
4111 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
4112
4113         * Makefile.in (mostlyclean-local): Do not remove *~.
4114         * */Makefile.in (mostlyclean): Idem.
4115         Reported by Robert E. Brown and Richard Stallman.
4116
4117 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
4118
4119         * src/m4.h: Get rid of CONFIG_BROKETS.
4120
4121 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
4122
4123         * configure.in: Use AC_ARG_PROGRAM.
4124         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
4125         Reported by David MacKenzie.
4126
4127 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
4128
4129         * configure.in: Do not add -O to CFLAGS for GNU C, now that
4130         configure does it automatically.
4131         Reported by Jim Meyering.
4132
4133 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
4134
4135         * src/stackovf.c: Declare the handler_t typedef earlier in the
4136         code, use it for stackovf_handler.
4137         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
4138         casting sigsegv_handler.
4139         Reported by Robert Bernstein.
4140
4141         * src/m4.c (main): Initialize program_name to argv[0] without
4142         basename'ing it.
4143         Reported by Karl Berry.
4144
4145 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
4146
4147         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
4148         Reported by Karl Berry.
4149
4150 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
4151
4152         * lib/Makefile.in (mostlyclean): Added.
4153         (TAGS): Make in $(srcdir).
4154
4155         * configure.in: Use `choke me' in test, like everywhere!
4156
4157         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
4158         unreacheable and useless.
4159
4160         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
4161
4162         * lib/Makefile.in (DISTFILES): Distribute TAGS.
4163         (distclean): Do not remove TAGS.
4164         (realclean): Remove it.
4165         * Makefile.in: Make TAGS in lib also, not just in src.
4166         Reported by Karl Berry.
4167
4168         * Makefile.in (distclean, realclean): Instead of recursively
4169         calling $(MAKE) for the -local part, allow parallel execution of
4170         -recursive and -local, only delay the removal of config.status,
4171         which is repeated in both goals.
4172 \f
4173 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
4174
4175         Release 1.3.
4176         * Makefile.in: Group all *clean-recursive goals in one, using sed
4177         to remove `-recursive' while calling make recursively.  Also, use
4178         a subshell for each recursive $(MAKE).
4179         Reported by Jim Meyering.
4180
4181         * src/m4.h (memcpy): Define with bcopy for BSD systems.
4182         Reported by Kaveh R. Ghazi.
4183
4184         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
4185         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
4186         specify it.
4187
4188         * configure.in: Use date instead of touch for stamp-h.
4189         * Makefile.in (stamp-h.in): Idem.
4190
4191         * Makefile.in (distclean, realclean): Force serial execution of
4192         both goals, in case parallel makes are being used.
4193         Reported by Jim Meyering.
4194
4195         * src/Makefile.in (DISTFILES): Distribute TAGS.
4196         (distclean): Do not remove TAGS.
4197         (realclean): Remove it.
4198         Reported by Karl Berry.
4199
4200 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
4201
4202         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
4203         to old names, for following Autoconf.
4204
4205 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
4206
4207         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
4208         ./install.sh will not be correctly referred to in sub-Makefiles.
4209         Reported by John David Anglin.
4210
4211         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
4212         Reported by Eric Backus.
4213
4214         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
4215         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
4216         config.status into remaking this directory's Makefile only.
4217         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
4218         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
4219         Reported by Jim Meyering.
4220
4221 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
4222
4223         * configure.in: Correct stack overflow detection logic, taking
4224         care of systems having only incomplete implementations (like for
4225         Pyramid 9820 OSx 5.0d).
4226         Reported by Kaveh R. Ghazi.
4227
4228         * src/Makefile.in (TAGS): Remote -t from etags call.
4229
4230 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
4231
4232         * lib/Makefile.in (install): Depend on all.
4233
4234 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
4235
4236         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
4237         Reported by Jim Meyering and John David Anglin.
4238
4239         * Makefile.in (distclean-local): Delete config.log.
4240         Reported by Jim Meyering.
4241
4242         Solidify frozen files with respect to -P:
4243         * src/m4.c: Have -P set prefix_all_buitins variable instead of
4244         calling a function by that name.  Declare the variable.
4245         * src/m4.h: Adjust declaration for prefix_all_buitins.
4246         * src/builtin.c (builtin_init): Merge in functionality from
4247         previous prefix_all_buitins function, while making entries in the
4248         symbol table, but not modifying the builtin description itself.
4249
4250         * src/freeze.c (reload_frozen_state): Add a useless `break;',
4251         because *many* compilers do not accept an empty `default:'.
4252         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
4253         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
4254
4255         * configure.in: Use AC_TYPE_SIGNAL.
4256         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
4257         Reported by Robert Bernstein.
4258
4259         * checks/Makefile.in (check): Modify PATH so check-them will find
4260         m4 in the src directory.
4261         * Makefile.in (check): Don't.
4262         Reported by Akiko Matsushita and Jim Meyering.
4263
4264         * src/output.c (make_room_for, output_character_helper): New
4265         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
4266         a per buffer MAXIMUM_BUFFER_SIZE.
4267
4268         * src/output.c (output_text): New function, for optimizing the
4269         output of strings of characters.  Use it.
4270
4271 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
4272
4273         * doc, src: New directories reorganizing the distribution.
4274         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
4275         files.
4276         * Makefile.in: Adjusted.
4277         * configure.in: Configure new Makefiles.
4278
4279         * m4.h: Declare STRING typedef.  Use it for comment and quote
4280         strings, adjusting all references.  (This is the rudiments of a
4281         beginning for the eventual withdrawal of NUL terminated strings.)
4282         * output.c (shipout_text): Accept a length parameter, and use it.
4283         All callers adjusted.
4284
4285 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
4286
4287         * m4.h: Include <unistd.h> if it exists.
4288         * stackovf.c: Don't.
4289
4290         Clean up for current_diversion variable:
4291         * output.c: Move current_diversion from builtin.c.
4292         * m4.h: Declare current_diversion so builtin.c can access it.
4293         * output.c (output_init, make_diversion): Initialize or update
4294         current_diversion.
4295         * builtin.c (builtin_init, m4_divert): Leave current_diversion
4296         alone.
4297
4298         Remove limit on number of diversions:
4299         * output.c: Replace ndiversion by diversions, declare it.
4300         (output_init): Allocate only diversion 0.
4301         (make_diversion): Allocate new diversions as needed.
4302         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
4303         * m4.c: Still accept -N, but do nothing with it.
4304         Reported by David MacKenzie.
4305
4306         Freeze diversions:
4307         * output.c (freeze_diversions): New function.
4308         * m4.h: Declare freeze_diversions.
4309         * freeze.c: Document frozen file format, revise it, call
4310         freeze_diversions to add diversions to frozen format, and code to
4311         reload them properly.
4312         * m4.c: Do not undivert automatically at end when status being
4313         frozen.  Do not call builtin_init when reloading frozen state.
4314
4315         Speed up diversion processing:
4316         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
4317         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
4318         structure and variables, cached variables out of output_diversion,
4319         reallocate_diversion_for and OUTPUT_CHARACTER.
4320         (shipout_text, make_diversion, insert_diversion): Adapted to new
4321         structures.
4322         (insert_file): Use better buffering.
4323         Reported by David MacKenzie.
4324
4325 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
4326
4327         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
4328         dist works from another build directory.
4329
4330 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
4331
4332         * symtab.c (hack_all_symbols): Use hash_table_size instead of
4333         constant HASHMAX, for -H option to work better.
4334
4335         * builtin.c (DECLARE): Simplify by using _ ().
4336
4337         * freeze.c: New file.
4338         * Makefile.in: Compile it, distribute it.
4339         * m4.c: Recognize, document and process --freeze-state (-F) and
4340         --reload-state (-R) options.  Pass a true flag to builtin_init
4341         only if no reloading some state.
4342         * builtin.c (define_builtin): Remove static specifier.
4343         (find_builtin_by_name): Remove static specifier.
4344         (builtin_init): Accept and obey a flag argument.
4345         * m4.h: Add declarations for freeze.c, changes for builtin.c.
4346
4347 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
4348
4349         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
4350         specifier.
4351
4352         * configure.in: Implement --with-dmalloc.
4353         * acconfig.h: Document WITH_DMALLOC.
4354         * m4.h: Add code for when WITH_DMALLOC.
4355
4356 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
4357
4358         * m4.c (long_options): Use "error-output", the dash was missing.
4359         Reported by Akiko Matsushita.
4360
4361 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
4362
4363         * m4.h: Include <sys/types.h>.
4364         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
4365         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
4366         int.
4367         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
4368         as size_t, not int.
4369         * builtin.c (dump_args): Declare len as size_t, not int.
4370
4371         * debug.c: Prototype the forward declaration of debug_set_file.
4372
4373         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
4374         shadowing of this variable.
4375         * output.c (insert_diversion): Idem.
4376
4377         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
4378         (input_init): Duplicate default quote and comment strings.
4379         (set_quotes): Free previous quote strings in all cases.  Duplicate
4380         even default quote strings.
4381         (set_comment): Free previous comment strings in all cases.
4382         Duplicate even default comment strings.
4383
4384         * configure.in: Updated for Autoconf 2.0.
4385         * Makefile.in (distclean-local): Also delete config.cache.
4386
4387         * m4.c (usage): Reorganize the --help output by topic.  Include a
4388         description for debugging flags.
4389
4390 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
4391
4392         * configure.in: If sigaction is available and SA_ONSTACK defined,
4393         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
4394         defined, use sigvec.  Else don't compile stackovf.c.
4395         * stackovf.c (setup_stackovf_trap): Idem.
4396         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
4397         and Simon Leinen.
4398
4399 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
4400
4401         * m4.c (usage): Replace printf par fputs.
4402 \f
4403 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
4404
4405         * Release 1.2
4406
4407 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
4408
4409         * configure.in: Check for sigaction and sigvec.  Add a new delayed
4410         check for RLIMIT_STACK, combine in the checking for getrlimit.
4411         All those things are not universally available.
4412         * stackovf.c: Split setting up the trap handler and catching
4413         signals, for better taking care of various configure outcomes.
4414         * examples/stackovf.sh: Correct a typo.
4415         Reported by Eric Backus, Jim Avera and Jim Meyering.
4416
4417 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
4418
4419         * ansi2knr.c: New version sent by its author, Peter Deutsch.
4420
4421 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
4422
4423         * Makefile.in: Modify so parallel make will not try making
4424         lib/libm4.a twice simultaneously.
4425         Reported by Jim Meyering.
4426
4427 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
4428
4429         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
4430         error message, for when no code possibility exists.  Even if this
4431         line is completely #ifdef'ed out, it brings a syntax error.
4432         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
4433
4434         * Makefile.in (install): Have install depend on all too, for lib
4435         to be remade as needed.
4436
4437         * examples/stackovf.sh: Try ksh, bsh and bash for shells
4438         providing ulimit, instead of using only ksh.
4439         Reported by Jim Avera and Joseph E. Sacco.
4440
4441 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
4442
4443         * Makefile.in (check): Have it depend on all instead of m4.  In
4444         this way, a change in lib will be detected and processed.
4445
4446         * builtin.c (numeric_arg): Use strtol and verify the conversion,
4447         instead of using sscanf which stops as soon as there is a
4448         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
4449         and divert(1xyzzy) were all accepted without any warning or error
4450         messages.
4451         * m4.h: Declare strtol as long if not including stdlib.h.
4452         * configure.in: Check for limits.h, and replace strtol if missing.
4453         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
4454         * lib/strtol.c: New file, from elsewhere.
4455         Reported by Andreas Schwab.
4456
4457 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
4458
4459         * macro.c (expand_macro): Cast value to (boolean) prior to
4460         assigning it to traced.
4461         Reported by Tom McConnell.
4462
4463         * Makefile.in (m4): Always make all in lib first.
4464         Reported by Jim Meyering.
4465
4466 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
4467
4468         * stackovf.c: Isolated OS-dependent sections; Improved portability,
4469         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
4470         handlers), and a default error message if the fault address is not
4471         available (when neither siginfo.h nor BSD sigcontext are supported).
4472         * configure.in: Changes for stackovf.h: Check for sigcontext,
4473         sigaction, sigstack, and define rlim_t as int if necessary.
4474         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
4475         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
4476         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
4477
4478 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
4479
4480         * configure.in: Use AC_SET_MAKE.
4481         * Makefile.in: Use @SET_MAKE@.
4482         Reported by Jim Meyering.
4483
4484         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
4485         Reported by Ian Taylor.
4486
4487 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
4488
4489         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
4490         because siginfo.h is unrelated to standard headers, and siginfo.h
4491         is already checked for.
4492         Reported by Joseph E. Sacco.
4493
4494         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
4495         PROTOTYPES.
4496         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
4497         AC_PROTOTYPES.
4498
4499 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
4500
4501         * builtin.c (substitute): Use \& to represent this part of the
4502         string which was matched by the whole regexp, instead of
4503         representing the whole string.  Any usage of \0 issues a warning
4504         and acts like \&, it will disappear in some subsequent release.
4505
4506 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
4507
4508         * m4.c: Complete prototype for forwarded declaration of usage.
4509
4510         * input.c (init_macro_token): Correct own reference in error
4511         message.  Previous name get_macro_func was referred to instead.
4512         (next_char):  Correct own reference in error message.  Previous
4513         name advance_input was referred to instead.
4514
4515         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
4516         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
4517         and_term, not_term, logical_not_term, cmp_term, shift_term,
4518         add_term, mult_term, exp_term, unary_term, simple_term): Add
4519         prototype to forwarded declarations.  Declare parameter v1 as
4520         eval_t * instead of int *.  Same for local variable v2 in dyadic
4521         functions.  Same for result in exp_term.
4522         * builtin.c (m4_eval): Declare value as eval_t instead of int.
4523         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
4524         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
4525         (shipout_int): Cast first argument of ntoa to eval_t.
4526         Reported by Thorsten Ohl.
4527
4528         * macro.c: Complete the prototypes of forwarded expand_macro and
4529         expand_token.
4530         Reported by Thorsten Ohl.
4531
4532         * m4.h: Define voidstar as void * or char * depending on __STDC__.
4533         The Ultrix 3.1 compiler cannot do much with void pointers.
4534
4535         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
4536         * m4.c (xfree):  Replace void * by voidstar.
4537         Reported by Tom McConnell.
4538
4539         * ansi2knr.1: New, from elsewhere.
4540         * Makefile.in (DISTFILES): Distribute ansi2knr.1
4541
4542         * Makefile.in (stamp-h.in): Avoid running ./config.status if
4543         stamp-h does not exist yet.  This avoids running it a second time
4544         just after the initial ./configure.
4545         Reported by David MacKenzie and Tom McConnell.
4546
4547         * m4.h: Replace the enum debug_info declaration with a series of
4548         #define's.  The Ultrix 3.1 compiler would otherwise need casting
4549         (int) to most references, when used in expressions.
4550         Reported by Tom McConnell.
4551
4552 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
4553
4554         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
4555         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
4556         calls the compiler.  Previously, FP_PROTOTYPES was only calling
4557         the preprocessor; by not being subject to CFLAGS, this was
4558         discouraging those flags asking for ANSI compilation.
4559         * acconfig.h: Document HAVE_PROTOTYPES.
4560         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
4561         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
4562         Reported by Eric Backus.
4563
4564         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
4565         from the environment.  Default CFLAGS to -g if not set.
4566         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
4567         * lib/Makefile.in: Have CFLAGS substituted from configure.
4568         Reported by Eric Backus and Tom McConnell.
4569
4570         * configure.in: m4_undefine changeword before using AC_ENABLE.
4571
4572         * m4.h: Declare prototypes for error (for ANSI compilers only),
4573         prefix_all_builtins and reference_error.
4574         Reported by Tom McConnell.
4575
4576         * input.c (set_word_regexp): Do not try to initialize the array
4577         test from a string, this does not work with non-ANSI compilers.
4578         Reported by Eric Backus.
4579
4580         * Makefile.in (dist): Clean examples/ before saving it.
4581         (distclean-local): Also remove stamp-h.
4582         Reported by Eric Backus.
4583
4584         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
4585         non ANSI compilers.
4586         Reported by Tom McConnell.
4587
4588         * checks/Makefile.in (clean): Depends on mostlyclean.
4589         (mostlyclean): New goal.
4590
4591 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
4592
4593         * Makefile.in (DISTFILES): Distribute install.sh.
4594         * install.sh: New file, copied from elsewhere.
4595         Reported by Assar Westerlund and Kaveh R. Ghazi.
4596
4597 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
4598
4599         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
4600         * acconfig.h: Explain ENABLE_CHANGEWORD.
4601
4602         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
4603         from code provided by Pete Chown]
4604         * m4.h: Add original_text field to u_t variant of union u.
4605         Declare TOKEN_DATA_FUNC macro.
4606         * builtin.c: Declare changeword.
4607         (m4_changeword): New function.
4608         * input.c: Include "regex.h", define variables with word regexps.
4609         (input_init): Initialize the word regexp.
4610         (set_word_regexp): New.
4611         (next_token): Declare local variables, use the previous code if
4612         default_word_regexp is true.  Else, match using a new code.  Save
4613         the original text.
4614         * macro.c (expand_token): Ship out original text if not a macro
4615         name.
4616         Reported by Krste Asanovic and Pete Chown.
4617
4618         [These modifs all depend upon ENABLE_CHANGEWORD]
4619         * m4.h: Declare external user_word_regexp.
4620         * m4.c: Declare user_word_regexp, and initialize it from
4621         --word-regexp or -W, or NULL if not specified.
4622         * input.c: Use user_word_regexp if specified, instead of
4623         DEFAULT_WORD_REGEXP.
4624
4625         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
4626         agree with it.
4627
4628         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
4629         * checks/Makefile.in: Empty the suffix list.
4630         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
4631
4632         * m4.c: Declare nesting_limit and initialize it to 250.
4633         Implement -LNUMBER or --nesting-limit=NUMBER to change its
4634         value.
4635         * m4.h: Declare nesting_limit as external.
4636         * macro.c (expand_macro): Stop execution whenever nesting limit
4637         is exceeded.
4638         Reported by Bengt Mertensson.
4639
4640         * eval.c (evaluate): Diagnose excess characters in eval input.
4641         Things like `eval(08)' used to return 0 with no diagnostic.
4642
4643         * m4.h: Capitalize first letter of all macro arguments in
4644         definitions.
4645
4646         * m4.c: Declare warning_status, initialize it to 0.  Add new
4647         option -E, or --fatal-warnings, which sets warning_status to
4648         EXIT_FAILURE instead.
4649         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
4650         EXIT_FAILURE if not otherwise done by header files.
4651         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
4652         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
4653         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
4654         argument of all M4ERROR calls.
4655         Reported by Noah Friedman.
4656
4657         * examples/incl-test.m4: Renamed from incl_test.m4.
4658         * examples/include.m4: Include incl-test.m4 instead of
4659         incl_test.m4.
4660         * examples/multiquotes.m4: Renamed from multi-quotes.m.
4661
4662 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
4663
4664         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
4665         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
4666         also tested it on a Sun Sparc workstation running SunOS 4.x.
4667
4668         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
4669         49.format check, abusing a `union values' argument with sprintf
4670         without selecting the proper field.  Now, save the formatting type
4671         first, delaying the fetch of the corresponding argument.
4672         Reported by Joseph E. Sacco and Tom Quinn.
4673
4674         * format.c (format): Remove const from char *fmt declaration when
4675         not HAVE_EFGCVT, because a NUL may be forced into it.
4676
4677         * m4.h: Declare atof() when not STDC_HEADERS.
4678         Reported by Joseph E. Sacco.
4679
4680         * Regenerate configure using Autoconf 1.11, this corrects a
4681         problem about an incorrect cpp seting on NeXT 3.1.
4682         Reported by Alexander Lehmann.
4683
4684 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
4685
4686         * m4.h (_): Change argument from `x' to `Args'.
4687
4688 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
4689
4690         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
4691         bringing more evil than good on a few systems.
4692         Reported by Greg A. Woods.
4693
4694 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
4695
4696         * m4.h: Rename Args() to _().
4697         * m4.h: Remove extern specifier from all function declarations.
4698
4699 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
4700
4701         * stackovf.c: New file implementing stack-overflow detection.
4702         * configure.in: Check for getrlimit, sigaction.  If all of
4703         standard headers, getrlimit and sigaction, define USE_STACKOVF and
4704         substitute ${U}stackovf.o for STACKOVF.
4705         * acconfig.h: Declare USE_STACKOVF.
4706         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
4707         * m4.h: Declare setup_stackovf_trap().
4708         * m4.c: Call setup_stackovf_trap().
4709         * tests/stackovf_test.sh: New file.
4710
4711 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
4712
4713         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
4714
4715         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
4716
4717 Sun Jan 30 14:24:19 1994    (pinard at icule)
4718
4719         * m4.h: Remove definition of volatile, not used anymore.
4720         Reported by Jim Meyering and Joseph E. Sacco.
4721
4722         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
4723         of `if ... else /* nothing */' for if macros.
4724         Reported by Jim Meyering.
4725
4726         * builtin.c (m4_regexp): Reorganize the code for avoiding a
4727         warning from gcc about `repl' possibly used before defined.
4728         Reported by Jim Meyering.
4729
4730         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
4731         Reported by Jim Meyering.
4732
4733 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
4734
4735         * m4.h: Move the conditional definition of volatile after the
4736         inclusion of system files, because they may define it first.
4737
4738 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
4739
4740         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
4741         get around a problem with Alpha make seeing a syntax error, there.
4742         Reported by Vern Paxson.
4743
4744 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
4745
4746         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
4747         Reported by Richard Stallman.
4748
4749 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
4750
4751         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
4752         instead of AC_HAVE_FUNCS.
4753         Reported by Noah Friedman.
4754
4755 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
4756
4757         * m4.c: Initialize show_help and show_version to zero.
4758
4759         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
4760         Use them in exit() and usage() calls.
4761
4762 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
4763
4764         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
4765         syserr() macro.  Delete errref, add reference_error and M4ERROR.
4766         * m4.c: Replace errref, which was returning an input reference
4767         string, with reference_error, which prints it on standard error.
4768         * builtin.c, output.c: Use errno as second parameter to error,
4769         instead of using syserr() with %s.
4770         * *.c: Use M4ERROR instead of error: no more errref() with %s.
4771         Doing so, the program name appears after the input reference
4772         instead of before, which eases M-x next-error processing.
4773
4774 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
4775
4776         * checks/get-them: Escape braces with backslashes in patterns,
4777         because HPUX-9.01 awk needs this.
4778         Reported by Jim Meyering.
4779
4780 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
4781
4782         * builtin.c: Declare "FILE *popen ();".
4783
4784         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
4785         macros, replace error_message_prefix() declaration by errref()'s.
4786         Declare xrealloc, for use in errref().
4787         * m4.c: Delete error_message_prefix() function, add errref().
4788         * *.c: Use error() systematically in place of all error macros,
4789         now that error() flushes stdout first.  Make needed adjustments.
4790
4791         * m4.h: Remove const in sys_errlist[] declaration, it creates
4792         conflicts on SGI and Alpha.
4793         Reported by Kaveh R. Ghazi.
4794
4795 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
4796
4797         * m4.c: Include <getopt.h> instead of "getopt.h".
4798
4799         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
4800         * acconfig.h: New, for documenting HAVE_EFGCVT.
4801         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
4802         use them wherever appropriate.  Also use -I. for compilations.
4803         * lib/Makefile.in: Use -I.. for compilations.
4804         * *.c: Include <config.h> or "config.h".
4805
4806         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
4807         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
4808
4809 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
4810
4811         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
4812
4813         * input.c (input_init): Initialize quote and comment strings
4814         explicitely instead of calling set_quotes and set_comment: by
4815         doing so, we ensure we do not free uninitialized variables.
4816
4817         * checks/check-them: Reverse arguments to both diff, so the
4818         expected is on the left and the obtained on the right.
4819
4820         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
4821         macros. Delete declarations for m4error, warning, fatal and
4822         internal_error, add declaration for error_message_prefix.
4823         * m4.c:  Delete m4error, warning, fatal and internal_error
4824         routines, add error_message_prefix routine.
4825         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
4826         warning with WARNING*, fatal with FATAL* and internal_error with
4827         INTERNAL_ERROR*.
4828         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
4829         this is not needed anymore.
4830
4831         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
4832         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
4833         and debug_message, add declaration for debug_message_prefix.
4834         * debug.c: Remove static specifier for FILE *debug declaration.
4835         Delete debug_print and debug_message routines, add
4836         debug_message_prefix routine.
4837         * builtin.c, debug.c: Replace debug_print routine calls with
4838         DEBUG_PRINT* macro calls.
4839         * input.c, path.c: Replace debug_message routine calls with
4840         DEBUG_MESSAGE* macro calls.
4841
4842         * m4.h: Remove inclusion of <varargs.h>.
4843         * debug.c: Include <stdarg.h> or <varargs.h>.
4844         (trace_format): Use stdarg instead of varargs if __STDC__.
4845
4846         * configure.in: Remove checks for vfprintf and _doprnt.  These
4847         implementations use varargs tricks which are not portable enough.
4848         * lib/vfprintf.c: Deleted.
4849         * lib/_doprnt.c: Deleted.
4850         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
4851         Reported by Joel Sherrill.
4852
4853         * path.c (add_include_directory): Use xstrdup.
4854
4855         * builtin.c (find_builtin_by_name): Declare static.
4856
4857         * *.[ch]: Add const to a few "char *" declarations.
4858
4859         * configure.in: Remove commented tests for fileno() and fstat().
4860         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
4861
4862         * debug.c (debug_flush_files): New.
4863         * m4.h: Declares it.
4864         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
4865         Reported by Nicolas Pioch.
4866
4867 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
4868
4869         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
4870         Reported by Joel Sherrill.
4871
4872         * builtin.c (prefix_all_builtins): Instead of the table size, use
4873         the null entry at end for stopping the loop.  It was overwritten.
4874         Reported by Andreas Schwab and Jim Meyering.
4875
4876         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
4877         Reported by Kaveh R. Ghazi.
4878
4879         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
4880         Reported by Karl Vogel.
4881
4882 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
4883
4884         * m4.h: Do not define volatile if already defined.
4885         Reported by Rene' Seindal.
4886
4887         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
4888
4889         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
4890         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
4891
4892 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
4893
4894         * m4.h: Define strchr and strrchr in terms of index and rindex,
4895         instead of the other way around.
4896         * builtin.c, m4.c, path.c: Use strchr instead of index.
4897
4898         * input.c (next_char): Remove a "break;" after a "return ...;".
4899         Reported by Tom McConnell.
4900 \f
4901 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
4902
4903         * Release 1.1
4904
4905         * configure.in: Do not copy check files in the build hierarchy.
4906         * checks/check-them: Identify the m4 version being checked.  For
4907         finding m4, look in $PATH instead of in the parent directory.
4908         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
4909         * checks/Makefile.in (.all-stamp): Always create check files in
4910         the source hierarchy, not anymore in the build hierarchy.
4911         (check): cd to the source hierarchy before performing checks.
4912         Do not copy nor clean COPYING anymore, take it from `..'.
4913         Reported by Tom McConnell.
4914
4915         * Makefile.in (Makefile): Use $(SHELL).
4916         (config.status): Use $(SHELL).  Use "config.status --recheck"
4917         instead of "configure --no-create", which is obsolete.
4918         Reported by Tom McConnell.
4919
4920 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
4921
4922         * m4.c (usage): Use "%s" instead of "m4" in format string.
4923         Reported by Jim Meyering.
4924
4925         * Makefile.in: Distribute mkinstalldirs.
4926         Reported by Pierre Gaumond.
4927         Reported by Jim Meyering.
4928         Reported by Tom McConnell.
4929         Reported by Andreas Gustafsson.
4930
4931         * checks/check-them: Renamed from checks/check_them.
4932         * checks/get-them: Renamed from checks/get_them.
4933         * checks/.all-stamp: Renamed from checks/.all_stamp.
4934         * checks/Makefile.in: Changed accordingly.
4935         Reported by Jim Meyering.
4936
4937 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
4938
4939         * lib/Makefile.in (dist): Correct permissions on files.
4940
4941         * output.c: Declare tmpfile, some systems don't.
4942
4943 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
4944
4945         * checks/Makefile.in (dist): Correct permissions on files.
4946
4947         * Makefile.in (dist): Ensure recursive linking for subdirectory
4948         `examples', also set read/write permissions on all its files.
4949
4950         * mkinstalldirs: New, from elsewhere.
4951         * Makefile.in: Use it.
4952
4953         * debug.c: Synchronize debug messages and regular output when
4954         the debug file and stdout are redirected to the same file.
4955         * configure.in: Add (commented) checks for fileno and fstat.
4956         Reported by Jim Avera.
4957
4958         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
4959         etc., arguments, then ignore the superfluous one.  m4 used to
4960         diagnose missing arguments and return the empty string.
4961         Reported by Nick S. Kanakakorn.
4962
4963 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
4964
4965         * m4.c (main): At end of all input, ensure all undiverted text
4966         goes to the main output stream.
4967         Reported by Andreas Gustafsson.
4968
4969         * m4.c (main): exit (0), instead of return 0.
4970
4971         * m4.c: Implement -P and --prefix-builtins.
4972         * builtin.c: Delete const specifier on builtin_tab.
4973         (prefix_all_builtins): New.
4974         Reported by Noah Friedman.
4975         Reported by Scott Bartram.
4976
4977         * c-boxes.el: New, from elsewhere.
4978         * Makefile.in: Distribute it.
4979
4980         * m4.h: Do not define bcopy if <string.h> defines it.
4981         Reported by Stephen Perkins.
4982
4983         * builtin.c (define_macro): Allow a missing second argument, in
4984         which case it is implied empty.  Affects define and pushdef.
4985         Reported by Eric Allman.
4986
4987 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
4988
4989         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
4990         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
4991         * builtin.c: Initialize all the blindness fields in builtin_tab.
4992         (define_builtin): Copy the blindness of a builtin into its symbol.
4993         * macro.c (expand_token): Avoid processing a blind builtin if the
4994         next character is not an opening parenthesis.
4995         Reported by David MacKenzie.
4996         Reported by Noah Friedman.
4997
4998         * configure.in: Ensure an exit status of 0 on completion.
4999         Reported by Vivek P. Singhal.
5000
5001         * eval.c (eval_lex): Admit both lower and upper case letters for
5002         bases greater than 10.  Only lower case letters were accepted.
5003
5004         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
5005         Reported by Krste Asanovic.
5006
5007         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
5008         * eval.c (logical_not_term): New name for not_term.
5009         * eval.c (xor_term): New, between or_term and and_term.
5010         * eval.c (not_term): New, between and_term and logical_not_term.
5011         * eval.c (shift_term): New, between cmp_term and add_term.
5012         Reported by Krste Asanovic: ~, ^, <<, >>.
5013         Reported by Ben A. Mesander: ** vs ^.
5014
5015         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
5016         * m4.h: Delete xrealloc.c.
5017         * lib/xmalloc.c: New, from elsewhere.
5018         * lib/xstrdup.c: New, from elsewhere.
5019         * lib/Makefile.in: Distribute and compile them.
5020
5021         * m4.c: Change progname to program_name.
5022         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
5023         * lib/error.c: New, from elsewhere.
5024         * lib/Makefile.in: Distribute and compile error.c.
5025         * configure.in: Check AC_VPRINTF and for strerror.
5026         * m4.c: Delete cmd_error.  Use error instead.
5027         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
5028
5029         * m4.h: Delete #define const, let Autoconf takes care of this.
5030
5031         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
5032         Merge parse_args into main.  Declare argv to be `char *const *',
5033         then remove superfluous casts.
5034
5035         * m4.c: Rename --no-gnu-extensions to --traditional.
5036         Reported by Ben A. Mesander.
5037
5038         * m4.c (usage): Add a status parameter.  Supply one in various
5039         calls.  Add --help processing.  Remove -V for --version.
5040
5041         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
5042
5043         * lib/Makefile.in: Have an AR=ar declaration.
5044         Reported by Eric Backus.
5045         Reported by Bjorn R. Bjornsson.
5046         Reported by Tom Tromey.
5047         Reported by Kristine Lund.
5048         Reported by Marion Hakanson.
5049
5050 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
5051
5052         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
5053         Reported by Noah Friedman.
5054
5055 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
5056
5057         * Makefile.in: Remove MDEFINES and cleanup.
5058
5059 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
5060
5061         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
5062         Create a gzip file.
5063
5064 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
5065
5066         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
5067         ensure 777 mode for directories, so older tar's will restore file
5068         modes properly.
5069
5070 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
5071
5072         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
5073         so the installer can override automatically configured choices.
5074         Reported by Karl Berry.
5075
5076 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
5077
5078         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
5079         previous version was not working properly on m68k-hp-bsd4.3.
5080         Reported by Roland McGrath.
5081
5082         * lib/_doprnt.c: Stolen from Oleo distribution.
5083         * configure.in: Check for _doprnt.c if vfprintf.c selected.
5084         * lib/Makefile.in: Distribute _doprnt.c.
5085         Do not distribute regex.[ch].old anymore.
5086
5087 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
5088
5089         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
5090         Richard wants it there.
5091
5092 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
5093
5094         * Makefile.in: Add DEFS to MDEFINES.
5095         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
5096         (libm4.a): Remove the library before creating it.
5097         (distclean): Remove tags and TAGS too.
5098
5099 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
5100
5101         * Makefile.in (dvi, m4.dvi): New goals.
5102
5103         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
5104         macro.c, output.c, path.c, symtab.c: Change Copyright from
5105         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
5106
5107         * examples/divert.m4: Deleted, this bug has been corrected.
5108
5109         * Makefile.in (texclean, mostlyclean): New goals.
5110
5111         * Makefile.in (clean): Remove clutter from ansi2knr.
5112         Reported by Pierre Gaumond.
5113         Reported by Greg A. Woods.
5114
5115 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
5116
5117         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
5118         might well use CFLAGS is s/he needs it.
5119
5120         * Makefile.in: Allow installation of info files from a separate
5121         build directory.
5122         Reported by Jason Merrill.
5123         Reported by David MacKenzie.
5124         Reported by Skip Montanaro.
5125         Reported by Erez Zadok.
5126         Reported by Assar Westerlund.
5127 \f
5128 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
5129
5130         * Release 1.0.3
5131         This is still a beta release for the future GNU m4 version 1.1.
5132
5133         * lib/alloca.c: New, from elsewhere.
5134         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
5135
5136         * m4.h: Do not define index/rindex if already defined.  If
5137         FALSE/TRUE are already defined, do not redefine them, but merely
5138         define boolean typedef to int.
5139
5140         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
5141         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
5142         because some C compilers do not like connectives with #ifdef.
5143         * m4.h: Define `volatile' only if __GNUC__, instead of once for
5144         __GNUC__ and once for __STDC__.
5145         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
5146
5147         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
5148         Makefile dependencies.  Without it, make keeps destroying and
5149         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
5150
5151         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
5152         to diversion/DIVERSION, this was a spelling error.
5153
5154         * m4.c: Declare version[], remove #include "version.h".
5155         * version.h: Deleted.
5156         * Makefile.in: Remove references to version.h.
5157
5158         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
5159         production, by using a simpler and more robust algorithm.  This
5160         solves the problem of synclines sometimes written in the middle of
5161         an output line.  Delete sync_line() and output_lines variable.
5162         * m4.h: Remove sync_line prototype and output_lines declaration.
5163         * input.c (next_char), output.c (shipout_text): Remove references
5164         to output_lines.
5165         * input.c (push_file, pop_file): Merely put the value -1 in
5166         output_current_line instead of calling sync_line, for delaying a
5167         single `#line NUM FILE' before next output line.  Do not test
5168         for sync_output, because this is unnecessary clutter.
5169         * output.c (make_divertion, insert_divertion): Idem.
5170         * input.c: Rename must_advance_line to start_of_input_line, for
5171         consistency.
5172
5173         * debug.c (trace_header): Select a new debug line format, which
5174         better complies with GNU standards for formatting error messages.
5175         With option `-dfl', M-x next-error might be used on the output.
5176         * m4.c (vmesg): Adjust format of error output to GNU standards.
5177         * m4.texinfo: Adjust examples for `make check' to work.
5178
5179         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
5180         case for enum debug_info constants, which were all lower case.
5181
5182         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
5183         re_search_2.
5184         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
5185         collected patches.  I tried a few times using newer regex.[ch], it
5186         mysteriously stopped aborting with this one.  Insecure feeling...
5187         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
5188
5189 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
5190
5191         * m4.c: Change `--no-warnings' to `--silent'.
5192         Reported by David MacKenzie.
5193
5194         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
5195         leave it off for now.  See comment in m4.c for justification.
5196         Reported by David MacKenzie.
5197
5198         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
5199         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
5200
5201         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
5202
5203         * Makefile.in: Ensure recursive cleaning is done before local
5204         cleaning for all clean goals.
5205
5206         * builtin.c (ntoa): Ensure the value is always interpreted as a
5207         signed quantity, whatever the radix is.
5208
5209 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
5210
5211         * builtin.c, format.c, input.c: Split long lines.
5212         * m4.c: Use typedef macro_definition instead of struct
5213         macro_definition.
5214         * symtab.c: Use typedef symbol instead of struct symbol.
5215
5216 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
5217
5218         * *.[ch]: Remove all trailing whitespace, in code and comments.
5219
5220         * configure.in: Find some awk.
5221         * Makefile.in: Add $(AWK) to MDEFINES.
5222         * checks/Makefile.in: Transmit $(AWK) to get_them.
5223         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
5224         awk script when switching files, because without this, mawk runs
5225         out of file descriptors.
5226
5227 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
5228
5229         * Makefile.in (realclean): Delete m4.info*.
5230         Reported by Jim Meyering.
5231
5232         * Makefile.in: Adjust and link with checks/Makefile.
5233         * checks/Makefile.in: New.
5234         * configure.in: Output checks/Makefile.
5235
5236         * checks/get_them: Have the dnl header of each test more
5237         recognizable by next-error, also use a better message.
5238
5239 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
5240
5241         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
5242         And use that only if __GNUC__ since we're using it's GCC-specific
5243         semantics that tell the compiler the associated function doesn't
5244         return.
5245
5246         * builtin.c (substitute): Don't use character as an array index.
5247         (dumpdef_cmp): Make formal arguments `const void *' to avoid
5248         warnings with gcc -W -Wall on systems with qsort prototype.
5249         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
5250         from gcc -W -Wall.
5251
5252         * eval.c (most functions): Add parentheses to assignments used
5253         as truth values go avoid warnings from gcc -Wall.
5254
5255         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
5256         any functions that don't need external scope.
5257
5258         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
5259         (many functions and arrays): Declare `const'.
5260
5261 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
5262
5263         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
5264         removing the declaration from m4.h.  Also rename false to FALSE
5265         and true to TRUE.
5266
5267         * lib/Makefile.in (Makefile): New goal.
5268
5269         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
5270         so heavily loaded.  It gets more easily overridable, calling make.
5271         Reported by Jim Meyering.
5272
5273         * Makefile.in (dist): Get .fname from the current directory name,
5274         instead of from version.h.  I need updating many files manually,
5275         when the version changes, version.h is just one of them.
5276
5277 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
5278
5279         * m4.h: Remove the tag `boolean' on the enum introducing typedef
5280         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
5281         Reported by Tom McConnell.
5282
5283 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
5284
5285         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
5286         39.cleardiv, which were describing missing or spurious newlines.
5287         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
5288         do not depend on machine word size, `/bin/false' implementation,
5289         or `wc' output format.  `make check' is more dependable, now.
5290
5291         * checks/check_them: Summarize the failed tests by listing their
5292         name, at end.  If none, issue `All checks successful'.  Output
5293         `Checking' instead of `Input file:'.
5294
5295         * checks/get_them, checks/check_them: Reindented.
5296
5297         * Makefile.in (dist): chmod a+r before making the tar file.
5298
5299 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
5300
5301         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
5302
5303         * input.c (next_token): Reinitialize token_buttom just after using
5304         it as a watermark with obstack_free.  Or else, a future token, big
5305         enough for triggering reallocation of the obstack chunk, could
5306         void the initialized value of token_buttom, later causing panic in
5307         obstack_free.  Rename token_buttom to token_bottom everywhere.
5308
5309         * m4.h: Before declaring errno, first include <errno.h> and
5310         ensure that it does not define errno.
5311         Reported by Richard Stallman.
5312
5313 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
5314
5315         * builtin.c: Define and use DECLARE macro for builtins.
5316
5317         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
5318         argument, this is a common idiom for introducing long comments.
5319
5320         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
5321         arguments.  The last argument was silently ignored.
5322
5323         * m4.c (cmd_error): Add a missing semicolon before va_end().
5324
5325 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
5326
5327         * Makefile.in: Now handle protoized sources.  Define and use U.
5328         Compile and use ansi2knr with old compilers.  Update DISTFILES.
5329         Add `aclocal.m4' to `configure' dependencies.
5330         * ansi2knr.c: New, from Ghostscript distribution.
5331         * configure.in: Define U through FP_PROTOTYPES for old compilers.
5332         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
5333         * aclocal.m4: New, provide FP_PROTOTYPES.
5334         * m4.h: Conditionnaly protoized through Args, save for varags.
5335         * builtin.c: Protoized.  Then:
5336         Include <sys/types.h> if size_t is not defined, before "regex.h".
5337         (m4_ifelse): Fetch built-in name properly for diagnostic.
5338         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
5339         (m4_regexp): Add const to `msg' declaration.
5340         (m4_patsubst): Add const to `msg' declaration.
5341         * debug.c: Protoized, save for varargs.
5342         * eval.c: Protoized.
5343         * format.c: Protoized.
5344         * input.c: Protoized.
5345         * m4.c: Protoized, save for varargs.  Then:
5346         (xfree): Accept void * instead of char *.
5347         (xmalloc): Return void * instead of char *.
5348         (xrealloc): Accept and return void * instead of char *.
5349         * macro.c: Protoized.
5350         * output.c: Protoized.
5351         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
5352         * symtab.c: Protoized.
5353
5354 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
5355
5356         * m4.texinfo: Remove directory from diagnostics in 30.include,
5357         51.eval, 56.errprint and 57.m4exit tests.
5358
5359         * m4.h: Remove declarations for int or void system functions, they
5360         cause more conflicting trouble than they make good.
5361
5362         * configure.in: Avoid configuration header file.  Add some tests.
5363         * m4.h: Remove #include "config.h".
5364         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
5365         Then, rewritten for better compliance with GNU standards.
5366
5367 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
5368
5369         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
5370         because of a misplaced #endif.
5371
5372         * Many *.[hc] files: Correct intra-line spacing here and there,
5373         according to GNU indent 1.6 advice.
5374
5375         * configure.in: New, using Autoconf 1.2.
5376         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
5377         * Delete old configure.in, configure, etc/configure.in,
5378         etc/configure, lib/configure.in, lib/configure and config/*.
5379         Reported by Jason Merrill.
5380
5381         * symtab.c (hash): Change (char) NULL to '\0'.
5382         Reported by Jason Merrill.
5383
5384         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
5385         etc/nextvers.sh.  Release numbers will be edited `by hand'.
5386         * version.h: De-automatize, force value in.
5387
5388         * m4.c: Changes in order to use a newer getopt.h.
5389         Reported by David MacKenzie.
5390
5391         * checks/: New name for examples/.
5392         * checks/get_them: New location for etc/get_examples.
5393         * checks/check_them: New location for etc/check_examples.
5394         * Makefile.in, checks/get_them, checks/check_them: Adjust.
5395         * lib/vfprintf.c: New location for etc/vfprintf.c.
5396         * Delete empty etc/.
5397         * examples/: New name for test/.
5398
5399 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
5400
5401         * Makefile.in (check): Add m4 as dependency.
5402
5403         * m4.c: Accept --no-warnings instead of --no_warnings, and
5404         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
5405         usage message more informative.
5406         Reported by David MacKenzie.
5407
5408 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
5409
5410         * etc/check_examples: New name for check_examples.sh.
5411         * etc/get_examples: New name for get_examples.sh.
5412         * Makefile.in, etc/Makefile.in: Use new names.
5413
5414         * Makefile.in: Transmit $(CC) while making in lib.
5415
5416         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
5417         code disposition by hand.
5418
5419 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
5420
5421         * m4.h: Delete definitions for abort() and exit().
5422         Reported by Richard Stallman.
5423
5424         * config/hmake-unicos, config/s-unicos.h: New files.
5425         Reported by Hal Peterson.
5426
5427         * eval.c (exp_term): Have N^0 return 1.
5428         Reported by Michael Fetterman.
5429
5430         * eval.c, input.c, m4.h: Remove last comma in enums.
5431         Reported by Mike Lijewski.
5432
5433         * Transfer of maintenance duties from Rene' to Franc,ois.
5434 \f
5435 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
5436
5437         * Release 1.0.  Many thanks to those, who provided me with bug
5438         reports and feedback.
5439
5440         * Uses GNU configure, taken from the gdb distribution.
5441
5442         * Uses GNU getopt(), with long option names.
5443
5444         * The -Q/+quiet option is added, which suppresses warnings about
5445         missing or superflous arguments to built-in macros.
5446
5447         * Added default options via the M4OPTS environment variable.
5448
5449         * The built-in format can now be configured to use sprintf as
5450         the formatting engine, for systems without [efg]cvt(3).
5451
5452         * GNU library code is moved to the ./lib subdirectory; other
5453         utility files are now in ./etc.
5454
5455         * Several minor bugs have been fixed.
5456 \f
5457 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
5458
5459         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
5460         Francois Pinard and Roland H. Pesch for providing me with reports.
5461
5462         * The builtins incr and decr are now implemented without use of
5463         eval.
5464
5465         * The builtin indir is added, to allow for indirect macro calls
5466         (allows use of "illegal" macro names).
5467
5468         * The debugging and tracing facilities has been enhanced
5469         considerably.  See the manual for details.
5470
5471         * The -tMACRO option is added, marks MACRO for tracing as soon
5472         as it is defined.
5473
5474         * Builtins are traced after renaming iff they were before.
5475
5476         * Named files can now be undiverted.
5477
5478         * The -Nnum option can be used to increase the number of
5479         divertions available.
5480
5481         * Calling changecom without arguments now disables all comment
5482         handling.
5483
5484         * The function m4_patsubst() is now consistently declared
5485         static.
5486
5487         * A bug in dnl is fixed.
5488
5489         * A bug in the multi-character quoting code is fixed.
5490
5491         * Several typos in the manual has been corrected.  More probably
5492         persist.
5493
5494         * The m4.info file is now installed along with the program.
5495 \f
5496 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
5497
5498         * Updated and enhanced version.  Release 0.75, manual 0.07.
5499
5500         * Implemented search path for include files (-I option and
5501         M4PATH envronment variable).
5502
5503         * Implemented builtin "format" for printf-like formatting.
5504
5505         * Implemented builtin "regexp" for searching for regular
5506         expressions.
5507
5508         * Implemented builtin "patsubst" for substitution with regular
5509         expressions.
5510
5511         * Implemented builtin "esyscmd", which expands to a shell
5512         commands output.
5513
5514         * Implemented "__file__" and "__line__" for use in error
5515         messages.
5516
5517         * Implemented character ranges in "translit".
5518
5519         * Implemented control over debugging output.
5520
5521         * Implemented multi-character quotes.
5522
5523         * Implemented multi-character comment delimiters.
5524
5525         * Changed predefined macro "gnu" to "__gnu__".
5526
5527         * Changed predefined macro "unix" to "__unix__", when the -G
5528         option is not used.  With -G, "unix" is still defined.
5529
5530         * Changed "shift", "$@" and "$*" to not insert spaces afters
5531         commas.
5532
5533         * Added program name to error messages.
5534
5535         * Fixed two missing null bytes bugs.
5536 \f
5537 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
5538
5539         * Initial beta release.  Release 0.50, manual 0.05.
5540
5541         -----
5542
5543         Local Variables:
5544         coding: utf-8
5545         End:
5546
5547         Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2013 Free
5548         Software Foundation, Inc.
5549
5550         Copying and distribution of this file, with or without
5551         modification, are permitted provided the copyright notice
5552         and this notice are preserved.