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