1 2011-03-01 Eric Blake <eblake@redhat.com>
3 Release Version 1.4.16.
4 * gnulib: Update to latest.
5 * NEWS: Mention the release.
6 * src/builtin.c (m4_defn): Silence spurious -Wstrict-overflow
7 warnings from gcc 4.5.1 at -O2.
9 2011-02-28 Eric Blake <eblake@redhat.com>
11 index: fix typo in previous commit
12 * doc/m4.texinfo (Index macro): Actually expose the bug.
14 2011-02-26 Eric Blake <eblake@redhat.com>
16 index: fix another regression from faulty strstr
17 * gnulib: Update to latest, for strstr fix.
18 * doc/m4.texinfo (Index macro): Test for the bug.
19 * NEWS: Document the fix.
21 Reported by Mike Stump, with additional analysis from Ralf
22 Wildenhues and Jim Meyering.
24 2011-02-07 Eric Blake <eblake@redhat.com>
26 maint: speed up configure, using latest gnulib
27 * gnulib: Update to latest.
28 * m4/gnulib-cache.m4: Import fclose and rename modules.
29 * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Speed up normal
30 configure runs (and document how to rerun GNULIB_POSIXCHECK).
31 * HACKING: Document GNULIB_POSIXCHECK.
33 maint: update http git cloning instructions
34 * HACKING: Git http doesn't like the redirect at git.sv.gnu.org.
36 Reported by Mike Dupont.
38 2011-02-01 Eric Blake <eblake@redhat.com>
40 maint: update to latest gnulib
41 * gnulib: Update to latest.
42 * m4/gnulib-cache.m4: Regenerate.
43 * src/builtin.c (m4_ifelse): Use STREQ.
45 2011-01-25 Eric Blake <eblake@redhat.com>
47 maint: reflect recent copyright assignments
50 2011-01-03 Eric Blake <eblake@redhat.com>
52 maint: update copyright year
53 * gnulib: Update to latest.
54 * m4/gnulib-cache.m4: Regenerate.
55 * all other files: Run 'make update-copyright'.
57 maint: document use of copyright ranges
58 * README: Copy coreutils wording for allowing copyright year
59 ranges. Also mention libsigsegv 2.9.
60 * cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding
61 Standards permit it, prefer shorthand copyright.
62 * HACKING: Update libsigsegv preference.
63 * NEWS: 1.4.16 will be in 2011.
64 * doc/m4.texinfo (History): Likewise.
66 2010-12-31 Eric Blake <eblake@redhat.com>
68 main: avoid leaking string on Haiku
69 * src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV.
71 Reported by Scott McCreary.
73 2010-12-24 Eric Blake <eblake@redhat.com>
75 build: pull in various gnulib fixes
76 * gnulib: Update to latest.
77 * m4/gnulib-cache.m4: Reflect spawn-pipe module name change.
78 * src/builtin.c (includes): Likewise.
79 (define_user_macro): Alter comment to appease syntax-check.
80 * src/input.c (pop_wrapup): Likewise.
81 * src/output.c (undivert_all): Likewise.
82 * cfg.mk (local-checks-to-skip): Skip new rule.
84 maint: reflect recent copyright assignment
85 * AUTHORS: Add Raphael Poss.
87 2010-10-21 Eric Blake <eblake@redhat.com>
89 build: work around glibc and libsigsegv bugs
90 * gnulib: Update to latest.
91 * m4/gnulib-cache.m4: Regenerate.
92 * docs/m4.texinfo (Index macro): Expose strstr bug.
93 * NEWS: Mention fixes.
95 docs: mention more history
96 * doc/m4.texinfo (History): Add upcoming 1.4.16 release.
98 2010-08-31 Eric Blake <eblake@redhat.com>
100 Release Version 1.4.15.
101 * gnulib: Update to latest.
102 * NEWS: Mention the release.
104 2010-08-30 Eric Blake <eblake@redhat.com>
106 Clean up compiler warnings.
107 * src/builtin.c (m4_patsubst): Drop dead store.
108 * src/eval.c (unary_term): Likewise.
109 * src/input.c (match_input): Likewise. Also drop useless casts to
111 * src/symtab.c (symtab_debug): Drop useless casts.
113 Test previous commit.
114 * doc/m4.texinfo (Format): Add a test.
115 * NEWS: Document the fix.
118 2010-08-30 Carlo Teubner <carlo.teubner@gmail.com> (tiny change)
120 Avoid a crash with bad format string.
121 * src/format.c (expand_format): Fix off-by-one error.
123 2010-08-30 Eric Blake <eblake@redhat.com>
125 Document recent bug fixes.
126 * NEWS: Add some entries.
127 * gnulib: Update to latest, for more AIX fixes.
129 2010-07-30 Eric Blake <eblake@redhat.com>
131 Update to newer gnulib.
132 * gnulib: Update to latest, for strtod fix.
133 * src/Makefile.am (m4_LDADD): Update link libraries accordingly.
134 * cfg.mk (local-checks-to-skip): Skip broken check.
135 * doc/m4.texinfo: Drop all use of @acronym{}.
137 Reported by Rainer Tammer.
139 2010-06-04 Eric Blake <eblake@redhat.com>
141 Reflect recent copyright assignment.
142 * AUTHORS: Add David Warme.
144 Update to newer gnulib.
145 * gnulib: Update to latest, and include C++ tests.
146 * configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
148 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
150 * m4/gnulib-cache.m4: Regenerate.
151 * build-aux/.cvsignore: Likewise.
152 * build-aux/.gitignore: Likewise.
154 Fix build on newer glibc.
155 * src/m4.h (includes): Add <sys/stat.h>.
157 Reported by Todd Rinaldo.
159 2010-03-02 Giuseppe Scrivano <gscrivano@gnu.org> (tiny change)
161 Support bootstrap --gnulib-srcdir=DIR.
162 * bootstrap: Add --gnulib-srcdir option, which overrides
163 GNULIB_SRCDIR, for consistency with gnulib bootstrap.
165 2010-02-24 Eric Blake <eblake@redhat.com>
167 Release Version 1.4.14.
168 * gnulib: Update to latest.
169 * README: Increase libsigsegv recommendation.
170 * HACKING: Likewise. Tweak release instructions.
171 * NEWS: Mention the release.
173 Improve parsing example.
174 * doc/m4.texinfo (Input processing): Double-quote argument to
175 translit, for robustness.
177 Reported by Chris Penev.
179 2010-01-29 Eric Blake <ebb9@byu.net>
181 Document upcoming release.
182 * gnulib: Update to latest.
183 * doc/m4.texinfo (History): Mention 1.4.14.
185 2010-01-06 Eric Blake <ebb9@byu.net>
187 Use correct license on auxiliary documentation.
188 * gnulib: Update to latest.
189 * AUTHORS: Use GFDL 1.3, not 1.2.
194 * NEWS: Place under GFDL.
195 * cfg.mk (old_NEWS_hash): Update.
197 2010-01-05 Eric Blake <ebb9@byu.net>
199 Remove more TAB characters.
200 * THANKS: Use space for alignment.
201 * bootstrap: Likewise.
202 * checks/stackovf.test: Likewise.
203 * configure.ac: Likewise.
204 * src/builtin.c: Likewise. Also update some stale comments.
205 * src/debug.c: Likewise.
206 * src/eval.c: Likewise.
207 * src/format.c: Likewise.
208 * src/freeze.c: Likewise.
209 * src/input.c: Likewise.
210 * src/m4.c: Likewise.
211 * src/m4.h: Likewise.
212 * src/macro.c: Likewise.
213 * src/output.c: Likewise.
214 * src/path.c: Likewise.
215 * src/symtab.c: Likewise.
217 Clarify minimum bootstrap requirements.
218 * bootstrap: Avoid out-of-date duplicated data.
220 Security fix by requiring newer automake features.
221 * configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
222 parallel-tests, and silent-rules.
223 (AC_PREREQ): Bump autoconf requirement to 2.62, per automake.
224 * HACKING: Update minimum requirements.
225 * NEWS: Document the fix.
227 Drop hard-coding of GPG id.
228 * gnulib: Update to latest.
229 * m4/gnulib-cache.m4: Regenerate.
230 * cfg.mk (gpg_key_ID): Delete, now that maint.mk provides a
232 (update-copyright-env): Don't let environment interfere with wrap
235 2010-01-01 Eric Blake <ebb9@byu.net>
237 Update copyright year.
238 All files impacted, via 'make update-copyright'. Additionally:
239 * .gitignore: Ignore backup files.
241 2009-12-29 Eric Blake <ebb9@byu.net>
243 Document new indentation policy.
244 * HACKING: Document indentation policy.
245 * .x-sc_prohibit_tab_based_indentation: New file.
246 * cfg.mk (sc_prohibit_tab_based_indentation): New rule.
247 * Makefile.am (syntax_check_exceptions): New macro.
248 (EXTRA_DIST): Distribute exception files, and .prev-version.
250 Switch to indentation by space, not tab.
251 * .gitmodules: Convert leading tabs to spaces.
253 * bootstrap: Likewise.
254 * c-boxes.el: Likewise.
255 * checks/check-them: Likewise.
256 * checks/get-them: Likewise.
257 * checks/stackovf.test: Likewise.
258 * configure.ac: Likewise.
259 * src/builtin.c: Likewise.
260 * src/debug.c: Likewise.
261 * src/eval.c: Likewise.
262 * src/format.c: Likewise.
263 * src/freeze.c: Likewise.
264 * src/input.c: Likewise.
265 * src/m4.c: Likewise.
266 * src/m4.h: Likewise.
267 * src/macro.c: Likewise.
268 * src/output.c: Likewise.
269 * src/path.c: Likewise.
270 * src/symtab.c: Likewise.
272 Update to latest gnulib.
274 * m4/gnulib-cache.m4: Import xoset.
275 * src/output.c (includes): Ensure that gnulib oset usage will
276 call xalloc_die on memory failure.
277 * build-aux/.cvsignore: Regenerate.
278 * build-aux/.gitignore: Likewise.
280 2009-11-28 Eric Blake <ebb9@byu.net>
282 Work around BSD getopt bug.
284 * doc/m4.texinfo (Command line files): Add test.
286 Use fastmap for better regex performance.
287 * src/input.c (word_start): Delete.
288 (pop_wrapup): Free memory on exit.
289 (set_word_regexp): Compile a fastmap instead.
290 (peek_token, next_token): Use the fastmap.
292 2009-11-26 Eric Blake <ebb9@byu.net>
294 Ignore write failures before stack overflow exit.
295 * m4/gnulib-cache.m4: Import ignore-value module.
296 * src/m4.c (fault_handler): Use it to avoid compiler warning.
298 2009-11-25 Eric Blake <ebb9@byu.net>
300 Allow use of compiler warnings.
301 * m4/gnulib-cache.m4: Import manywarnings module.
302 * configure.ac (WERROR_CFLAGS, WARN_CFLAGS): New variables.
303 * src/Makefile.am (AM_CFLAGS): Use them.
304 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Turn on warnings during
306 * src/m4.h (M4_GNUC_NORETURN): New macro.
307 (trace_post): Delete unused parameter.
308 * src/m4.c (usage): Mark as noreturn.
309 (main): Remove unused parameter.
310 * src/debug.c (trace_post): Likewise.
311 (trace_pre): Cover all enum values.
312 * src/symtab.c (lookup_symbol): Likewise.
313 * src/builtin.c (define_macro, m4_dumpdef): Likewise.
314 (m4_define, m4_undefine, m4_pushdef, m4_popdef, m4_sysval)
315 (m4_divert, m4_undivert, m4_dnl, m4_changequote, m4_changecom)
316 (m4_changeword, m4_syscmd, m4_include, m4_sinclude, m4_m4exit)
317 (m4_debugmode, m4_debugfile, m4_placeholder): Mark unused
319 (mkstemp_helper): Use parameter.
320 (substitute): Avoid signed vs. unsigned comparison.
321 * src/format.c (arg_int, arg_long, arg_double): Likewise.
322 * src/input.c (next_token): Likewise.
323 * src/output.c (freeze_diversions): Likewise.
324 (m4_tmpname): Allow C++ compilation.
325 * src/freeze.c (produce_frozen_state, GET_NUMBER): Use correct
327 * src/macro.c (call_macro): Cover all enum values.
328 (expand_macro): Update caller.
329 * src/path.c (m4_fopen): Remove unused parameter.
330 (m4_path_search): Update caller.
332 Silence syntax-check warnings.
333 * src/m4.h (STREQ): New macro.
334 * src/builtin.c (find_builtin_by_name): Use it.
335 * src/input.c (set_word_regexp): Likewise.
336 * src/m4.c (process_file): Likewise.
337 (main): Consistently spell warning, and mark output strings.
338 Avoid unsafe parsing functions.
339 (process_file): Mark output strings.
340 * src/output.c (make_diversion): Likewise.
341 * src/format.c (arg_int, arg_long, arg_double): New helpers.
342 (ARG_INT, ARG_LONG, ARG_DOUBLE): Use them to detect parse errors.
343 * BACKLOG: Avoid whitespace problems.
346 * examples/esyscmd.m4: Likewise.
347 * examples/file.m4: Likewise.
348 * examples/fstab.m4: Likewise.
349 * examples/patsubst.m4: Likewise.
351 Use gnulib maintainer-makefile module.
352 * m4/gnulib-cache.m4: Import maintainer-makefile module.
353 * cfg.mk (local-checks-to-skip): Drop changelog-check; add
354 sc_cast_of_x_alloc_return_value.
355 (gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
357 (config_h_header, old_NEWS_hash): New macros.
358 * .prev-version: New file.
359 * maint.mk: Remove from version control; use gnulib instead.
360 * .gitignore: Update.
365 * m4/gnulib-cache.m4: Use --makefile-name.
366 * lib/Makefile.am: Wrap the gnulib-generated file.
367 * tests/Makefile.am: Likewise.
368 * .gitignore: Track our wrappers.
369 * doc/m4.texinfo (Improved capitalize): Fix typo.
371 2009-10-05 Eric Blake <ebb9@byu.net>
375 * m4/gnulib-cache.m4: Import gnu-web-doc-update module.
376 * build-aux/.gitignore: Ignore new file.
377 * build-aux/.cvsignore: Likewise.
379 2009-08-20 Eric Blake <ebb9@byu.net>
383 * AUTHORS: Mention recent copyright assignment.
385 2009-08-17 Eric Blake <ebb9@byu.net>
387 Enhance test with closed descriptors.
388 * doc/m4.texinfo (Command line files): Enhance test from
389 2009-07-20 to actually test the bug being fixed.
391 Update copyright year.
392 * AUTHORS: Run UPDATE_COPYRIGHT_FORCE=1 make update-copyright.
394 * Makefile.am: Likewise.
396 * acinclude.m4: Likewise.
397 * c-boxes.el: Likewise.
399 * checks/Makefile.in: Likewise.
400 * checks/check-them: Likewise.
401 * checks/stackovf.test: Likewise.
402 * doc/Makefile.am: Likewise.
403 * examples/Makefile.am: Likewise.
404 * src/Makefile.am: Likewise.
405 * src/debug.c: Likewise.
406 * src/eval.c: Likewise.
407 * src/freeze.c: Likewise.
408 * src/m4.h: Likewise.
409 * src/macro.c: Likewise.
410 * src/path.c: Likewise.
411 * src/symtab.c: Likewise.
413 Prepare to bulk update copyright year.
415 * m4/gnulib-cache.m4: Import update-copyright and vc-list-files
417 * maint.mk: Fix copyright.
418 (build_aux, VC_LIST, VC_LIST_EXCEPT, update-copyright): New macros
419 and rules borrowed from gnulib.
420 * cfg.mk (update-copyright-env): Enforce longhand behavior.
421 * .cvsignore: Reflect these changes.
422 * .gitignore: Likewise.
423 * .x-update-copyright: New file.
425 2009-08-14 Eric Blake <ebb9@byu.net>
427 Explicitly request GNU getopt extensions.
429 * m4/gnulib-cache.m4: Use getopt-gnu, not obsolete getopt module.
431 2009-07-22 Eric Blake <ebb9@byu.net>
433 Fix testsuite on Solaris.
434 * doc/m4.texinfo (Command line files): Tolerate different spelling
436 * src/builtin.c (m4_esyscmd): Clear errno before reaping.
438 2009-07-21 Eric Blake <ebb9@byu.net>
440 Fix testsuite on mingw.
443 2009-07-20 Eric Blake <ebb9@byu.net>
445 Pick up gnulib fixes for sub-process execution.
447 * doc/m4.texinfo (Command line files): Add test; regression
448 introduced 2009-03-05.
449 * NEWS: Document the change.
451 Avoid cygwin 1.7 crash with closed stdout.
453 * doc/m4.texinfo (Command line files): Add test; regression
454 introduced 2008-07-17.
455 * NEWS: Document the change.
457 A status of 127 does not always imply esyscmd failure.
458 * src/builtin.c (m4_esyscmd): Silence gnulib message; regression
459 introduced 2009-03-05.
460 * doc/m4.texinfo (Sysval): Test this.
461 * NEWS: Document the change.
463 2009-06-25 Eric Blake <ebb9@byu.net>
465 Fix description of limits on diversions.
466 * doc/m4.texinfo (Diversions): Fix grammar. Be less pessimistic
469 Reported by Elias Benali.
471 2009-06-17 Eric Blake <ebb9@byu.net>
473 Update to latest gnulib.
474 * gnulib: Import fixes for Interix compilation.
476 Reported by Jay Krell.
478 2009-05-22 Eric Blake <ebb9@byu.net>
480 Update to latest gnulib.
481 * gnulib: Import fixes for AIX compilation.
483 Reported by Jens Rehsack.
485 2009-04-13 Eric Blake <ebb9@byu.net>
488 * doc/m4.texinfo (copying): Complete transition to GFDL 1.3,
490 Reported by Santiago Vila.
492 2009-04-01 Eric Blake <ebb9@byu.net>
494 Release Version 1.4.13.
495 * NEWS: Mention the release.
497 2009-03-31 Eric Blake <ebb9@byu.net>
499 Tweak submodule instructions.
500 * HACKING: Improve directions.
501 * gnulib: Update to latest version.
503 2009-03-23 Eric Blake <ebb9@byu.net>
505 Don't force file overwrites during bootstrap.
506 * bootstrap: Ensure that rerunning bootstrap doesn't alter tree.
508 Drop dist-lzma, now that xz replaces lzma.
509 * configure.ac (AM_INIT_AUTOMAKE): Drop dist-lzma. Until a stable
510 automake release includes dist-xz, the release process will just
511 manually create a .xz tarball.
512 * gnulib: Update to latest gnulib.
514 2009-03-19 Eric Blake <ebb9@byu.net>
516 Exploit git submodule by adding appropriate symlinks.
517 * bootstrap: No longer copy files from gnulib.
518 * COPYING: Change to symlink pointing into gnulib.
520 * build-aux/compile: Likewise.
521 * build-aux/config.guess: Likewise.
522 * build-aux/config.sub: Likewise.
523 * build-aux/depcomp: Likewise.
524 * build-aux/install-sh: Likewise.
525 * build-aux/mdate-sh: Likewise.
526 * build-aux/missing: Likewise.
527 * build-aux/texinfo.tex: Likewise.
528 * .cvsignore: Reflect these changes.
529 * .gitignore: Likewise.
530 * build-aux/.cvsignore: New file.
531 * build-aux/.gitignore: Likewise.
533 2009-03-18 Eric Blake <ebb9@byu.net>
535 Make gnulib a git submodule.
536 * .gitmodules: New file.
537 * gnulib: Record which version of gnulib has been tested.
538 * bootstrap: Aid in submodule usage.
539 * cfg.mk (gnulib_dir): Alter default location of gnulib.
540 * HACKING: Mention how to use submodule.
542 Use latest compile script, even with stable automake.
543 * bootstrap: Also sync build-aux/compile.
545 2009-03-12 Eric Blake <ebb9@byu.net>
547 Fix awk script portability.
548 * checks/get-them: In gsub, properly escape {. Close all files
550 Reported by Gary V. Vaughan.
552 2009-03-05 Eric Blake <ebb9@byu.net>
554 Allow configuration choice in syscmd shell.
555 * configure.ac (SYSCMD_SHELL): New test.
556 * src/builtin.c (m4_syscmd, m4_esyscmd): Use it to avoid
557 hard-coding the shell location.
558 * doc/m4.texinfo (Syscmd, Esyscmd): Document this.
559 * README: Document new configure option.
562 Remove cruft now that gnulib modules do the work.
563 * configure.ac (M4_cv_func_system_consistent): Delete.
564 * src/builtin.c (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS):
567 Use gnulib pipe module instead of popen(3).
568 * m4/gnulib-cache.m4: Import pipe and wait-process modules.
569 * src/builtin.c (m4_esyscmd): Rewrite with pipe module.
570 Resolves a failure on AIX, reported by Gary V. Vaughan.
572 Use gnulib execute module instead of system(3).
573 * m4/gnulib-cache.m4: Import execute module.
574 * src/builtin.c (m4_sysval): Move computation...
575 (m4_esyscmd): ...into caller.
576 (m4_syscmd): Rewrite with execute module.
577 Resolves a failure on AIX, reported by Gary V. Vaughan.
579 2009-03-03 Eric Blake <ebb9@byu.net>
581 Try to tolerate spaces in directory names in testsuite.
582 * doc/m4.texinfo (Diversions, Using frozen files): Provide shell
583 quoting, in case __program__ contains spaces.
585 Improve web-manual maintainer rule.
586 * maint.mk (web-manual): Work with VPATH builds. Factor
587 package-specific detail...
588 * cfg.mk (manual_title): ...to new variable.
590 2009-02-26 Eric Blake <ebb9@byu.net>
592 Make bootstrap easier on Solaris.
593 * bootstrap: Add GNULIB_SRCDIR. Useful when a wrapper script
594 gnulib-tool exists earlier on the path to work around /bin/sh
595 failure in parsing $GNULIB_SRCDIR/gnulib-tool.
597 2009-02-19 Eric Blake <ebb9@byu.net>
599 Fix regression in translit.
600 * src/builtin.c (m4_translit): Use correct comparison.
601 * doc/m4.texinfo (Translit): Enhance test.
603 Speed up input engine, by searching for quotes by buffer.
604 * src/input.c (struct input_block): Add end pointer to string.
605 (push_string_finish, push_wrapup): Populate it.
606 (next_token): For quotes, attempt a buffer search.
607 * NEWS: Document this.
609 2009-02-18 Eric Blake <ebb9@byu.net>
611 Speed up translit when from argument is short.
612 * m4/gnulib-cache.m4: Import memchr2 module.
613 * src/builtin.c (m4_translit): Use memchr2 when possible.
614 * doc/m4.texinfo (Translit): Add tests.
615 * NEWS: Document this.
617 Update copyright year.
618 * THANKS: Mention 2009 in copyright year.
620 Prefer buffer over byte operations.
621 * src/format.c (expand_format): Use strchr for speed.
622 * src/builtin.c (substitute, expand_user_macro): Likewise.
624 Speed up esyscmd with buffer reads.
625 * src/builtin.c (m4_esyscmd): Read blocks directly into obstack,
626 rather than repeatedly reading bytes. Detect read errors.
628 Avoid risk of stack overflow.
629 * src/output.c (insert_file): Avoid stack allocation of large
631 (freeze_diversions): Avoid spurious semicolon.
633 2009-02-16 Eric Blake <ebb9@byu.net>
635 Avoid test failure due to different errno.
636 * doc/m4.texinfo (Using frozen files): Ignore stdout, since
637 hardened systems can prevent attempts to read /.
639 Reported by Ronny Peine, in Gentoo bug 259184.
641 Avoid tests that make no sense, because m4 is single-threaded.
642 * m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
644 2009-02-12 Eric Blake <ebb9@byu.net>
646 Avoid quadratic code when walking definition stack.
647 * examples/stack_sep.m4: Use linear, not quadratic
649 * doc/m4.texinfo (Improved copy): Fix documentation and add test,
650 based on recent autoconf bug fix.
652 2009-01-24 Eric Blake <ebb9@byu.net>
654 Add URLs to --help output.
655 * src/m4.c (usage): Use enhanced version-etc features.
657 2009-01-02 Eric Blake <ebb9@byu.net>
659 Use nicer email address in web manual.
660 * maint.mk (web-manual): Use new option in gendocs.sh.
662 Nuke xdelta diffs at release time; no one reported using them.
663 * maint.mk (got-xdelta, delta-xdelta): Delete.
666 2009-01-01 Eric Blake <ebb9@byu.net>
668 Update copyright year.
669 * NEWS: M4 1.4.13 will occur in 2009.
670 * doc/m4.texinfo (History): Likewise.
672 2008-12-24 Eric Blake <ebb9@byu.net>
674 Prepare for eventual release.
675 * doc/m4.texinfo (History): Mention 1.4.13.
677 2008-12-22 Eric Blake <ebb9@byu.net>
679 Make --debugfile argument optional.
680 * src/builtin.c (m4_debugfile): Make error message consistent.
681 * src/m4.c (long_options): Make the argument optional, to allow
682 setting debug file back to stderr.
683 (main): Make --debugfile order-dependent.
684 (usage): Document this.
685 * doc/m4.texinfo (Debugging options): Likewise.
689 * doc/m4.texinfo (Operation modes, Preprocessor features)
690 (Limits control, Frozen state, Debugging options): Use lower case
692 (Improved copy): Use @code, not @var, as appropriate.
694 2008-12-18 Eric Blake <ebb9@byu.net>
696 Document optimized forloop.
697 * doc/m4.texinfo (Improved forloop): Mention alternate style that
698 avoids define overhead.
699 * examples/forloop3.m4: New file.
700 * examples/Makefile.am (EXTRA_DIST): Distribute it.
702 Deal with M4 1.4.x limitation on builtin tokens.
703 * doc/m4.texinfo (Composition): Mention limitation on curry.
704 (Improved copy): New node.
705 * examples/stack_sep.m4: New file.
706 * examples/Makefile.am (EXTRA_DIST): Distribute it.
708 Document copy composite using stack_foreach and curry.
709 * doc/m4.texinfo (Stacks): New node, to document pushdef stack
711 (Ifelse): Move define_blind...
712 (Composition): ...to this new node. Document currying, then use
713 it to implement copy and rename.
714 * examples/curry.m4: New file.
715 * examples/stack.m4: Likewise.
716 * examples/Makefile.am (EXTRA_DIST): Distribute them.
718 2008-12-17 Eric Blake <ebb9@byu.net>
720 Don't override signal handlers installed by c-stack.
721 * src/m4.c (main): Reorder installation of signal handlers, so we
722 don't trash a SIGBUS handler installed by c-stack. Also provide a
723 SIGSEGV fallback, for platforms where c-stack combined with
724 libsigsegv uses something lower level than SIGSEGV.
726 2008-12-12 Eric Blake <ebb9@byu.net>
728 Double size of temp file cache.
729 * src/output.c (tmp_file, tmp_file_owner): Split...
730 (tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into
732 (tmp_file2_recent): New variable.
733 (m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename)
734 (output_exit): Adjust callers.
736 Use fewer seeks on cached files.
737 * src/output.c (m4_tmpfile): Use write, not append mode.
738 (m4_tmpopen): Add parameter to decide when to skip seeks.
739 (m4_tmprename, make_diversion, insert_diversion_helper)
740 (freeze_diversions): Adjust callers.
742 Cache most recently spilled diversion.
743 * src/output.c (tmp_file, tmp_file_owner): New variables, for
744 1-deep cache of spilled diversions.
745 (m4_tmpfile): Open in append mode, since we might revisit
746 diversion without closing it now.
747 (m4_tmpopen): Check cache first.
748 (m4_tmpclose): Update cache, rather than closing. Add parameter.
749 (m4_tmpremove): Close cache before removing.
750 (m4_tmprename): Deal with open files when renaming.
751 (output_exit): Close cache before exiting.
752 (make_room_for, make_diversion, insert_diversion_helper): Adjust
754 * configure.ac (RENAME_OPEN_FILE_WORKS): New configure test.
756 Correctly track size of in-memory diversions.
757 * src/output.c (insert_diversion_helper): Correctly track total
758 in-memory diversion size after undivert.
760 Avoid quadratic behavior for some cases of divert/undivert.
761 * src/output.c (struct m4_diversion): Improve comments.
762 (m4_tmpname, make_diversion): Strengthen preconditions.
763 (m4_tmprename): New function.
764 (output_init, output_exit): Move after internal functions.
765 (make_room_for): Don't bother copying uninitialized bytes.
766 (insert_diversion_helper): Transfer metadata, rather than copying
767 contents, when undiverting into a previously unused diversion.
768 * src/m4.h (includes): Add assert.h.
769 * doc/m4.texinfo (Diversions): Add test.
770 (Undivert): Enhance test.
771 * NEWS: Document the speedup.
773 2008-12-12 Eric Blake <ebb9@byu.net>
775 Upgrade to FDL 1.3, keep COPYING in repository.
776 * Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING.
777 * .cvsignore: Don't ignore it.
778 * .gitignore: Likewise.
779 * COPYING: Store in repository, per automake 1.10.2
781 * m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
782 * doc/m4.texinfo (GNU Free Documentation License): Upgrade
784 * doc/Makefile.am (m4_TEXINFOS): Likewise.
785 * NEWS: Mention the documentation license change.
787 2008-10-10 Eric Blake <ebb9@byu.net>
789 Release Version 1.4.12.
790 * NEWS: Mention the release.
792 2008-10-06 Eric Blake <ebb9@byu.net>
794 Work around Solaris' sed inability to process NUL.
795 * checks/check-them (SED): Allow user to override.
797 2008-09-25 Eric Blake <ebb9@byu.net>
799 Tweak error message on command line failure.
800 * src/m4.c (process_file): Match wording of include builtin.
801 * src/freeze.c (produce_frozen_state): Likewise.
802 * m4/gnulib-cache.m4: Regenerate.
803 * doc/m4.texinfo (Command line files, Using frozen files): Update
806 2008-09-24 Eric Blake <ebb9@byu.net>
808 Unify error handling for reading directories.
809 * src/path.c (m4_path_search): Factor open attempts...
810 (m4_fopen): ...into new function, to reject directories.
811 * doc/m4.texinfo (Include): Document that directories cannot be
814 Avoid bugs on platforms that mishandle trailing /.
815 * m4/gnulib-cache.m4: Import fopen module.
816 * doc/m4.texinfo (Command line files, Include): Add tests.
817 (Using frozen files): This test now works on mingw.
818 * checks/check-them (examples): Expand xerr to allow ignoring
819 error output because of differences in platform errno values.
821 2008-09-22 Eric Blake <ebb9@byu.net>
823 Support alternate path separator.
824 * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
825 * src/m4.h (includes): Add headers.
826 * src/path.c (m4_path_search): Avoid literal use of '/' as path
827 separator and when detecting absolute paths.
829 2008-09-16 Eric Blake <ebb9@byu.net>
831 Fix bootstrap for Solaris /bin/sh.
832 * bootstrap: Avoid shell quoting pitfall.
834 2008-09-01 Eric Blake <ebb9@byu.net>
836 Fix building with -DDEBUG=1.
837 * src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
838 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
839 * src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
840 Reported by Tom G. Christensen.
842 2008-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
844 Typos in source code comments.
845 * src/builtin.c: Fix typos in comments.
846 * src/input.c: Likewise.
848 2008-08-29 Eric Blake <ebb9@byu.net>
850 Fix manual date information.
851 * doc/m4.texinfo: UPDATED refers to the day the manual was built,
852 not the release date of M4.
853 Based on a bison patch by Akim Demaille.
855 2008-08-27 Eric Blake <ebb9@byu.net>
858 * doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
861 2008-08-25 Eric Blake <ebb9@byu.net>
863 Update recommendation now that libsigsegv 2.6 is released.
864 * NEWS: Recommend libsigsegv 2.6+.
867 2008-08-21 Eric Blake <ebb9@byu.net>
869 Fix crash with traced defn(undef), regression from 2007-08-09.
870 * src/builtin.c (m4_defn): Handle traced but undefined macros.
871 * doc/m4.texinfo (Trace): Test it.
874 2008-08-18 Eric Blake <ebb9@byu.net>
876 Fix crash with 'm4 -N9', regression from 2006-09-14.
877 * src/m4.c (main): Add missing break.
880 2008-08-15 Eric Blake <ebb9@byu.net>
882 Documentation updates.
883 * doc/m4.texinfo (History): Mention 1.4.12.
884 (Builtin): Enhance regression tests.
885 (Debug Levels): Mention effect of -l. Enhance regression tests.
886 (Incompatibilities): Fix typo, and mention trace output.
887 (Improved capitalize): Simplify example.
889 Avoid compiler warning.
890 * src/builtin.c (m4_ifelse): Avoid unused variable.
892 Reported by Tom G. Christensen.
894 Improve 'git diff' of manual source.
895 * .gitattributes (*.texi*): Add diff attribute.
896 * bootstrap: Tell git how to use it.
897 Inspired by Jim Meyering's similar patch for coreutils.
899 2008-08-11 Eric Blake <ebb9@byu.net>
901 Avoid triggering OS/2 bug in testsuite.
902 * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
903 Reported by Elbert Pol.
905 2008-08-03 Eric Blake <ebb9@byu.net>
907 Increase ulimit stack value to be larger than SIGSTKSZ.
908 * checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
909 at least OpenBSD's sh died early from an undersized stack limit.
911 2008-07-17 Eric Blake <ebb9@byu.net>
913 Remove redundant examples/stackovf.sh.
914 * examples/stackovf.sh: Delete, now that checks has better
916 * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
918 2008-07-17 Eric Blake <ebb9@byu.net>
920 Adjust to c-stack changes in gnulib.
921 * src/Makefile.am (m4_LDADD): Use libsigsegv when available and
922 necessary, via LIBCSTACK.
923 * src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
925 * checks/stackovf.test: New file.
926 * checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
927 (DOC_CHECKS): ...generated documentation tests into new macro.
928 (DISTFILES): Distribute stackovf.test.
929 * checks/check-them: Special-case stackovf.test.
930 * NEWS: Enhance the NEWS item for -L improvements.
931 * README: Mention the optional dependency.
932 * HACKING: Mention maintenance burden added by libsigsegv.
934 2008-06-21 Eric Blake <ebb9@byu.net>
936 Use new sigaction module.
937 * m4/gnulib-cache.m4: Import sigaction module.
938 * src/m4.c (main): Drop signal() calls.
940 2008-06-18 Eric Blake <ebb9@byu.net>
942 Also trap SIGILL, SIGFPE, SIGBUS.
943 * m4/gnulib-cache.m4: Import strsignal module.
944 * src/m4.c (main): Register more handlers, and prefer sigaction
946 (SIGBUS, NSIG): Provide fallback when lacking.
947 (signal_message): New variable, to keep async-safety.
948 (fault_handler): Display faulting signal description.
949 * configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
950 optimize for single-threaded operation.
952 2008-06-06 Eric Blake <ebb9@byu.net>
954 Inform users what to do in case of programmer error.
955 * src/m4.h (EXIT_INTERNAL_ERROR): New macro.
956 * configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
957 * src/m4.c (fault_handler): New method.
958 (program_error_message): New variable, for async-safety.
959 (main): Print bug reporting address rather than dump core on any
960 failed assertions or detected non-stack-overflow faults.
962 2008-06-06 Eric Blake <ebb9@byu.net>
964 Replace stackovf with gnulib c-stack.
965 * m4/gnulib.cache.m4: Import c-stack module.
966 * configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
967 siginfo.h, sys/wait.h.
968 (AC_CHECK_TYPES): Likewise for siginfo_t.
969 (AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
970 (AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
971 sigstack, sigvec, strerror.
972 (M4_cv_use_stackovf): Likewise for stack overflow detection.
973 * src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
974 * src/stackovf.c: Delete.
975 * src/m4.h (setup_stackovf_trap): Delete.
976 * src/m4.c (stackovf_handler): Delete.
977 (main): Use c_stack_action instead of setup_stackovf_trap. If
978 stack overflow is detectable, don't limit -L artificially.
979 (usage): Document unlimited default on supported systems.
980 * doc/m4.texinfo (Limits control): Document new default nesting
982 * NEWS: Document this change.
984 2008-07-30 Eric Blake <ebb9@byu.net>
986 Avoid regressions in trace and comment output.
987 * doc/m4.texinfo (Trace): Add test.
988 (Comments): Likewise.
990 2008-07-28 Eric Blake <ebb9@byu.net>
992 Optimize iteration examples.
993 * examples/forloop2.m4: Avoid excess indir, by passing current
994 counter value as parameter.
995 * examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
997 * doc/m4.texinfo (Improved forloop, Improved foreach): Update the
998 documentation to match.
1000 2008-07-26 Eric Blake <ebb9@byu.net>
1002 Give example for O(n) foreach on m4 1.4.x.
1003 * examples/foreachq4.m4: New file.
1004 * examples/Makefile.am (EXTRA_DIST): Distribute it.
1005 * doc/m4.texinfo (Improved foreach): Document linear foreach with
1006 m4 1.4.5 and greater.
1008 2008-07-17 Eric Blake <ebb9@byu.net>
1010 Fix missing copyright notices.
1011 * acinclude.m4: Add copyright license details.
1012 * c-boxes.el: Likewise.
1013 * checks/get-them: Likewise.
1014 * checks/check-them: Likewise.
1016 2008-07-13 Eric Blake <ebb9@byu.net>
1018 Add -g/--gnu command line argument.
1019 * src/m4.c (usage): Mention the new option.
1020 (long_options, OPTSTRING): Add new option.
1022 * NEWS: Document this addition.
1023 * doc/m4.texinfo (Limits control): Likewise.
1024 (Incompatibilities): Mention future use of POSIXLY_CORRECT.
1026 Reported by Joel E. Denny.
1028 2008-07-11 Eric Blake <ebb9@byu.net>
1030 Avoid bogus whitespace in @ovar, @dvar.
1031 * doc/m4.texinfo (ovar, dvar): Add @c.
1032 Based on patch by Ralf Wildenhues to Autoconf manual.
1034 2008-06-16 Eric Blake <ebb9@byu.net>
1036 Add missing const qualifications.
1037 * src/builtin.c (builtin_tab): Declare array elements as const.
1039 2008-06-03 Eric Blake <ebb9@byu.net>
1041 Use progname module rather than rolling our own program_name.
1042 * m4/gnulib-cache.m4: Import progname module.
1043 * src/m4.c (program_name): Replace...
1044 (main): ...with a call to set_program_name.
1046 2008-06-02 Eric Blake <ebb9@byu.net>
1048 Allow autobuild usage.
1049 * m4/gnulib.cache: Import autobuild module.
1051 2008-05-23 Eric Blake <ebb9@byu.net>
1053 Make closing files be consistent.
1054 * src/freeze.c (reload_frozen_state): Use close_stream.
1055 Reported by Jean-Charles Longuet.
1057 2008-05-22 Eric Blake <ebb9@byu.net>
1059 Don't allow failure to freeze give exit status of 0.
1060 * src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
1062 * doc/m4.texinfo (Using frozen files): Test the fix.
1064 Reported by Jean-Charles Longuet.
1066 2008-05-09 Eric Blake <ebb9@byu.net>
1068 Improve error message when frozen file is invalid.
1069 * src/freeze.c (reload_frozen_state): Track current line.
1070 [GET_STRING]: New helper macro.
1072 2008-05-09 Eric Blake <ebb9@byu.net>
1074 Detect integer overflow when loading frozen file.
1075 * src/m4.h (includes): Add limits.h.
1076 (_): Define as a no-op placeholder for now.
1077 * src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
1078 immediately on overflow.
1079 Reported by Jim Meyering.
1081 2008-05-07 Eric Blake <ebb9@byu.net>
1083 Fix traceon regression introduced 2006-06-06.
1084 * src/builtin.m4 (traceon): Only perform insertion if lookup
1086 * doc/m4.texinfo (Trace): Test for the bug.
1087 * NEWS: Document it.
1089 2008-05-03 Eric Blake <ebb9@byu.net>
1091 Document define_blind.
1092 * doc/m4.texinfo (Ifelse): Add a new composite macro.
1094 Suggested by Mike R.
1096 2008-04-24 Eric Blake <ebb9@byu.net>
1099 * doc/m4.texinfo (Debug Levels): Test -di behavior.
1100 (Changeword, Location): Correct examples.
1101 * checks/check-them (examples): Update to account for recommended
1102 location for running tests.
1103 * doc/m4.texinfo (Debug Levels): Test this behavior.
1105 2008-04-21 Eric Blake <ebb9@byu.net>
1107 Fix spelling of attribution to Christopher Strachey.
1108 * doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
1110 Reported by Fernando Carrijo.
1112 2008-04-17 Eric Blake <ebb9@byu.net>
1114 Fix buildbot failure.
1115 * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
1118 Detected by Bob Proulx's buildbot.
1120 2008-04-17 Eric Blake <ebb9@byu.net>
1122 Avoid gcc shadowing warnings.
1123 * src/builtin.c (m4_format): s/format/expand_format, so local
1124 variables can be named format.
1125 * src/format.c (format): Rename...
1126 (expand_format): ...to this, and avoid the name index.
1127 * src/input.c (push_file): Avoid the name close.
1128 * src/m4.h (expand_format): Adjust prototype.
1129 * src/output.c (threshold_diversion_CB): Avoid the name div.
1131 2008-04-15 Eric Blake <ebb9@byu.net>
1133 Another 'make installcheck' fix.
1134 * doc/m4.texinfo (Diversions): s/m4/__program__/ in case
1135 --program-prefix was active.
1137 2008-04-11 Eric Blake <ebb9@byu.net>
1139 Ensure --program-prefix doesn't regress.
1140 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
1141 2008-03-10 by testing it at 'make distcheck' time.
1143 2008-04-11 Eric Blake <ebb9@byu.net>
1145 Improve OS/2+emx build.
1146 * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
1147 system(3), no matter what other macros it pre-defined.
1148 * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
1150 * src/builtin.c (predefined_tab): Ensure all possible system
1151 identifiers are defined, not just the first; the testsuite will
1152 catch if multiple identifiers mistakenly made it through.
1154 Reported by Elbert Pol.
1156 2008-04-09 Eric Blake <ebb9@byu.net>
1158 Remove redundant configure macros.
1159 * configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
1160 (AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
1162 (AC_CHECK_HEADERS_ONCE): Remove limits.h.
1164 2008-08-07 Bruno Haible <bruno@clisp.org> (tiny change)
1166 Run m4 tests prior to gnulib unit tests.
1167 * Makefile.am (SUBDIRS): Swap order of directories.
1169 2008-04-02 Eric Blake <ebb9@byu.net>
1171 Release Version 1.4.11.
1172 * NEWS: Mention the release.
1174 Prepare for release.
1175 * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
1176 remove tag operation.
1177 (version-check): Enhance this check.
1178 (prev-tarball): Depend on version-check.
1179 (this-vc-tag): Delete, and mention need to run tag...
1180 * HACKING: ...here, prior to make maintainer-distcheck.
1181 Update the instructions to match this particular release process.
1182 * Makefile.am (.version, announcement): Allow for VPATH build.
1183 * cfg.mk (gnulib_dir): Likewise.
1184 * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
1187 2008-04-01 Eric Blake <ebb9@byu.net>
1189 Speed up index builtin.
1190 * m4/gnulib-cache: Import strstr module.
1191 * NEWS: Mention the speedup.
1193 2008-03-29 Eric Blake <ebb9@byu.net>
1195 Fix testsuite on mingw, OpenBSD.
1196 * src/format.c (ARG_DOUBLE): Use strtod, not atof.
1197 * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
1198 * doc/m4.texinfo (Format): Add hex-float support.
1199 * NEWS: Document this.
1201 2008-03-27 Eric Blake <ebb9@byu.net>
1203 Pull other useful doc fixes from branch-1.6.
1204 * doc/m4.texinfo (Arguments): Enable test of
1205 --warn-macro-sequence.
1206 (Defn): Test length of builtin token.
1207 (Builtin, Ifelse, Changequote): Add more regression tests.
1209 2008-03-27 Eric Blake <ebb9@byu.net>
1211 Add test for divert bug on 2007-05-28, patched 2007-07-21.
1212 * doc/m4.texinfo (Diversions): Add test.
1214 2008-03-24 Eric Blake <ebb9@byu.net>
1216 Pull GNUmakefile from gnulib.
1217 * m4/gnulib-cache.m4: Import gnumakefile module.
1218 * GNUmakefile: Remove from version control; supplied by gnulib
1220 * configure.ac (AC_INIT): Track intra-release version with
1222 (AC_CONFIG_LINKS): Let gnulib do this now.
1223 * Makefile.am (distclean-local): Likewise.
1224 (EXTRA_DIST): Likewise. Also handle renamed files.
1225 * (.version, dist-hook): Improve version handling.
1226 * Makefile.cfg: Rename...
1227 * cfg.mk: ...to this.
1228 * Makefile.maint: Rename...
1229 * maint.mk: ...to this.
1230 (ME, makefile-check, m4-check): Use new macro instead of
1232 * HACKING: Mention that maintainer rules should now work in VPATH
1235 2008-03-15 Eric Blake <ebb9@byu.net>
1237 Document join, in order to fix bug in m4wrap example.
1238 * doc/m4.texinfo (Improved m4wrap): New node.
1239 (Defn, Location): Enhance tests.
1240 (Shift): Document the composite macro join.
1241 (Incompatibilities): Move documentation of LIFO vs. FIFO...
1242 (M4wrap): ...here, to match improved example.
1244 2008-03-10 Eric Blake <ebb9@byu.net>
1246 Allow 'make installcheck' with './configure --program-prefix'.
1247 * checks/Makefile.in (program_transform_name): New macro.
1248 (installcheck): Use it to transform name of m4 before testing.
1249 * checks/check-them (m4): Add -m option, to allow testing m4 by a
1251 * checks/get-them: Allow xout and xerr notation.
1253 2008-02-25 Eric Blake <ebb9@byu.net>
1255 Improve release process.
1256 * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
1258 * HACKING: Update for git release procedures.
1259 * Makefile.cfg: New file.
1260 * GNUmakefile: Use it.
1261 * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
1262 (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
1263 (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
1264 (makefile-check, news-date-check, changelog-check, m4-check)
1265 (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
1266 (announcement, alpha, beta, major): New rules, borrowed from
1268 (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
1270 * Makefile.am (EXTRA_DIST): Distribute new file.
1272 2008-02-19 Eric Blake <ebb9@byu.net>
1274 Clean up foreach example.
1275 * doc/m4.texinfo (Foreach, Improved foreach): Document another
1276 shortcoming in foreach.m4.
1278 2008-02-16 Eric Blake <ebb9@byu.net>
1280 Add regression test for multi-character quote recursion.
1281 * examples/foreach2.m4: Use $0 rather than spelling out name.
1282 * examples/foreachq2.m4: Likewise.
1283 * examples/forloop2.m4: Likewise.
1284 * examples/hanoi.m4: Likewise.
1285 * examples/trace.m4: Likewise.
1286 * doc/m4.texinfo (Improved forloop): Document advantage of $0.
1287 (Improved foreach): Adjust dump from file.
1289 2008-02-13 Eric Blake <ebb9@byu.net>
1291 Fix texinfo grammar.
1292 * doc/m4.texinfo (Incompatibilities): Use @. after capital.
1293 (History): Use @: after abbreviations.
1294 (M4exit): Use correct Latin abbreviation.
1296 2008-02-11 Eric Blake <ebb9@byu.net>
1298 Document behavior of __gnu__().
1299 * doc/m4.texinfo (Platform macros): Enhance test.
1300 (Macro expansion): New test.
1302 2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1304 * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
1305 than hard-coding /bin/sh.
1307 Reported by Lawson Chan.
1309 2007-12-13 Paolo Bonzini <bonzini@gnu.org> (tiny change)
1311 * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
1314 Reported by Giovanni Toffetti.
1316 2007-12-07 Eric Blake <ebb9@byu.net>
1318 Minor security fix: Quote output of mkstemp.
1319 * src/builtin.c (mkstemp_helper): Produce quoted output.
1320 * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
1321 * NEWS: Document this change.
1323 2007-12-04 Eric Blake <ebb9@byu.net>
1325 Fix builds with OpenBSD make.
1326 * doc/Makefile.am (HELP2MAN): New macro.
1327 (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
1328 * README: Update copyright.
1329 * HACKING: Mention help2man and makeinfo dependencies.
1331 2007-11-22 Eric Blake <ebb9@byu.net>
1333 Security fix: avoid arbitrary code execution with 'm4 -F'.
1334 * src/freeze.c (produce_frozen_state): Never pass raw file name as
1336 * NEWS: Document this fix.
1338 2007-11-07 Eric Blake <ebb9@byu.net>
1340 * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
1342 2007-11-05 Eric Blake <ebb9@byu.net>
1344 Use build-aux directory.
1345 * configure.ac (PACKAGE, VERSION): Delete, since Automake does
1347 (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
1348 instead of the top level.
1349 (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
1350 * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
1351 * bootstrap: Adjust accordingly.
1352 * m4/gnulib-cache.m4: Add --aux-dir option.
1353 * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
1355 2007-10-31 Eric Blake <ebb9@byu.net>
1357 Test more corner cases.
1358 * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
1359 (Improved foreach): Document alternate foreachq style.
1361 2007-10-28 Eric Blake <ebb9@byu.net>
1363 More test coverage for autoconf usage patterns.
1364 * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
1365 (Builtin): Add new undocumented tests.
1366 (Shift): Document cond macro, and add new test.
1368 2007-10-27 Eric Blake <ebb9@byu.net>
1370 Document one use of changequote(`(',`)').
1371 * doc/m4.texinfo (Changequote): Add new test, based on recent
1372 autoconf addition of m4_expand.
1374 2007-10-22 Eric Blake <ebb9@byu.net>
1376 Never let printf failures go undetected.
1377 * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
1378 intprops, strtod, and xprintf modules. Remove deprecated free
1379 module. Replace vasprintf-posix and xvasprintf with
1381 * src/m4.h: Include xprintf.h.
1382 * src/builtin.c (ntoa): Export.
1383 (m4_errprint): Adjust all *printf callers.
1384 * src/debug.c (debug_message_prefix, trace_format): Likewise.
1385 * src/freeze.c (produce_frozen_state): Likewise.
1386 * src/input.c [DEBUG_INPUT]: Likewise.
1387 * src/m4.c (usage): Likewise.
1388 * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
1389 (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
1390 * src/output.c (shipout_text, freeze_diversione): Likewise.
1391 * src/path.c [DEBUG_INCL]: Likewise.
1392 * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
1393 * src/symtab.c [DEBUG_SYM]: Likewise.
1395 2007-10-17 Eric Blake <ebb9@byu.net>
1397 Fix 'm4 -F file -t undefined'.
1398 * src/freeze.c (produce_frozen_state): Avoid core dump.
1399 * doc/m4.texinfo (Using frozen files): Test for the bug.
1400 * NEWS: Mention the fix.
1402 2007-10-09 Eric Blake <ebb9@byu.net>
1404 Avoid regexp regression.
1405 * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
1407 2007-10-02 Eric Blake <ebb9@byu.net>
1409 Add more examples and tests.
1410 * doc/m4.texinfo (Patsubst): Use the examples directory. Also
1412 (Improved capitalize): New node.
1413 (Index macro, Regexp): Test more code paths.
1414 * examples/capitalize.m4: Update to match manual.
1415 * examples/capitalize2.m4: New file.
1416 * examples/foreachq3.m4: Likewise.
1417 * examples/join.m4: Likewise.
1418 * examples/loop.m4: Likewise.
1419 * examples/wraplifo.m4: Likewise.
1420 * examples/wraplifo2.m4: Likewise.
1421 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1423 2007-09-24 Eric Blake <ebb9@byu.net>
1425 Create .gitignore alongside .cvsignore.
1426 * bootstrap (LC_ALL): Set up front.
1427 (version control) Borrow idea from head, to avoid churn in
1428 m4/.*ignore files modified by gnulib-tool.
1430 2007-09-13 Eric Blake <ebb9@byu.net>
1432 * AUTHORS: Fix typo.
1434 2007-09-07 Eric Blake <ebb9@byu.net>
1436 * AUTHORS: Simplify, to match libtool and autoconf layout.
1437 * THANKS: Sync with head.
1439 2007-08-10 Eric Blake <ebb9@byu.net>
1441 * doc/m4.texinfo (Compatibility): Sync with head.
1443 2007-08-10 Konrad Schwarz <konrad.schwarz@siemens.com> (tiny change)
1444 and Eric Blake <ebb9@byu.net>
1446 * doc/m4.texinfo (Defn): Update wording.
1448 2007-08-09 Eric Blake <ebb9@byu.net>
1450 POSIX requires defn(`a',`b') to concatenate definitions.
1451 * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
1452 trying to mix a builtin with anything else.
1453 * doc/m4.texinfo (Defn): Document a use for this POSIX
1455 (Incompatibilities): Update to match current status.
1456 * NEWS: Document this change.
1458 Reported by Konrad Schwarz.
1460 2007-08-04 Eric Blake <ebb9@byu.net>
1462 Normalize all GPL license notices.
1463 * GNUmakefile: Update license wording.
1464 * Makefile.am: Likewise.
1465 * Makefile.maint: Likewise.
1466 * bootstrap: Likewise.
1468 * configure.ac: Likewise.
1469 * checks/Makefile.in: Likewise.
1470 * doc/Makefile.am: Likewise.
1471 * examples/Makefile.am: Likewise.
1472 * src/Makefile.am: Likewise.
1473 * src/builtin.c: Likewise.
1474 * src/debug.c: Likewise.
1475 * src/eval.c: Likewise.
1476 * src/format.c: Likewise.
1477 * src/freeze.c: Likewise.
1478 * src/input.c: Likewise.
1479 * src/m4.c: Likewise.
1480 * src/m4.h: Likewise.
1481 * src/macro.c: Likewise.
1482 * src/output.c: Likewise.
1483 * src/path.c: Likewise.
1484 * src/stackovf.c: Likewise.
1485 * src/symtab.c: Likewise.
1487 2007-07-21 Eric Blake <ebb9@byu.net>
1489 Fix regression on NetBSD from 2007-05-28.
1490 * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
1492 * NEWS: Document this fix.
1494 Reported by Thomas Klausner.
1496 2007-07-20 Eric Blake <ebb9@byu.net>
1498 Fix 'make distcheck' issues.
1499 * Makefile.am (EXTRA_DIST): No need to distribute
1500 gpl-3.0.texi.diff anymore.
1501 * m4/gnulib-cache.m4: Update to latest gnulib.
1503 2007-07-14 Eric Blake <ebb9@byu.net>
1505 Reflect upstream license .texi changes.
1506 * doc/m4.texinfo (Copying): Rename node...
1507 (GNU General Public License): ...to this.
1508 (GNU Free Documentation License): Adjust node location.
1509 * local/doc/gpl-3.0.texi.diff: Remove file.
1511 2007-07-10 Eric Blake <ebb9@byu.net>
1514 * configure.ac (AC_INIT): Bump version number.
1515 * NEWS: Start changes since 1.4.10.
1516 * doc/m4.texinfo (History): Mention 1.4.11.
1517 (Copying This Package, Copying This Manual): Add index entries.
1518 * local/lib/version-etc.c.diff: Delete, now that gnulib has been
1520 * Makefile.am (EXTRA_DIST): Remove dead file.
1522 2007-07-09 Eric Blake <ebb9@byu.net>
1524 Release Version 1.4.10.
1525 * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
1526 * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
1527 * configure.ac (AC_INIT): Bump version number.
1528 * NEWS: Describe changes since 1.4.9.
1530 * src/format.c: Missed a GPLv3 conversion.
1532 Avoid undefined behavior of %.*c in printf.
1533 * src/format.c (format): Special case %c.
1534 * TODO: Document that more remains to be done.
1535 * NEWS: Document the fix.
1537 2007-07-05 Eric Blake <ebb9@byu.net>
1539 Fix up gnulib-tool usage.
1540 * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
1541 * version-etc.c.diff: Move to...
1542 * local/lib/version-etc.c.diff: ...here.
1543 * gpl-3.0.texi.diff: Move to...
1544 * local/doc/gpl-3.0.texi.diff: ...here.
1546 2007-07-04 Eric Blake <ebb9@byu.net>
1548 Upgrade to GPL version 3 or later.
1549 * bootstrap: Pick up GPLv3.
1550 * m4/gnulib-cache.m4: Augment with 'gnulib-tool
1551 --local-dir=. --import gpl-3.0'.
1552 * doc/m4.texinfo (Copying This Package): New appendix.
1553 * NEWS: Mention this change.
1554 * README: Mention why some files still claim to be version 2.
1555 * version-etc.c.diff: New file, to make sure --version claims
1556 correct GPL version. Temporary until gnulib makes move.
1557 * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
1558 appendix, rather than section, of the manual.
1559 * GNUmakefile: Update to new license.
1560 * Makefile.am: Likewise.
1561 * Makefile.maint: Likewise.
1563 * configure.ac: Likewise.
1564 * checks/Makefile.in: Likewise.
1565 * doc/Makefile.am: Likewise.
1566 * examples/Makefile.am: Likewise.
1567 * src/Makefile.am: Likewise.
1568 * src/builtin.c: Likewise.
1569 * src/debug.c: Likewise.
1570 * src/eval.c: Likewise.
1571 * src/freeze.c: Likewise.
1572 * src/input.c: Likewise.
1573 * src/m4.c: Likewise.
1574 * src/m4.h: Likewise.
1575 * src/macro.c: Likewise.
1576 * src/output.c: Likewise.
1577 * src/path.c: Likewise.
1578 * src/stackovf.c: Likewise.
1579 * src/symtab.c: Likewise.
1581 2007-06-26 Eric Blake <ebb9@byu.net>
1583 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
1585 2007-06-26 Karl Berry <karl@freefriends.org> (tiny change)
1587 Match Free Software Directory categories.
1588 * doc/m4.texinfo (dircategory): Update.
1590 2007-05-31 Eric Blake <ebb9@byu.net>
1592 * src/output.c (output_text): Fix regression from 2007-05-28.
1593 * doc/m4.texinfo (History): Mention 1.4.10.
1594 (Format): Make testsuite output easier to debug.
1596 2007-05-29 Eric Blake <ebb9@byu.net>
1599 * configure.ac (AC_INIT): Bump version number.
1600 * NEWS: Start changes since 1.4.9b, and fix typo.
1602 Beta Release Version 1.4.9b.
1603 * configure.ac (AC_INIT): Bump version number.
1604 * NEWS: Describe changes since 1.4.9.
1606 Improve format support.
1607 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1609 * src/format.c (format): Parse %'hhd, %a, %A. Avoid calling
1610 printf with too few arguments, as in format(%*.*d,-1,-1,1).
1611 * doc/m4.texinfo (Format): Expand tests, and improve
1613 * NEWS: Document this change.
1615 2007-05-28 Eric Blake <ebb9@byu.net>
1617 Fix large diversion corner cases, including 1.4.8 regression.
1618 * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
1619 (make_room_for): Use NULL, not 0, for pointers.
1620 (insert_diversion_helper): Avoid using rewind.
1621 (freeze_diversions): Allow freezing large diversions.
1622 * NEWS: Document this fix.
1624 Also run gnulib unit tests during make check.
1625 * m4/gnulib-cache.m4: Augment with 'gnulib-tool
1626 --tests-base=tests --with-tests'.
1627 * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
1628 * Makefile.am (SUBDIRS): Run gnulib tests before ours.
1630 2007-05-25 Eric Blake <ebb9@byu.net>
1632 Backport prompts in examples from head.
1633 * src/macro.c (expand_macro): Shorten message.
1634 * doc/m4.texinfo (Manual, Command line files, Comments)
1635 (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
1636 (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
1637 (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
1638 (Using frozen files, Improved forloop, Improved foreach): Add
1639 prompts to examples.
1640 * checks/get-them: Ignore prompts in examples.
1642 Fix sync line interaction with multiline comments.
1643 * doc/m4.texinfo (Other Incompatibilities): Add example, and
1644 document bug in --syncline/divert interaction.
1645 (Preprocessor features): Augment test.
1646 * src/m4.h (output_text): Export.
1647 (shipout_text, next_token): Add parameter.
1648 * src/freeze.c (reload_frozen_state): Don't interfere with
1649 synclines when reloading state.
1650 * src/output.c (output_text): Export.
1651 (shipout_text): Take new parameter for start line of token.
1652 Output at most one syncline per token.
1653 * src/input.c (next_token): Report line where multiline tokens
1655 * src/macro.c (expand_input, expand_token, expand_argument):
1656 Adjust callers so that line is passed from input to output.
1657 * NEWS: Document this fix.
1658 Reported by Sergey Poznyakoff.
1660 Test -s in testsuite.
1661 * doc/m4.texinfo (Preprocessor features): Add a test.
1662 * checks/get-them: Support extra options in testsuite.
1663 * checks/check-them (examples): Use extra options.
1665 Reported by Sergey Poznyakoff.
1667 2007-05-24 Eric Blake <ebb9@byu.net>
1669 Support POSIX flush semantics on all platforms.
1670 * m4/gnulib-cache.m4: Remove closeout, and augment with
1671 'gnulib-tool --import closein fflush'.
1672 * src/m4.h (includes): Use closein, not closeout.
1673 * src/m4.c (main): Ensure stdin is flushed when not all input is
1675 (process_file): No return needed.
1676 * src/debug.c (debug_flush_files): Rely on gnulib module, rather
1677 than excluding mingw.
1678 * NEWS: Document this change.
1680 Work around cygwin and mingw fseeko bugs.
1681 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
1682 * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
1684 2007-04-25 Eric Blake <ebb9@byu.net>
1686 Fix negative division within eval, regression of 2007-01-06.
1687 * doc/m4.texinfo (Eval): Catch this bug.
1688 * src/eval.c (mult_term): Fix it.
1689 * NEWS: Document this.
1691 Reported by Cesar Strauss.
1693 2007-04-23 Eric Blake <ebb9@byu.net>
1696 * configure.ac (AC_INIT): Bump version number.
1697 * NEWS: Start changes since 1.4.9.
1699 2007-03-23 Eric Blake <ebb9@byu.net>
1702 * configure.ac (AC_INIT): Bump version number.
1703 * NEWS: Describe changes since 1.4.8b.
1705 2007-03-16 Eric Blake <ebb9@byu.net>
1707 * doc/m4.texinfo (Mkstemp): Tweak wording.
1708 * src/output.c (output_init): Adjust to latest gnulib.
1710 2007-03-15 Eric Blake <ebb9@byu.net>
1712 Avoid Tandem/NSK's broken long long (without a symmetric unsigned
1713 long long, it confuses gnulib).
1714 * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
1715 if unsigned long long doesn't work.
1717 Reported by Matthew Woehlke.
1719 2007-03-07 Eric Blake <ebb9@byu.net>
1722 * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
1724 2007-03-01 Eric Blake <ebb9@byu.net>
1726 * doc/m4.texinfo: Pick up more index entries from head. Follow
1727 more texinfo recommendations.
1728 (Sysval): Improve tests.
1730 Avoid overfull \vbox warning from texinfo, due to indices that
1731 weren't quite big enough to split across page boundaries.
1732 * doc/m4.texinfo: Add lots of concept index entries.
1733 (Concept Index): Move to be last, as recommended by texinfo
1735 (Define, Arguments, Pseudo Arguments): Add more function entries.
1737 2007-02-28 Eric Blake <ebb9@byu.net>
1739 * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
1741 (Pseudo Arguments): Add useful example.
1743 * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
1744 reflect POSIX XCU ERN 118.
1746 * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
1747 * src/m4.c (usage): ...here,...
1748 * src/builtin.c (set_macro_sequence): ...and here.
1749 (define_user_macro): Fix typo.
1750 * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
1752 (Shift): Document composite macro argn for portably getting at
1753 positional parameters beyond 9.
1754 * configure.ac (AC_INIT): Bump version number.
1755 * NEWS: Start changes of 1.4.8c.
1757 2007-02-24 Eric Blake <ebb9@byu.net>
1759 Beta Release 1.4.8b:
1760 * configure.ac (AC_INIT): Bump version number.
1761 * NEWS: Describe changes since 1.4.8.
1763 Reserve all uses of raw ${} in macro definitions, not just
1765 * src/builtin.c (set_macro_sequence): Change default macro
1767 * doc/m4.texinfo (Operation modes): Update to match.
1768 * src/m4.c (usage): Likewise.
1771 2007-02-23 Eric Blake <ebb9@byu.net>
1773 * src/m4.h (includes): Update to latest gnulib.
1775 2007-02-08 Eric Blake <ebb9@byu.net>
1777 Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
1778 more flexible, and so that autoconf can use it.
1779 * src/m4.h (set_macro_sequence, free_macro_sequence): New
1781 * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
1782 (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
1783 New variables and functions.
1784 (define_user_macro): Allow flexibility in regular expression used
1786 * src/m4.c (warn_syntax): Delete.
1787 (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
1788 spelling of option, along with optional argument.
1789 * doc/m4.texinfo (Operation modes, Arguments): Document this
1791 * NEWS: Document this change.
1793 2007-02-05 Eric Blake <ebb9@byu.net>
1795 * m4/gnulib-cache.m4: Module strstr no longer exists.
1797 Avoid bool bitfields, as they don't work on AIX.
1798 * src/m4.h (bool_bitfield): New typedef.
1799 (struct symbol, struct builtin): Use it.
1800 * src/input.c (struct input_block): Likewise.
1801 Reported by Albert Chin.
1803 * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
1804 Reported by Albert Chin.
1807 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
1809 * doc/m4.texinfo (Input processing): Further clarifications.
1811 2007-02-03 Eric Blake <ebb9@byu.net>
1813 * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
1815 Reported by Bruno Haible.
1817 2007-02-01 Eric Blake <ebb9@byu.net>
1819 * src/m4.c (fatal_warnings): New variable.
1820 (usage): Document new -E behavior.
1821 (main): Make -E an additive option.
1822 (m4_error, m4_error_at_line): Change exit status when required.
1823 * NEWS: Document this change.
1824 * doc/m4.texinfo (Operation modes): Likewise.
1825 Reported by Ralf Wildenhues.
1827 2007-01-27 Eric Blake <ebb9@byu.net>
1829 * src/m4.h (warn_syntax): Declare.
1830 (init_pattern_buffer): Export.
1831 * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
1832 (long_options, main): Implement new option.
1833 * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
1834 (define_user_macro): Warn on $11 and ${1} if requested.
1835 * src/input.c (init_pattern_buffer): Delete duplicate method.
1836 * doc/m4.texinfo (Operation modes): Document it.
1837 (Arguments): Document future direction of ${11} vs. $11.
1838 (Incompatibilities): Fix wording on POSIX limitations.
1839 * checks/get-them: Parse @{ and @} correctly.
1840 * NEWS: Document this change.
1842 2007-01-26 Eric Blake <ebb9@byu.net>
1844 * src/builtin.c (includes): Adjust to gnulib changes.
1846 2007-01-15 Eric Blake <ebb9@byu.net>
1848 * doc/m4.texinfo: Pull in various improvements from head.
1849 * src/builtin.c (include): Alter exit status on failure.
1850 * NEWS: Document this fix.
1852 2007-01-13 Eric Blake <ebb9@byu.net>
1854 * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
1855 assume the fallback of ss_base for BSDI 4.0.1.
1856 * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
1857 ! HAVE_STACK_T_SS_SP]: Use this check.
1858 Reported by Chris McGuire.
1860 * NEWS: Document the improvement.
1862 2007-01-09 Eric Blake <ebb9@byu.net>
1864 * src/eval.c (ASSIGN): New enumerator.
1865 (eval_lex): Recognize '='.
1866 (equality_term): Treat '=' like '==', but warn that it is
1868 * doc/m4.texinfo (Eval): Document and test this.
1869 (Incompatibilities): Document the POSIX incompatibility.
1870 * NEWS: Document this change.
1872 2007-01-06 Eric Blake <ebb9@byu.net>
1874 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
1875 * checks/check-them: Record expected exit status.
1876 * checks/get-them: Check exit status.
1877 * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
1879 * src/builtin.c: All users changed.
1880 * src/eval.c: Likewise. Also document where we are triggering
1881 undefined or implementation-defined behavior.
1882 (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
1883 (logical_or_term, logical_and_term, logical_not_term, not_term)
1884 (equality_term, unary_term): Port from head to follow POSIX
1886 (exp_term): Reject 0**0 as undefined.
1887 * doc/m4.texinfo (History): Mention 1.4.9.
1888 (Format, Incompatibilities): Update to document POSIX compliance.
1889 * NEWS: Document this change.
1891 2007-01-04 Eric Blake <ebb9@byu.net>
1893 * NEWS: Document previous fix.
1896 2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
1898 Fix Debian bug 405594, introduced 2006-11-01 from a bad
1899 copy-n-paste from head.
1900 * src/m4.c (main): Use correct file name after --.
1902 2007-01-04 Eric Blake <ebb9@byu.net>
1904 Fix regression from 1.4.7 in large file handling on some
1905 platforms, introduced on 2006-10-13.
1906 * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
1908 * NEWS: Document this fix.
1910 2007-01-03 Eric Blake <ebb9@byu.net>
1912 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1914 * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
1915 it bumps the copyright year).
1917 2006-12-27 Eric Blake <ebb9@byu.net>
1919 * doc/m4.texinfo (Patsubst): Fix typo.
1921 2006-12-16 Eric Blake <ebb9@byu.net>
1923 * src/m4.c (main): Check for errors when closing stdin.
1925 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1927 * doc/m4.texinfo: Fix some typos.
1929 2006-12-09 Eric Blake <ebb9@byu.net>
1931 * configure.ac (AC_INIT): Bump version number.
1932 * NEWS: Start changes of 1.4.8a.
1934 2006-11-20 Eric Blake <ebb9@byu.net>
1937 * configure.ac (AC_INIT): Bump version number.
1938 * NEWS: Describe changes since 1.4.7.
1940 2006-11-16 Eric Blake <ebb9@byu.net>
1942 * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
1943 Minor tweaks noticed while porting to head.
1945 2006-11-14 Eric Blake <ebb9@byu.net>
1947 * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
1949 (m4_tmpname): Avoid memory leak.
1951 2006-11-13 Eric Blake <ebb9@byu.net>
1953 * src/output.c (cleanup_tmpfile): Avoid double error message when
1954 umask is prohibitive.
1955 (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
1957 (m4_tmpfile): Add parameter, move cloexec action here.
1958 (make_room_for): Adjust caller. Don't keep too many files open.
1959 (insert_diversion_helper): Unlink emptied temp files.
1960 (make_diversion): Don't keep too many files open.
1961 * doc/m4.texinfo (Diversions): Tweak wording, now that open file
1962 descriptors are no longer a limiting factor.
1963 * NEWS: Document this change.
1965 Backport sparse diversion handling from head.
1966 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1968 * src/output.c (struct m4_diversion): Rename from struct
1969 diversion, and update members. All users changed.
1970 (diversion_table): Change to an ordered set, instead of an array.
1971 (div0): New storage for diversion 0.
1972 (diversions): No longer needed.
1973 (free_list): New list to allow recycling diversion storage.
1974 (diversion_storage): New storage to reduce malloc overhead.
1975 (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
1976 (output_init, output_exit, cleanup_tmpfile, make_room_for)
1977 (make_diversion): Handle new diversion storage scheme.
1978 (insert_diversion_helper): New function.
1979 (insert_diversion, undivert_all, freeze_diversions): Use it.
1980 * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
1981 exhaustion to visible test of large diversion numbers.
1982 * NEWS: Document this fix.
1984 2006-11-11 Eric Blake <ebb9@byu.net>
1986 * src/builtin.c (m4_translit): Slight optimization.
1988 * src/m4.h (to_uchar): Depend on HAVE_INLINE.
1990 * src/builtin.c: Remove unnecessary casts.
1991 (expand_ranges): Make 8-bit clean.
1992 * doc/m4.texinfo (Translit): Add tests and wording.
1993 * NEWS: Document this fix.
1995 2006-11-07 Eric Blake <ebb9@byu.net>
1997 * src/m4.h (output_exit): New prototype.
1998 * src/m4.c (main): Use it.
1999 * src/output.c (cleanup_tmpfile): Close files before removing
2001 (insert_diversion): Check for failure.
2002 (output_exit): Avoid memory leak.
2003 * doc/m4.texinfo (Diversions): Test this bug.
2005 * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
2007 2006-11-01 Eric Blake <ebb9@byu.net>
2009 Allow C++ compilation on Linux, as a safety measure in type
2011 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2013 * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
2014 (boolean): Kill this, and use stdbool.h instead.
2015 * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
2016 * src/output.c, src/symtab.c: All users changed.
2017 * src/symtab.c (hack_all_symbols): Update prototype.
2018 * src/builtin.c (dump_symbol, set_trace): Update signature.
2019 (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
2020 (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
2022 * src/debug.c (trace_flush): Likewise.
2023 * src/freeze.c (reload_frozen_state): Likewise.
2024 * src/input.c (push_file, push_string_finish, push_wrapup):
2025 (token_bottom, next_token): Likewise.
2026 * src/m4.c (main): Likewise.
2028 * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
2030 * src/m4.h (m4_path_search): Tweak signature.
2031 * src/path.c (m4_path_search): Likewise.
2032 * src/builtin.c (include): Update caller.
2033 * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
2034 with file names. Don't write to **argv.
2035 (process_file): New helper method.
2036 * NEWS: Document this fix.
2038 2006-10-31 Eric Blake <ebb9@byu.net>
2040 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
2041 * doc/m4.texinfo (Translit): Improve the documentation.
2042 * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
2044 (m4_index): Simplify, and speed up slightly.
2045 * NEWS: Document this fix.
2047 2006-10-28 Eric Blake <ebb9@byu.net>
2049 * src/input.c (set_quotes): Don't allow empty end-quote with
2050 non-empty start-quote.
2051 (set_comment): Likewise for end-comment.
2052 * src/builtin.c (m4_changecom): Adjust caller.
2053 * doc/m4.texinfo (Changequote, Changecom): Update documentation to
2055 (Incompatibilities): Document another POSIX bug.
2056 * NEWS: Mention this change.
2058 2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2060 * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
2063 2006-10-26 Eric Blake <ebb9@byu.net>
2065 Silence -Wwrite-strings -Wpointer-arith warnings.
2066 * src/builtin.c (define_user_macro): Allow NULL argument.
2067 (m4_builtin, m4_indir): Cast away const of "".
2068 * src/format.c (format): Likewise.
2069 * src/macro.c (collect_arguments): Likewise.
2070 (expand_macro): Avoid math on void*.
2071 * src/m4.c (main): Adjust caller.
2072 * src/output.c (freeze_diversions): Detect off_t overflow.
2074 * src/input.c (pop_input): Remove unnecessary code.
2076 2006-10-25 Eric Blake <ebb9@byu.net>
2078 * src/symtab.c (symtab_init): Avoid size_t overflow.
2079 * src/output.c (make_diversion): Avoid size_t overflow.
2080 * doc/m4.texinfo (Diversions): Test this fix.
2081 * src/input.c (input_block): Remove unused member. Reduce size
2083 (push_file, pop_input): Avoid useless assignment.
2084 * NEWS: Document the bug fix.
2086 Redo location tracking. Instead of having just files track the
2087 line to return to when popping input, now all input blocks track
2089 * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
2091 (input_block): Have line and file storage for all input types, and
2092 rename some members.
2093 (input_change): New global flag.
2094 (push_file, push_macro, push_string_init, push_wrapup): Store
2096 (push_string_finish, pop_input, pop_wrapup): Notice changes in
2098 (peek_input): Adjust to new member names.
2099 (next_char, next_char1): Adjust location if needed.
2100 (skip_line): Simplify restoring location.
2101 * doc/m4.texinfo (Location): Augment the test to catch line
2102 location of expansion of multi-line arguments.
2103 Reported by Stepan Kasal.
2105 2006-10-23 Eric Blake <ebb9@byu.net>
2107 * doc/m4.texinfo (Macro Arguments): Document that leading space
2108 in argument collection stops at macro expansion.
2109 (Incompatibilities): Document POSIX whitespace wording issue.
2111 2006-10-20 Eric Blake <ebb9@byu.net>
2113 * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
2114 TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
2115 end of a TeX line splits incorrectly.
2116 (Foreach, Improved foreach): Write these sections, borrowing ideas
2117 from CVS head and from m4sugar.
2118 * checks/get-them: Accomodate new way to show trailing space in
2120 * examples/foreach.m4: Make usable in documentation.
2121 * examples/foreachq.m4: New file.
2122 * examples/foreachq2.m4: New file.
2123 * examples/foreach2.m4: New file.
2124 * NEWS: Document the documentation updates.
2126 2006-10-19 Eric Blake <ebb9@byu.net>
2128 * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
2129 (m4_maketemp): Provide traditional behavior.
2130 * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
2131 new `mkstemp' macro and the flaws of the old `maketemp'.
2132 (Incompatibilities): Move maketemp discussion to...
2133 (Extensions): ...here, since -G now supresses the GNU extension.
2134 * NEWS: Document this.
2136 * examples/forloop.m4: Simplify.
2137 * examples/forloop2.m4: New file.
2138 * examples/quote.m4: New file.
2139 * doc/m4.texinfo (Loops): Rename to...
2140 (Shift): ...this node.
2141 (Forloop, Foreach, Improved forloop, Improved foreach): New
2144 2006-10-17 Eric Blake <ebb9@byu.net>
2146 * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
2148 * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
2149 gnulib headers, rather than in top directory.
2150 * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
2153 2006-10-16 Eric Blake <ebb9@byu.net>
2155 * doc/m4.texinfo: Backport some minor cleanups from head.
2156 (Cleardivert): Rename from cleardiv.
2158 * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
2159 a section of Preliminaries.
2160 (Operation modes, Preprocessor features, Limits control)
2161 (Frozen state, Debugging options, Command line files): Subdivide
2163 (Input processing, Quoting Arguments, Define, Arguments)
2164 (Cleardiv, Format, M4exit): Fix grammar of references.
2165 (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
2166 (Debug Levels, Debug Output, Include, Search Path, Divert)
2167 (Platform macros, Syscmd, Location, Extensions): Point to new
2169 (Top, Loops, Include, Undivert, Location, Incompatibilities):
2170 Improve file references.
2172 2006-10-14 Eric Blake <ebb9@byu.net>
2174 * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
2176 Reported by Ralf Wildenhues.
2178 * src/builtin.c (m4_undivert): Check for read error.
2180 2006-10-13 Eric Blake <ebb9@byu.net>
2182 * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
2183 header files are included, since <unistd.h> can affect the tests.
2185 Reported by Martin Koeppe.
2187 Backport head's usage of clean-temp module, as it is cleaner than
2188 using tmpfile-safer.
2189 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2190 clean-temp closeout', and remove tmpfile-safer.
2191 * src/m4.h (includes): Adjust.
2192 (m4_path_search): Rename from path_search, to avoid collision
2194 * src/m4.c (main): Install closeout handler. Adjust caller.
2195 (usage): Now done by closeout module.
2196 * src/builtin.c (m4_m4exit): Likewise.
2197 (m4_undivert, include): Adjust callers.
2198 * src/freeze.c (reload_frozen_state): Likewise.
2199 * src/path.c (m4_path_search): Rename from path_search.
2200 * src/output.c (output_temp_dir): New variable.
2201 (cleanup_tmpfile, m4_tmpfile): New functions, from head.
2202 (insert_diversion, make_room_for): Use them.
2203 * doc/m4.texinfo (Diversions): Document this, and add a test.
2204 (Improved fatal_error): Fix typo.
2205 (Maketemp): Port test to mingw, and no longer hide from
2207 * NEWS: Document the change in TMPDIR behavior.
2209 * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
2210 macros, to work with recent gnulib-tool update.
2212 * src/builtin.c (m4_builtin, m4_indir): Allow transparent
2213 handling of defn results.
2214 * doc/m4.texinfo (Builtin, Indir): Add test cases.
2215 * NEWS: Document this.
2217 2006-10-12 Eric Blake <ebb9@byu.net>
2219 * doc/m4.texinfo (Location): Fix typo in previous commit.
2220 (Changeword): Catch one more case.
2221 * src/input.c (skip_line): Fix case when outer file used macro to
2224 2006-10-11 Eric Blake <ebb9@byu.net>
2226 * src/input.c (enum input_type): Add additional types, to shave
2227 time off the common case.
2228 (push_wrapup): Wrapped strings remember location.
2229 (push_string_finish): Normal strings carry no location.
2230 (push_file): Start new files uninitialized.
2231 (peek_input, next_char_1): Optimize common cases by updating
2232 location only on new input types.
2233 (pop_input): Update to honor new input types.
2234 (skip_line, push_string_finish): Fix regression in previous patch
2235 when dnl is not followed by newline in included file.
2236 (push_string_init): Initialize all fields of INPUT_STRING sooner.
2237 (peek_token): Simplify.
2238 (peek_input): Don't pop input files on peek, so that __file__ and
2239 __line__ as last token of include file work correctly.
2240 * doc/m4.texinfo (History): Mention 1.4.8.
2241 (Answers): Split into sections, one per answer.
2242 (Improved exch, Improved cleardivert, Improved fatal_error): New
2244 (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
2245 new m4wrap location semantics.
2246 (Changeword): Add test that caught the regression.
2247 * NEWS: Document this.
2249 * src/macro.c (expand_macro): In macro expansion errors, report
2250 line number at open parenthesis.
2251 * src/input.c (next_token): Fix off-by-one bug in reporting end
2252 of file in unterminated comment and string.
2253 (file_names): New obstack, necessary since expand_macro now hangs
2254 on to file names longer than the files remain open.
2255 (input_init): Initialize new obstack.
2256 (push_file): Use new obstack. Delay updates to current_file
2257 until after expand_macro has restored state.
2258 (peek_input, next_char_1): Update current_file if necessary.
2259 (pop_wrapup): Release memory.
2260 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
2262 (Dnl): Update to the new location reporting rules.
2263 * NEWS: Document these changes.
2265 2006-10-10 Eric Blake <ebb9@byu.net>
2267 * src/macro.c (argc_stack, argv_stack): New variables for sharing
2268 obstacks across multiple macro calls.
2269 (expand_input): Initialize and tear down stack once per input
2270 file, instead of once per macro.
2271 (expand_macro): Reuse existing stacks when possible.
2272 (collect_arguments): Simplify slightly.
2274 * src/path.c (include_env_init): Fix botched patch application.
2275 Reported by Ralf Wildenhues.
2277 2006-10-09 Eric Blake <ebb9@byu.net>
2279 * src/m4.c (usage, main): Detect write failures to stderr.
2280 * src/builtin.c (m4_m4exit): Likewise.
2281 * NEWS: Document this.
2283 * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
2285 * NEWS: Document this.
2286 * doc/m4.texinfo (Invoking m4): Likewise.
2288 2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2290 * src/path.c (include_env_init): Copy the string returned
2291 by getenv before overwriting it; POSIX disallows this.
2293 2006-10-09 Eric Blake <ebb9@byu.net>
2295 * src/m4.c (main): Defer debugfile until after --help.
2296 * configure.ac (AC_INIT): Bump version number.
2297 * NEWS: Start changes of 1.4.7a.
2299 2006-09-25 Eric Blake <ebb9@byu.net>
2302 * configure.ac (AC_INIT): Bump version number.
2303 * NEWS: Describe changes since 1.4.6.
2305 2006-09-21 Eric Blake <ebb9@byu.net>
2307 * doc/m4.texinfo (Invoking m4): Add clarification on option
2308 processing behavior.
2310 Reported by Mikhail Teterin.
2312 * bootstrap: Add --force option, based on idea from coreutils.
2313 * README: Document that ./bootstrap and autoreconf are for
2314 developers, and not lightly done in tarballs.
2316 2006-09-20 Eric Blake <ebb9@byu.net>
2318 * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
2319 deprecation warning on -e.
2320 * doc/m4.texinfo (Invoking m4, Extensions): Document this.
2321 * NEWS: Document this.
2323 2006-09-19 Eric Blake <ebb9@byu.net>
2325 * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
2326 -o/--error-output to --debugfile, and deprecate the former. This
2327 will allow a future release to be more consistent with other GNU
2328 tools, with -o/--output affecting stdout, not debug.
2329 * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
2330 * NEWS: Document this.
2332 2006-09-14 Eric Blake <ebb9@byu.net>
2334 * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
2335 --diversions. `m4 --help --version' now displays help, not
2337 (interactive, frozen_file_to_read, frozen_file_to_write): Move to
2339 (show_help, show_version): No longer needed.
2340 (long_options, DIVERSIONS_OPTION): Backport patch from head to
2341 distinguish between -N and --diversions in warning.
2342 * doc/m4.texinfo (Invoking m4): Document this.
2345 2006-09-11 Eric Blake <ebb9@byu.net>
2347 * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
2348 * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
2350 (debug_set_file): Use STDOUT_FILENO.
2351 * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
2352 with POSIX in regards to unread input.
2353 * NEWS: Document this fix.
2354 * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
2356 2006-09-07 Eric Blake <ebb9@byu.net>
2358 * m4/gnulib-cache.m4: Update to newer gnulib-tool.
2359 * src/m4.h (push_file): Change prototype.
2360 * src/input.c (push_file, peek_input, next_char_1): Only call getc
2361 once at EOF, to avoid double ^D on terminal stdin; regression from
2363 (push_file, pop_file): Allow reading stdin twice.
2364 * src/m4.c (main): Likewise.
2365 * src/builtin.c (include): Update caller.
2366 * NEWS: Document this change.
2367 * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
2368 (Syscmd): Add a test that failed before this patch.
2370 2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2372 * checks/check-them: Quote $pwd.
2374 2006-09-05 Eric Blake <ebb9@byu.net>
2376 * src/builtin.c (define_macro): Warn on invalid macro name.
2377 * NEWS: Document this change.
2378 * doc/m4.texinfo: Fix typos.
2379 (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
2380 (Ifelse): Backport some improvements from head.
2382 2006-09-04 Eric Blake <ebb9@byu.net>
2384 * doc/m4.texinfo (Changeword): Skip test on mingw, where the
2385 native echo is braindead.
2386 * checks/check-them (strip_needed): Ignore \r in output. Now the
2387 testsuite will pass when cross-compiling from cygwin to mingw.
2389 * src/input.c (peek_input): Fix regression in handling macro
2390 without arguments as last token in file; debian bug 385720.
2391 (next_token): Always consume an input character.
2392 Reported by Andreas Schultz.
2393 * configure.ac (AC_INIT): Bump version number.
2394 * NEWS: Document this fix.
2395 * doc/m4.texinfo (History): Mention next version.
2396 (Changeword): Add example that exposes this bug.
2399 2006-08-25 Eric Blake <ebb9@byu.net>
2402 * configure.ac (AC_INIT): Bump version number.
2403 * NEWS: Describe changes since 1.4.5.
2405 * Makefile.maint (web-manual): Give up on VPATH build during
2406 distribution. But distributions are made so infrequently that
2407 this is not too much of a hardship.
2408 * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
2411 2006-08-24 Eric Blake <ebb9@byu.net>
2413 * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
2414 Solaris, produce output on just one argument.
2415 (m4_regexp, m4_patsubst): For consistency, do likewise.
2416 (m4_patsubst): Allow zero-length match at end of string.
2417 * doc/m4.texinfo (Sysval): Fix overfull hbox.
2418 (Bugs, Macro Arguments): Minor fixes.
2419 (Other tokens): Rearrange node order.
2420 (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
2421 * NEWS: Document these fixes.
2423 2006-08-22 Eric Blake <ebb9@byu.net>
2425 * src/input.c (pop_input): Avoid empty filename with -di option.
2426 * src/debug.c (debug_message_prefix): Put space before message.
2428 * m4/gnulib-cache.m4: We don't explicitly use alloca module.
2430 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
2431 * Makefile.maint (fetch): Simplify, now that we can use gnupload.
2433 * checks/check-them: State why a test is skipped.
2434 * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
2436 * ChangeLog: Add copyright.
2437 * AUTHORS: Likewise.
2438 * BACKLOG: Likewise.
2442 * examples/COPYING: New file, add copyright for all the examples.
2443 * checks/get-them: Put copyright on testsuite files.
2445 2006-08-18 Eric Blake <ebb9@byu.net>
2447 Don't let unrelated child processes see too many files.
2448 * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
2449 * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
2450 spelling in error message.
2451 * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
2452 (debug_set_output): Close debug file on exec.
2453 * src/m4.h (includes): Add cloexec.h.
2454 * src/output.c (make_room_for): Close diversions on exec.
2455 * src/path.c (path_search): Close include files on exec.
2456 * NEWS: Document this.
2458 Regular expressions were leaking memory.
2459 * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
2461 (m4_regexp, m4_patsubst): Avoid memory leak.
2462 * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
2464 (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
2465 from O(n^2) to O(n) for calculating word_start.
2466 (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
2467 O(1) bitmap, not O(n) search string.
2468 * NEWS: Document this fix.
2470 2006-08-17 Eric Blake <ebb9@byu.net>
2472 * NEWS: Document previous checkin.
2474 * src/builtin.c (substitute): Avoid core dump when accessing
2475 beyond bound of regular expression.
2476 Reported by Karl Nelson.
2477 * doc/m4.texinfo (Regexp): Add example that causes core dump on
2478 some architectures prior to this patch.
2481 2006-08-16 Eric Blake <ebb9@byu.net>
2483 * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
2484 clear that dumpdef does not always go to stderr.
2486 * src/builtin.c (m4_errprint): Flush buffers before printing to
2490 2006-08-15 Eric Blake <ebb9@byu.net>
2492 * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
2493 per debian bug 96075.
2494 * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
2495 (Changeword): Don't use shift as an example of a swallowed word.
2496 (Divert): Discuss fact that divert is an English word.
2497 Reported by Richard A Nelson.
2499 2006-08-14 Eric Blake <ebb9@byu.net>
2501 * doc/m4.texinfo (Invoking m4): Minor fixes.
2503 2006-08-12 Eric Blake <ebb9@byu.net>
2505 * doc/m4.texinfo (Arguments): Hint at better exch macro.
2506 (Answers): Provide a better definition.
2508 2006-08-09 Eric Blake <ebb9@byu.net>
2510 * doc/m4.texinfo (Incompatibilities): Document that m4 does not
2511 yet understand locales.
2512 * NEWS: Fix wording of a few items.
2514 2006-08-08 Eric Blake <ebb9@byu.net>
2516 Avoid printing `NONE:0:' in error messages.
2517 * src/m4.h (m4_error_at_line): New function.
2518 * src/m4.c (m4_error_at_line): Implement.
2519 * src/input.c (skip_line, input_init, next_token): Use "", not
2520 "NONE", for no file, since NONE can be a real file name.
2521 * src/macro.c (expand_argument): Likewise.
2522 * src/debug.c (debug_message_prefix, trace_header): Check for
2524 * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
2525 (Location): Document that synclines and internal message format
2526 are not impacted by redefining these macros.
2527 (M4exit): Hint at bug in fatal_error.
2528 (Answers): Provide workaround to match m4 output.
2530 * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
2531 * src/m4.h (m4_error): New function.
2532 (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
2533 error module deficiencies.
2534 (reference_error, suppress_line): No longer needed.
2535 * src/m4.c (m4_error): Implement.
2536 (main): No longer need to install error callback.
2538 2006-08-04 Eric Blake <ebb9@byu.net>
2540 * src/m4.h (program_name): Declare.
2541 (suppress_line): New variable.
2542 (M4ERROR_AT_LINE): New macro.
2543 * src/m4.c (reference_error, main): Follow GNU Coding Standards
2544 for error message format.
2545 * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
2546 * src/macro.c (expand_argument): Likewise.
2547 * checks/check-them (examples): Adjust to new message format.
2548 * src/builtin.c (m4___program__): New builtin.
2549 * doc/m4.texinfo (Location): Split from Errprint into new node,
2550 and document __program__.
2551 (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
2552 (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
2554 (Extensions): Document __program__.
2555 * NEWS: Document this change.
2557 2006-08-03 Eric Blake <ebb9@byu.net>
2559 Don't confuse leading `(' in comment or quote with start of
2560 argument collection.
2561 * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
2563 (peek_input): Make private to input.c.
2564 (peek_token): New prototype.
2565 * src/input.c (default_word_regexp): Reduce ifdefs.
2566 (peek_input): Make static.
2567 (next_token): Return new token types.
2568 (match_input, MATCH): Add argument consume, which controls
2569 whether match should be pushed back.
2570 (peek_token): New function.
2571 (token_type_string) [DEBUG_INPUT]: New function.
2572 * src/macro.c (expand_token, expand_argument, collect_arguments):
2573 Handle new token types.
2574 * doc/m4.texinfo (Changequote, Changecom): Document this.
2575 * NEWS: Document this.
2577 * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
2579 * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
2580 overflow detection when sigstack exists but is not implemented.
2581 Fixes debian bug 154053.
2583 Reported by David Perlin.
2585 2006-08-02 Eric Blake <ebb9@byu.net>
2587 * src/input.c (MATCH): Fix EOF detection on multi-byte comment
2590 2006-08-01 Eric Blake <ebb9@byu.net>
2592 * src/input.c (skip_line, next_token): Remember current file in
2593 case input file ends abruptly. Addresses debian bug 175365.
2594 (pop_input): Defer freeing storage that holds previous file
2596 (pop_wrapup): to here, after error message is issued.
2597 * src/macro.c (expand_argument): Remember current file in case
2598 input file ends abruptly.
2599 * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
2600 (M4wrap): Adjust testsuite accordingly.
2601 (Errprint): Document line number limitation of m4wrap.
2602 * NEWS: Document this fix.
2605 2006-07-31 Eric Blake <ebb9@byu.net>
2607 * src/input.c (peek_input, next_char, match_input): Be eight-bit
2608 clean; fixes debian bug 311378.
2609 * doc/m4.texinfo (Syntax): Describe eight-bit handling.
2610 (Changequote, Changecom): Add examples to test this.
2611 * NEWS: Document this fix.
2613 Reported by Steven Augart.
2615 * doc/m4.texinfo: Whitespace fix.
2616 * checks/get-them: Avoid exceeding 14-char file name limit.
2619 2006-07-30 Eric Blake <ebb9@byu.net>
2621 * src/path.c (path_search): Detect allocation failure.
2623 Use native free when it is good enough.
2624 * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
2625 * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
2627 * src/symtab.c (free_symbol): Likewise.
2628 * src/m4.c (xfree, main): Likewise.
2629 * src/m4.h (obstack_chunk_free): Likewise.
2630 * src/path.c (path_search): Likewise.
2631 * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
2633 * doc/m4.texinfo (Errprint): Add example for last patch.
2634 * checks/check-them: Account for VPATH in latest example.
2636 2006-07-29 Eric Blake <ebb9@byu.net>
2638 * src/path.c (path_search): Add result parameter, so that
2639 -I can be accounted for. Debian bug 53685.
2640 * src/m4.h (path_search): Update prototype.
2641 * src/m4.c (main): Adjust callers.
2642 * src/freeze.c (reload_frozen_state): Likewise.
2643 * src/builtin.c (include, m4_undivert): Likewise.
2644 * NEWS: Document this change.
2645 Reported by Nicolas Lichtmaier.
2647 2006-07-28 Eric Blake <ebb9@byu.net>
2649 * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
2650 several non-GNU makes.
2651 * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
2652 * src/m4.h: Likewise.
2653 * src/input.c (push_wrapup): Avoid compiler warning with Solaris
2656 2006-07-27 Eric Blake <ebb9@byu.net>
2658 * doc/m4.texinfo: Use @acronym{GNU} throughout.
2659 (History): Update for 1.4.6.
2661 * src/m4.h (_): Remove K&R cruft.
2662 * src/builtin.c: Likewise.
2663 * src/debug.c: Likewise.
2664 * src/eval.c: Likewise.
2665 * src/macro.c: Likewise.
2666 * src/stackovf.c: Likewise.
2668 * doc/Makefile.am (m4.1): Improve man page.
2669 * src/m4.c (usage): Improve --help output, including adding the
2670 bug reporting address.
2671 (main): Follow GNU Coding Standards for --version output.
2673 2006-07-26 Eric Blake <ebb9@byu.net>
2675 * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
2676 end-comment consistently, to match POSIX.
2678 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
2679 (Dnl, M4wrap, Include): Document EOF issues, and add examples.
2680 (Incompatibilities): Document incompatibility of changecom
2681 vs. macro names, and of EOF in include.
2682 * src/input.c (next_token): Reject unterminated comments at EOF.
2683 (skip_line): Warn on unterminated dnl at EOF.
2684 * NEWS: Document these changes.
2686 2006-07-25 Eric Blake <ebb9@byu.net>
2688 * m4/gnulib-cache.m4: Update to reflect gnulib's split of
2689 stdio-safer into fopen-safer and tmpfile-safer.
2690 * src/m4.c: Remove redundant include.
2692 2006-07-24 Eric Blake <ebb9@byu.net>
2694 Fix bugs related to stream handling.
2695 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2696 unlocked-io stdio-safer stdlib-safer close-stream.
2697 * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
2698 provided by gnulib if needed.
2699 * src/output.c [! HAVE_TMPFILE]: Likewise.
2700 * src/m4.h (includes): Replace unistd, stdio, and stdlib with
2701 their safer counterparts.
2702 (retcode): New global variable.
2703 * src/input.c (pop_input): Check for read failure.
2704 * src/freeze.c (reload_frozen_state): Likewise.
2705 (produce_frozen_state): Check for write failure.
2706 * src/debug.c (debug_set_file): Likewise.
2707 * src/m4.c (usage, main): Likewise.
2708 (retcode): Make global.
2709 * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
2710 status is non-zero except when everything succeeds.
2711 * doc/m4.texinfo (M4exit): Document these changes.
2712 (Incompatibilities): Remove documentation of bug now fixed.
2713 * NEWS: Document these fixes.
2715 2006-07-22 Eric Blake <ebb9@byu.net>
2717 * src/format.c (format): Avoid compiler warning that str may be
2720 2006-07-21 Eric Blake <ebb9@byu.net>
2722 * src/m4.h [UNIX]: Add more platforms that are close enough to
2723 categorize as UNIX, but which don't predefine __unix__.
2724 Reported by Nelson H. F. Beebe.
2726 2006-07-20 Eric Blake <ebb9@byu.net>
2728 * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
2729 to explicitly ask for --assume-autoconf=2.60.
2731 2006-07-19 Eric Blake <ebb9@byu.net>
2733 * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
2734 and exits normally with 129.
2735 Reported by Nelson H. F. Beebe.
2738 * src/m4.h (EXIT_MISMATCH): Define.
2739 * src/freeze.c (reload_frozen_state): Detect version mismatch, by
2740 exiting with status 63.
2741 * src/m4.c (usage): Document this.
2742 * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
2745 * doc/m4.texinfo (copying): Relax restriction on front-cover and
2748 2006-07-17 Eric Blake <ebb9@byu.net>
2750 * src/format.c (format): Support F, g, and G specifiers.
2751 * doc/m4.texinfo (Format): Document this.
2752 * NEWS: Document this addition.
2754 * doc/m4.texinfo (Builtin): Delete redundant text.
2756 * configure.ac (AC_INIT): Bump version number.
2757 * src/builtin.c (substitute): Bah. Fix buffer overrun.
2758 * NEWS: Document this fix.
2760 2006-07-15 Eric Blake <ebb9@byu.net>
2763 * configure.ac (AC_INIT): Bump version number.
2764 * NEWS: Describe changes since 1.4.4.
2766 * src/m4.c (usage): Document exit status.
2767 * doc/m4.texinfo: Use `exit status', not `exit code'.
2768 (Invoking m4): Document exit status.
2770 * bootstrap: Backport --help, --version from head.
2771 (func_update): New function, for easily grabbing up-to-date files
2773 * Makefile.maint (web-manual): Fix for VPATH builds.
2775 2006-07-14 Eric Blake <ebb9@byu.net>
2777 * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
2778 looks bad in info. Use @deffn rather than @example for
2779 describing prototypes. Fix awkward wording and grammar.
2781 * src/builtin.c (substitute): Warn on bad escape sequences.
2782 Ignore trailing backslash.
2783 * doc/m4.texinfo (Regexp): Add documentation for this.
2784 * NEWS: Document this change.
2786 * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
2787 * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
2789 (Dnl): Update example to show side effects.
2790 * checks/get-them: Generate three digit test names.
2791 * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
2793 2006-07-13 Eric Blake <ebb9@byu.net>
2795 * src/input.c (input_init): Simplify.
2796 (set_word_regexp): Treat empty string as default, since empty
2797 regexp would disable word parsing.
2798 * src/m4.c (user_word_regexp): Default to empty string.
2799 * src/builtin.c (builtin_tab): Make changeword blind.
2800 * doc/m4.texinfo (Changeword): Document this.
2801 * NEWS: Document this.
2802 * TODO: Knock off completed items.
2804 * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
2806 * doc/m4.texinfo (Undefine, Pushdef): Test this.
2807 * NEWS: Document this change.
2809 * src/builtin.c (numeric_arg): Treat empty string as 0, with a
2810 warning. Detect quoted leading space and overflow as warnings.
2811 (m4_eval): Treat empty radix as 10, and allow output in radix 1.
2812 Treat width as minimum number of digits, as required by POSIX.
2813 (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
2815 (m4_substr): Likewise. Silently treat empty start as 0.
2816 (m4_undivert): Treat ` 1a' as file, not diversion 1.
2817 * src/eval.c (eval_lex): Parse radix 1 numbers.
2818 * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
2819 one type of warning.
2820 (Manual): Document behavior of numeric parsing of empty string.
2821 (Divert, Incr): Document error handling.
2822 (Eval): Document radices better.
2823 (Incompatibilities): Document translit incompatibility.
2824 * NEWS: Document these changes.
2826 * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
2827 (web-manual): Simplify.
2828 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
2829 * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
2830 (MAINTAINERCLEANFILES): Clean it as well.
2831 * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
2832 (MAINTAINERCLEANFILES): Clean it as well.
2834 2006-07-12 Eric Blake <ebb9@byu.net>
2836 * doc/m4.texinfo (Extensions): Document how to overcome
2837 implementation difference in > 9 positional parameters.
2839 * src/m4.c (usage): Sort within sections.
2840 (nesting_limit): Raise default from 250 to 1024.
2841 * doc/m4.texinfo: Use file name, not filename, per GNU coding
2842 standard. Use @option where appropriate.
2843 (Invoking m4): Sort to match --help output.
2844 (Debug Levels): Sort.
2845 (Frozen files): Sort and break into two nodes.
2847 * src/m4.c (nesting_limit): Raise default from 250 to 1024.
2848 * NEWS: Document raised -L limit.
2850 2006-07-11 Eric Blake <ebb9@byu.net>
2852 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
2853 stress-test changeword before a release.
2854 * doc/m4.texinfo: More doc cleanups.
2855 (Copying This Manual): New node; actually include the FDL in the
2857 * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
2858 * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
2859 * NEWS: Mention documentation improvements.
2861 * src/m4.h (OS2): New platform macro.
2862 * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
2864 * doc/m4.texinfo (Platform macros): Document it.
2865 (Sysval): Remove non-portable test of system("").
2866 * NEWS: Document this change.
2867 Reported by Andreas Buening.
2869 2006-07-09 Eric Blake <ebb9@byu.net>
2871 * doc/m4.texinfo (Undivert): Fix typo in last commit.
2872 * src/m4.c (usage): Document M4PATH.
2873 * src/path.c (path_search): Reject empty string.
2874 * src/output.c (insert_diversion): Ignore diversion 0.
2875 * src/builtin.c (m4_undivert): Ignore empty string.
2876 * NEWS: Document this fix.
2878 2006-07-08 Eric Blake <ebb9@byu.net>
2880 * checks/get-them: Make filtering easier.
2881 * checks/check-them: Filter non-input lines, so line counts are
2882 more realistic in the documentation, and so changeword tests work
2883 even when dnl is disabled.
2884 * doc/m4.texinfo: Adjust example line numbers. Clean up
2885 front-matter, following autoconf's example.
2886 (Changeword): Enable tests, skipping if changeword not supported.
2887 (Define, Defn, Ifelse): Backport more examples from head.
2888 (Input processing, Answers): New nodes, backported from head.
2889 (Include): Expand test to cover empty filename.
2890 (Undivert): Add test of undivert(0).
2892 2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2894 * doc/m4.texinfo: Fix spelling errors.
2896 2006-07-07 Eric Blake <ebb9@byu.net>
2900 * doc/Makefile.am (m4.1): No need to go through a temporary file;
2901 this also ensures timestamps are updated.
2902 * src/m4.h (includes): Require config.h. Assume string.h,
2903 stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
2904 than prototyping ourselves.
2905 (builtin_func): Add parameter type-checking.
2906 (voidstar): Delete, now that we assume C89.
2907 * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
2909 * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
2912 2006-07-06 Eric Blake <ebb9@byu.net>
2914 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2916 * src/m4.h (includes): Add binary-io.h for O_BINARY.
2917 * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
2918 #ifdef. Fixes patch from 2005-02-03 for cygwin.
2919 * NEWS: Mention this fix.
2921 * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
2922 * src/builtin.c (m4_syscmd): Work around OS/2 bug.
2924 * Makefile.am (SUBDIRS): Build . before src, so that autoheader
2925 runs first when needed.
2926 * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
2927 once in srcdir rather than multiple times in VPATH builds.
2929 2006-07-03 Eric Blake <ebb9@byu.net>
2931 * checks/check-them: Use portable = in test.
2932 * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
2933 directory, as required by Solaris cc. Include built headers, as
2934 required by Solaris make in VPATH build.
2935 * checks/Makefile.in: Use $(srcdir) where needed.
2936 (CHECKS): Factor $(srcdir) into macro.
2937 (DISTFILES): Likewise. Automake takes care of distributing
2940 (Makefile): Use modern syntax of config.status.
2941 * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
2942 Avoid overfull and underfull hboxes in dvi.
2944 Fix 'make check' in VPATH build. All files included by testsuite
2945 now live in a single directory. Use forloop.m4 in testsuite.
2946 * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
2948 * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
2950 * checks/Makefile.in (DISTFILES): Don't distribute moved files.
2951 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
2952 * checks/check-them: Avoid s/// when filename is in pattern.
2953 * examples/forloop.m4: Fix to match documentation.
2954 * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
2956 (Loops, Format): Actually use forloop.m4 in tests.
2958 2006-07-02 Eric Blake <ebb9@byu.net>
2960 * checks/Makefile.in (exec_prefix, prefix): New macros, so that
2961 $(bindir) works in installcheck.
2962 (check, installcheck): No longer change directory, so that
2963 distcheck works with a read-only builddir.
2964 * checks/check-them: Work when pwd is no longer builddir.
2966 2006-07-01 Eric Blake <ebb9@byu.net>
2968 * GNUmakefile: New file, borrowed from coreutils.
2969 * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
2970 * Makefile.maint (Makefile): Delete this rule, now that
2971 GNUmakefile includes Makefile.
2973 2006-06-30 Eric Blake <ebb9@byu.net>
2975 For compatibility with other m4 implementations, sysval returns
2976 signal<<8 rather than 0 if syscmd is terminated by a signal.
2977 * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
2978 * src/builtin.c (include): Include sys/wait.h when stdlib.h does
2979 not provide wait macros.
2980 (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
2981 (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
2982 (m4_esyscmd): Set sysval to -1 on failure.
2983 (m4_sysval): Print 127 on failure, and accomodate signals if they
2985 * NEWS: Document this change.
2986 * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
2988 * checks/check-them: Likewise.
2989 * src/debug.c (debug_set_file): Work around mingw fstat bug.
2991 * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
2992 * src/freeze.c (produce_frozen_state): Use new spelling of
2994 * src/builtin.c (predefined_tab): Add __windows__ on non-unix
2996 (m4_syscmd, m4_esyscmd): The empty command is successful.
2997 * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
2998 Document platform-dependence of system().
2999 (Syscmd): Add example.
3000 (Esyscmd): Make example more robust, and actually demonstrate
3002 (Sysval): Expand test to cover esyscmd code path, and to check
3003 that empty command is successful. Add conditional check for
3005 (Other Incompatibilities): Move platform macros from here...
3006 (Platform macros): ...to this new node. Add windows macro.
3007 Check that exactly one platform macro is provided.
3008 * checks/check-them: Improve trap cleanup. Tolerate dirname and
3009 .exe in error messages. Allow for skipping checks.
3010 * configure.ac (HAVE_EFGCVT): Kill dead configure check.
3011 * NEWS: Document platform macros.
3013 2006-06-29 Eric Blake <ebb9@byu.net>
3015 Fix buffer overrun bug.
3016 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
3018 * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
3019 variant instead, since [efg]cvt are obsolete and our use of them
3020 was buggy (savannah sr #104303).
3021 (format): Fix buffer overflow by using xasprintf.
3022 * doc/m4.texinfo (Format): Expand format test to catch both bugs.
3023 * NEWS: Document this fix.
3025 * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
3027 (AC_CACHE_CHECK): Cache search for ecvt.
3029 2006-06-27 Eric Blake <ebb9@byu.net>
3031 * doc/m4.texinfo (Eval): Document 32-bit signed limitations
3032 required by POSIX, and add example that exposed core dump on x86
3034 (Incompatibilities): Document incompatibility in eval precedence.
3035 * src/eval.c (shift_term): Explicitly mask, to avoid undefined
3037 (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
3038 * NEWS: Document this change.
3040 * doc/m4.texinfo: Use @noindent consistently.
3041 (Quoting Arguments): Document that unquoted parentheses group
3043 (Pseudo Arguments): Expand tests to show this.
3044 (Incompatibilities): Contrast traditional behavior of
3047 2006-06-24 Eric Blake <ebb9@byu.net>
3049 * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
3050 (AC_CHECK_HEADERS_ONCE): Use this new feature.
3051 (AC_CHECK_FUNCS_ONCE): Likewise.
3053 2006-06-23 Eric Blake <ebb9@byu.net>
3055 * doc/m4.texinfo: Quoting cleanup throughout - follow
3056 autoconf-recommended style of one level of quote per parenthesis
3057 in the normal case. Adjust error messages to match GNU coding
3058 standards (and to allow 'make check' to pass again).
3059 (Quoted strings, Inhibiting Invocation): Turn more examples into
3061 (Comments): Resolve FIXME by adding example.
3062 (Define): Add example about underquoting.
3063 (Defn): Add example about use of $0.
3064 (Indir, Format): Resolve FIXME done in last commit.
3065 (Ifelse): Add example about creating blind macro.
3066 (Debugging): Fix grammar.
3067 (Dnl): Add example about dnl with arguments.
3068 (M4wrap): Be explicit that LIFO order is non compliant, and will
3070 (Undivert): Resolve FIXME by adding example.
3071 (Frozen files): Document that m4wrap and sysval will not work
3072 consistently until m4 2.0.
3073 (Incompatibilities): Document another POSIX compliance bug, this
3074 time with changequote. Document a traditional incompatibility
3075 with partial input spanning file boundaries.
3077 Make error messages more consistent with GNU coding standards -
3078 start with lower case, and don't end sentence with punctuation.
3079 * src/debug.c (trace_pre): Update message wording.
3080 * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
3082 * src/freeze.c (produce_frozen_state, issue_expect_message),
3083 (reload_frozen_state): Likewise.
3084 * src/input.c (push_string_init, pop_init, init_macro_token),
3085 (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
3086 * src/m4.c (stackovf_handler, main): Likewise.
3087 * src/macro.c (expand_token, expand_argument, call_macro),
3088 (expand_macro): Likewise.
3089 * src/output.c (make_room_for, output_text, insert_file),
3090 (freeze_diversions): Likewise.
3091 * src/symtab.c (symtab_init, lookup_symbol): Likewise.
3093 * src/builtin.c (builtin_tab): Make format and indir blind.
3094 (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
3095 * NEWS: Mention the change to builtins.
3097 2006-06-22 Eric Blake <ebb9@byu.net>
3099 Robustify frozen file format.
3100 * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
3101 macro. Require V first, and only accept it once. For F, use
3102 placeholder if builtin is not found, rather than warning.
3103 * src/m4.h (m4_placeholder): New prototype.
3104 * src/builtin.c: Unify error message style.
3105 (m4_placeholder): New function, warn if invoked.
3106 (builtin_tab): Add m4_placeholder.
3107 (m4_defn): Warn if placeholder is encountered.
3108 (find_builtin_by_addr): Handle placeholder.
3109 (find_builtin_by_name): Return placeholder on failure.
3110 (m4_builtin): Treat placeholder as undefined.
3111 * doc/m4.texinfo (Frozen files): Document changes in V and F.
3112 * NEWS: Document this change.
3113 Reported by Bruno Haible.
3115 * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
3116 (tabchar): New macro, so that 'make check' still works.
3117 (Invoking m4): Document that ignored compatibility options -B, -S,
3118 and -T each consume an argument.
3119 * checks/get-them: Honor @tabchar{}.
3121 Avoid compiler warnings during -DDEBUG.
3122 * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
3123 [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
3124 * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
3125 (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
3126 (next_token) [DEBUG_INPUT]: Print before returning.
3127 * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
3128 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
3130 Avoid mkstemp bugs on various platforms.
3131 * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
3132 * src/output.c [! HAVE_MKSTEMP]: Delete.
3133 * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
3134 * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
3135 * NEWS: Document this.
3137 * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
3138 Reported by Bruno Haible.
3140 2006-06-21 Eric Blake <ebb9@byu.net>
3142 Avoid obsolete sigstack when POSIX sigaltstack is available.
3143 * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
3145 * configure.ac (AC_CHECK_HEADERS): Likewise.
3146 (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
3147 obsolete and most hosts now have it in signal.h.
3148 (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
3149 (AC_CACHE_CHECK): Cache decision to use stackovf.
3150 (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
3151 * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
3152 (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
3153 simplify later code.
3154 (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
3155 in case of dereferencing a member of a NULL pointer.
3156 (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
3158 (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
3159 EXIT_FAILURE in error, indent preprocessor directives.
3160 [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
3162 [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
3163 Reported by Santiago Vila.
3165 2006-06-19 Eric Blake <ebb9@byu.net>
3169 2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
3171 * checks/Makefile.in (PATH_SEPARATOR): New macro.
3172 (check, installcheck): Use it, for OS/2.
3174 2006-06-18 Eric Blake <ebb9@byu.net>
3176 Consistently use "GNU M4" as package name, "m4" as executable
3178 * NEWS: Document previous fix.
3180 * README: Fix grammar. Document that --enable-changeword is on
3182 * doc/m4.texinfo (Top, Changeword): Likewise.
3183 (Sysval): Enhance this test.
3184 (History): Backport this section from CVS head, and update.
3186 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
3187 Eric Blake <ebb9@byu.net>
3189 * src/builtin.c (WEXITSTATUS): Provide fallback definition.
3190 (m4_esyscmd): Set sysval to 0xffff, to accomodate both
3191 big-endian and little-endian wait status definitions.
3192 (m4_sysval): Use WEXITSTATUS.
3193 Reported by Andreas Buening.
3195 2006-06-18 Eric Blake <ebb9@byu.net>
3197 * configure.ac (AC_INIT): Bump version number.
3198 * NEWS: Describe changes in 1.4.4c.
3200 2006-06-17 Eric Blake <ebb9@byu.net>
3202 Beta Release 1.4.4b:
3203 * configure.ac (AC_INIT): Bump version number.
3204 * NEWS: Describe changes since 1.4.4.
3205 * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
3207 * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
3209 * checks/Makefile.in (maintainer-clean): Add missing target.
3210 * COPYING: Remove generated file from CVS.
3212 2006-06-16 Eric Blake <ebb9@byu.net>
3214 * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
3216 2006-06-15 Eric Blake <ebb9@byu.net>
3218 * checks/wrapfifo.m4: New file. Use it...
3219 * doc/m4.texinfo (Incompatibilities): here, in a new test case to
3220 demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
3222 * src/m4.h (to_uchar): New function.
3223 * src/eval.c (eval_lex): Use it to avoid passing signed char to
3224 isdigit, isalpha, isupper, islower, isspace, isalnum.
3225 * src/builtin.c (expand_user_macro): Likewise.
3226 * src/format.c (format): Likewise.
3227 * src/macro.c (expand_argument): Likewise.
3228 * NEWS: Document this security fix.
3231 * src/symtab.c (lookup_symbol): Use invalid, not illegal.
3232 * src/freeze.c (reload_frozen_state): Fix typo in message.
3233 (produce_frozen_state): Standardize on builtin, not built-in.
3234 * src/builtin.c (numeric_arg, bad_argc): Likewise.
3236 * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
3237 (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
3238 (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
3240 * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
3241 * m4/gnulib-cache.m4: New file, from gnulib.
3242 * bootstrap: Invoke gnulib-tool --update.
3243 * src/m4.c (main): Cast away const.
3244 * NEWS: Document that regex is updated.
3247 2006-06-08 Eric Blake <ebb9@byu.net>
3249 * configure.ac (changeword): Work even when changeword is not a
3251 (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
3252 Delete; now done by automake.
3253 (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
3255 2006-06-07 Eric Blake <ebb9@byu.net>
3257 * lib/regex.c (bcmp_translate): Canonicalize type name.
3258 * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
3259 * configure.ac (changeword): Disable changeword for the creation
3260 of configure, in case of bootstrapping with an m4 configured with
3261 --enable-changeword.
3263 Distribute a rudimentary man page.
3264 * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
3266 * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
3267 (SUFFIXES, m4.1): New macros and rules to build m4.1.
3269 2006-06-06 Eric Blake <ebb9@byu.net>
3271 * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
3272 compiler warnings at -O2.
3273 * lib/getopt.c (_getopt_internal): Likewise.
3275 Cleanup of previous patches.
3276 * src/input.c (struct input_block): Remove traced member.
3277 (push_macro, init_macro_token): Don't pass trace status around.
3278 * src/m4.h (struct token_data): Remove traced member.
3279 (struct symbol, struct builtin): Reduce unused space.
3280 (TOKEN_DATA_FUNC): Simplify.
3281 (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
3282 (push_macro, define_builtin): Remove unused parameter.
3283 * src/builtin.c (define_builtin, builtin_init, define_macro),
3284 (m4_defn): Don't pass trace status around.
3285 * src/macro.c (expand_argument): Likewise.
3286 * src/freeze.c (reload_frozen_state): Likewise.
3287 * src/symtab.c: Whitespace cleanup.
3288 * NEWS: Clean up wording.
3289 * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
3290 ensure tests actually expose bugs prior to today's patches.
3292 Trace status of builtins is no longer inherited across
3293 define(...,defn(...)). Fixes bug that autom4te had been working
3295 * src/builtin.c (define_builtin): Don't override trace status.
3296 * doc/m4.texinfo (Trace): Add test for this.
3297 * NEWS: Document this.
3299 When changing macro definitions inside the arguments to the macro,
3300 consistently preserve the old definition that was in effect before
3301 argument collection, similar to the C pre-processor.
3302 Reported by John Brzustowski.
3303 * NEWS: Document this change.
3304 * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
3305 this policy, and add tests that expose core dumps prior to this
3307 * src/m4.h (struct symbol): New members to track when a symbol is
3308 still in use after removal from the symbol table.
3309 (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
3310 (free_symbol): Prototype.
3311 * src/macro.c (expand_macro): Track pending expansions of a
3312 symbol. On completion, if a symbol is deleted and no longer
3313 pending, free its memory.
3314 * src/symtab.c (free_symbol): Export. Don't free memory if symbol
3316 (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
3318 (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
3319 in use as deleted and remove from the table without freeing
3321 (symtab_print_list) [DEBUG_SYM]: More debug output.
3323 * src/symtab.c (hack_all_symbols): Allow certain modifications of
3324 the symbol table during traversal.
3325 * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
3326 SYMBOL_POPDEF, since only the latter is safe with
3329 Solve crash when passing "indir(`foo')" to "m4 -tfoo".
3330 * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
3331 Preserve placeholder when macro is being traced.
3332 * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
3333 symbol is not defined.
3334 (set_trace): Remove placeholder when no longer traced.
3335 (m4_traceon): On named traces, always reserve a slot in the
3337 (m4_traceoff): Don't warn about untracing a nonexistent symbol.
3338 * NEWS: Document new trace behavior.
3339 * doc/m4.texinfo (Trace): Tracing by name now consistently works
3340 no matter whether that macro is currently defined.
3341 (Incompatibilities): Document differences between traditional and
3344 2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
3345 Eric Blake <ebb9@byu.net>
3347 * src/m4.h (hash_table_size): Now size_t instead of int.
3348 * src/m4.c (hash_table_size): Likewise.
3349 (main): Adjust to this; use atol rather than atoi.
3350 * src/symtab.c: Include <limits.h>, for CHAR_BIT.
3351 (symtab_init, lookup_symbol, hack_all_symbols):
3352 Use size_t for sizes and indexes, not int.
3353 (symtab_print_list) [DEBUG_SYM]: Likewise.
3354 (hash): Likewise. Don't case-fold in the hash function.
3355 Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
3356 Don't assume hash word is 32 bits.
3357 * NEWS: Document this change.
3359 2006-06-04 Eric Blake <ebb9@byu.net>
3361 * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
3362 to allow compilation, for use in debugger.
3363 (profiles, current_mode) [DEBUG_SYM]: New variables.
3364 (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
3365 determining hash table performance.
3367 2006-05-31 Eric Blake <ebb9@byu.net>
3368 John Brzustowski <jbrzusto@fastmail.fm>
3370 * src/input.c (input_stack): Delete; use current_input instead.
3371 (wrapup_stack): Dynamically allocate, so that recursion is handled
3373 (push_wrapup): Use current wrapup stack.
3374 (pop_wrapup): Rotate wrapup stack to current, and create new
3376 (input_init): Dynamically allocate stacks.
3377 * NEWS: Update, now that recursive m4wrap can no longer cause
3380 2006-05-31 Eric Blake <ebb9@byu.net>
3382 * lib/getopt.c: Fix copyright year.
3383 * lib/obstack.c: Ditto.
3384 * src/builtin.c: Ditto.
3386 2006-05-30 Eric Blake <ebb9@byu.net>
3388 * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
3389 Reported by John Brzustowski.
3390 (Incompatibilities): Document known POSIX incompatibilities.
3393 2006-05-29 Eric Blake <ebb9@byu.net>
3395 * doc/m4.texinfo (Maketemp): Work even when running 'make check'
3399 * Makefile.am: New file.
3400 * doc/Makefile.am: Ditto.
3401 * examples/Makefile.am: Ditto.
3402 * lib/Makefile.am: Ditto.
3403 * src/Makefile.am: Ditto.
3404 * acinclude.m4: New file, renamed from aclocal.m4.
3405 * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
3406 (AC_ARG_PROGRAM): Now redundant.
3407 (STACKOVF): Turn into automake conditional.
3408 (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
3409 * checks/Makefile.in: Converting this dir to automake was not
3410 trivial; for now, just add missing targets demanded by top-level.
3411 * INSTALL: Remove files that are now generated from CVS.
3412 * Makefile.in: Ditto.
3413 * aclocal.m4: Ditto.
3414 * install-sh: Ditto.
3415 * mkinstalldirs: Ditto.
3416 * doc/Makefile.in: Ditto.
3417 * doc/texinfo.tex: Ditto.
3418 * examples/Makefile.in: Ditto.
3419 * lib/Makefile.in: Ditto.
3420 * src/Makefile.in: Ditto.
3422 * AUTHORS: Backport from CVS head, and update.
3423 * doc/m4.texinfo (Changeword): Fix examples to match behavior.
3425 2006-05-27 Eric Blake <ebb9@byu.net>
3427 * lib/regex.c (regex_compile): Kill compiler warnings.
3428 * lib/getopt.c: Likewise.
3429 * lib/obstack.c: Likewise.
3430 * src/builtin.c (builtin_init): Likewise.
3431 * src/path.c (path_search): Likewise.
3433 * doc/m4.texinfo: Fix usage of a vs. an.
3434 (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
3435 overfull hbox warnings.
3436 (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
3438 * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
3440 * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
3441 (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
3443 (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
3444 * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
3445 * src/Makefile.in: Delete remains of ansi2knr.
3446 * src/ansi2knr.1: Delete.
3447 * src/ansi2knr.c: Delete.
3449 2006-05-25 Eric Blake <ebb9@byu.net>
3451 * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
3454 * doc/m4.texinfo (Francois): No longer needed as a tex variable.
3455 Reported by Karl Berry.
3457 2006-05-24 Eric Blake <ebb9@byu.net>
3459 * Makefile.in (html): New target.
3460 * doc/Makefile.in (html, m4.html): Likewise.
3461 (MAKEINFOHTML): New macro.
3462 * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
3464 (Regexp) [ifhtml]: Make cross-reference to emacs manual an
3466 Reported by Bob Badour.
3468 * THANKS: Update. Move reporter's email addresses here, instead
3471 2006-05-11 Eric Blake <ebb9@byu.net>
3474 * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
3475 patched on 2005-12-04.
3476 Reported by Ilya N. Golubev.
3478 * bootstrap: New file, so that generated files need not be stored
3480 * Makefile.in (DISTFILES): Add bootstrap.
3482 Make testsuite less sensitive to doc changes.
3483 * doc/m4.texinfo: Use m4.input instead of filename.
3484 * checks/check-them (xerr): Turn m4.input into filename.
3485 * checks/Makefile.in (dist): Depend on stamp-checks.
3487 Portability updates for OS/2.
3488 * src/Makefile.in (EXEEXT, OBJEXT): Define.
3491 * lib/Makefile.in (OBJEXT): Define.
3493 * doc/Makefile.in (install, uninstall): Install info files into
3495 Reported by Andreas Buening.
3497 2006-05-09 Eric Blake <ebb9@byu.net>
3499 * install-sh: Update to newer upstream version.
3500 * mkinstalldirs: Likewise.
3501 Reported by Andreas Buening.
3503 * src/m4.c (main): Bump copyright year.
3504 * Makefile.in (datarootdir): Define, for autoconf 2.59c.
3505 * doc/Makefile.in (datarootdir): Likewise.
3507 2006-05-08 Eric Blake <ebb9@byu.net>
3510 * doc/m4.texinfo (Bugs): Backport bug email address from head.
3511 Reported by Stepan Kasal.
3513 2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
3515 * input.c (match_input): Do not pass expression with side effect
3516 to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
3519 2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
3521 * doc/m4.texinfo (How to debug macros and input): s/woould/would/
3522 Reported by Damian Menscher.
3524 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
3526 * configure.ac (AC_INIT): Bump to 1.4.4a.
3528 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
3531 * configure.ac (AC_INIT): Bump to 1.4.4.
3532 * NEWS: Describe 1.4.4's changes.
3533 * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
3535 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
3537 * src/m4.c: fix return code when non-existent files are processed
3539 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
3541 * README: update email address for bug reports.
3543 2005-10-17 Gary V. Vaughan <gary@gnu.org>
3545 * doc/m4.info: Generated files are not kept in the repository.
3547 2005-05-01 Gary V. Vaughan <gary@gnu.org>
3549 The FSF are moving offices today. Changed their contact address
3550 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
3551 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
3553 Also, some of the files here were never updated from the previous
3554 '675 Mass Ave, Cambridge, MA 02139', so changed those to the
3555 '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
3557 2005-03-31 Mike Frysinger <vapier@gentoo.org>
3559 * Makefile.in (bindir, infodir): Substitute from configure rather
3561 * doc/Makefile.in (infodir): Ditto.
3562 * src/Makefile.in (bindir): Ditto.
3565 2005-03-31 Gary V. Vaughan <gary@gnu.org>
3567 Changes needed to automate the release process for 1.4.3:
3569 * Makefile.in (dist): Make .tar.bz2 tarball too.
3570 * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
3571 (cvs-news): Look 1 line further down for NEWS release number.
3572 (cvs-dist): We don't use automake, so make dist is fine.
3573 Remove double . before suffixes.
3574 (cvs-release): Don't mention manual.html.
3575 (fetch): Get latest gendocs files.
3576 (web-manual): Rewritten to use gendoc for multiformat manuals.
3577 * doc/gendocs.sh: Don't save an old version in m4 CVS!
3578 * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
3579 preserving, but case insensitive, so generating html docs per node
3580 clashes between Index.html, the node file, and index.html, the
3581 top-level of the document tree...
3582 (Index macro): ...so renamed to this. Changed all references.
3584 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
3586 * configure.ac (AC_INIT): Bump to 1.4.3a.
3588 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
3591 * configure.in (AC_INIT): Bump to 1.4.3.
3592 * NEWS: Describe 1.4.3's changes.
3594 2005-03-31 Gary V. Vaughan <gary@gnu.org>
3596 * Makefile.maint: New file with release rules, from CVS libtool.
3597 * Makefile.in (DISTFILES): Add Makefile.maint.
3598 * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
3601 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
3603 * doc/m4.texinfo (Patsubst): Re-add trailing space required by
3604 checks/47.patsubst, with a redundant @comment to prevent emacs
3605 from removing it accidentally again.
3606 * checks/get-them: Allow for trailing spaces tucked behind
3609 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
3611 * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
3612 * src/Makefile.in (install, uninstall): Likewise.
3614 2005-02-07 Gary V. Vaughan <gary@gnu.org>
3616 * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
3618 Reported by Eric Blake.
3620 2005-02-04 Gary V. Vaughan <gary@gnu.org>
3622 * lib/regex.c, lib/regex.h: Updated from gnulib.
3623 * src/input.c (set_word_regexp): Don't change the word_regexp
3624 unless it compiles correctly.
3626 Reported by Frank Schwidom.
3628 * Makefile.in (stamp-h): Regenerate config.h properly.
3630 2005-02-03 Gary V. Vaughan <gary@gnu.org>
3632 * configure.ac (AC_DEFINE): Fix overquoting of description
3635 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
3637 * src/freeze.c (produce_frozen_state): Use \n line-endings even
3638 on Windows, so that the frozen file reader will work.
3639 Reported by Josef T. Burger.
3641 * src/m4.c (main): Modernise the --version output.
3643 2005-02-03 Gary V. Vaughan <gary@gnu.org>
3645 Modernise the configury a little to prevent spurious errors from
3646 Autoconf-2.59's autoreconf:
3648 * config.h.in: Renamed to...
3649 * config-h.in: ...this to better support DOS 8.3 file systems.
3650 * acconfig.h: Removed.
3651 * configure.in: Renamed to...
3652 * configure.ac: ...this, and AC_DEFINE used to declare config.h
3653 entry comments. Slight reorganisation and reformatting.
3654 * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
3656 (AC_INIT): Use a modern 3 argument call.
3657 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3658 examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
3659 s/PRODUCT/PACKAGE/g.
3660 * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
3661 config.h.in. Added configure.ac, config-h.in.
3662 (stamp-h.in): Removed acconfig.h from dependencies.
3663 (configure): Depends on configure.ac, not configure.in.
3664 * doc/Makefile.in (stamp-vti): Ditto.
3665 * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
3666 difference between PRODUCT="m4" and PACKAGE="GNU M4".
3667 * configure: Regenerated.
3669 2005-02-03 Noah Misch <noah@cs.caltech.edu>
3671 * src/output.c (mkstemp): Make non-static, and build regardless of
3672 HAVE_TMPFILE; src/builtin.c also needs this replacement.
3675 2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
3677 * configure.in (AC_CHECK_HEADERS): Commit works best when you save
3678 changes from your editor buffer first.
3680 * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
3681 * src/m4.c: And include them as appropriate.
3684 2004-09-09 Andreas Schwab <schwab@suse.de>
3686 Refactoring of the string read case in next_char provides about a
3687 20% speedup of M4 as typically used by autoconf:
3689 * src/input.c (next_char_1): Renamed from next_char.
3690 (next_char): New macro.
3693 2004-08-21 Gary V. Vaughan <gary@gnu.org>
3695 * configure.in (VERSION): Bump to 1.4.2a.
3697 2004-08-19 Paul Eggert <eggert@twinsun.com>
3700 * configure.in (VERSION): Bump to 1.4.2.
3701 * News: Describe 1.4.2's changes.
3703 * src/m4.c (reference_error): Preserve errno, since M4ERROR
3705 * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
3706 (m4_maketemp): Clear errno before calling mkstemp.
3707 * src/path.c (path_search): Don't let "free" trash errno when
3709 * src/output.c (insert_file): Don't assume errno has a valid
3710 value simply because fread returns zero. This fixes a
3711 portability bug reported by Marion Hakanson in
3712 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
3714 2004-06-09 Gary V. Vaughan <gary@gnu.org>
3716 * configure.in (VERSION): Bump to 1.4.1a.
3717 * NEWS: Place holder for next stable release.
3719 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3722 * configure.in (VERSION): Bump to 1.4.1.
3723 * NEWS: Describe 1.4.1's changes.
3725 * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
3726 pacify Autoconf 2.59.
3728 * doc/m4.texinfo: Insert commas after @xref's that lack them,
3729 to pacify Texinfo 4.7.
3730 * doc/Makefile.in (info): Remove info-1, info-2, info-3.
3732 * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
3733 pacify Sun C compilers.
3735 2003-09-28 Akim Demaille <akim@epita.fr>
3737 * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
3740 2003-09-03 Santiago Vila <sanvila@debian.org>
3742 * examples/stackovf.sh: Use tempfile if available.
3744 2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
3746 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
3747 * src/output.c (m4_insert_file): Do not mix buffered and
3748 unbuffered I/O, as this breaks on the Hurd. (trivial change)
3750 2001-02-01 Santiago Vila <sanvila@debian.org>
3752 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
3753 * src/m4.c (main): Fix format vulnerabilities. (trivial change)
3755 2001-02-01 Matt Kraai <kraai@debian.org>
3757 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
3758 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
3759 empty file rather than to a nonexistent file. This closes a common
3761 * src/builtin.c (m4_maketemp): Implement the above, by using
3762 mkstemp rather than mktemp. (trivial change)
3764 2000-01-09 Akim Demaille <demaille@inf.enst.fr>
3766 * src/builtin.c (expand_ranges): Added break after trailing dash.
3767 This caused misbehaviors on some systems.
3769 Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
3772 * doc/Makefile.in (realclean): Also remove stamp-vti.
3773 Reported by Eric Backus.
3775 Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
3777 * src/freeze.c (produce_frozen_state): If the frozen file cannot
3778 be opened, return immediately after producing the error message.
3779 Reported by Andreas Schwab.
3781 * configure.in: Check for const only after having found possible
3782 ANSIfying compiler flags, this is of no use to check it before.
3783 Reported by Alexander Lehmann.
3785 Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
3787 * src/macro.c (collect_arguments): Cast obstack arguments to
3788 (voidstar), so avoiding compiler warnings.
3789 Reported by Joseph E. Sacco.
3791 * src/freeze.c (produce_frozen_state): Cast printed lengths to
3792 (int) so they correspond to %d format items.
3793 Reported by Joseph E. Sacco.
3795 * src/m4.c (main): Cast the argument to xfree to (voidstar).
3796 * src/symtab.c (free_symbol): Idem.
3797 Reported by Karl Vogel.
3799 Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
3801 * Makefile.in (DISTFILES): Distribute BACKLOG.
3803 * configure.in: Define PRODUCT and VERSION.
3804 * acconfig.h: Document PRODUCT and VERSION.
3805 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
3806 constant string m4 and variable or parameter named version.
3808 Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
3810 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
3811 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
3812 defines __STDC__ to 0, for indicating it is *not* ANSI!
3813 Reported by Kaveh R. Ghazi.
3815 * configure.in: Added obsolescent tests for AIX and Minix.
3817 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
3818 which texclean does not exist anymore.
3819 Reported by Eric Backus, Jim Meyering, John David Anglin and
3822 Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
3824 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
3825 Reported by John David Anglin.
3827 * src/ansi2knr.c: New version, sent by Peter Deutsch.
3828 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
3829 ANSI2KNR, depending on the fact the compiler is ANSI or not.
3830 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
3831 Remove the sed filter after ansi2knr for debug.c. Use $O instead
3832 of $U, put underline in extensions rather than in basenames. Use
3833 implicit rules, now that regularity makes this possible.
3834 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
3835 of ansi2knr whenever it is needed.
3836 * configure.in: Adjusted for correct STACKOVF substitution.
3837 * src/debug.c (trace_format): When not __STDC__, use (...) as a
3838 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
3839 Reported by David MacKenzie.
3841 * Makefile.in: Remove binprefix. Use transform_name instead.
3842 Reported by David MacKenzie.
3844 * doc/Makefile.in: Create version.texi, use it, clean it.
3845 Reported by Jim Meyering.
3847 Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
3849 * Makefile.in (all, install, uninstall): Depend on Makefile.
3851 * Makefile.in: For actions invoking $(MAKE) from within compound
3852 sh statements, exit non-zero if the sub-make fails. Otherwise,
3853 the top-level make may exit successfully when it should fail.
3854 Reported by Jim Kingdon.
3856 * {,/*}Makefile.in: Use && after all cd, in case they fail.
3858 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
3859 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
3860 * configure.in: Substitute PRODUCT and VERSION.
3862 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
3864 Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
3866 * Makefile.in (mostlyclean-local): Do not remove *~.
3867 * */Makefile.in (mostlyclean): Idem.
3868 Reported by Robert E. Brown and Richard Stallman.
3870 Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
3872 * src/m4.h: Get rid of CONFIG_BROKETS.
3874 Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
3876 * configure.in: Use AC_ARG_PROGRAM.
3877 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
3878 Reported by David MacKenzie.
3880 Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
3882 * configure.in: Do not add -O to CFLAGS for GNU C, now that
3883 configure does it automatically.
3884 Reported by Jim Meyering.
3886 Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
3888 * src/stackovf.c: Declare the handler_t typedef earlier in the
3889 code, use it for stackovf_handler.
3890 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
3891 casting sigsegv_handler.
3892 Reported by Robert Bernstein.
3894 * src/m4.c (main): Initialize program_name to argv[0] without
3896 Reported by Karl Berry.
3898 Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
3900 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
3901 Reported by Karl Berry.
3903 Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
3905 * lib/Makefile.in (mostlyclean): Added.
3906 (TAGS): Make in $(srcdir).
3908 * configure.in: Use `choke me' in test, like everywhere!
3910 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
3911 unreacheable and useless.
3913 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
3915 * lib/Makefile.in (DISTFILES): Distribute TAGS.
3916 (distclean): Do not remove TAGS.
3917 (realclean): Remove it.
3918 * Makefile.in: Make TAGS in lib also, not just in src.
3919 Reported by Karl Berry.
3921 * Makefile.in (distclean, realclean): Instead of recursively
3922 calling $(MAKE) for the -local part, allow parallel execution of
3923 -recursive and -local, only delay the removal of config.status,
3924 which is repeated in both goals.
3926 Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
3929 * Makefile.in: Group all *clean-recursive goals in one, using sed
3930 to remove `-recursive' while calling make recursively. Also, use
3931 a subshell for each recursive $(MAKE).
3932 Reported by Jim Meyering.
3934 * src/m4.h (memcpy): Define with bcopy for BSD systems.
3935 Reported by Kaveh R. Ghazi.
3937 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
3938 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
3941 * configure.in: Use date instead of touch for stamp-h.
3942 * Makefile.in (stamp-h.in): Idem.
3944 * Makefile.in (distclean, realclean): Force serial execution of
3945 both goals, in case parallel makes are being used.
3946 Reported by Jim Meyering.
3948 * src/Makefile.in (DISTFILES): Distribute TAGS.
3949 (distclean): Do not remove TAGS.
3950 (realclean): Remove it.
3951 Reported by Karl Berry.
3953 Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
3955 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
3956 to old names, for following Autoconf.
3958 Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
3960 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
3961 ./install.sh will not be correctly referred to in sub-Makefiles.
3962 Reported by John David Anglin.
3964 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
3965 Reported by Eric Backus.
3967 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3968 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
3969 config.status into remaking this directory's Makefile only.
3970 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
3971 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
3972 Reported by Jim Meyering.
3974 Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
3976 * configure.in: Correct stack overflow detection logic, taking
3977 care of systems having only incomplete implementations (like for
3978 Pyramid 9820 OSx 5.0d).
3979 Reported by Kaveh R. Ghazi.
3981 * src/Makefile.in (TAGS): Remote -t from etags call.
3983 Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
3985 * lib/Makefile.in (install): Depend on all.
3987 Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
3989 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
3990 Reported by Jim Meyering and John David Anglin.
3992 * Makefile.in (distclean-local): Delete config.log.
3993 Reported by Jim Meyering.
3995 Solidify frozen files with respect to -P:
3996 * src/m4.c: Have -P set prefix_all_buitins variable instead of
3997 calling a function by that name. Declare the variable.
3998 * src/m4.h: Adjust declaration for prefix_all_buitins.
3999 * src/builtin.c (builtin_init): Merge in functionality from
4000 previous prefix_all_buitins function, while making entries in the
4001 symbol table, but not modifying the builtin description itself.
4003 * src/freeze.c (reload_frozen_state): Add a useless `break;',
4004 because *many* compilers do not accept an empty `default:'.
4005 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
4006 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
4008 * configure.in: Use AC_TYPE_SIGNAL.
4009 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
4010 Reported by Robert Bernstein.
4012 * checks/Makefile.in (check): Modify PATH so check-them will find
4013 m4 in the src directory.
4014 * Makefile.in (check): Don't.
4015 Reported by Akiko Matsushita and Jim Meyering.
4017 * src/output.c (make_room_for, output_character_helper): New
4018 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
4019 a per buffer MAXIMUM_BUFFER_SIZE.
4021 * src/output.c (output_text): New function, for optimizing the
4022 output of strings of characters. Use it.
4024 Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
4026 * doc, src: New directories reorganizing the distribution.
4027 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
4029 * Makefile.in: Adjusted.
4030 * configure.in: Configure new Makefiles.
4032 * m4.h: Declare STRING typedef. Use it for comment and quote
4033 strings, adjusting all references. (This is the rudiments of a
4034 beginning for the eventual withdrawal of NUL terminated strings.)
4035 * output.c (shipout_text): Accept a length parameter, and use it.
4036 All callers adjusted.
4038 Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
4040 * m4.h: Include <unistd.h> if it exists.
4041 * stackovf.c: Don't.
4043 Clean up for current_diversion variable:
4044 * output.c: Move current_diversion from builtin.c.
4045 * m4.h: Declare current_diversion so builtin.c can access it.
4046 * output.c (output_init, make_diversion): Initialize or update
4048 * builtin.c (builtin_init, m4_divert): Leave current_diversion
4051 Remove limit on number of diversions:
4052 * output.c: Replace ndiversion by diversions, declare it.
4053 (output_init): Allocate only diversion 0.
4054 (make_diversion): Allocate new diversions as needed.
4055 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
4056 * m4.c: Still accept -N, but do nothing with it.
4057 Reported by David MacKenzie.
4060 * output.c (freeze_diversions): New function.
4061 * m4.h: Declare freeze_diversions.
4062 * freeze.c: Document frozen file format, revise it, call
4063 freeze_diversions to add diversions to frozen format, and code to
4064 reload them properly.
4065 * m4.c: Do not undivert automatically at end when status being
4066 frozen. Do not call builtin_init when reloading frozen state.
4068 Speed up diversion processing:
4069 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
4070 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
4071 structure and variables, cached variables out of output_diversion,
4072 reallocate_diversion_for and OUTPUT_CHARACTER.
4073 (shipout_text, make_diversion, insert_diversion): Adapted to new
4075 (insert_file): Use better buffering.
4076 Reported by David MacKenzie.
4078 Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
4080 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
4081 dist works from another build directory.
4083 Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
4085 * symtab.c (hack_all_symbols): Use hash_table_size instead of
4086 constant HASHMAX, for -H option to work better.
4088 * builtin.c (DECLARE): Simplify by using _ ().
4090 * freeze.c: New file.
4091 * Makefile.in: Compile it, distribute it.
4092 * m4.c: Recognize, document and process --freeze-state (-F) and
4093 --reload-state (-R) options. Pass a true flag to builtin_init
4094 only if no reloading some state.
4095 * builtin.c (define_builtin): Remove static specifier.
4096 (find_builtin_by_name): Remove static specifier.
4097 (builtin_init): Accept and obey a flag argument.
4098 * m4.h: Add declarations for freeze.c, changes for builtin.c.
4100 Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
4102 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
4105 * configure.in: Implement --with-dmalloc.
4106 * acconfig.h: Document WITH_DMALLOC.
4107 * m4.h: Add code for when WITH_DMALLOC.
4109 Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
4111 * m4.c (long_options): Use "error-output", the dash was missing.
4112 Reported by Akiko Matsushita.
4114 Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
4116 * m4.h: Include <sys/types.h>.
4117 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
4118 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
4120 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
4122 * builtin.c (dump_args): Declare len as size_t, not int.
4124 * debug.c: Prototype the forward declaration of debug_set_file.
4126 * builtin.c (m4_undivert): Replace div by file, for avoiding the
4127 shadowing of this variable.
4128 * output.c (insert_diversion): Idem.
4130 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
4131 (input_init): Duplicate default quote and comment strings.
4132 (set_quotes): Free previous quote strings in all cases. Duplicate
4133 even default quote strings.
4134 (set_comment): Free previous comment strings in all cases.
4135 Duplicate even default comment strings.
4137 * configure.in: Updated for Autoconf 2.0.
4138 * Makefile.in (distclean-local): Also delete config.cache.
4140 * m4.c (usage): Reorganize the --help output by topic. Include a
4141 description for debugging flags.
4143 Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
4145 * configure.in: If sigaction is available and SA_ONSTACK defined,
4146 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
4147 defined, use sigvec. Else don't compile stackovf.c.
4148 * stackovf.c (setup_stackovf_trap): Idem.
4149 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
4152 Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
4154 * m4.c (usage): Replace printf par fputs.
4156 Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
4160 Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
4162 * configure.in: Check for sigaction and sigvec. Add a new delayed
4163 check for RLIMIT_STACK, combine in the checking for getrlimit.
4164 All those things are not universally available.
4165 * stackovf.c: Split setting up the trap handler and catching
4166 signals, for better taking care of various configure outcomes.
4167 * examples/stackovf.sh: Correct a typo.
4168 Reported by Eric Backus, Jim Avera and Jim Meyering.
4170 Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
4172 * ansi2knr.c: New version sent by its author, Peter Deutsch.
4174 Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
4176 * Makefile.in: Modify so parallel make will not try making
4177 lib/libm4.a twice simultaneously.
4178 Reported by Jim Meyering.
4180 Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
4182 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
4183 error message, for when no code possibility exists. Even if this
4184 line is completely #ifdef'ed out, it brings a syntax error.
4185 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
4187 * Makefile.in (install): Have install depend on all too, for lib
4188 to be remade as needed.
4190 * examples/stackovf.sh: Try ksh, bsh and bash for shells
4191 providing ulimit, instead of using only ksh.
4192 Reported by Jim Avera and Joseph E. Sacco.
4194 Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
4196 * Makefile.in (check): Have it depend on all instead of m4. In
4197 this way, a change in lib will be detected and processed.
4199 * builtin.c (numeric_arg): Use strtol and verify the conversion,
4200 instead of using sscanf which stops as soon as there is a
4201 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
4202 and divert(1xyzzy) were all accepted without any warning or error
4204 * m4.h: Declare strtol as long if not including stdlib.h.
4205 * configure.in: Check for limits.h, and replace strtol if missing.
4206 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
4207 * lib/strtol.c: New file, from elsewhere.
4208 Reported by Andreas Schwab.
4210 Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
4212 * macro.c (expand_macro): Cast value to (boolean) prior to
4213 assigning it to traced.
4214 Reported by Tom McConnell.
4216 * Makefile.in (m4): Always make all in lib first.
4217 Reported by Jim Meyering.
4219 Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
4221 * stackovf.c: Isolated OS-dependent sections; Improved portability,
4222 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
4223 handlers), and a default error message if the fault address is not
4224 available (when neither siginfo.h nor BSD sigcontext are supported).
4225 * configure.in: Changes for stackovf.h: Check for sigcontext,
4226 sigaction, sigstack, and define rlim_t as int if necessary.
4227 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
4228 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
4229 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
4231 Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
4233 * configure.in: Use AC_SET_MAKE.
4234 * Makefile.in: Use @SET_MAKE@.
4235 Reported by Jim Meyering.
4237 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
4238 Reported by Ian Taylor.
4240 Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
4242 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
4243 because siginfo.h is unrelated to standard headers, and siginfo.h
4244 is already checked for.
4245 Reported by Joseph E. Sacco.
4247 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
4249 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
4252 Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
4254 * builtin.c (substitute): Use \& to represent this part of the
4255 string which was matched by the whole regexp, instead of
4256 representing the whole string. Any usage of \0 issues a warning
4257 and acts like \&, it will disappear in some subsequent release.
4259 Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
4261 * m4.c: Complete prototype for forwarded declaration of usage.
4263 * input.c (init_macro_token): Correct own reference in error
4264 message. Previous name get_macro_func was referred to instead.
4265 (next_char): Correct own reference in error message. Previous
4266 name advance_input was referred to instead.
4268 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
4269 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
4270 and_term, not_term, logical_not_term, cmp_term, shift_term,
4271 add_term, mult_term, exp_term, unary_term, simple_term): Add
4272 prototype to forwarded declarations. Declare parameter v1 as
4273 eval_t * instead of int *. Same for local variable v2 in dyadic
4274 functions. Same for result in exp_term.
4275 * builtin.c (m4_eval): Declare value as eval_t instead of int.
4276 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
4277 unsigned_eval_t instead of unsigned int. Change casts accordingly.
4278 (shipout_int): Cast first argument of ntoa to eval_t.
4279 Reported by Thorsten Ohl.
4281 * macro.c: Complete the prototypes of forwarded expand_macro and
4283 Reported by Thorsten Ohl.
4285 * m4.h: Define voidstar as void * or char * depending on __STDC__.
4286 The Ultrix 3.1 compiler cannot do much with void pointers.
4288 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
4289 * m4.c (xfree): Replace void * by voidstar.
4290 Reported by Tom McConnell.
4292 * ansi2knr.1: New, from elsewhere.
4293 * Makefile.in (DISTFILES): Distribute ansi2knr.1
4295 * Makefile.in (stamp-h.in): Avoid running ./config.status if
4296 stamp-h does not exist yet. This avoids running it a second time
4297 just after the initial ./configure.
4298 Reported by David MacKenzie and Tom McConnell.
4300 * m4.h: Replace the enum debug_info declaration with a series of
4301 #define's. The Ultrix 3.1 compiler would otherwise need casting
4302 (int) to most references, when used in expressions.
4303 Reported by Tom McConnell.
4305 Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
4307 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
4308 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
4309 calls the compiler. Previously, FP_PROTOTYPES was only calling
4310 the preprocessor; by not being subject to CFLAGS, this was
4311 discouraging those flags asking for ANSI compilation.
4312 * acconfig.h: Document HAVE_PROTOTYPES.
4313 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
4314 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
4315 Reported by Eric Backus.
4317 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
4318 from the environment. Default CFLAGS to -g if not set.
4319 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
4320 * lib/Makefile.in: Have CFLAGS substituted from configure.
4321 Reported by Eric Backus and Tom McConnell.
4323 * configure.in: m4_undefine changeword before using AC_ENABLE.
4325 * m4.h: Declare prototypes for error (for ANSI compilers only),
4326 prefix_all_builtins and reference_error.
4327 Reported by Tom McConnell.
4329 * input.c (set_word_regexp): Do not try to initialize the array
4330 test from a string, this does not work with non-ANSI compilers.
4331 Reported by Eric Backus.
4333 * Makefile.in (dist): Clean examples/ before saving it.
4334 (distclean-local): Also remove stamp-h.
4335 Reported by Eric Backus.
4337 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
4339 Reported by Tom McConnell.
4341 * checks/Makefile.in (clean): Depends on mostlyclean.
4342 (mostlyclean): New goal.
4344 Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
4346 * Makefile.in (DISTFILES): Distribute install.sh.
4347 * install.sh: New file, copied from elsewhere.
4348 Reported by Assar Westerlund and Kaveh R. Ghazi.
4350 Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
4352 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
4353 * acconfig.h: Explain ENABLE_CHANGEWORD.
4355 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
4356 from code provided by Pete Chown]
4357 * m4.h: Add original_text field to u_t variant of union u.
4358 Declare TOKEN_DATA_FUNC macro.
4359 * builtin.c: Declare changeword.
4360 (m4_changeword): New function.
4361 * input.c: Include "regex.h", define variables with word regexps.
4362 (input_init): Initialize the word regexp.
4363 (set_word_regexp): New.
4364 (next_token): Declare local variables, use the previous code if
4365 default_word_regexp is true. Else, match using a new code. Save
4367 * macro.c (expand_token): Ship out original text if not a macro
4369 Reported by Krste Asanovic and Pete Chown.
4371 [These modifs all depend upon ENABLE_CHANGEWORD]
4372 * m4.h: Declare external user_word_regexp.
4373 * m4.c: Declare user_word_regexp, and initialize it from
4374 --word-regexp or -W, or NULL if not specified.
4375 * input.c: Use user_word_regexp if specified, instead of
4376 DEFAULT_WORD_REGEXP.
4378 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
4381 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
4382 * checks/Makefile.in: Empty the suffix list.
4383 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
4385 * m4.c: Declare nesting_limit and initialize it to 250.
4386 Implement -LNUMBER or --nesting-limit=NUMBER to change its
4388 * m4.h: Declare nesting_limit as external.
4389 * macro.c (expand_macro): Stop execution whenever nesting limit
4391 Reported by Bengt Mertensson.
4393 * eval.c (evaluate): Diagnose excess characters in eval input.
4394 Things like `eval(08)' used to return 0 with no diagnostic.
4396 * m4.h: Capitalize first letter of all macro arguments in
4399 * m4.c: Declare warning_status, initialize it to 0. Add new
4400 option -E, or --fatal-warnings, which sets warning_status to
4401 EXIT_FAILURE instead.
4402 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
4403 EXIT_FAILURE if not otherwise done by header files.
4404 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
4405 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
4406 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
4407 argument of all M4ERROR calls.
4408 Reported by Noah Friedman.
4410 * examples/incl-test.m4: Renamed from incl_test.m4.
4411 * examples/include.m4: Include incl-test.m4 instead of
4413 * examples/multiquotes.m4: Renamed from multi-quotes.m.
4415 Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
4417 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
4418 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
4419 also tested it on a Sun Sparc workstation running SunOS 4.x.
4421 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
4422 49.format check, abusing a `union values' argument with sprintf
4423 without selecting the proper field. Now, save the formatting type
4424 first, delaying the fetch of the corresponding argument.
4425 Reported by Joseph E. Sacco and Tom Quinn.
4427 * format.c (format): Remove const from char *fmt declaration when
4428 not HAVE_EFGCVT, because a NUL may be forced into it.
4430 * m4.h: Declare atof() when not STDC_HEADERS.
4431 Reported by Joseph E. Sacco.
4433 * Regenerate configure using Autoconf 1.11, this corrects a
4434 problem about an incorrect cpp seting on NeXT 3.1.
4435 Reported by Alexander Lehmann.
4437 Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
4439 * m4.h (_): Change argument from `x' to `Args'.
4441 Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
4443 * Makefile.in: Remove all occurrences of $(MFLAGS), which were
4444 bringing more evil than good on a few systems.
4445 Reported by Greg A. Woods.
4447 Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
4449 * m4.h: Rename Args() to _().
4450 * m4.h: Remove extern specifier from all function declarations.
4452 Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
4454 * stackovf.c: New file implementing stack-overflow detection.
4455 * configure.in: Check for getrlimit, sigaction. If all of
4456 standard headers, getrlimit and sigaction, define USE_STACKOVF and
4457 substitute ${U}stackovf.o for STACKOVF.
4458 * acconfig.h: Declare USE_STACKOVF.
4459 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
4460 * m4.h: Declare setup_stackovf_trap().
4461 * m4.c: Call setup_stackovf_trap().
4462 * tests/stackovf_test.sh: New file.
4464 Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
4466 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
4468 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
4470 Sun Jan 30 14:24:19 1994 (pinard at icule)
4472 * m4.h: Remove definition of volatile, not used anymore.
4473 Reported by Jim Meyering and Joseph E. Sacco.
4475 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
4476 of `if ... else /* nothing */' for if macros.
4477 Reported by Jim Meyering.
4479 * builtin.c (m4_regexp): Reorganize the code for avoiding a
4480 warning from gcc about `repl' possibly used before defined.
4481 Reported by Jim Meyering.
4483 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
4484 Reported by Jim Meyering.
4486 Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
4488 * m4.h: Move the conditional definition of volatile after the
4489 inclusion of system files, because they may define it first.
4491 Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
4493 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
4494 get around a problem with Alpha make seeing a syntax error, there.
4495 Reported by Vern Paxson.
4497 Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
4499 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
4500 Reported by Richard Stallman.
4502 Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
4504 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
4505 instead of AC_HAVE_FUNCS.
4506 Reported by Noah Friedman.
4508 Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
4510 * m4.c: Initialize show_help and show_version to zero.
4512 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
4513 Use them in exit() and usage() calls.
4515 Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
4517 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
4518 syserr() macro. Delete errref, add reference_error and M4ERROR.
4519 * m4.c: Replace errref, which was returning an input reference
4520 string, with reference_error, which prints it on standard error.
4521 * builtin.c, output.c: Use errno as second parameter to error,
4522 instead of using syserr() with %s.
4523 * *.c: Use M4ERROR instead of error: no more errref() with %s.
4524 Doing so, the program name appears after the input reference
4525 instead of before, which eases M-x next-error processing.
4527 Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
4529 * checks/get-them: Escape braces with backslashes in patterns,
4530 because HPUX-9.01 awk needs this.
4531 Reported by Jim Meyering.
4533 Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
4535 * builtin.c: Declare "FILE *popen ();".
4537 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
4538 macros, replace error_message_prefix() declaration by errref()'s.
4539 Declare xrealloc, for use in errref().
4540 * m4.c: Delete error_message_prefix() function, add errref().
4541 * *.c: Use error() systematically in place of all error macros,
4542 now that error() flushes stdout first. Make needed adjustments.
4544 * m4.h: Remove const in sys_errlist[] declaration, it creates
4545 conflicts on SGI and Alpha.
4546 Reported by Kaveh R. Ghazi.
4548 Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
4550 * m4.c: Include <getopt.h> instead of "getopt.h".
4552 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
4553 * acconfig.h: New, for documenting HAVE_EFGCVT.
4554 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
4555 use them wherever appropriate. Also use -I. for compilations.
4556 * lib/Makefile.in: Use -I.. for compilations.
4557 * *.c: Include <config.h> or "config.h".
4559 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
4560 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
4562 Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
4564 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
4566 * input.c (input_init): Initialize quote and comment strings
4567 explicitely instead of calling set_quotes and set_comment: by
4568 doing so, we ensure we do not free uninitialized variables.
4570 * checks/check-them: Reverse arguments to both diff, so the
4571 expected is on the left and the obtained on the right.
4573 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
4574 macros. Delete declarations for m4error, warning, fatal and
4575 internal_error, add declaration for error_message_prefix.
4576 * m4.c: Delete m4error, warning, fatal and internal_error
4577 routines, add error_message_prefix routine.
4578 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
4579 warning with WARNING*, fatal with FATAL* and internal_error with
4581 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
4582 this is not needed anymore.
4584 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
4585 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
4586 and debug_message, add declaration for debug_message_prefix.
4587 * debug.c: Remove static specifier for FILE *debug declaration.
4588 Delete debug_print and debug_message routines, add
4589 debug_message_prefix routine.
4590 * builtin.c, debug.c: Replace debug_print routine calls with
4591 DEBUG_PRINT* macro calls.
4592 * input.c, path.c: Replace debug_message routine calls with
4593 DEBUG_MESSAGE* macro calls.
4595 * m4.h: Remove inclusion of <varargs.h>.
4596 * debug.c: Include <stdarg.h> or <varargs.h>.
4597 (trace_format): Use stdarg instead of varargs if __STDC__.
4599 * configure.in: Remove checks for vfprintf and _doprnt. These
4600 implementations use varargs tricks which are not portable enough.
4601 * lib/vfprintf.c: Deleted.
4602 * lib/_doprnt.c: Deleted.
4603 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
4604 Reported by Joel Sherrill.
4606 * path.c (add_include_directory): Use xstrdup.
4608 * builtin.c (find_builtin_by_name): Declare static.
4610 * *.[ch]: Add const to a few "char *" declarations.
4612 * configure.in: Remove commented tests for fileno() and fstat().
4613 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
4615 * debug.c (debug_flush_files): New.
4616 * m4.h: Declares it.
4617 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
4618 Reported by Nicolas Pioch.
4620 Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
4622 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
4623 Reported by Joel Sherrill.
4625 * builtin.c (prefix_all_builtins): Instead of the table size, use
4626 the null entry at end for stopping the loop. It was overwritten.
4627 Reported by Andreas Schwab and Jim Meyering.
4629 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
4630 Reported by Kaveh R. Ghazi.
4632 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
4633 Reported by Karl Vogel.
4635 Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
4637 * m4.h: Do not define volatile if already defined.
4638 Reported by Rene' Seindal.
4640 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
4642 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
4643 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
4645 Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
4647 * m4.h: Define strchr and strrchr in terms of index and rindex,
4648 instead of the other way around.
4649 * builtin.c, m4.c, path.c: Use strchr instead of index.
4651 * input.c (next_char): Remove a "break;" after a "return ...;".
4652 Reported by Tom McConnell.
4654 Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
4658 * configure.in: Do not copy check files in the build hierarchy.
4659 * checks/check-them: Identify the m4 version being checked. For
4660 finding m4, look in $PATH instead of in the parent directory.
4661 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
4662 * checks/Makefile.in (.all-stamp): Always create check files in
4663 the source hierarchy, not anymore in the build hierarchy.
4664 (check): cd to the source hierarchy before performing checks.
4665 Do not copy nor clean COPYING anymore, take it from `..'.
4666 Reported by Tom McConnell.
4668 * Makefile.in (Makefile): Use $(SHELL).
4669 (config.status): Use $(SHELL). Use "config.status --recheck"
4670 instead of "configure --no-create", which is obsolete.
4671 Reported by Tom McConnell.
4673 Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
4675 * m4.c (usage): Use "%s" instead of "m4" in format string.
4676 Reported by Jim Meyering.
4678 * Makefile.in: Distribute mkinstalldirs.
4679 Reported by Pierre Gaumond.
4680 Reported by Jim Meyering.
4681 Reported by Tom McConnell.
4682 Reported by Andreas Gustafsson.
4684 * checks/check-them: Renamed from checks/check_them.
4685 * checks/get-them: Renamed from checks/get_them.
4686 * checks/.all-stamp: Renamed from checks/.all_stamp.
4687 * checks/Makefile.in: Changed accordingly.
4688 Reported by Jim Meyering.
4690 Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
4692 * lib/Makefile.in (dist): Correct permissions on files.
4694 * output.c: Declare tmpfile, some systems don't.
4696 Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
4698 * checks/Makefile.in (dist): Correct permissions on files.
4700 * Makefile.in (dist): Ensure recursive linking for subdirectory
4701 `examples', also set read/write permissions on all its files.
4703 * mkinstalldirs: New, from elsewhere.
4704 * Makefile.in: Use it.
4706 * debug.c: Synchronize debug messages and regular output when
4707 the debug file and stdout are redirected to the same file.
4708 * configure.in: Add (commented) checks for fileno and fstat.
4709 Reported by Jim Avera.
4711 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
4712 etc., arguments, then ignore the superfluous one. m4 used to
4713 diagnose missing arguments and return the empty string.
4714 Reported by Nick S. Kanakakorn.
4716 Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
4718 * m4.c (main): At end of all input, ensure all undiverted text
4719 goes to the main output stream.
4720 Reported by Andreas Gustafsson.
4722 * m4.c (main): exit (0), instead of return 0.
4724 * m4.c: Implement -P and --prefix-builtins.
4725 * builtin.c: Delete const specifier on builtin_tab.
4726 (prefix_all_builtins): New.
4727 Reported by Noah Friedman.
4728 Reported by Scott Bartram.
4730 * c-boxes.el: New, from elsewhere.
4731 * Makefile.in: Distribute it.
4733 * m4.h: Do not define bcopy if <string.h> defines it.
4734 Reported by Stephen Perkins.
4736 * builtin.c (define_macro): Allow a missing second argument, in
4737 which case it is implied empty. Affects define and pushdef.
4738 Reported by Eric Allman.
4740 Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
4742 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
4743 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
4744 * builtin.c: Initialize all the blindness fields in builtin_tab.
4745 (define_builtin): Copy the blindness of a builtin into its symbol.
4746 * macro.c (expand_token): Avoid processing a blind builtin if the
4747 next character is not an opening parenthesis.
4748 Reported by David MacKenzie.
4749 Reported by Noah Friedman.
4751 * configure.in: Ensure an exit status of 0 on completion.
4752 Reported by Vivek P. Singhal.
4754 * eval.c (eval_lex): Admit both lower and upper case letters for
4755 bases greater than 10. Only lower case letters were accepted.
4757 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
4758 Reported by Krste Asanovic.
4760 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
4761 * eval.c (logical_not_term): New name for not_term.
4762 * eval.c (xor_term): New, between or_term and and_term.
4763 * eval.c (not_term): New, between and_term and logical_not_term.
4764 * eval.c (shift_term): New, between cmp_term and add_term.
4765 Reported by Krste Asanovic: ~, ^, <<, >>.
4766 Reported by Ben A. Mesander: ** vs ^.
4768 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
4769 * m4.h: Delete xrealloc.c.
4770 * lib/xmalloc.c: New, from elsewhere.
4771 * lib/xstrdup.c: New, from elsewhere.
4772 * lib/Makefile.in: Distribute and compile them.
4774 * m4.c: Change progname to program_name.
4775 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
4776 * lib/error.c: New, from elsewhere.
4777 * lib/Makefile.in: Distribute and compile error.c.
4778 * configure.in: Check AC_VPRINTF and for strerror.
4779 * m4.c: Delete cmd_error. Use error instead.
4780 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
4782 * m4.h: Delete #define const, let Autoconf takes care of this.
4784 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
4785 Merge parse_args into main. Declare argv to be `char *const *',
4786 then remove superfluous casts.
4788 * m4.c: Rename --no-gnu-extensions to --traditional.
4789 Reported by Ben A. Mesander.
4791 * m4.c (usage): Add a status parameter. Supply one in various
4792 calls. Add --help processing. Remove -V for --version.
4794 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
4796 * lib/Makefile.in: Have an AR=ar declaration.
4797 Reported by Eric Backus.
4798 Reported by Bjorn R. Bjornsson.
4799 Reported by Tom Tromey.
4800 Reported by Kristine Lund.
4801 Reported by Marion Hakanson.
4803 Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
4805 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
4806 Reported by Noah Friedman.
4808 Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
4810 * Makefile.in: Remove MDEFINES and cleanup.
4812 Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
4814 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
4817 Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
4819 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
4820 ensure 777 mode for directories, so older tar's will restore file
4823 Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
4825 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
4826 so the installer can override automatically configured choices.
4827 Reported by Karl Berry.
4829 Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
4831 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
4832 previous version was not working properly on m68k-hp-bsd4.3.
4833 Reported by Roland McGrath.
4835 * lib/_doprnt.c: Stolen from Oleo distribution.
4836 * configure.in: Check for _doprnt.c if vfprintf.c selected.
4837 * lib/Makefile.in: Distribute _doprnt.c.
4838 Do not distribute regex.[ch].old anymore.
4840 Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
4842 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
4843 Richard wants it there.
4845 Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
4847 * Makefile.in: Add DEFS to MDEFINES.
4848 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
4849 (libm4.a): Remove the library before creating it.
4850 (distclean): Remove tags and TAGS too.
4852 Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
4854 * Makefile.in (dvi, m4.dvi): New goals.
4856 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
4857 macro.c, output.c, path.c, symtab.c: Change Copyright from
4858 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
4860 * examples/divert.m4: Deleted, this bug has been corrected.
4862 * Makefile.in (texclean, mostlyclean): New goals.
4864 * Makefile.in (clean): Remove clutter from ansi2knr.
4865 Reported by Pierre Gaumond.
4866 Reported by Greg A. Woods.
4868 Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
4870 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
4871 might well use CFLAGS is s/he needs it.
4873 * Makefile.in: Allow installation of info files from a separate
4875 Reported by Jason Merrill.
4876 Reported by David MacKenzie.
4877 Reported by Skip Montanaro.
4878 Reported by Erez Zadok.
4879 Reported by Assar Westerlund.
4881 Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
4884 This is still a beta release for the future GNU m4 version 1.1.
4886 * lib/alloca.c: New, from elsewhere.
4887 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
4889 * m4.h: Do not define index/rindex if already defined. If
4890 FALSE/TRUE are already defined, do not redefine them, but merely
4891 define boolean typedef to int.
4893 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
4894 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
4895 because some C compilers do not like connectives with #ifdef.
4896 * m4.h: Define `volatile' only if __GNUC__, instead of once for
4897 __GNUC__ and once for __STDC__.
4898 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
4900 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
4901 Makefile dependencies. Without it, make keeps destroying and
4902 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
4904 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
4905 to diversion/DIVERSION, this was a spelling error.
4907 * m4.c: Declare version[], remove #include "version.h".
4908 * version.h: Deleted.
4909 * Makefile.in: Remove references to version.h.
4911 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
4912 production, by using a simpler and more robust algorithm. This
4913 solves the problem of synclines sometimes written in the middle of
4914 an output line. Delete sync_line() and output_lines variable.
4915 * m4.h: Remove sync_line prototype and output_lines declaration.
4916 * input.c (next_char), output.c (shipout_text): Remove references
4918 * input.c (push_file, pop_file): Merely put the value -1 in
4919 output_current_line instead of calling sync_line, for delaying a
4920 single `#line NUM FILE' before next output line. Do not test
4921 for sync_output, because this is unnecessary clutter.
4922 * output.c (make_divertion, insert_divertion): Idem.
4923 * input.c: Rename must_advance_line to start_of_input_line, for
4926 * debug.c (trace_header): Select a new debug line format, which
4927 better complies with GNU standards for formatting error messages.
4928 With option `-dfl', M-x next-error might be used on the output.
4929 * m4.c (vmesg): Adjust format of error output to GNU standards.
4930 * m4.texinfo: Adjust examples for `make check' to work.
4932 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
4933 case for enum debug_info constants, which were all lower case.
4935 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
4937 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
4938 collected patches. I tried a few times using newer regex.[ch], it
4939 mysteriously stopped aborting with this one. Insecure feeling...
4940 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
4942 Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
4944 * m4.c: Change `--no-warnings' to `--silent'.
4945 Reported by David MacKenzie.
4947 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
4948 leave it off for now. See comment in m4.c for justification.
4949 Reported by David MacKenzie.
4951 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
4952 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
4954 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
4956 * Makefile.in: Ensure recursive cleaning is done before local
4957 cleaning for all clean goals.
4959 * builtin.c (ntoa): Ensure the value is always interpreted as a
4960 signed quantity, whatever the radix is.
4962 Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
4964 * builtin.c, format.c, input.c: Split long lines.
4965 * m4.c: Use typedef macro_definition instead of struct
4967 * symtab.c: Use typedef symbol instead of struct symbol.
4969 Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
4971 * *.[ch]: Remove all trailing whitespace, in code and comments.
4973 * configure.in: Find some awk.
4974 * Makefile.in: Add $(AWK) to MDEFINES.
4975 * checks/Makefile.in: Transmit $(AWK) to get_them.
4976 * checks/get_them: Use $AWK instead of gawk. Add a close in the
4977 awk script when switching files, because without this, mawk runs
4978 out of file descriptors.
4980 Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
4982 * Makefile.in (realclean): Delete m4.info*.
4983 Reported by Jim Meyering.
4985 * Makefile.in: Adjust and link with checks/Makefile.
4986 * checks/Makefile.in: New.
4987 * configure.in: Output checks/Makefile.
4989 * checks/get_them: Have the dnl header of each test more
4990 recognizable by next-error, also use a better message.
4992 Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
4994 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
4995 And use that only if __GNUC__ since we're using it's GCC-specific
4996 semantics that tell the compiler the associated function doesn't
4999 * builtin.c (substitute): Don't use character as an array index.
5000 (dumpdef_cmp): Make formal arguments `const void *' to avoid
5001 warnings with gcc -W -Wall on systems with qsort prototype.
5002 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
5005 * eval.c (most functions): Add parentheses to assignments used
5006 as truth values go avoid warnings from gcc -Wall.
5008 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
5009 any functions that don't need external scope.
5011 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
5012 (many functions and arrays): Declare `const'.
5014 Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
5016 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
5017 removing the declaration from m4.h. Also rename false to FALSE
5020 * lib/Makefile.in (Makefile): New goal.
5022 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
5023 so heavily loaded. It gets more easily overridable, calling make.
5024 Reported by Jim Meyering.
5026 * Makefile.in (dist): Get .fname from the current directory name,
5027 instead of from version.h. I need updating many files manually,
5028 when the version changes, version.h is just one of them.
5030 Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
5032 * m4.h: Remove the tag `boolean' on the enum introducing typedef
5033 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
5034 Reported by Tom McConnell.
5036 Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
5038 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
5039 39.cleardiv, which were describing missing or spurious newlines.
5040 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
5041 do not depend on machine word size, `/bin/false' implementation,
5042 or `wc' output format. `make check' is more dependable, now.
5044 * checks/check_them: Summarize the failed tests by listing their
5045 name, at end. If none, issue `All checks successful'. Output
5046 `Checking' instead of `Input file:'.
5048 * checks/get_them, checks/check_them: Reindented.
5050 * Makefile.in (dist): chmod a+r before making the tar file.
5052 Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
5054 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
5056 * input.c (next_token): Reinitialize token_buttom just after using
5057 it as a watermark with obstack_free. Or else, a future token, big
5058 enough for triggering reallocation of the obstack chunk, could
5059 void the initialized value of token_buttom, later causing panic in
5060 obstack_free. Rename token_buttom to token_bottom everywhere.
5062 * m4.h: Before declaring errno, first include <errno.h> and
5063 ensure that it does not define errno.
5064 Reported by Richard Stallman.
5066 Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
5068 * builtin.c: Define and use DECLARE macro for builtins.
5070 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
5071 argument, this is a common idiom for introducing long comments.
5073 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
5074 arguments. The last argument was silently ignored.
5076 * m4.c (cmd_error): Add a missing semicolon before va_end().
5078 Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
5080 * Makefile.in: Now handle protoized sources. Define and use U.
5081 Compile and use ansi2knr with old compilers. Update DISTFILES.
5082 Add `aclocal.m4' to `configure' dependencies.
5083 * ansi2knr.c: New, from Ghostscript distribution.
5084 * configure.in: Define U through FP_PROTOTYPES for old compilers.
5085 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
5086 * aclocal.m4: New, provide FP_PROTOTYPES.
5087 * m4.h: Conditionnaly protoized through Args, save for varags.
5088 * builtin.c: Protoized. Then:
5089 Include <sys/types.h> if size_t is not defined, before "regex.h".
5090 (m4_ifelse): Fetch built-in name properly for diagnostic.
5091 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
5092 (m4_regexp): Add const to `msg' declaration.
5093 (m4_patsubst): Add const to `msg' declaration.
5094 * debug.c: Protoized, save for varargs.
5095 * eval.c: Protoized.
5096 * format.c: Protoized.
5097 * input.c: Protoized.
5098 * m4.c: Protoized, save for varargs. Then:
5099 (xfree): Accept void * instead of char *.
5100 (xmalloc): Return void * instead of char *.
5101 (xrealloc): Accept and return void * instead of char *.
5102 * macro.c: Protoized.
5103 * output.c: Protoized.
5104 * path.c: Protoized. Then cast some (char *) over xmalloc's.
5105 * symtab.c: Protoized.
5107 Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
5109 * m4.texinfo: Remove directory from diagnostics in 30.include,
5110 51.eval, 56.errprint and 57.m4exit tests.
5112 * m4.h: Remove declarations for int or void system functions, they
5113 cause more conflicting trouble than they make good.
5115 * configure.in: Avoid configuration header file. Add some tests.
5116 * m4.h: Remove #include "config.h".
5117 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
5118 Then, rewritten for better compliance with GNU standards.
5120 Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
5122 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
5123 because of a misplaced #endif.
5125 * Many *.[hc] files: Correct intra-line spacing here and there,
5126 according to GNU indent 1.6 advice.
5128 * configure.in: New, using Autoconf 1.2.
5129 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
5130 * Delete old configure.in, configure, etc/configure.in,
5131 etc/configure, lib/configure.in, lib/configure and config/*.
5132 Reported by Jason Merrill.
5134 * symtab.c (hash): Change (char) NULL to '\0'.
5135 Reported by Jason Merrill.
5137 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
5138 etc/nextvers.sh. Release numbers will be edited `by hand'.
5139 * version.h: De-automatize, force value in.
5141 * m4.c: Changes in order to use a newer getopt.h.
5142 Reported by David MacKenzie.
5144 * checks/: New name for examples/.
5145 * checks/get_them: New location for etc/get_examples.
5146 * checks/check_them: New location for etc/check_examples.
5147 * Makefile.in, checks/get_them, checks/check_them: Adjust.
5148 * lib/vfprintf.c: New location for etc/vfprintf.c.
5149 * Delete empty etc/.
5150 * examples/: New name for test/.
5152 Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
5154 * Makefile.in (check): Add m4 as dependency.
5156 * m4.c: Accept --no-warnings instead of --no_warnings, and
5157 --no-gnu-extensions instead of --no_gnu_extensions. Make the
5158 usage message more informative.
5159 Reported by David MacKenzie.
5161 Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
5163 * etc/check_examples: New name for check_examples.sh.
5164 * etc/get_examples: New name for get_examples.sh.
5165 * Makefile.in, etc/Makefile.in: Use new names.
5167 * Makefile.in: Transmit $(CC) while making in lib.
5169 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
5170 code disposition by hand.
5172 Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
5174 * m4.h: Delete definitions for abort() and exit().
5175 Reported by Richard Stallman.
5177 * config/hmake-unicos, config/s-unicos.h: New files.
5178 Reported by Hal Peterson.
5180 * eval.c (exp_term): Have N^0 return 1.
5181 Reported by Michael Fetterman.
5183 * eval.c, input.c, m4.h: Remove last comma in enums.
5184 Reported by Mike Lijewski.
5186 * Transfer of maintenance duties from Rene' to Franc,ois.
5188 Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
5190 * Release 1.0. Many thanks to those, who provided me with bug
5191 reports and feedback.
5193 * Uses GNU configure, taken from the gdb distribution.
5195 * Uses GNU getopt(), with long option names.
5197 * The -Q/+quiet option is added, which suppresses warnings about
5198 missing or superflous arguments to built-in macros.
5200 * Added default options via the M4OPTS environment variable.
5202 * The built-in format can now be configured to use sprintf as
5203 the formatting engine, for systems without [efg]cvt(3).
5205 * GNU library code is moved to the ./lib subdirectory; other
5206 utility files are now in ./etc.
5208 * Several minor bugs have been fixed.
5210 Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
5212 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
5213 Francois Pinard and Roland H. Pesch for providing me with reports.
5215 * The builtins incr and decr are now implemented without use of
5218 * The builtin indir is added, to allow for indirect macro calls
5219 (allows use of "illegal" macro names).
5221 * The debugging and tracing facilities has been enhanced
5222 considerably. See the manual for details.
5224 * The -tMACRO option is added, marks MACRO for tracing as soon
5227 * Builtins are traced after renaming iff they were before.
5229 * Named files can now be undiverted.
5231 * The -Nnum option can be used to increase the number of
5232 divertions available.
5234 * Calling changecom without arguments now disables all comment
5237 * The function m4_patsubst() is now consistently declared
5240 * A bug in dnl is fixed.
5242 * A bug in the multi-character quoting code is fixed.
5244 * Several typos in the manual has been corrected. More probably
5247 * The m4.info file is now installed along with the program.
5249 Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
5251 * Updated and enhanced version. Release 0.75, manual 0.07.
5253 * Implemented search path for include files (-I option and
5254 M4PATH envronment variable).
5256 * Implemented builtin "format" for printf-like formatting.
5258 * Implemented builtin "regexp" for searching for regular
5261 * Implemented builtin "patsubst" for substitution with regular
5264 * Implemented builtin "esyscmd", which expands to a shell
5267 * Implemented "__file__" and "__line__" for use in error
5270 * Implemented character ranges in "translit".
5272 * Implemented control over debugging output.
5274 * Implemented multi-character quotes.
5276 * Implemented multi-character comment delimiters.
5278 * Changed predefined macro "gnu" to "__gnu__".
5280 * Changed predefined macro "unix" to "__unix__", when the -G
5281 option is not used. With -G, "unix" is still defined.
5283 * Changed "shift", "$@" and "$*" to not insert spaces afters
5286 * Added program name to error messages.
5288 * Fixed two missing null bytes bugs.
5290 Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
5292 * Initial beta release. Release 0.50, manual 0.05.
5300 Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2011 Free Software
5303 Copying and distribution of this file, with or without
5304 modification, are permitted provided the copyright notice
5305 and this notice are preserved.