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