1 2008-10-10 Eric Blake <ebb9@byu.net>
3 Release Version 1.4.12.
4 * NEWS: Mention the release.
6 2008-10-06 Eric Blake <ebb9@byu.net>
8 Work around Solaris' sed inability to process NUL.
9 * checks/check-them (SED): Allow user to override.
11 2008-09-25 Eric Blake <ebb9@byu.net>
13 Tweak error message on command line failure.
14 * src/m4.c (process_file): Match wording of include builtin.
15 * src/freeze.c (produce_frozen_state): Likewise.
16 * m4/gnulib-cache.m4: Regenerate.
17 * doc/m4.texinfo (Command line files, Using frozen files): Update
20 2008-09-24 Eric Blake <ebb9@byu.net>
22 Unify error handling for reading directories.
23 * src/path.c (m4_path_search): Factor open attempts...
24 (m4_fopen): ...into new function, to reject directories.
25 * doc/m4.texinfo (Include): Document that directories cannot be
28 Avoid bugs on platforms that mishandle trailing /.
29 * m4/gnulib-cache.m4: Import fopen module.
30 * doc/m4.texinfo (Command line files, Include): Add tests.
31 (Using frozen files): This test now works on mingw.
32 * checks/check-them (examples): Expand xerr to allow ignoring
33 error output because of differences in platform errno values.
35 2008-09-22 Eric Blake <ebb9@byu.net>
37 Support alternate path separator.
38 * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
39 * src/m4.h (includes): Add headers.
40 * src/path.c (m4_path_search): Avoid literal use of '/' as path
41 separator and when detecting absolute paths.
43 2008-09-16 Eric Blake <ebb9@byu.net>
45 Fix bootstrap for Solaris /bin/sh.
46 * bootstrap: Avoid shell quoting pitfall.
48 2008-09-01 Eric Blake <ebb9@byu.net>
50 Fix building with -DDEBUG=1.
51 * src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
52 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
53 * src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
54 Reported by Tom G. Christensen.
56 2008-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
58 Typos in source code comments.
59 * src/builtin.c: Fix typos in comments.
60 * src/input.c: Likewise.
62 2008-08-29 Eric Blake <ebb9@byu.net>
64 Fix manual date information.
65 * doc/m4.texinfo: UPDATED refers to the day the manual was built,
66 not the release date of M4.
67 Based on a bison patch by Akim Demaille.
69 2008-08-27 Eric Blake <ebb9@byu.net>
72 * doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
75 2008-08-25 Eric Blake <ebb9@byu.net>
77 Update recommendation now that libsigsegv 2.6 is released.
78 * NEWS: Recommend libsigsegv 2.6+.
81 2008-08-21 Eric Blake <ebb9@byu.net>
83 Fix crash with traced defn(undef), regression from 2007-08-09.
84 * src/builtin.c (m4_defn): Handle traced but undefined macros.
85 * doc/m4.texinfo (Trace): Test it.
88 2008-08-18 Eric Blake <ebb9@byu.net>
90 Fix crash with 'm4 -N9', regression from 2006-09-14.
91 * src/m4.c (main): Add missing break.
94 2008-08-15 Eric Blake <ebb9@byu.net>
96 Documentation updates.
97 * doc/m4.texinfo (History): Mention 1.4.12.
98 (Builtin): Enhance regression tests.
99 (Debug Levels): Mention effect of -l. Enhance regression tests.
100 (Incompatibilities): Fix typo, and mention trace output.
101 (Improved capitalize): Simplify example.
103 Avoid compiler warning.
104 * src/builtin.c (m4_ifelse): Avoid unused variable.
106 Reported by Tom G. Christensen.
108 Improve 'git diff' of manual source.
109 * .gitattributes (*.texi*): Add diff attribute.
110 * bootstrap: Tell git how to use it.
111 Inspired by Jim Meyering's similar patch for coreutils.
113 2008-08-11 Eric Blake <ebb9@byu.net>
115 Avoid triggering OS/2 bug in testsuite.
116 * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
117 Reported by Elbert Pol.
119 2008-08-03 Eric Blake <ebb9@byu.net>
121 Increase ulimit stack value to be larger than SIGSTKSZ.
122 * checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
123 at least OpenBSD's sh died early from an undersized stack limit.
125 2008-07-17 Eric Blake <ebb9@byu.net>
127 Fix missing copyright notices.
128 * acinclude.m4: Add copyright license details.
129 * c-boxes.el: Likewise.
130 * checks/get-them: Likewise.
131 * checks/check-them: Likewise.
133 2008-07-17 Eric Blake <ebb9@byu.net>
135 Remove redundant examples/stackovf.sh.
136 * examples/stackovf.sh: Delete, now that checks has better
138 * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
140 2008-07-17 Eric Blake <ebb9@byu.net>
142 Adjust to c-stack changes in gnulib.
143 * src/Makefile.am (m4_LDADD): Use libsigsegv when available and
144 necessary, via LIBCSTACK.
145 * src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
147 * checks/stackovf.test: New file.
148 * checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
149 (DOC_CHECKS): ...generated documentation tests into new macro.
150 (DISTFILES): Distribute stackovf.test.
151 * checks/check-them: Special-case stackovf.test.
152 * NEWS: Enhance the NEWS item for -L improvements.
153 * README: Mention the optional dependency.
154 * HACKING: Mention maintenance burden added by libsigsegv.
156 2008-06-21 Eric Blake <ebb9@byu.net>
158 Use new sigaction module.
159 * m4/gnulib-cache.m4: Import sigaction module.
160 * src/m4.c (main): Drop signal() calls.
162 2008-06-18 Eric Blake <ebb9@byu.net>
164 Also trap SIGILL, SIGFPE, SIGBUS.
165 * m4/gnulib-cache.m4: Import strsignal module.
166 * src/m4.c (main): Register more handlers, and prefer sigaction
168 (SIGBUS, NSIG): Provide fallback when lacking.
169 (signal_message): New variable, to keep async-safety.
170 (fault_handler): Display faulting signal description.
171 * configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
172 optimize for single-threaded operation.
174 2008-06-06 Eric Blake <ebb9@byu.net>
176 Inform users what to do in case of programmer error.
177 * src/m4.h (EXIT_INTERNAL_ERROR): New macro.
178 * configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
179 * src/m4.c (fault_handler): New method.
180 (program_error_message): New variable, for async-safety.
181 (main): Print bug reporting address rather than dump core on any
182 failed assertions or detected non-stack-overflow faults.
184 2008-06-06 Eric Blake <ebb9@byu.net>
186 Replace stackovf with gnulib c-stack.
187 * m4/gnulib.cache.m4: Import c-stack module.
188 * configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
189 siginfo.h, sys/wait.h.
190 (AC_CHECK_TYPES): Likewise for siginfo_t.
191 (AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
192 (AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
193 sigstack, sigvec, strerror.
194 (M4_cv_use_stackovf): Likewise for stack overflow detection.
195 * src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
196 * src/stackovf.c: Delete.
197 * src/m4.h (setup_stackovf_trap): Delete.
198 * src/m4.c (stackovf_handler): Delete.
199 (main): Use c_stack_action instead of setup_stackovf_trap. If
200 stack overflow is detectable, don't limit -L artificially.
201 (usage): Document unlimited default on supported systems.
202 * doc/m4.texinfo (Limits control): Document new default nesting
204 * NEWS: Document this change.
206 2008-07-30 Eric Blake <ebb9@byu.net>
208 Avoid regressions in trace and comment output.
209 * doc/m4.texinfo (Trace): Add test.
210 (Comments): Likewise.
212 2008-07-28 Eric Blake <ebb9@byu.net>
214 Optimize iteration examples.
215 * examples/forloop2.m4: Avoid excess indir, by passing current
216 counter value as parameter.
217 * examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
219 * doc/m4.texinfo (Improved forloop, Improved foreach): Update the
220 documentation to match.
222 2008-07-26 Eric Blake <ebb9@byu.net>
224 Give example for O(n) foreach on m4 1.4.x.
225 * examples/foreachq4.m4: New file.
226 * examples/Makefile.am (EXTRA_DIST): Distribute it.
227 * doc/m4.texinfo (Improved foreach): Document linear foreach with
228 m4 1.4.5 and greater.
230 2008-07-17 Eric Blake <ebb9@byu.net>
232 Fix missing copyright notices.
233 * acinclude.m4: Add copyright license details.
234 * c-boxes.el: Likewise.
235 * checks/get-them: Likewise.
236 * checks/check-them: Likewise.
238 2008-07-13 Eric Blake <ebb9@byu.net>
240 Add -g/--gnu command line argument.
241 * src/m4.c (usage): Mention the new option.
242 (long_options, OPTSTRING): Add new option.
244 * NEWS: Document this addition.
245 * doc/m4.texinfo (Limits control): Likewise.
246 (Incompatibilities): Mention future use of POSIXLY_CORRECT.
248 Reported by Joel E. Denny.
250 2008-07-11 Eric Blake <ebb9@byu.net>
252 Avoid bogus whitespace in @ovar, @dvar.
253 * doc/m4.texinfo (ovar, dvar): Add @c.
254 Based on patch by Ralf Wildenhues to Autoconf manual.
256 2008-06-16 Eric Blake <ebb9@byu.net>
258 Add missing const qualifications.
259 * src/builtin.c (builtin_tab): Declare array elements as const.
261 2008-06-03 Eric Blake <ebb9@byu.net>
263 Use progname module rather than rolling our own program_name.
264 * m4/gnulib-cache.m4: Import progname module.
265 * src/m4.c (program_name): Replace...
266 (main): ...with a call to set_program_name.
268 2008-06-02 Eric Blake <ebb9@byu.net>
270 Allow autobuild usage.
271 * m4/gnulib.cache: Import autobuild module.
273 2008-05-23 Eric Blake <ebb9@byu.net>
275 Make closing files be consistent.
276 * src/freeze.c (reload_frozen_state): Use close_stream.
277 Reported by Jean-Charles Longuet.
279 2008-05-22 Eric Blake <ebb9@byu.net>
281 Don't allow failure to freeze give exit status of 0.
282 * src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
284 * doc/m4.texinfo (Using frozen files): Test the fix.
286 Reported by Jean-Charles Longuet.
288 2008-05-09 Eric Blake <ebb9@byu.net>
290 Improve error message when frozen file is invalid.
291 * src/freeze.c (reload_frozen_state): Track current line.
292 [GET_STRING]: New helper macro.
294 2008-05-09 Eric Blake <ebb9@byu.net>
296 Detect integer overflow when loading frozen file.
297 * src/m4.h (includes): Add limits.h.
298 (_): Define as a no-op placeholder for now.
299 * src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
300 immediately on overflow.
301 Reported by Jim Meyering.
303 2008-05-07 Eric Blake <ebb9@byu.net>
305 Fix traceon regression introduced 2006-06-06.
306 * src/builtin.m4 (traceon): Only perform insertion if lookup
308 * doc/m4.texinfo (Trace): Test for the bug.
311 2008-05-03 Eric Blake <ebb9@byu.net>
313 Document define_blind.
314 * doc/m4.texinfo (Ifelse): Add a new composite macro.
318 2008-04-24 Eric Blake <ebb9@byu.net>
321 * doc/m4.texinfo (Debug Levels): Test -di behavior.
322 (Changeword, Location): Correct examples.
323 * checks/check-them (examples): Update to account for recommended
324 location for running tests.
325 * doc/m4.texinfo (Debug Levels): Test this behavior.
327 2008-04-21 Eric Blake <ebb9@byu.net>
329 Fix spelling of attribution to Christopher Strachey.
330 * doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
332 Reported by Fernando Carrijo.
334 2008-04-17 Eric Blake <ebb9@byu.net>
336 Fix buildbot failure.
337 * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
340 Detected by Bob Proulx's buildbot.
342 2008-04-17 Eric Blake <ebb9@byu.net>
344 Avoid gcc shadowing warnings.
345 * src/builtin.c (m4_format): s/format/expand_format, so local
346 variables can be named format.
347 * src/format.c (format): Rename...
348 (expand_format): ...to this, and avoid the name index.
349 * src/input.c (push_file): Avoid the name close.
350 * src/m4.h (expand_format): Adjust prototype.
351 * src/output.c (threshold_diversion_CB): Avoid the name div.
353 2008-04-15 Eric Blake <ebb9@byu.net>
355 Another 'make installcheck' fix.
356 * doc/m4.texinfo (Diversions): s/m4/__program__/ in case
357 --program-prefix was active.
359 2008-04-11 Eric Blake <ebb9@byu.net>
361 Ensure --program-prefix doesn't regress.
362 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
363 2008-03-10 by testing it at 'make distcheck' time.
365 2008-04-11 Eric Blake <ebb9@byu.net>
367 Improve OS/2+emx build.
368 * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
369 system(3), no matter what other macros it pre-defined.
370 * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
372 * src/builtin.c (predefined_tab): Ensure all possible system
373 identifiers are defined, not just the first; the testsuite will
374 catch if multiple identifiers mistakenly made it through.
376 Reported by Elbert Pol.
378 2008-04-09 Eric Blake <ebb9@byu.net>
380 Remove redundant configure macros.
381 * configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
382 (AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
384 (AC_CHECK_HEADERS_ONCE): Remove limits.h.
386 2008-08-07 Bruno Haible <bruno@clisp.org> (tiny change)
388 Run m4 tests prior to gnulib unit tests.
389 * Makefile.am (SUBDIRS): Swap order of directories.
391 2008-04-02 Eric Blake <ebb9@byu.net>
393 Release Version 1.4.11.
394 * NEWS: Mention the release.
397 * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
398 remove tag operation.
399 (version-check): Enhance this check.
400 (prev-tarball): Depend on version-check.
401 (this-vc-tag): Delete, and mention need to run tag...
402 * HACKING: ...here, prior to make maintainer-distcheck.
403 Update the instructions to match this particular release process.
404 * Makefile.am (.version, announcement): Allow for VPATH build.
405 * cfg.mk (gnulib_dir): Likewise.
406 * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
409 2008-04-01 Eric Blake <ebb9@byu.net>
411 Speed up index builtin.
412 * m4/gnulib-cache: Import strstr module.
413 * NEWS: Mention the speedup.
415 2008-03-29 Eric Blake <ebb9@byu.net>
417 Fix testsuite on mingw, OpenBSD.
418 * src/format.c (ARG_DOUBLE): Use strtod, not atof.
419 * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
420 * doc/m4.texinfo (Format): Add hex-float support.
421 * NEWS: Document this.
423 2008-03-27 Eric Blake <ebb9@byu.net>
425 Pull other useful doc fixes from branch-1.6.
426 * doc/m4.texinfo (Arguments): Enable test of
427 --warn-macro-sequence.
428 (Defn): Test length of builtin token.
429 (Builtin, Ifelse, Changequote): Add more regression tests.
431 2008-03-27 Eric Blake <ebb9@byu.net>
433 Add test for divert bug on 2007-05-28, patched 2007-07-21.
434 * doc/m4.texinfo (Diversions): Add test.
436 2008-03-24 Eric Blake <ebb9@byu.net>
438 Pull GNUmakefile from gnulib.
439 * m4/gnulib-cache.m4: Import gnumakefile module.
440 * GNUmakefile: Remove from version control; supplied by gnulib
442 * configure.ac (AC_INIT): Track intra-release version with
444 (AC_CONFIG_LINKS): Let gnulib do this now.
445 * Makefile.am (distclean-local): Likewise.
446 (EXTRA_DIST): Likewise. Also handle renamed files.
447 * (.version, dist-hook): Improve version handling.
448 * Makefile.cfg: Rename...
449 * cfg.mk: ...to this.
450 * Makefile.maint: Rename...
451 * maint.mk: ...to this.
452 (ME, makefile-check, m4-check): Use new macro instead of
454 * HACKING: Mention that maintainer rules should now work in VPATH
457 2008-03-15 Eric Blake <ebb9@byu.net>
459 Document join, in order to fix bug in m4wrap example.
460 * doc/m4.texinfo (Improved m4wrap): New node.
461 (Defn, Location): Enhance tests.
462 (Shift): Document the composite macro join.
463 (Incompatibilities): Move documentation of LIFO vs. FIFO...
464 (M4wrap): ...here, to match improved example.
466 2008-03-10 Eric Blake <ebb9@byu.net>
468 Allow 'make installcheck' with './configure --program-prefix'.
469 * checks/Makefile.in (program_transform_name): New macro.
470 (installcheck): Use it to transform name of m4 before testing.
471 * checks/check-them (m4): Add -m option, to allow testing m4 by a
473 * checks/get-them: Allow xout and xerr notation.
475 2008-02-25 Eric Blake <ebb9@byu.net>
477 Improve release process.
478 * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
480 * HACKING: Update for git release procedures.
481 * Makefile.cfg: New file.
482 * GNUmakefile: Use it.
483 * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
484 (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
485 (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
486 (makefile-check, news-date-check, changelog-check, m4-check)
487 (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
488 (announcement, alpha, beta, major): New rules, borrowed from
490 (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
492 * Makefile.am (EXTRA_DIST): Distribute new file.
494 2008-02-19 Eric Blake <ebb9@byu.net>
496 Clean up foreach example.
497 * doc/m4.texinfo (Foreach, Improved foreach): Document another
498 shortcoming in foreach.m4.
500 2008-02-16 Eric Blake <ebb9@byu.net>
502 Add regression test for multi-character quote recursion.
503 * examples/foreach2.m4: Use $0 rather than spelling out name.
504 * examples/foreachq2.m4: Likewise.
505 * examples/forloop2.m4: Likewise.
506 * examples/hanoi.m4: Likewise.
507 * examples/trace.m4: Likewise.
508 * doc/m4.texinfo (Improved forloop): Document advantage of $0.
509 (Improved foreach): Adjust dump from file.
511 2008-02-13 Eric Blake <ebb9@byu.net>
514 * doc/m4.texinfo (Incompatibilities): Use @. after capital.
515 (History): Use @: after abbreviations.
516 (M4exit): Use correct Latin abbreviation.
518 2008-02-11 Eric Blake <ebb9@byu.net>
520 Document behavior of __gnu__().
521 * doc/m4.texinfo (Platform macros): Enhance test.
522 (Macro expansion): New test.
524 2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
526 * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
527 than hard-coding /bin/sh.
529 Reported by Lawson Chan.
531 2007-12-13 Paolo Bonzini <bonzini@gnu.org> (tiny change)
533 * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
536 Reported by Giovanni Toffetti.
538 2007-12-07 Eric Blake <ebb9@byu.net>
540 Minor security fix: Quote output of mkstemp.
541 * src/builtin.c (mkstemp_helper): Produce quoted output.
542 * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
543 * NEWS: Document this change.
545 2007-12-04 Eric Blake <ebb9@byu.net>
547 Fix builds with OpenBSD make.
548 * doc/Makefile.am (HELP2MAN): New macro.
549 (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
550 * README: Update copyright.
551 * HACKING: Mention help2man and makeinfo dependencies.
553 2007-11-22 Eric Blake <ebb9@byu.net>
555 Security fix: avoid arbitrary code execution with 'm4 -F'.
556 * src/freeze.c (produce_frozen_state): Never pass raw file name as
558 * NEWS: Document this fix.
560 2007-11-07 Eric Blake <ebb9@byu.net>
562 * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
564 2007-11-05 Eric Blake <ebb9@byu.net>
566 Use build-aux directory.
567 * configure.ac (PACKAGE, VERSION): Delete, since Automake does
569 (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
570 instead of the top level.
571 (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
572 * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
573 * bootstrap: Adjust accordingly.
574 * m4/gnulib-cache.m4: Add --aux-dir option.
575 * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
577 2007-10-31 Eric Blake <ebb9@byu.net>
579 Test more corner cases.
580 * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
581 (Improved foreach): Document alternate foreachq style.
583 2007-10-28 Eric Blake <ebb9@byu.net>
585 More test coverage for autoconf usage patterns.
586 * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
587 (Builtin): Add new undocumented tests.
588 (Shift): Document cond macro, and add new test.
590 2007-10-27 Eric Blake <ebb9@byu.net>
592 Document one use of changequote(`(',`)').
593 * doc/m4.texinfo (Changequote): Add new test, based on recent
594 autoconf addition of m4_expand.
596 2007-10-22 Eric Blake <ebb9@byu.net>
598 Never let printf failures go undetected.
599 * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
600 intprops, strtod, and xprintf modules. Remove deprecated free
601 module. Replace vasprintf-posix and xvasprintf with
603 * src/m4.h: Include xprintf.h.
604 * src/builtin.c (ntoa): Export.
605 (m4_errprint): Adjust all *printf callers.
606 * src/debug.c (debug_message_prefix, trace_format): Likewise.
607 * src/freeze.c (produce_frozen_state): Likewise.
608 * src/input.c [DEBUG_INPUT]: Likewise.
609 * src/m4.c (usage): Likewise.
610 * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
611 (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
612 * src/output.c (shipout_text, freeze_diversione): Likewise.
613 * src/path.c [DEBUG_INCL]: Likewise.
614 * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
615 * src/symtab.c [DEBUG_SYM]: Likewise.
617 2007-10-17 Eric Blake <ebb9@byu.net>
619 Fix 'm4 -F file -t undefined'.
620 * src/freeze.c (produce_frozen_state): Avoid core dump.
621 * doc/m4.texinfo (Using frozen files): Test for the bug.
622 * NEWS: Mention the fix.
624 2007-10-09 Eric Blake <ebb9@byu.net>
626 Avoid regexp regression.
627 * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
629 2007-10-02 Eric Blake <ebb9@byu.net>
631 Add more examples and tests.
632 * doc/m4.texinfo (Patsubst): Use the examples directory. Also
634 (Improved capitalize): New node.
635 (Index macro, Regexp): Test more code paths.
636 * examples/capitalize.m4: Update to match manual.
637 * examples/capitalize2.m4: New file.
638 * examples/foreachq3.m4: Likewise.
639 * examples/join.m4: Likewise.
640 * examples/loop.m4: Likewise.
641 * examples/wraplifo.m4: Likewise.
642 * examples/wraplifo2.m4: Likewise.
643 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
645 2007-09-24 Eric Blake <ebb9@byu.net>
647 Create .gitignore alongside .cvsignore.
648 * bootstrap (LC_ALL): Set up front.
649 (version control) Borrow idea from head, to avoid churn in
650 m4/.*ignore files modified by gnulib-tool.
652 2007-09-13 Eric Blake <ebb9@byu.net>
656 2007-09-07 Eric Blake <ebb9@byu.net>
658 * AUTHORS: Simplify, to match libtool and autoconf layout.
659 * THANKS: Sync with head.
661 2007-08-10 Eric Blake <ebb9@byu.net>
663 * doc/m4.texinfo (Compatibility): Sync with head.
665 2007-08-10 Konrad Schwarz <konrad.schwarz@siemens.com> (tiny change)
666 and Eric Blake <ebb9@byu.net>
668 * doc/m4.texinfo (Defn): Update wording.
670 2007-08-09 Eric Blake <ebb9@byu.net>
672 POSIX requires defn(`a',`b') to concatenate definitions.
673 * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
674 trying to mix a builtin with anything else.
675 * doc/m4.texinfo (Defn): Document a use for this POSIX
677 (Incompatibilities): Update to match current status.
678 * NEWS: Document this change.
680 Reported by Konrad Schwarz.
682 2007-08-04 Eric Blake <ebb9@byu.net>
684 Normalize all GPL license notices.
685 * GNUmakefile: Update license wording.
686 * Makefile.am: Likewise.
687 * Makefile.maint: Likewise.
688 * bootstrap: Likewise.
690 * configure.ac: Likewise.
691 * checks/Makefile.in: Likewise.
692 * doc/Makefile.am: Likewise.
693 * examples/Makefile.am: Likewise.
694 * src/Makefile.am: Likewise.
695 * src/builtin.c: Likewise.
696 * src/debug.c: Likewise.
697 * src/eval.c: Likewise.
698 * src/format.c: Likewise.
699 * src/freeze.c: Likewise.
700 * src/input.c: Likewise.
701 * src/m4.c: Likewise.
702 * src/m4.h: Likewise.
703 * src/macro.c: Likewise.
704 * src/output.c: Likewise.
705 * src/path.c: Likewise.
706 * src/stackovf.c: Likewise.
707 * src/symtab.c: Likewise.
709 2007-07-21 Eric Blake <ebb9@byu.net>
711 Fix regression on NetBSD from 2007-05-28.
712 * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
714 * NEWS: Document this fix.
716 Reported by Thomas Klausner.
718 2007-07-20 Eric Blake <ebb9@byu.net>
720 Fix 'make distcheck' issues.
721 * Makefile.am (EXTRA_DIST): No need to distribute
722 gpl-3.0.texi.diff anymore.
723 * m4/gnulib-cache.m4: Update to latest gnulib.
725 2007-07-14 Eric Blake <ebb9@byu.net>
727 Reflect upstream license .texi changes.
728 * doc/m4.texinfo (Copying): Rename node...
729 (GNU General Public License): ...to this.
730 (GNU Free Documentation License): Adjust node location.
731 * local/doc/gpl-3.0.texi.diff: Remove file.
733 2007-07-10 Eric Blake <ebb9@byu.net>
736 * configure.ac (AC_INIT): Bump version number.
737 * NEWS: Start changes since 1.4.10.
738 * doc/m4.texinfo (History): Mention 1.4.11.
739 (Copying This Package, Copying This Manual): Add index entries.
740 * local/lib/version-etc.c.diff: Delete, now that gnulib has been
742 * Makefile.am (EXTRA_DIST): Remove dead file.
744 2007-07-09 Eric Blake <ebb9@byu.net>
746 Release Version 1.4.10.
747 * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
748 * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
749 * configure.ac (AC_INIT): Bump version number.
750 * NEWS: Describe changes since 1.4.9.
752 * src/format.c: Missed a GPLv3 conversion.
754 Avoid undefined behavior of %.*c in printf.
755 * src/format.c (format): Special case %c.
756 * TODO: Document that more remains to be done.
757 * NEWS: Document the fix.
759 2007-07-05 Eric Blake <ebb9@byu.net>
761 Fix up gnulib-tool usage.
762 * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
763 * version-etc.c.diff: Move to...
764 * local/lib/version-etc.c.diff: ...here.
765 * gpl-3.0.texi.diff: Move to...
766 * local/doc/gpl-3.0.texi.diff: ...here.
768 2007-07-04 Eric Blake <ebb9@byu.net>
770 Upgrade to GPL version 3 or later.
771 * bootstrap: Pick up GPLv3.
772 * m4/gnulib-cache.m4: Augment with 'gnulib-tool
773 --local-dir=. --import gpl-3.0'.
774 * doc/m4.texinfo (Copying This Package): New appendix.
775 * NEWS: Mention this change.
776 * README: Mention why some files still claim to be version 2.
777 * version-etc.c.diff: New file, to make sure --version claims
778 correct GPL version. Temporary until gnulib makes move.
779 * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
780 appendix, rather than section, of the manual.
781 * GNUmakefile: Update to new license.
782 * Makefile.am: Likewise.
783 * Makefile.maint: Likewise.
785 * configure.ac: Likewise.
786 * checks/Makefile.in: Likewise.
787 * doc/Makefile.am: Likewise.
788 * examples/Makefile.am: Likewise.
789 * src/Makefile.am: Likewise.
790 * src/builtin.c: Likewise.
791 * src/debug.c: Likewise.
792 * src/eval.c: Likewise.
793 * src/freeze.c: Likewise.
794 * src/input.c: Likewise.
795 * src/m4.c: Likewise.
796 * src/m4.h: Likewise.
797 * src/macro.c: Likewise.
798 * src/output.c: Likewise.
799 * src/path.c: Likewise.
800 * src/stackovf.c: Likewise.
801 * src/symtab.c: Likewise.
803 2007-06-26 Eric Blake <ebb9@byu.net>
805 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
807 2007-06-26 Karl Berry <karl@freefriends.org> (tiny change)
809 Match Free Software Directory categories.
810 * doc/m4.texinfo (dircategory): Update.
812 2007-05-31 Eric Blake <ebb9@byu.net>
814 * src/output.c (output_text): Fix regression from 2007-05-28.
815 * doc/m4.texinfo (History): Mention 1.4.10.
816 (Format): Make testsuite output easier to debug.
818 2007-05-29 Eric Blake <ebb9@byu.net>
821 * configure.ac (AC_INIT): Bump version number.
822 * NEWS: Start changes since 1.4.9b, and fix typo.
824 Beta Release Version 1.4.9b.
825 * configure.ac (AC_INIT): Bump version number.
826 * NEWS: Describe changes since 1.4.9.
828 Improve format support.
829 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
831 * src/format.c (format): Parse %'hhd, %a, %A. Avoid calling
832 printf with too few arguments, as in format(%*.*d,-1,-1,1).
833 * doc/m4.texinfo (Format): Expand tests, and improve
835 * NEWS: Document this change.
837 2007-05-28 Eric Blake <ebb9@byu.net>
839 Fix large diversion corner cases, including 1.4.8 regression.
840 * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
841 (make_room_for): Use NULL, not 0, for pointers.
842 (insert_diversion_helper): Avoid using rewind.
843 (freeze_diversions): Allow freezing large diversions.
844 * NEWS: Document this fix.
846 Also run gnulib unit tests during make check.
847 * m4/gnulib-cache.m4: Augment with 'gnulib-tool
848 --tests-base=tests --with-tests'.
849 * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
850 * Makefile.am (SUBDIRS): Run gnulib tests before ours.
852 2007-05-25 Eric Blake <ebb9@byu.net>
854 Backport prompts in examples from head.
855 * src/macro.c (expand_macro): Shorten message.
856 * doc/m4.texinfo (Manual, Command line files, Comments)
857 (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
858 (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
859 (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
860 (Using frozen files, Improved forloop, Improved foreach): Add
862 * checks/get-them: Ignore prompts in examples.
864 Fix sync line interaction with multiline comments.
865 * doc/m4.texinfo (Other Incompatibilities): Add example, and
866 document bug in --syncline/divert interaction.
867 (Preprocessor features): Augment test.
868 * src/m4.h (output_text): Export.
869 (shipout_text, next_token): Add parameter.
870 * src/freeze.c (reload_frozen_state): Don't interfere with
871 synclines when reloading state.
872 * src/output.c (output_text): Export.
873 (shipout_text): Take new parameter for start line of token.
874 Output at most one syncline per token.
875 * src/input.c (next_token): Report line where multiline tokens
877 * src/macro.c (expand_input, expand_token, expand_argument):
878 Adjust callers so that line is passed from input to output.
879 * NEWS: Document this fix.
880 Reported by Sergey Poznyakoff.
882 Test -s in testsuite.
883 * doc/m4.texinfo (Preprocessor features): Add a test.
884 * checks/get-them: Support extra options in testsuite.
885 * checks/check-them (examples): Use extra options.
887 Reported by Sergey Poznyakoff.
889 2007-05-24 Eric Blake <ebb9@byu.net>
891 Support POSIX flush semantics on all platforms.
892 * m4/gnulib-cache.m4: Remove closeout, and augment with
893 'gnulib-tool --import closein fflush'.
894 * src/m4.h (includes): Use closein, not closeout.
895 * src/m4.c (main): Ensure stdin is flushed when not all input is
897 (process_file): No return needed.
898 * src/debug.c (debug_flush_files): Rely on gnulib module, rather
899 than excluding mingw.
900 * NEWS: Document this change.
902 Work around cygwin and mingw fseeko bugs.
903 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
904 * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
906 2007-04-25 Eric Blake <ebb9@byu.net>
908 Fix negative division within eval, regression of 2007-01-06.
909 * doc/m4.texinfo (Eval): Catch this bug.
910 * src/eval.c (mult_term): Fix it.
911 * NEWS: Document this.
913 Reported by Cesar Strauss.
915 2007-04-23 Eric Blake <ebb9@byu.net>
918 * configure.ac (AC_INIT): Bump version number.
919 * NEWS: Start changes since 1.4.9.
921 2007-03-23 Eric Blake <ebb9@byu.net>
924 * configure.ac (AC_INIT): Bump version number.
925 * NEWS: Describe changes since 1.4.8b.
927 2007-03-16 Eric Blake <ebb9@byu.net>
929 * doc/m4.texinfo (Mkstemp): Tweak wording.
930 * src/output.c (output_init): Adjust to latest gnulib.
932 2007-03-15 Eric Blake <ebb9@byu.net>
934 Avoid Tandem/NSK's broken long long (without a symmetric unsigned
935 long long, it confuses gnulib).
936 * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
937 if unsigned long long doesn't work.
939 Reported by Matthew Woehlke.
941 2007-03-07 Eric Blake <ebb9@byu.net>
944 * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
946 2007-03-01 Eric Blake <ebb9@byu.net>
948 * doc/m4.texinfo: Pick up more index entries from head. Follow
949 more texinfo recommendations.
950 (Sysval): Improve tests.
952 Avoid overfull \vbox warning from texinfo, due to indices that
953 weren't quite big enough to split across page boundaries.
954 * doc/m4.texinfo: Add lots of concept index entries.
955 (Concept Index): Move to be last, as recommended by texinfo
957 (Define, Arguments, Pseudo Arguments): Add more function entries.
959 2007-02-28 Eric Blake <ebb9@byu.net>
961 * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
963 (Pseudo Arguments): Add useful example.
965 * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
966 reflect POSIX XCU ERN 118.
968 * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
969 * src/m4.c (usage): ...here,...
970 * src/builtin.c (set_macro_sequence): ...and here.
971 (define_user_macro): Fix typo.
972 * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
974 (Shift): Document composite macro argn for portably getting at
975 positional parameters beyond 9.
976 * configure.ac (AC_INIT): Bump version number.
977 * NEWS: Start changes of 1.4.8c.
979 2007-02-24 Eric Blake <ebb9@byu.net>
982 * configure.ac (AC_INIT): Bump version number.
983 * NEWS: Describe changes since 1.4.8.
985 Reserve all uses of raw ${} in macro definitions, not just
987 * src/builtin.c (set_macro_sequence): Change default macro
989 * doc/m4.texinfo (Operation modes): Update to match.
990 * src/m4.c (usage): Likewise.
993 2007-02-23 Eric Blake <ebb9@byu.net>
995 * src/m4.h (includes): Update to latest gnulib.
997 2007-02-08 Eric Blake <ebb9@byu.net>
999 Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
1000 more flexible, and so that autoconf can use it.
1001 * src/m4.h (set_macro_sequence, free_macro_sequence): New
1003 * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
1004 (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
1005 New variables and functions.
1006 (define_user_macro): Allow flexibility in regular expression used
1008 * src/m4.c (warn_syntax): Delete.
1009 (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
1010 spelling of option, along with optional argument.
1011 * doc/m4.texinfo (Operation modes, Arguments): Document this
1013 * NEWS: Document this change.
1015 2007-02-05 Eric Blake <ebb9@byu.net>
1017 * m4/gnulib-cache.m4: Module strstr no longer exists.
1019 Avoid bool bitfields, as they don't work on AIX.
1020 * src/m4.h (bool_bitfield): New typedef.
1021 (struct symbol, struct builtin): Use it.
1022 * src/input.c (struct input_block): Likewise.
1023 Reported by Albert Chin.
1025 * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
1026 Reported by Albert Chin.
1029 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
1031 * doc/m4.texinfo (Input processing): Further clarifications.
1033 2007-02-03 Eric Blake <ebb9@byu.net>
1035 * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
1037 Reported by Bruno Haible.
1039 2007-02-01 Eric Blake <ebb9@byu.net>
1041 * src/m4.c (fatal_warnings): New variable.
1042 (usage): Document new -E behavior.
1043 (main): Make -E an additive option.
1044 (m4_error, m4_error_at_line): Change exit status when required.
1045 * NEWS: Document this change.
1046 * doc/m4.texinfo (Operation modes): Likewise.
1047 Reported by Ralf Wildenhues.
1049 2007-01-27 Eric Blake <ebb9@byu.net>
1051 * src/m4.h (warn_syntax): Declare.
1052 (init_pattern_buffer): Export.
1053 * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
1054 (long_options, main): Implement new option.
1055 * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
1056 (define_user_macro): Warn on $11 and ${1} if requested.
1057 * src/input.c (init_pattern_buffer): Delete duplicate method.
1058 * doc/m4.texinfo (Operation modes): Document it.
1059 (Arguments): Document future direction of ${11} vs. $11.
1060 (Incompatibilities): Fix wording on POSIX limitations.
1061 * checks/get-them: Parse @{ and @} correctly.
1062 * NEWS: Document this change.
1064 2007-01-26 Eric Blake <ebb9@byu.net>
1066 * src/builtin.c (includes): Adjust to gnulib changes.
1068 2007-01-15 Eric Blake <ebb9@byu.net>
1070 * doc/m4.texinfo: Pull in various improvements from head.
1071 * src/builtin.c (include): Alter exit status on failure.
1072 * NEWS: Document this fix.
1074 2007-01-13 Eric Blake <ebb9@byu.net>
1076 * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
1077 assume the fallback of ss_base for BSDI 4.0.1.
1078 * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
1079 ! HAVE_STACK_T_SS_SP]: Use this check.
1080 Reported by Chris McGuire.
1082 * NEWS: Document the improvement.
1084 2007-01-09 Eric Blake <ebb9@byu.net>
1086 * src/eval.c (ASSIGN): New enumerator.
1087 (eval_lex): Recognize '='.
1088 (equality_term): Treat '=' like '==', but warn that it is
1090 * doc/m4.texinfo (Eval): Document and test this.
1091 (Incompatibilities): Document the POSIX incompatibility.
1092 * NEWS: Document this change.
1094 2007-01-06 Eric Blake <ebb9@byu.net>
1096 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
1097 * checks/check-them: Record expected exit status.
1098 * checks/get-them: Check exit status.
1099 * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
1101 * src/builtin.c: All users changed.
1102 * src/eval.c: Likewise. Also document where we are triggering
1103 undefined or implementation-defined behavior.
1104 (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
1105 (logical_or_term, logical_and_term, logical_not_term, not_term)
1106 (equality_term, unary_term): Port from head to follow POSIX
1108 (exp_term): Reject 0**0 as undefined.
1109 * doc/m4.texinfo (History): Mention 1.4.9.
1110 (Format, Incompatibilities): Update to document POSIX compliance.
1111 * NEWS: Document this change.
1113 2007-01-04 Eric Blake <ebb9@byu.net>
1115 * NEWS: Document previous fix.
1118 2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
1120 Fix Debian bug 405594, introduced 2006-11-01 from a bad
1121 copy-n-paste from head.
1122 * src/m4.c (main): Use correct file name after --.
1124 2007-01-04 Eric Blake <ebb9@byu.net>
1126 Fix regression from 1.4.7 in large file handling on some
1127 platforms, introduced on 2006-10-13.
1128 * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
1130 * NEWS: Document this fix.
1132 2007-01-03 Eric Blake <ebb9@byu.net>
1134 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1136 * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
1137 it bumps the copyright year).
1139 2006-12-27 Eric Blake <ebb9@byu.net>
1141 * doc/m4.texinfo (Patsubst): Fix typo.
1143 2006-12-16 Eric Blake <ebb9@byu.net>
1145 * src/m4.c (main): Check for errors when closing stdin.
1147 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1149 * doc/m4.texinfo: Fix some typos.
1151 2006-12-09 Eric Blake <ebb9@byu.net>
1153 * configure.ac (AC_INIT): Bump version number.
1154 * NEWS: Start changes of 1.4.8a.
1156 2006-11-20 Eric Blake <ebb9@byu.net>
1159 * configure.ac (AC_INIT): Bump version number.
1160 * NEWS: Describe changes since 1.4.7.
1162 2006-11-16 Eric Blake <ebb9@byu.net>
1164 * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
1165 Minor tweaks noticed while porting to head.
1167 2006-11-14 Eric Blake <ebb9@byu.net>
1169 * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
1171 (m4_tmpname): Avoid memory leak.
1173 2006-11-13 Eric Blake <ebb9@byu.net>
1175 * src/output.c (cleanup_tmpfile): Avoid double error message when
1176 umask is prohibitive.
1177 (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
1179 (m4_tmpfile): Add parameter, move cloexec action here.
1180 (make_room_for): Adjust caller. Don't keep too many files open.
1181 (insert_diversion_helper): Unlink emptied temp files.
1182 (make_diversion): Don't keep too many files open.
1183 * doc/m4.texinfo (Diversions): Tweak wording, now that open file
1184 descriptors are no longer a limiting factor.
1185 * NEWS: Document this change.
1187 Backport sparse diversion handling from head.
1188 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1190 * src/output.c (struct m4_diversion): Rename from struct
1191 diversion, and update members. All users changed.
1192 (diversion_table): Change to an ordered set, instead of an array.
1193 (div0): New storage for diversion 0.
1194 (diversions): No longer needed.
1195 (free_list): New list to allow recycling diversion storage.
1196 (diversion_storage): New storage to reduce malloc overhead.
1197 (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
1198 (output_init, output_exit, cleanup_tmpfile, make_room_for)
1199 (make_diversion): Handle new diversion storage scheme.
1200 (insert_diversion_helper): New function.
1201 (insert_diversion, undivert_all, freeze_diversions): Use it.
1202 * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
1203 exhaustion to visible test of large diversion numbers.
1204 * NEWS: Document this fix.
1206 2006-11-11 Eric Blake <ebb9@byu.net>
1208 * src/builtin.c (m4_translit): Slight optimization.
1210 * src/m4.h (to_uchar): Depend on HAVE_INLINE.
1212 * src/builtin.c: Remove unnecessary casts.
1213 (expand_ranges): Make 8-bit clean.
1214 * doc/m4.texinfo (Translit): Add tests and wording.
1215 * NEWS: Document this fix.
1217 2006-11-07 Eric Blake <ebb9@byu.net>
1219 * src/m4.h (output_exit): New prototype.
1220 * src/m4.c (main): Use it.
1221 * src/output.c (cleanup_tmpfile): Close files before removing
1223 (insert_diversion): Check for failure.
1224 (output_exit): Avoid memory leak.
1225 * doc/m4.texinfo (Diversions): Test this bug.
1227 * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
1229 2006-11-01 Eric Blake <ebb9@byu.net>
1231 Allow C++ compilation on Linux, as a safety measure in type
1233 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1235 * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
1236 (boolean): Kill this, and use stdbool.h instead.
1237 * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
1238 * src/output.c, src/symtab.c: All users changed.
1239 * src/symtab.c (hack_all_symbols): Update prototype.
1240 * src/builtin.c (dump_symbol, set_trace): Update signature.
1241 (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
1242 (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
1244 * src/debug.c (trace_flush): Likewise.
1245 * src/freeze.c (reload_frozen_state): Likewise.
1246 * src/input.c (push_file, push_string_finish, push_wrapup):
1247 (token_bottom, next_token): Likewise.
1248 * src/m4.c (main): Likewise.
1250 * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
1252 * src/m4.h (m4_path_search): Tweak signature.
1253 * src/path.c (m4_path_search): Likewise.
1254 * src/builtin.c (include): Update caller.
1255 * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
1256 with file names. Don't write to **argv.
1257 (process_file): New helper method.
1258 * NEWS: Document this fix.
1260 2006-10-31 Eric Blake <ebb9@byu.net>
1262 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
1263 * doc/m4.texinfo (Translit): Improve the documentation.
1264 * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
1266 (m4_index): Simplify, and speed up slightly.
1267 * NEWS: Document this fix.
1269 2006-10-28 Eric Blake <ebb9@byu.net>
1271 * src/input.c (set_quotes): Don't allow empty end-quote with
1272 non-empty start-quote.
1273 (set_comment): Likewise for end-comment.
1274 * src/builtin.c (m4_changecom): Adjust caller.
1275 * doc/m4.texinfo (Changequote, Changecom): Update documentation to
1277 (Incompatibilities): Document another POSIX bug.
1278 * NEWS: Mention this change.
1280 2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1282 * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
1285 2006-10-26 Eric Blake <ebb9@byu.net>
1287 Silence -Wwrite-strings -Wpointer-arith warnings.
1288 * src/builtin.c (define_user_macro): Allow NULL argument.
1289 (m4_builtin, m4_indir): Cast away const of "".
1290 * src/format.c (format): Likewise.
1291 * src/macro.c (collect_arguments): Likewise.
1292 (expand_macro): Avoid math on void*.
1293 * src/m4.c (main): Adjust caller.
1294 * src/output.c (freeze_diversions): Detect off_t overflow.
1296 * src/input.c (pop_input): Remove unnecessary code.
1298 2006-10-25 Eric Blake <ebb9@byu.net>
1300 * src/symtab.c (symtab_init): Avoid size_t overflow.
1301 * src/output.c (make_diversion): Avoid size_t overflow.
1302 * doc/m4.texinfo (Diversions): Test this fix.
1303 * src/input.c (input_block): Remove unused member. Reduce size
1305 (push_file, pop_input): Avoid useless assignment.
1306 * NEWS: Document the bug fix.
1308 Redo location tracking. Instead of having just files track the
1309 line to return to when popping input, now all input blocks track
1311 * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
1313 (input_block): Have line and file storage for all input types, and
1314 rename some members.
1315 (input_change): New global flag.
1316 (push_file, push_macro, push_string_init, push_wrapup): Store
1318 (push_string_finish, pop_input, pop_wrapup): Notice changes in
1320 (peek_input): Adjust to new member names.
1321 (next_char, next_char1): Adjust location if needed.
1322 (skip_line): Simplify restoring location.
1323 * doc/m4.texinfo (Location): Augment the test to catch line
1324 location of expansion of multi-line arguments.
1325 Reported by Stepan Kasal.
1327 2006-10-23 Eric Blake <ebb9@byu.net>
1329 * doc/m4.texinfo (Macro Arguments): Document that leading space
1330 in argument collection stops at macro expansion.
1331 (Incompatibilities): Document POSIX whitespace wording issue.
1333 2006-10-20 Eric Blake <ebb9@byu.net>
1335 * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
1336 TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
1337 end of a TeX line splits incorrectly.
1338 (Foreach, Improved foreach): Write these sections, borrowing ideas
1339 from CVS head and from m4sugar.
1340 * checks/get-them: Accomodate new way to show trailing space in
1342 * examples/foreach.m4: Make usable in documentation.
1343 * examples/foreachq.m4: New file.
1344 * examples/foreachq2.m4: New file.
1345 * examples/foreach2.m4: New file.
1346 * NEWS: Document the documentation updates.
1348 2006-10-19 Eric Blake <ebb9@byu.net>
1350 * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
1351 (m4_maketemp): Provide traditional behavior.
1352 * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
1353 new `mkstemp' macro and the flaws of the old `maketemp'.
1354 (Incompatibilities): Move maketemp discussion to...
1355 (Extensions): ...here, since -G now supresses the GNU extension.
1356 * NEWS: Document this.
1358 * examples/forloop.m4: Simplify.
1359 * examples/forloop2.m4: New file.
1360 * examples/quote.m4: New file.
1361 * doc/m4.texinfo (Loops): Rename to...
1362 (Shift): ...this node.
1363 (Forloop, Foreach, Improved forloop, Improved foreach): New
1366 2006-10-17 Eric Blake <ebb9@byu.net>
1368 * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
1370 * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
1371 gnulib headers, rather than in top directory.
1372 * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
1375 2006-10-16 Eric Blake <ebb9@byu.net>
1377 * doc/m4.texinfo: Backport some minor cleanups from head.
1378 (Cleardivert): Rename from cleardiv.
1380 * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
1381 a section of Preliminaries.
1382 (Operation modes, Preprocessor features, Limits control)
1383 (Frozen state, Debugging options, Command line files): Subdivide
1385 (Input processing, Quoting Arguments, Define, Arguments)
1386 (Cleardiv, Format, M4exit): Fix grammar of references.
1387 (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
1388 (Debug Levels, Debug Output, Include, Search Path, Divert)
1389 (Platform macros, Syscmd, Location, Extensions): Point to new
1391 (Top, Loops, Include, Undivert, Location, Incompatibilities):
1392 Improve file references.
1394 2006-10-14 Eric Blake <ebb9@byu.net>
1396 * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
1398 Reported by Ralf Wildenhues.
1400 * src/builtin.c (m4_undivert): Check for read error.
1402 2006-10-13 Eric Blake <ebb9@byu.net>
1404 * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
1405 header files are included, since <unistd.h> can affect the tests.
1407 Reported by Martin Koeppe.
1409 Backport head's usage of clean-temp module, as it is cleaner than
1410 using tmpfile-safer.
1411 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1412 clean-temp closeout', and remove tmpfile-safer.
1413 * src/m4.h (includes): Adjust.
1414 (m4_path_search): Rename from path_search, to avoid collision
1416 * src/m4.c (main): Install closeout handler. Adjust caller.
1417 (usage): Now done by closeout module.
1418 * src/builtin.c (m4_m4exit): Likewise.
1419 (m4_undivert, include): Adjust callers.
1420 * src/freeze.c (reload_frozen_state): Likewise.
1421 * src/path.c (m4_path_search): Rename from path_search.
1422 * src/output.c (output_temp_dir): New variable.
1423 (cleanup_tmpfile, m4_tmpfile): New functions, from head.
1424 (insert_diversion, make_room_for): Use them.
1425 * doc/m4.texinfo (Diversions): Document this, and add a test.
1426 (Improved fatal_error): Fix typo.
1427 (Maketemp): Port test to mingw, and no longer hide from
1429 * NEWS: Document the change in TMPDIR behavior.
1431 * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
1432 macros, to work with recent gnulib-tool update.
1434 * src/builtin.c (m4_builtin, m4_indir): Allow transparent
1435 handling of defn results.
1436 * doc/m4.texinfo (Builtin, Indir): Add test cases.
1437 * NEWS: Document this.
1439 2006-10-12 Eric Blake <ebb9@byu.net>
1441 * doc/m4.texinfo (Location): Fix typo in previous commit.
1442 (Changeword): Catch one more case.
1443 * src/input.c (skip_line): Fix case when outer file used macro to
1446 2006-10-11 Eric Blake <ebb9@byu.net>
1448 * src/input.c (enum input_type): Add additional types, to shave
1449 time off the common case.
1450 (push_wrapup): Wrapped strings remember location.
1451 (push_string_finish): Normal strings carry no location.
1452 (push_file): Start new files uninitialized.
1453 (peek_input, next_char_1): Optimize common cases by updating
1454 location only on new input types.
1455 (pop_input): Update to honor new input types.
1456 (skip_line, push_string_finish): Fix regression in previous patch
1457 when dnl is not followed by newline in included file.
1458 (push_string_init): Initialize all fields of INPUT_STRING sooner.
1459 (peek_token): Simplify.
1460 (peek_input): Don't pop input files on peek, so that __file__ and
1461 __line__ as last token of include file work correctly.
1462 * doc/m4.texinfo (History): Mention 1.4.8.
1463 (Answers): Split into sections, one per answer.
1464 (Improved exch, Improved cleardivert, Improved fatal_error): New
1466 (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
1467 new m4wrap location semantics.
1468 (Changeword): Add test that caught the regression.
1469 * NEWS: Document this.
1471 * src/macro.c (expand_macro): In macro expansion errors, report
1472 line number at open parenthesis.
1473 * src/input.c (next_token): Fix off-by-one bug in reporting end
1474 of file in unterminated comment and string.
1475 (file_names): New obstack, necessary since expand_macro now hangs
1476 on to file names longer than the files remain open.
1477 (input_init): Initialize new obstack.
1478 (push_file): Use new obstack. Delay updates to current_file
1479 until after expand_macro has restored state.
1480 (peek_input, next_char_1): Update current_file if necessary.
1481 (pop_wrapup): Release memory.
1482 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
1484 (Dnl): Update to the new location reporting rules.
1485 * NEWS: Document these changes.
1487 2006-10-10 Eric Blake <ebb9@byu.net>
1489 * src/macro.c (argc_stack, argv_stack): New variables for sharing
1490 obstacks across multiple macro calls.
1491 (expand_input): Initialize and tear down stack once per input
1492 file, instead of once per macro.
1493 (expand_macro): Reuse existing stacks when possible.
1494 (collect_arguments): Simplify slightly.
1496 * src/path.c (include_env_init): Fix botched patch application.
1497 Reported by Ralf Wildenhues.
1499 2006-10-09 Eric Blake <ebb9@byu.net>
1501 * src/m4.c (usage, main): Detect write failures to stderr.
1502 * src/builtin.c (m4_m4exit): Likewise.
1503 * NEWS: Document this.
1505 * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
1507 * NEWS: Document this.
1508 * doc/m4.texinfo (Invoking m4): Likewise.
1510 2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1512 * src/path.c (include_env_init): Copy the string returned
1513 by getenv before overwriting it; POSIX disallows this.
1515 2006-10-09 Eric Blake <ebb9@byu.net>
1517 * src/m4.c (main): Defer debugfile until after --help.
1518 * configure.ac (AC_INIT): Bump version number.
1519 * NEWS: Start changes of 1.4.7a.
1521 2006-09-25 Eric Blake <ebb9@byu.net>
1524 * configure.ac (AC_INIT): Bump version number.
1525 * NEWS: Describe changes since 1.4.6.
1527 2006-09-21 Eric Blake <ebb9@byu.net>
1529 * doc/m4.texinfo (Invoking m4): Add clarification on option
1530 processing behavior.
1532 Reported by Mikhail Teterin.
1534 * bootstrap: Add --force option, based on idea from coreutils.
1535 * README: Document that ./bootstrap and autoreconf are for
1536 developers, and not lightly done in tarballs.
1538 2006-09-20 Eric Blake <ebb9@byu.net>
1540 * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
1541 deprecation warning on -e.
1542 * doc/m4.texinfo (Invoking m4, Extensions): Document this.
1543 * NEWS: Document this.
1545 2006-09-19 Eric Blake <ebb9@byu.net>
1547 * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
1548 -o/--error-output to --debugfile, and deprecate the former. This
1549 will allow a future release to be more consistent with other GNU
1550 tools, with -o/--output affecting stdout, not debug.
1551 * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
1552 * NEWS: Document this.
1554 2006-09-14 Eric Blake <ebb9@byu.net>
1556 * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
1557 --diversions. `m4 --help --version' now displays help, not
1559 (interactive, frozen_file_to_read, frozen_file_to_write): Move to
1561 (show_help, show_version): No longer needed.
1562 (long_options, DIVERSIONS_OPTION): Backport patch from head to
1563 distinguish between -N and --diversions in warning.
1564 * doc/m4.texinfo (Invoking m4): Document this.
1567 2006-09-11 Eric Blake <ebb9@byu.net>
1569 * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
1570 * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
1572 (debug_set_file): Use STDOUT_FILENO.
1573 * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
1574 with POSIX in regards to unread input.
1575 * NEWS: Document this fix.
1576 * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
1578 2006-09-07 Eric Blake <ebb9@byu.net>
1580 * m4/gnulib-cache.m4: Update to newer gnulib-tool.
1581 * src/m4.h (push_file): Change prototype.
1582 * src/input.c (push_file, peek_input, next_char_1): Only call getc
1583 once at EOF, to avoid double ^D on terminal stdin; regression from
1585 (push_file, pop_file): Allow reading stdin twice.
1586 * src/m4.c (main): Likewise.
1587 * src/builtin.c (include): Update caller.
1588 * NEWS: Document this change.
1589 * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
1590 (Syscmd): Add a test that failed before this patch.
1592 2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1594 * checks/check-them: Quote $pwd.
1596 2006-09-05 Eric Blake <ebb9@byu.net>
1598 * src/builtin.c (define_macro): Warn on invalid macro name.
1599 * NEWS: Document this change.
1600 * doc/m4.texinfo: Fix typos.
1601 (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
1602 (Ifelse): Backport some improvements from head.
1604 2006-09-04 Eric Blake <ebb9@byu.net>
1606 * doc/m4.texinfo (Changeword): Skip test on mingw, where the
1607 native echo is braindead.
1608 * checks/check-them (strip_needed): Ignore \r in output. Now the
1609 testsuite will pass when cross-compiling from cygwin to mingw.
1611 * src/input.c (peek_input): Fix regression in handling macro
1612 without arguments as last token in file; debian bug 385720.
1613 (next_token): Always consume an input character.
1614 Reported by Andreas Schultz.
1615 * configure.ac (AC_INIT): Bump version number.
1616 * NEWS: Document this fix.
1617 * doc/m4.texinfo (History): Mention next version.
1618 (Changeword): Add example that exposes this bug.
1621 2006-08-25 Eric Blake <ebb9@byu.net>
1624 * configure.ac (AC_INIT): Bump version number.
1625 * NEWS: Describe changes since 1.4.5.
1627 * Makefile.maint (web-manual): Give up on VPATH build during
1628 distribution. But distributions are made so infrequently that
1629 this is not too much of a hardship.
1630 * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1633 2006-08-24 Eric Blake <ebb9@byu.net>
1635 * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1636 Solaris, produce output on just one argument.
1637 (m4_regexp, m4_patsubst): For consistency, do likewise.
1638 (m4_patsubst): Allow zero-length match at end of string.
1639 * doc/m4.texinfo (Sysval): Fix overfull hbox.
1640 (Bugs, Macro Arguments): Minor fixes.
1641 (Other tokens): Rearrange node order.
1642 (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1643 * NEWS: Document these fixes.
1645 2006-08-22 Eric Blake <ebb9@byu.net>
1647 * src/input.c (pop_input): Avoid empty filename with -di option.
1648 * src/debug.c (debug_message_prefix): Put space before message.
1650 * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1652 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1653 * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1655 * checks/check-them: State why a test is skipped.
1656 * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1658 * ChangeLog: Add copyright.
1659 * AUTHORS: Likewise.
1660 * BACKLOG: Likewise.
1664 * examples/COPYING: New file, add copyright for all the examples.
1665 * checks/get-them: Put copyright on testsuite files.
1667 2006-08-18 Eric Blake <ebb9@byu.net>
1669 Don't let unrelated child processes see too many files.
1670 * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1671 * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1672 spelling in error message.
1673 * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1674 (debug_set_output): Close debug file on exec.
1675 * src/m4.h (includes): Add cloexec.h.
1676 * src/output.c (make_room_for): Close diversions on exec.
1677 * src/path.c (path_search): Close include files on exec.
1678 * NEWS: Document this.
1680 Regular expressions were leaking memory.
1681 * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1683 (m4_regexp, m4_patsubst): Avoid memory leak.
1684 * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1686 (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
1687 from O(n^2) to O(n) for calculating word_start.
1688 (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1689 O(1) bitmap, not O(n) search string.
1690 * NEWS: Document this fix.
1692 2006-08-17 Eric Blake <ebb9@byu.net>
1694 * NEWS: Document previous checkin.
1696 * src/builtin.c (substitute): Avoid core dump when accessing
1697 beyond bound of regular expression.
1698 Reported by Karl Nelson.
1699 * doc/m4.texinfo (Regexp): Add example that causes core dump on
1700 some architectures prior to this patch.
1703 2006-08-16 Eric Blake <ebb9@byu.net>
1705 * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1706 clear that dumpdef does not always go to stderr.
1708 * src/builtin.c (m4_errprint): Flush buffers before printing to
1712 2006-08-15 Eric Blake <ebb9@byu.net>
1714 * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1715 per debian bug 96075.
1716 * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1717 (Changeword): Don't use shift as an example of a swallowed word.
1718 (Divert): Discuss fact that divert is an English word.
1719 Reported by Richard A Nelson.
1721 2006-08-14 Eric Blake <ebb9@byu.net>
1723 * doc/m4.texinfo (Invoking m4): Minor fixes.
1725 2006-08-12 Eric Blake <ebb9@byu.net>
1727 * doc/m4.texinfo (Arguments): Hint at better exch macro.
1728 (Answers): Provide a better definition.
1730 2006-08-09 Eric Blake <ebb9@byu.net>
1732 * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1733 yet understand locales.
1734 * NEWS: Fix wording of a few items.
1736 2006-08-08 Eric Blake <ebb9@byu.net>
1738 Avoid printing `NONE:0:' in error messages.
1739 * src/m4.h (m4_error_at_line): New function.
1740 * src/m4.c (m4_error_at_line): Implement.
1741 * src/input.c (skip_line, input_init, next_token): Use "", not
1742 "NONE", for no file, since NONE can be a real file name.
1743 * src/macro.c (expand_argument): Likewise.
1744 * src/debug.c (debug_message_prefix, trace_header): Check for
1746 * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1747 (Location): Document that synclines and internal message format
1748 are not impacted by redefining these macros.
1749 (M4exit): Hint at bug in fatal_error.
1750 (Answers): Provide workaround to match m4 output.
1752 * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1753 * src/m4.h (m4_error): New function.
1754 (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1755 error module deficiencies.
1756 (reference_error, suppress_line): No longer needed.
1757 * src/m4.c (m4_error): Implement.
1758 (main): No longer need to install error callback.
1760 2006-08-04 Eric Blake <ebb9@byu.net>
1762 * src/m4.h (program_name): Declare.
1763 (suppress_line): New variable.
1764 (M4ERROR_AT_LINE): New macro.
1765 * src/m4.c (reference_error, main): Follow GNU Coding Standards
1766 for error message format.
1767 * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1768 * src/macro.c (expand_argument): Likewise.
1769 * checks/check-them (examples): Adjust to new message format.
1770 * src/builtin.c (m4___program__): New builtin.
1771 * doc/m4.texinfo (Location): Split from Errprint into new node,
1772 and document __program__.
1773 (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1774 (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1776 (Extensions): Document __program__.
1777 * NEWS: Document this change.
1779 2006-08-03 Eric Blake <ebb9@byu.net>
1781 Don't confuse leading `(' in comment or quote with start of
1782 argument collection.
1783 * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1785 (peek_input): Make private to input.c.
1786 (peek_token): New prototype.
1787 * src/input.c (default_word_regexp): Reduce ifdefs.
1788 (peek_input): Make static.
1789 (next_token): Return new token types.
1790 (match_input, MATCH): Add argument consume, which controls
1791 whether match should be pushed back.
1792 (peek_token): New function.
1793 (token_type_string) [DEBUG_INPUT]: New function.
1794 * src/macro.c (expand_token, expand_argument, collect_arguments):
1795 Handle new token types.
1796 * doc/m4.texinfo (Changequote, Changecom): Document this.
1797 * NEWS: Document this.
1799 * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1801 * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1802 overflow detection when sigstack exists but is not implemented.
1803 Fixes debian bug 154053.
1805 Reported by David Perlin.
1807 2006-08-02 Eric Blake <ebb9@byu.net>
1809 * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1812 2006-08-01 Eric Blake <ebb9@byu.net>
1814 * src/input.c (skip_line, next_token): Remember current file in
1815 case input file ends abruptly. Addresses debian bug 175365.
1816 (pop_input): Defer freeing storage that holds previous file
1818 (pop_wrapup): to here, after error message is issued.
1819 * src/macro.c (expand_argument): Remember current file in case
1820 input file ends abruptly.
1821 * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1822 (M4wrap): Adjust testsuite accordingly.
1823 (Errprint): Document line number limitation of m4wrap.
1824 * NEWS: Document this fix.
1827 2006-07-31 Eric Blake <ebb9@byu.net>
1829 * src/input.c (peek_input, next_char, match_input): Be eight-bit
1830 clean; fixes debian bug 311378.
1831 * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1832 (Changequote, Changecom): Add examples to test this.
1833 * NEWS: Document this fix.
1835 Reported by Steven Augart.
1837 * doc/m4.texinfo: Whitespace fix.
1838 * checks/get-them: Avoid exceeding 14-char file name limit.
1841 2006-07-30 Eric Blake <ebb9@byu.net>
1843 * src/path.c (path_search): Detect allocation failure.
1845 Use native free when it is good enough.
1846 * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1847 * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1849 * src/symtab.c (free_symbol): Likewise.
1850 * src/m4.c (xfree, main): Likewise.
1851 * src/m4.h (obstack_chunk_free): Likewise.
1852 * src/path.c (path_search): Likewise.
1853 * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1855 * doc/m4.texinfo (Errprint): Add example for last patch.
1856 * checks/check-them: Account for VPATH in latest example.
1858 2006-07-29 Eric Blake <ebb9@byu.net>
1860 * src/path.c (path_search): Add result parameter, so that
1861 -I can be accounted for. Debian bug 53685.
1862 * src/m4.h (path_search): Update prototype.
1863 * src/m4.c (main): Adjust callers.
1864 * src/freeze.c (reload_frozen_state): Likewise.
1865 * src/builtin.c (include, m4_undivert): Likewise.
1866 * NEWS: Document this change.
1867 Reported by Nicolas Lichtmaier.
1869 2006-07-28 Eric Blake <ebb9@byu.net>
1871 * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1872 several non-GNU makes.
1873 * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1874 * src/m4.h: Likewise.
1875 * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1878 2006-07-27 Eric Blake <ebb9@byu.net>
1880 * doc/m4.texinfo: Use @acronym{GNU} throughout.
1881 (History): Update for 1.4.6.
1883 * src/m4.h (_): Remove K&R cruft.
1884 * src/builtin.c: Likewise.
1885 * src/debug.c: Likewise.
1886 * src/eval.c: Likewise.
1887 * src/macro.c: Likewise.
1888 * src/stackovf.c: Likewise.
1890 * doc/Makefile.am (m4.1): Improve man page.
1891 * src/m4.c (usage): Improve --help output, including adding the
1892 bug reporting address.
1893 (main): Follow GNU Coding Standards for --version output.
1895 2006-07-26 Eric Blake <ebb9@byu.net>
1897 * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1898 end-comment consistently, to match POSIX.
1900 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1901 (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1902 (Incompatibilities): Document incompatibility of changecom
1903 vs. macro names, and of EOF in include.
1904 * src/input.c (next_token): Reject unterminated comments at EOF.
1905 (skip_line): Warn on unterminated dnl at EOF.
1906 * NEWS: Document these changes.
1908 2006-07-25 Eric Blake <ebb9@byu.net>
1910 * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1911 stdio-safer into fopen-safer and tmpfile-safer.
1912 * src/m4.c: Remove redundant include.
1914 2006-07-24 Eric Blake <ebb9@byu.net>
1916 Fix bugs related to stream handling.
1917 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1918 unlocked-io stdio-safer stdlib-safer close-stream.
1919 * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1920 provided by gnulib if needed.
1921 * src/output.c [! HAVE_TMPFILE]: Likewise.
1922 * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1923 their safer counterparts.
1924 (retcode): New global variable.
1925 * src/input.c (pop_input): Check for read failure.
1926 * src/freeze.c (reload_frozen_state): Likewise.
1927 (produce_frozen_state): Check for write failure.
1928 * src/debug.c (debug_set_file): Likewise.
1929 * src/m4.c (usage, main): Likewise.
1930 (retcode): Make global.
1931 * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
1932 status is non-zero except when everything succeeds.
1933 * doc/m4.texinfo (M4exit): Document these changes.
1934 (Incompatibilities): Remove documentation of bug now fixed.
1935 * NEWS: Document these fixes.
1937 2006-07-22 Eric Blake <ebb9@byu.net>
1939 * src/format.c (format): Avoid compiler warning that str may be
1942 2006-07-21 Eric Blake <ebb9@byu.net>
1944 * src/m4.h [UNIX]: Add more platforms that are close enough to
1945 categorize as UNIX, but which don't predefine __unix__.
1946 Reported by Nelson H. F. Beebe.
1948 2006-07-20 Eric Blake <ebb9@byu.net>
1950 * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
1951 to explicitly ask for --assume-autoconf=2.60.
1953 2006-07-19 Eric Blake <ebb9@byu.net>
1955 * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1956 and exits normally with 129.
1957 Reported by Nelson H. F. Beebe.
1960 * src/m4.h (EXIT_MISMATCH): Define.
1961 * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1962 exiting with status 63.
1963 * src/m4.c (usage): Document this.
1964 * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1967 * doc/m4.texinfo (copying): Relax restriction on front-cover and
1970 2006-07-17 Eric Blake <ebb9@byu.net>
1972 * src/format.c (format): Support F, g, and G specifiers.
1973 * doc/m4.texinfo (Format): Document this.
1974 * NEWS: Document this addition.
1976 * doc/m4.texinfo (Builtin): Delete redundant text.
1978 * configure.ac (AC_INIT): Bump version number.
1979 * src/builtin.c (substitute): Bah. Fix buffer overrun.
1980 * NEWS: Document this fix.
1982 2006-07-15 Eric Blake <ebb9@byu.net>
1985 * configure.ac (AC_INIT): Bump version number.
1986 * NEWS: Describe changes since 1.4.4.
1988 * src/m4.c (usage): Document exit status.
1989 * doc/m4.texinfo: Use `exit status', not `exit code'.
1990 (Invoking m4): Document exit status.
1992 * bootstrap: Backport --help, --version from head.
1993 (func_update): New function, for easily grabbing up-to-date files
1995 * Makefile.maint (web-manual): Fix for VPATH builds.
1997 2006-07-14 Eric Blake <ebb9@byu.net>
1999 * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
2000 looks bad in info. Use @deffn rather than @example for
2001 describing prototypes. Fix awkward wording and grammar.
2003 * src/builtin.c (substitute): Warn on bad escape sequences.
2004 Ignore trailing backslash.
2005 * doc/m4.texinfo (Regexp): Add documentation for this.
2006 * NEWS: Document this change.
2008 * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
2009 * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
2011 (Dnl): Update example to show side effects.
2012 * checks/get-them: Generate three digit test names.
2013 * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
2015 2006-07-13 Eric Blake <ebb9@byu.net>
2017 * src/input.c (input_init): Simplify.
2018 (set_word_regexp): Treat empty string as default, since empty
2019 regexp would disable word parsing.
2020 * src/m4.c (user_word_regexp): Default to empty string.
2021 * src/builtin.c (builtin_tab): Make changeword blind.
2022 * doc/m4.texinfo (Changeword): Document this.
2023 * NEWS: Document this.
2024 * TODO: Knock off completed items.
2026 * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
2028 * doc/m4.texinfo (Undefine, Pushdef): Test this.
2029 * NEWS: Document this change.
2031 * src/builtin.c (numeric_arg): Treat empty string as 0, with a
2032 warning. Detect quoted leading space and overflow as warnings.
2033 (m4_eval): Treat empty radix as 10, and allow output in radix 1.
2034 Treat width as minimum number of digits, as required by POSIX.
2035 (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
2037 (m4_substr): Likewise. Silently treat empty start as 0.
2038 (m4_undivert): Treat ` 1a' as file, not diversion 1.
2039 * src/eval.c (eval_lex): Parse radix 1 numbers.
2040 * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
2041 one type of warning.
2042 (Manual): Document behavior of numeric parsing of empty string.
2043 (Divert, Incr): Document error handling.
2044 (Eval): Document radices better.
2045 (Incompatibilities): Document translit incompatibility.
2046 * NEWS: Document these changes.
2048 * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
2049 (web-manual): Simplify.
2050 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
2051 * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
2052 (MAINTAINERCLEANFILES): Clean it as well.
2053 * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
2054 (MAINTAINERCLEANFILES): Clean it as well.
2056 2006-07-12 Eric Blake <ebb9@byu.net>
2058 * doc/m4.texinfo (Extensions): Document how to overcome
2059 implementation difference in > 9 positional parameters.
2061 * src/m4.c (usage): Sort within sections.
2062 (nesting_limit): Raise default from 250 to 1024.
2063 * doc/m4.texinfo: Use file name, not filename, per GNU coding
2064 standard. Use @option where appropriate.
2065 (Invoking m4): Sort to match --help output.
2066 (Debug Levels): Sort.
2067 (Frozen files): Sort and break into two nodes.
2069 * src/m4.c (nesting_limit): Raise default from 250 to 1024.
2070 * NEWS: Document raised -L limit.
2072 2006-07-11 Eric Blake <ebb9@byu.net>
2074 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
2075 stress-test changeword before a release.
2076 * doc/m4.texinfo: More doc cleanups.
2077 (Copying This Manual): New node; actually include the FDL in the
2079 * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
2080 * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
2081 * NEWS: Mention documentation improvements.
2083 * src/m4.h (OS2): New platform macro.
2084 * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
2086 * doc/m4.texinfo (Platform macros): Document it.
2087 (Sysval): Remove non-portable test of system("").
2088 * NEWS: Document this change.
2089 Reported by Andreas Buening.
2091 2006-07-09 Eric Blake <ebb9@byu.net>
2093 * doc/m4.texinfo (Undivert): Fix typo in last commit.
2094 * src/m4.c (usage): Document M4PATH.
2095 * src/path.c (path_search): Reject empty string.
2096 * src/output.c (insert_diversion): Ignore diversion 0.
2097 * src/builtin.c (m4_undivert): Ignore empty string.
2098 * NEWS: Document this fix.
2100 2006-07-08 Eric Blake <ebb9@byu.net>
2102 * checks/get-them: Make filtering easier.
2103 * checks/check-them: Filter non-input lines, so line counts are
2104 more realistic in the documentation, and so changeword tests work
2105 even when dnl is disabled.
2106 * doc/m4.texinfo: Adjust example line numbers. Clean up
2107 front-matter, following autoconf's example.
2108 (Changeword): Enable tests, skipping if changeword not supported.
2109 (Define, Defn, Ifelse): Backport more examples from head.
2110 (Input processing, Answers): New nodes, backported from head.
2111 (Include): Expand test to cover empty filename.
2112 (Undivert): Add test of undivert(0).
2114 2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2116 * doc/m4.texinfo: Fix spelling errors.
2118 2006-07-07 Eric Blake <ebb9@byu.net>
2122 * doc/Makefile.am (m4.1): No need to go through a temporary file;
2123 this also ensures timestamps are updated.
2124 * src/m4.h (includes): Require config.h. Assume string.h,
2125 stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
2126 than prototyping ourselves.
2127 (builtin_func): Add parameter type-checking.
2128 (voidstar): Delete, now that we assume C89.
2129 * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
2131 * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
2134 2006-07-06 Eric Blake <ebb9@byu.net>
2136 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2138 * src/m4.h (includes): Add binary-io.h for O_BINARY.
2139 * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
2140 #ifdef. Fixes patch from 2005-02-03 for cygwin.
2141 * NEWS: Mention this fix.
2143 * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
2144 * src/builtin.c (m4_syscmd): Work around OS/2 bug.
2146 * Makefile.am (SUBDIRS): Build . before src, so that autoheader
2147 runs first when needed.
2148 * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
2149 once in srcdir rather than multiple times in VPATH builds.
2151 2006-07-03 Eric Blake <ebb9@byu.net>
2153 * checks/check-them: Use portable = in test.
2154 * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
2155 directory, as required by Solaris cc. Include built headers, as
2156 required by Solaris make in VPATH build.
2157 * checks/Makefile.in: Use $(srcdir) where needed.
2158 (CHECKS): Factor $(srcdir) into macro.
2159 (DISTFILES): Likewise. Automake takes care of distributing
2162 (Makefile): Use modern syntax of config.status.
2163 * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
2164 Avoid overfull and underfull hboxes in dvi.
2166 Fix 'make check' in VPATH build. All files included by testsuite
2167 now live in a single directory. Use forloop.m4 in testsuite.
2168 * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
2170 * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
2172 * checks/Makefile.in (DISTFILES): Don't distribute moved files.
2173 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
2174 * checks/check-them: Avoid s/// when filename is in pattern.
2175 * examples/forloop.m4: Fix to match documentation.
2176 * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
2178 (Loops, Format): Actually use forloop.m4 in tests.
2180 2006-07-02 Eric Blake <ebb9@byu.net>
2182 * checks/Makefile.in (exec_prefix, prefix): New macros, so that
2183 $(bindir) works in installcheck.
2184 (check, installcheck): No longer change directory, so that
2185 distcheck works with a read-only builddir.
2186 * checks/check-them: Work when pwd is no longer builddir.
2188 2006-07-01 Eric Blake <ebb9@byu.net>
2190 * GNUmakefile: New file, borrowed from coreutils.
2191 * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
2192 * Makefile.maint (Makefile): Delete this rule, now that
2193 GNUmakefile includes Makefile.
2195 2006-06-30 Eric Blake <ebb9@byu.net>
2197 For compatibility with other m4 implementations, sysval returns
2198 signal<<8 rather than 0 if syscmd is terminated by a signal.
2199 * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
2200 * src/builtin.c (include): Include sys/wait.h when stdlib.h does
2201 not provide wait macros.
2202 (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
2203 (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
2204 (m4_esyscmd): Set sysval to -1 on failure.
2205 (m4_sysval): Print 127 on failure, and accomodate signals if they
2207 * NEWS: Document this change.
2208 * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
2210 * checks/check-them: Likewise.
2211 * src/debug.c (debug_set_file): Work around mingw fstat bug.
2213 * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
2214 * src/freeze.c (produce_frozen_state): Use new spelling of
2216 * src/builtin.c (predefined_tab): Add __windows__ on non-unix
2218 (m4_syscmd, m4_esyscmd): The empty command is successful.
2219 * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
2220 Document platform-dependence of system().
2221 (Syscmd): Add example.
2222 (Esyscmd): Make example more robust, and actually demonstrate
2224 (Sysval): Expand test to cover esyscmd code path, and to check
2225 that empty command is successful. Add conditional check for
2227 (Other Incompatibilities): Move platform macros from here...
2228 (Platform macros): ...to this new node. Add windows macro.
2229 Check that exactly one platform macro is provided.
2230 * checks/check-them: Improve trap cleanup. Tolerate dirname and
2231 .exe in error messages. Allow for skipping checks.
2232 * configure.ac (HAVE_EFGCVT): Kill dead configure check.
2233 * NEWS: Document platform macros.
2235 2006-06-29 Eric Blake <ebb9@byu.net>
2237 Fix buffer overrun bug.
2238 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2240 * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
2241 variant instead, since [efg]cvt are obsolete and our use of them
2242 was buggy (savannah sr #104303).
2243 (format): Fix buffer overflow by using xasprintf.
2244 * doc/m4.texinfo (Format): Expand format test to catch both bugs.
2245 * NEWS: Document this fix.
2247 * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
2249 (AC_CACHE_CHECK): Cache search for ecvt.
2251 2006-06-27 Eric Blake <ebb9@byu.net>
2253 * doc/m4.texinfo (Eval): Document 32-bit signed limitations
2254 required by POSIX, and add example that exposed core dump on x86
2256 (Incompatibilities): Document incompatibility in eval precedence.
2257 * src/eval.c (shift_term): Explicitly mask, to avoid undefined
2259 (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
2260 * NEWS: Document this change.
2262 * doc/m4.texinfo: Use @noindent consistently.
2263 (Quoting Arguments): Document that unquoted parentheses group
2265 (Pseudo Arguments): Expand tests to show this.
2266 (Incompatibilities): Contrast traditional behavior of
2269 2006-06-24 Eric Blake <ebb9@byu.net>
2271 * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
2272 (AC_CHECK_HEADERS_ONCE): Use this new feature.
2273 (AC_CHECK_FUNCS_ONCE): Likewise.
2275 2006-06-23 Eric Blake <ebb9@byu.net>
2277 * doc/m4.texinfo: Quoting cleanup throughout - follow
2278 autoconf-recommended style of one level of quote per parenthesis
2279 in the normal case. Adjust error messages to match GNU coding
2280 standards (and to allow 'make check' to pass again).
2281 (Quoted strings, Inhibiting Invocation): Turn more examples into
2283 (Comments): Resolve FIXME by adding example.
2284 (Define): Add example about underquoting.
2285 (Defn): Add example about use of $0.
2286 (Indir, Format): Resolve FIXME done in last commit.
2287 (Ifelse): Add example about creating blind macro.
2288 (Debugging): Fix grammar.
2289 (Dnl): Add example about dnl with arguments.
2290 (M4wrap): Be explicit that LIFO order is non compliant, and will
2292 (Undivert): Resolve FIXME by adding example.
2293 (Frozen files): Document that m4wrap and sysval will not work
2294 consistently until m4 2.0.
2295 (Incompatibilities): Document another POSIX compliance bug, this
2296 time with changequote. Document a traditional incompatibility
2297 with partial input spanning file boundaries.
2299 Make error messages more consistent with GNU coding standards -
2300 start with lower case, and don't end sentence with punctuation.
2301 * src/debug.c (trace_pre): Update message wording.
2302 * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
2304 * src/freeze.c (produce_frozen_state, issue_expect_message),
2305 (reload_frozen_state): Likewise.
2306 * src/input.c (push_string_init, pop_init, init_macro_token),
2307 (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
2308 * src/m4.c (stackovf_handler, main): Likewise.
2309 * src/macro.c (expand_token, expand_argument, call_macro),
2310 (expand_macro): Likewise.
2311 * src/output.c (make_room_for, output_text, insert_file),
2312 (freeze_diversions): Likewise.
2313 * src/symtab.c (symtab_init, lookup_symbol): Likewise.
2315 * src/builtin.c (builtin_tab): Make format and indir blind.
2316 (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
2317 * NEWS: Mention the change to builtins.
2319 2006-06-22 Eric Blake <ebb9@byu.net>
2321 Robustify frozen file format.
2322 * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
2323 macro. Require V first, and only accept it once. For F, use
2324 placeholder if builtin is not found, rather than warning.
2325 * src/m4.h (m4_placeholder): New prototype.
2326 * src/builtin.c: Unify error message style.
2327 (m4_placeholder): New function, warn if invoked.
2328 (builtin_tab): Add m4_placeholder.
2329 (m4_defn): Warn if placeholder is encountered.
2330 (find_builtin_by_addr): Handle placeholder.
2331 (find_builtin_by_name): Return placeholder on failure.
2332 (m4_builtin): Treat placeholder as undefined.
2333 * doc/m4.texinfo (Frozen files): Document changes in V and F.
2334 * NEWS: Document this change.
2335 Reported by Bruno Haible.
2337 * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
2338 (tabchar): New macro, so that 'make check' still works.
2339 (Invoking m4): Document that ignored compatibility options -B, -S,
2340 and -T each consume an argument.
2341 * checks/get-them: Honor @tabchar{}.
2343 Avoid compiler warnings during -DDEBUG.
2344 * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
2345 [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
2346 * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
2347 (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
2348 (next_token) [DEBUG_INPUT]: Print before returning.
2349 * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
2350 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
2352 Avoid mkstemp bugs on various platforms.
2353 * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
2354 * src/output.c [! HAVE_MKSTEMP]: Delete.
2355 * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
2356 * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
2357 * NEWS: Document this.
2359 * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
2360 Reported by Bruno Haible.
2362 2006-06-21 Eric Blake <ebb9@byu.net>
2364 Avoid obsolete sigstack when POSIX sigaltstack is available.
2365 * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
2367 * configure.ac (AC_CHECK_HEADERS): Likewise.
2368 (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
2369 obsolete and most hosts now have it in signal.h.
2370 (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
2371 (AC_CACHE_CHECK): Cache decision to use stackovf.
2372 (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
2373 * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
2374 (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
2375 simplify later code.
2376 (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
2377 in case of dereferencing a member of a NULL pointer.
2378 (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
2380 (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
2381 EXIT_FAILURE in error, indent preprocessor directives.
2382 [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
2384 [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
2385 Reported by Santiago Vila.
2387 2006-06-19 Eric Blake <ebb9@byu.net>
2391 2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
2393 * checks/Makefile.in (PATH_SEPARATOR): New macro.
2394 (check, installcheck): Use it, for OS/2.
2396 2006-06-18 Eric Blake <ebb9@byu.net>
2398 Consistently use "GNU M4" as package name, "m4" as executable
2400 * NEWS: Document previous fix.
2402 * README: Fix grammar. Document that --enable-changeword is on
2404 * doc/m4.texinfo (Top, Changeword): Likewise.
2405 (Sysval): Enhance this test.
2406 (History): Backport this section from CVS head, and update.
2408 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
2409 Eric Blake <ebb9@byu.net>
2411 * src/builtin.c (WEXITSTATUS): Provide fallback definition.
2412 (m4_esyscmd): Set sysval to 0xffff, to accomodate both
2413 big-endian and little-endian wait status definitions.
2414 (m4_sysval): Use WEXITSTATUS.
2415 Reported by Andreas Buening.
2417 2006-06-18 Eric Blake <ebb9@byu.net>
2419 * configure.ac (AC_INIT): Bump version number.
2420 * NEWS: Describe changes in 1.4.4c.
2422 2006-06-17 Eric Blake <ebb9@byu.net>
2424 Beta Release 1.4.4b:
2425 * configure.ac (AC_INIT): Bump version number.
2426 * NEWS: Describe changes since 1.4.4.
2427 * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
2429 * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
2431 * checks/Makefile.in (maintainer-clean): Add missing target.
2432 * COPYING: Remove generated file from CVS.
2434 2006-06-16 Eric Blake <ebb9@byu.net>
2436 * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
2438 2006-06-15 Eric Blake <ebb9@byu.net>
2440 * checks/wrapfifo.m4: New file. Use it...
2441 * doc/m4.texinfo (Incompatibilities): here, in a new test case to
2442 demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
2444 * src/m4.h (to_uchar): New function.
2445 * src/eval.c (eval_lex): Use it to avoid passing signed char to
2446 isdigit, isalpha, isupper, islower, isspace, isalnum.
2447 * src/builtin.c (expand_user_macro): Likewise.
2448 * src/format.c (format): Likewise.
2449 * src/macro.c (expand_argument): Likewise.
2450 * NEWS: Document this security fix.
2453 * src/symtab.c (lookup_symbol): Use invalid, not illegal.
2454 * src/freeze.c (reload_frozen_state): Fix typo in message.
2455 (produce_frozen_state): Standardize on builtin, not built-in.
2456 * src/builtin.c (numeric_arg, bad_argc): Likewise.
2458 * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
2459 (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
2460 (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
2462 * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
2463 * m4/gnulib-cache.m4: New file, from gnulib.
2464 * bootstrap: Invoke gnulib-tool --update.
2465 * src/m4.c (main): Cast away const.
2466 * NEWS: Document that regex is updated.
2469 2006-06-08 Eric Blake <ebb9@byu.net>
2471 * configure.ac (changeword): Work even when changeword is not a
2473 (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
2474 Delete; now done by automake.
2475 (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
2477 2006-06-07 Eric Blake <ebb9@byu.net>
2479 * lib/regex.c (bcmp_translate): Canonicalize type name.
2480 * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
2481 * configure.ac (changeword): Disable changeword for the creation
2482 of configure, in case of bootstrapping with an m4 configured with
2483 --enable-changeword.
2485 Distribute a rudimentary man page.
2486 * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
2488 * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
2489 (SUFFIXES, m4.1): New macros and rules to build m4.1.
2491 2006-06-06 Eric Blake <ebb9@byu.net>
2493 * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
2494 compiler warnings at -O2.
2495 * lib/getopt.c (_getopt_internal): Likewise.
2497 Cleanup of previous patches.
2498 * src/input.c (struct input_block): Remove traced member.
2499 (push_macro, init_macro_token): Don't pass trace status around.
2500 * src/m4.h (struct token_data): Remove traced member.
2501 (struct symbol, struct builtin): Reduce unused space.
2502 (TOKEN_DATA_FUNC): Simplify.
2503 (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
2504 (push_macro, define_builtin): Remove unused parameter.
2505 * src/builtin.c (define_builtin, builtin_init, define_macro),
2506 (m4_defn): Don't pass trace status around.
2507 * src/macro.c (expand_argument): Likewise.
2508 * src/freeze.c (reload_frozen_state): Likewise.
2509 * src/symtab.c: Whitespace cleanup.
2510 * NEWS: Clean up wording.
2511 * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
2512 ensure tests actually expose bugs prior to today's patches.
2514 Trace status of builtins is no longer inherited across
2515 define(...,defn(...)). Fixes bug that autom4te had been working
2517 * src/builtin.c (define_builtin): Don't override trace status.
2518 * doc/m4.texinfo (Trace): Add test for this.
2519 * NEWS: Document this.
2521 When changing macro definitions inside the arguments to the macro,
2522 consistently preserve the old definition that was in effect before
2523 argument collection, similar to the C pre-processor.
2524 Reported by John Brzustowski.
2525 * NEWS: Document this change.
2526 * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
2527 this policy, and add tests that expose core dumps prior to this
2529 * src/m4.h (struct symbol): New members to track when a symbol is
2530 still in use after removal from the symbol table.
2531 (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
2532 (free_symbol): Prototype.
2533 * src/macro.c (expand_macro): Track pending expansions of a
2534 symbol. On completion, if a symbol is deleted and no longer
2535 pending, free its memory.
2536 * src/symtab.c (free_symbol): Export. Don't free memory if symbol
2538 (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
2540 (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
2541 in use as deleted and remove from the table without freeing
2543 (symtab_print_list) [DEBUG_SYM]: More debug output.
2545 * src/symtab.c (hack_all_symbols): Allow certain modifications of
2546 the symbol table during traversal.
2547 * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
2548 SYMBOL_POPDEF, since only the latter is safe with
2551 Solve crash when passing "indir(`foo')" to "m4 -tfoo".
2552 * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
2553 Preserve placeholder when macro is being traced.
2554 * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
2555 symbol is not defined.
2556 (set_trace): Remove placeholder when no longer traced.
2557 (m4_traceon): On named traces, always reserve a slot in the
2559 (m4_traceoff): Don't warn about untracing a nonexistent symbol.
2560 * NEWS: Document new trace behavior.
2561 * doc/m4.texinfo (Trace): Tracing by name now consistently works
2562 no matter whether that macro is currently defined.
2563 (Incompatibilities): Document differences between traditional and
2566 2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
2567 Eric Blake <ebb9@byu.net>
2569 * src/m4.h (hash_table_size): Now size_t instead of int.
2570 * src/m4.c (hash_table_size): Likewise.
2571 (main): Adjust to this; use atol rather than atoi.
2572 * src/symtab.c: Include <limits.h>, for CHAR_BIT.
2573 (symtab_init, lookup_symbol, hack_all_symbols):
2574 Use size_t for sizes and indexes, not int.
2575 (symtab_print_list) [DEBUG_SYM]: Likewise.
2576 (hash): Likewise. Don't case-fold in the hash function.
2577 Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
2578 Don't assume hash word is 32 bits.
2579 * NEWS: Document this change.
2581 2006-06-04 Eric Blake <ebb9@byu.net>
2583 * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
2584 to allow compilation, for use in debugger.
2585 (profiles, current_mode) [DEBUG_SYM]: New variables.
2586 (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
2587 determining hash table performance.
2589 2006-05-31 Eric Blake <ebb9@byu.net>
2590 John Brzustowski <jbrzusto@fastmail.fm>
2592 * src/input.c (input_stack): Delete; use current_input instead.
2593 (wrapup_stack): Dynamically allocate, so that recursion is handled
2595 (push_wrapup): Use current wrapup stack.
2596 (pop_wrapup): Rotate wrapup stack to current, and create new
2598 (input_init): Dynamically allocate stacks.
2599 * NEWS: Update, now that recursive m4wrap can no longer cause
2602 2006-05-31 Eric Blake <ebb9@byu.net>
2604 * lib/getopt.c: Fix copyright year.
2605 * lib/obstack.c: Ditto.
2606 * src/builtin.c: Ditto.
2608 2006-05-30 Eric Blake <ebb9@byu.net>
2610 * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2611 Reported by John Brzustowski.
2612 (Incompatibilities): Document known POSIX incompatibilities.
2615 2006-05-29 Eric Blake <ebb9@byu.net>
2617 * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2621 * Makefile.am: New file.
2622 * doc/Makefile.am: Ditto.
2623 * examples/Makefile.am: Ditto.
2624 * lib/Makefile.am: Ditto.
2625 * src/Makefile.am: Ditto.
2626 * acinclude.m4: New file, renamed from aclocal.m4.
2627 * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2628 (AC_ARG_PROGRAM): Now redundant.
2629 (STACKOVF): Turn into automake conditional.
2630 (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2631 * checks/Makefile.in: Converting this dir to automake was not
2632 trivial; for now, just add missing targets demanded by top-level.
2633 * INSTALL: Remove files that are now generated from CVS.
2634 * Makefile.in: Ditto.
2635 * aclocal.m4: Ditto.
2636 * install-sh: Ditto.
2637 * mkinstalldirs: Ditto.
2638 * doc/Makefile.in: Ditto.
2639 * doc/texinfo.tex: Ditto.
2640 * examples/Makefile.in: Ditto.
2641 * lib/Makefile.in: Ditto.
2642 * src/Makefile.in: Ditto.
2644 * AUTHORS: Backport from CVS head, and update.
2645 * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2647 2006-05-27 Eric Blake <ebb9@byu.net>
2649 * lib/regex.c (regex_compile): Kill compiler warnings.
2650 * lib/getopt.c: Likewise.
2651 * lib/obstack.c: Likewise.
2652 * src/builtin.c (builtin_init): Likewise.
2653 * src/path.c (path_search): Likewise.
2655 * doc/m4.texinfo: Fix usage of a vs. an.
2656 (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2657 overfull hbox warnings.
2658 (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2660 * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
2662 * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2663 (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2665 (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2666 * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2667 * src/Makefile.in: Delete remains of ansi2knr.
2668 * src/ansi2knr.1: Delete.
2669 * src/ansi2knr.c: Delete.
2671 2006-05-25 Eric Blake <ebb9@byu.net>
2673 * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
2676 * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2677 Reported by Karl Berry.
2679 2006-05-24 Eric Blake <ebb9@byu.net>
2681 * Makefile.in (html): New target.
2682 * doc/Makefile.in (html, m4.html): Likewise.
2683 (MAKEINFOHTML): New macro.
2684 * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2686 (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2688 Reported by Bob Badour.
2690 * THANKS: Update. Move reporter's email addresses here, instead
2693 2006-05-11 Eric Blake <ebb9@byu.net>
2696 * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2697 patched on 2005-12-04.
2698 Reported by Ilya N. Golubev.
2700 * bootstrap: New file, so that generated files need not be stored
2702 * Makefile.in (DISTFILES): Add bootstrap.
2704 Make testsuite less sensitive to doc changes.
2705 * doc/m4.texinfo: Use m4.input instead of filename.
2706 * checks/check-them (xerr): Turn m4.input into filename.
2707 * checks/Makefile.in (dist): Depend on stamp-checks.
2709 Portability updates for OS/2.
2710 * src/Makefile.in (EXEEXT, OBJEXT): Define.
2713 * lib/Makefile.in (OBJEXT): Define.
2715 * doc/Makefile.in (install, uninstall): Install info files into
2717 Reported by Andreas Buening.
2719 2006-05-09 Eric Blake <ebb9@byu.net>
2721 * install-sh: Update to newer upstream version.
2722 * mkinstalldirs: Likewise.
2723 Reported by Andreas Buening.
2725 * src/m4.c (main): Bump copyright year.
2726 * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2727 * doc/Makefile.in (datarootdir): Likewise.
2729 2006-05-08 Eric Blake <ebb9@byu.net>
2732 * doc/m4.texinfo (Bugs): Backport bug email address from head.
2733 Reported by Stepan Kasal.
2735 2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
2737 * input.c (match_input): Do not pass expression with side effect
2738 to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
2741 2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
2743 * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2744 Reported by Damian Menscher.
2746 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
2748 * configure.ac (AC_INIT): Bump to 1.4.4a.
2750 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
2753 * configure.ac (AC_INIT): Bump to 1.4.4.
2754 * NEWS: Describe 1.4.4's changes.
2755 * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2757 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
2759 * src/m4.c: fix return code when non-existent files are processed
2761 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
2763 * README: update email address for bug reports.
2765 2005-10-17 Gary V. Vaughan <gary@gnu.org>
2767 * doc/m4.info: Generated files are not kept in the repository.
2769 2005-05-01 Gary V. Vaughan <gary@gnu.org>
2771 The FSF are moving offices today. Changed their contact address
2772 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2773 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2775 Also, some of the files here were never updated from the previous
2776 '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2777 '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2779 2005-03-31 Mike Frysinger <vapier@gentoo.org>
2781 * Makefile.in (bindir, infodir): Substitute from configure rather
2783 * doc/Makefile.in (infodir): Ditto.
2784 * src/Makefile.in (bindir): Ditto.
2787 2005-03-31 Gary V. Vaughan <gary@gnu.org>
2789 Changes needed to automate the release process for 1.4.3:
2791 * Makefile.in (dist): Make .tar.bz2 tarball too.
2792 * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2793 (cvs-news): Look 1 line further down for NEWS release number.
2794 (cvs-dist): We don't use automake, so make dist is fine.
2795 Remove double . before suffixes.
2796 (cvs-release): Don't mention manual.html.
2797 (fetch): Get latest gendocs files.
2798 (web-manual): Rewritten to use gendoc for multiformat manuals.
2799 * doc/gendocs.sh: Don't save an old version in m4 CVS!
2800 * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2801 preserving, but case insensitive, so generating html docs per node
2802 clashes between Index.html, the node file, and index.html, the
2803 top-level of the document tree...
2804 (Index macro): ...so renamed to this. Changed all references.
2806 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
2808 * configure.ac (AC_INIT): Bump to 1.4.3a.
2810 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
2813 * configure.in (AC_INIT): Bump to 1.4.3.
2814 * NEWS: Describe 1.4.3's changes.
2816 2005-03-31 Gary V. Vaughan <gary@gnu.org>
2818 * Makefile.maint: New file with release rules, from CVS libtool.
2819 * Makefile.in (DISTFILES): Add Makefile.maint.
2820 * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2823 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
2825 * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2826 checks/47.patsubst, with a redundant @comment to prevent emacs
2827 from removing it accidentally again.
2828 * checks/get-them: Allow for trailing spaces tucked behind
2831 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
2833 * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2834 * src/Makefile.in (install, uninstall): Likewise.
2836 2005-02-07 Gary V. Vaughan <gary@gnu.org>
2838 * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
2840 Reported by Eric Blake.
2842 2005-02-04 Gary V. Vaughan <gary@gnu.org>
2844 * lib/regex.c, lib/regex.h: Updated from gnulib.
2845 * src/input.c (set_word_regexp): Don't change the word_regexp
2846 unless it compiles correctly.
2848 Reported by Frank Schwidom.
2850 * Makefile.in (stamp-h): Regenerate config.h properly.
2852 2005-02-03 Gary V. Vaughan <gary@gnu.org>
2854 * configure.ac (AC_DEFINE): Fix overquoting of description
2857 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2859 * src/freeze.c (produce_frozen_state): Use \n line-endings even
2860 on Windows, so that the frozen file reader will work.
2861 Reported by Josef T. Burger.
2863 * src/m4.c (main): Modernise the --version output.
2865 2005-02-03 Gary V. Vaughan <gary@gnu.org>
2867 Modernise the configury a little to prevent spurious errors from
2868 Autoconf-2.59's autoreconf:
2870 * config.h.in: Renamed to...
2871 * config-h.in: ...this to better support DOS 8.3 file systems.
2872 * acconfig.h: Removed.
2873 * configure.in: Renamed to...
2874 * configure.ac: ...this, and AC_DEFINE used to declare config.h
2875 entry comments. Slight reorganisation and reformatting.
2876 * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2878 (AC_INIT): Use a modern 3 argument call.
2879 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2880 examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2881 s/PRODUCT/PACKAGE/g.
2882 * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2883 config.h.in. Added configure.ac, config-h.in.
2884 (stamp-h.in): Removed acconfig.h from dependencies.
2885 (configure): Depends on configure.ac, not configure.in.
2886 * doc/Makefile.in (stamp-vti): Ditto.
2887 * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2888 difference between PRODUCT="m4" and PACKAGE="GNU M4".
2889 * configure: Regenerated.
2891 2005-02-03 Noah Misch <noah@cs.caltech.edu>
2893 * src/output.c (mkstemp): Make non-static, and build regardless of
2894 HAVE_TMPFILE; src/builtin.c also needs this replacement.
2897 2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
2899 * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2900 changes from your editor buffer first.
2902 * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
2903 * src/m4.c: And include them as appropriate.
2906 2004-09-09 Andreas Schwab <schwab@suse.de>
2908 Refactoring of the string read case in next_char provides about a
2909 20% speedup of M4 as typically used by autoconf:
2911 * src/input.c (next_char_1): Renamed from next_char.
2912 (next_char): New macro.
2915 2004-08-21 Gary V. Vaughan <gary@gnu.org>
2917 * configure.in (VERSION): Bump to 1.4.2a.
2919 2004-08-19 Paul Eggert <eggert@twinsun.com>
2922 * configure.in (VERSION): Bump to 1.4.2.
2923 * News: Describe 1.4.2's changes.
2925 * src/m4.c (reference_error): Preserve errno, since M4ERROR
2927 * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2928 (m4_maketemp): Clear errno before calling mkstemp.
2929 * src/path.c (path_search): Don't let "free" trash errno when
2931 * src/output.c (insert_file): Don't assume errno has a valid
2932 value simply because fread returns zero. This fixes a
2933 portability bug reported by Marion Hakanson in
2934 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2936 2004-06-09 Gary V. Vaughan <gary@gnu.org>
2938 * configure.in (VERSION): Bump to 1.4.1a.
2939 * NEWS: Place holder for next stable release.
2941 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2944 * configure.in (VERSION): Bump to 1.4.1.
2945 * NEWS: Describe 1.4.1's changes.
2947 * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2948 pacify Autoconf 2.59.
2950 * doc/m4.texinfo: Insert commas after @xref's that lack them,
2951 to pacify Texinfo 4.7.
2952 * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2954 * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2955 pacify Sun C compilers.
2957 2003-09-28 Akim Demaille <akim@epita.fr>
2959 * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2962 2003-09-03 Santiago Vila <sanvila@debian.org>
2964 * examples/stackovf.sh: Use tempfile if available.
2966 2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
2968 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2969 * src/output.c (m4_insert_file): Do not mix buffered and
2970 unbuffered I/O, as this breaks on the Hurd. (trivial change)
2972 2001-02-01 Santiago Vila <sanvila@debian.org>
2974 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2975 * src/m4.c (main): Fix format vulnerabilities. (trivial change)
2977 2001-02-01 Matt Kraai <kraai@debian.org>
2979 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2980 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2981 empty file rather than to a nonexistent file. This closes a common
2983 * src/builtin.c (m4_maketemp): Implement the above, by using
2984 mkstemp rather than mktemp. (trivial change)
2986 2000-01-09 Akim Demaille <demaille@inf.enst.fr>
2988 * src/builtin.c (expand_ranges): Added break after trailing dash.
2989 This caused misbehaviors on some systems.
2991 Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
2994 * doc/Makefile.in (realclean): Also remove stamp-vti.
2995 Reported by Eric Backus.
2997 Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
2999 * src/freeze.c (produce_frozen_state): If the frozen file cannot
3000 be opened, return immediately after producing the error message.
3001 Reported by Andreas Schwab.
3003 * configure.in: Check for const only after having found possible
3004 ANSIfying compiler flags, this is of no use to check it before.
3005 Reported by Alexander Lehmann.
3007 Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
3009 * src/macro.c (collect_arguments): Cast obstack arguments to
3010 (voidstar), so avoiding compiler warnings.
3011 Reported by Joseph E. Sacco.
3013 * src/freeze.c (produce_frozen_state): Cast printed lengths to
3014 (int) so they correspond to %d format items.
3015 Reported by Joseph E. Sacco.
3017 * src/m4.c (main): Cast the argument to xfree to (voidstar).
3018 * src/symtab.c (free_symbol): Idem.
3019 Reported by Karl Vogel.
3021 Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
3023 * Makefile.in (DISTFILES): Distribute BACKLOG.
3025 * configure.in: Define PRODUCT and VERSION.
3026 * acconfig.h: Document PRODUCT and VERSION.
3027 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
3028 constant string m4 and variable or parameter named version.
3030 Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
3032 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
3033 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
3034 defines __STDC__ to 0, for indicating it is *not* ANSI!
3035 Reported by Kaveh R. Ghazi.
3037 * configure.in: Added obsolescent tests for AIX and Minix.
3039 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
3040 which texclean does not exist anymore.
3041 Reported by Eric Backus, Jim Meyering, John David Anglin and
3044 Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
3046 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
3047 Reported by John David Anglin.
3049 * src/ansi2knr.c: New version, sent by Peter Deutsch.
3050 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
3051 ANSI2KNR, depending on the fact the compiler is ANSI or not.
3052 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
3053 Remove the sed filter after ansi2knr for debug.c. Use $O instead
3054 of $U, put underline in extensions rather than in basenames. Use
3055 implicit rules, now that regularity makes this possible.
3056 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
3057 of ansi2knr whenever it is needed.
3058 * configure.in: Adjusted for correct STACKOVF substitution.
3059 * src/debug.c (trace_format): When not __STDC__, use (...) as a
3060 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
3061 Reported by David MacKenzie.
3063 * Makefile.in: Remove binprefix. Use transform_name instead.
3064 Reported by David MacKenzie.
3066 * doc/Makefile.in: Create version.texi, use it, clean it.
3067 Reported by Jim Meyering.
3069 Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
3071 * Makefile.in (all, install, uninstall): Depend on Makefile.
3073 * Makefile.in: For actions invoking $(MAKE) from within compound
3074 sh statements, exit non-zero if the sub-make fails. Otherwise,
3075 the top-level make may exit successfully when it should fail.
3076 Reported by Jim Kingdon.
3078 * {,/*}Makefile.in: Use && after all cd, in case they fail.
3080 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
3081 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
3082 * configure.in: Substitute PRODUCT and VERSION.
3084 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
3086 Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
3088 * Makefile.in (mostlyclean-local): Do not remove *~.
3089 * */Makefile.in (mostlyclean): Idem.
3090 Reported by Robert E. Brown and Richard Stallman.
3092 Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
3094 * src/m4.h: Get rid of CONFIG_BROKETS.
3096 Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
3098 * configure.in: Use AC_ARG_PROGRAM.
3099 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
3100 Reported by David MacKenzie.
3102 Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
3104 * configure.in: Do not add -O to CFLAGS for GNU C, now that
3105 configure does it automatically.
3106 Reported by Jim Meyering.
3108 Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
3110 * src/stackovf.c: Declare the handler_t typedef earlier in the
3111 code, use it for stackovf_handler.
3112 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
3113 casting sigsegv_handler.
3114 Reported by Robert Bernstein.
3116 * src/m4.c (main): Initialize program_name to argv[0] without
3118 Reported by Karl Berry.
3120 Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
3122 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
3123 Reported by Karl Berry.
3125 Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
3127 * lib/Makefile.in (mostlyclean): Added.
3128 (TAGS): Make in $(srcdir).
3130 * configure.in: Use `choke me' in test, like everywhere!
3132 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
3133 unreacheable and useless.
3135 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
3137 * lib/Makefile.in (DISTFILES): Distribute TAGS.
3138 (distclean): Do not remove TAGS.
3139 (realclean): Remove it.
3140 * Makefile.in: Make TAGS in lib also, not just in src.
3141 Reported by Karl Berry.
3143 * Makefile.in (distclean, realclean): Instead of recursively
3144 calling $(MAKE) for the -local part, allow parallel execution of
3145 -recursive and -local, only delay the removal of config.status,
3146 which is repeated in both goals.
3148 Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
3151 * Makefile.in: Group all *clean-recursive goals in one, using sed
3152 to remove `-recursive' while calling make recursively. Also, use
3153 a subshell for each recursive $(MAKE).
3154 Reported by Jim Meyering.
3156 * src/m4.h (memcpy): Define with bcopy for BSD systems.
3157 Reported by Kaveh R. Ghazi.
3159 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
3160 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
3163 * configure.in: Use date instead of touch for stamp-h.
3164 * Makefile.in (stamp-h.in): Idem.
3166 * Makefile.in (distclean, realclean): Force serial execution of
3167 both goals, in case parallel makes are being used.
3168 Reported by Jim Meyering.
3170 * src/Makefile.in (DISTFILES): Distribute TAGS.
3171 (distclean): Do not remove TAGS.
3172 (realclean): Remove it.
3173 Reported by Karl Berry.
3175 Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
3177 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
3178 to old names, for following Autoconf.
3180 Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
3182 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
3183 ./install.sh will not be correctly referred to in sub-Makefiles.
3184 Reported by John David Anglin.
3186 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
3187 Reported by Eric Backus.
3189 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3190 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
3191 config.status into remaking this directory's Makefile only.
3192 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
3193 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
3194 Reported by Jim Meyering.
3196 Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
3198 * configure.in: Correct stack overflow detection logic, taking
3199 care of systems having only incomplete implementations (like for
3200 Pyramid 9820 OSx 5.0d).
3201 Reported by Kaveh R. Ghazi.
3203 * src/Makefile.in (TAGS): Remote -t from etags call.
3205 Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
3207 * lib/Makefile.in (install): Depend on all.
3209 Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
3211 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
3212 Reported by Jim Meyering and John David Anglin.
3214 * Makefile.in (distclean-local): Delete config.log.
3215 Reported by Jim Meyering.
3217 Solidify frozen files with respect to -P:
3218 * src/m4.c: Have -P set prefix_all_buitins variable instead of
3219 calling a function by that name. Declare the variable.
3220 * src/m4.h: Adjust declaration for prefix_all_buitins.
3221 * src/builtin.c (builtin_init): Merge in functionality from
3222 previous prefix_all_buitins function, while making entries in the
3223 symbol table, but not modifying the builtin description itself.
3225 * src/freeze.c (reload_frozen_state): Add a useless `break;',
3226 because *many* compilers do not accept an empty `default:'.
3227 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
3228 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
3230 * configure.in: Use AC_TYPE_SIGNAL.
3231 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
3232 Reported by Robert Bernstein.
3234 * checks/Makefile.in (check): Modify PATH so check-them will find
3235 m4 in the src directory.
3236 * Makefile.in (check): Don't.
3237 Reported by Akiko Matsushita and Jim Meyering.
3239 * src/output.c (make_room_for, output_character_helper): New
3240 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
3241 a per buffer MAXIMUM_BUFFER_SIZE.
3243 * src/output.c (output_text): New function, for optimizing the
3244 output of strings of characters. Use it.
3246 Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
3248 * doc, src: New directories reorganizing the distribution.
3249 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
3251 * Makefile.in: Adjusted.
3252 * configure.in: Configure new Makefiles.
3254 * m4.h: Declare STRING typedef. Use it for comment and quote
3255 strings, adjusting all references. (This is the rudiments of a
3256 beginning for the eventual withdrawal of NUL terminated strings.)
3257 * output.c (shipout_text): Accept a length parameter, and use it.
3258 All callers adjusted.
3260 Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
3262 * m4.h: Include <unistd.h> if it exists.
3263 * stackovf.c: Don't.
3265 Clean up for current_diversion variable:
3266 * output.c: Move current_diversion from builtin.c.
3267 * m4.h: Declare current_diversion so builtin.c can access it.
3268 * output.c (output_init, make_diversion): Initialize or update
3270 * builtin.c (builtin_init, m4_divert): Leave current_diversion
3273 Remove limit on number of diversions:
3274 * output.c: Replace ndiversion by diversions, declare it.
3275 (output_init): Allocate only diversion 0.
3276 (make_diversion): Allocate new diversions as needed.
3277 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
3278 * m4.c: Still accept -N, but do nothing with it.
3279 Reported by David MacKenzie.
3282 * output.c (freeze_diversions): New function.
3283 * m4.h: Declare freeze_diversions.
3284 * freeze.c: Document frozen file format, revise it, call
3285 freeze_diversions to add diversions to frozen format, and code to
3286 reload them properly.
3287 * m4.c: Do not undivert automatically at end when status being
3288 frozen. Do not call builtin_init when reloading frozen state.
3290 Speed up diversion processing:
3291 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
3292 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
3293 structure and variables, cached variables out of output_diversion,
3294 reallocate_diversion_for and OUTPUT_CHARACTER.
3295 (shipout_text, make_diversion, insert_diversion): Adapted to new
3297 (insert_file): Use better buffering.
3298 Reported by David MacKenzie.
3300 Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
3302 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
3303 dist works from another build directory.
3305 Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
3307 * symtab.c (hack_all_symbols): Use hash_table_size instead of
3308 constant HASHMAX, for -H option to work better.
3310 * builtin.c (DECLARE): Simplify by using _ ().
3312 * freeze.c: New file.
3313 * Makefile.in: Compile it, distribute it.
3314 * m4.c: Recognize, document and process --freeze-state (-F) and
3315 --reload-state (-R) options. Pass a true flag to builtin_init
3316 only if no reloading some state.
3317 * builtin.c (define_builtin): Remove static specifier.
3318 (find_builtin_by_name): Remove static specifier.
3319 (builtin_init): Accept and obey a flag argument.
3320 * m4.h: Add declarations for freeze.c, changes for builtin.c.
3322 Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
3324 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
3327 * configure.in: Implement --with-dmalloc.
3328 * acconfig.h: Document WITH_DMALLOC.
3329 * m4.h: Add code for when WITH_DMALLOC.
3331 Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
3333 * m4.c (long_options): Use "error-output", the dash was missing.
3334 Reported by Akiko Matsushita.
3336 Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
3338 * m4.h: Include <sys/types.h>.
3339 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
3340 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
3342 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
3344 * builtin.c (dump_args): Declare len as size_t, not int.
3346 * debug.c: Prototype the forward declaration of debug_set_file.
3348 * builtin.c (m4_undivert): Replace div by file, for avoiding the
3349 shadowing of this variable.
3350 * output.c (insert_diversion): Idem.
3352 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
3353 (input_init): Duplicate default quote and comment strings.
3354 (set_quotes): Free previous quote strings in all cases. Duplicate
3355 even default quote strings.
3356 (set_comment): Free previous comment strings in all cases.
3357 Duplicate even default comment strings.
3359 * configure.in: Updated for Autoconf 2.0.
3360 * Makefile.in (distclean-local): Also delete config.cache.
3362 * m4.c (usage): Reorganize the --help output by topic. Include a
3363 description for debugging flags.
3365 Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
3367 * configure.in: If sigaction is available and SA_ONSTACK defined,
3368 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
3369 defined, use sigvec. Else don't compile stackovf.c.
3370 * stackovf.c (setup_stackovf_trap): Idem.
3371 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
3374 Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
3376 * m4.c (usage): Replace printf par fputs.
3378 Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
3382 Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
3384 * configure.in: Check for sigaction and sigvec. Add a new delayed
3385 check for RLIMIT_STACK, combine in the checking for getrlimit.
3386 All those things are not universally available.
3387 * stackovf.c: Split setting up the trap handler and catching
3388 signals, for better taking care of various configure outcomes.
3389 * examples/stackovf.sh: Correct a typo.
3390 Reported by Eric Backus, Jim Avera and Jim Meyering.
3392 Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
3394 * ansi2knr.c: New version sent by its author, Peter Deutsch.
3396 Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
3398 * Makefile.in: Modify so parallel make will not try making
3399 lib/libm4.a twice simultaneously.
3400 Reported by Jim Meyering.
3402 Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
3404 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
3405 error message, for when no code possibility exists. Even if this
3406 line is completely #ifdef'ed out, it brings a syntax error.
3407 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
3409 * Makefile.in (install): Have install depend on all too, for lib
3410 to be remade as needed.
3412 * examples/stackovf.sh: Try ksh, bsh and bash for shells
3413 providing ulimit, instead of using only ksh.
3414 Reported by Jim Avera and Joseph E. Sacco.
3416 Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
3418 * Makefile.in (check): Have it depend on all instead of m4. In
3419 this way, a change in lib will be detected and processed.
3421 * builtin.c (numeric_arg): Use strtol and verify the conversion,
3422 instead of using sscanf which stops as soon as there is a
3423 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
3424 and divert(1xyzzy) were all accepted without any warning or error
3426 * m4.h: Declare strtol as long if not including stdlib.h.
3427 * configure.in: Check for limits.h, and replace strtol if missing.
3428 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
3429 * lib/strtol.c: New file, from elsewhere.
3430 Reported by Andreas Schwab.
3432 Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
3434 * macro.c (expand_macro): Cast value to (boolean) prior to
3435 assigning it to traced.
3436 Reported by Tom McConnell.
3438 * Makefile.in (m4): Always make all in lib first.
3439 Reported by Jim Meyering.
3441 Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
3443 * stackovf.c: Isolated OS-dependent sections; Improved portability,
3444 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
3445 handlers), and a default error message if the fault address is not
3446 available (when neither siginfo.h nor BSD sigcontext are supported).
3447 * configure.in: Changes for stackovf.h: Check for sigcontext,
3448 sigaction, sigstack, and define rlim_t as int if necessary.
3449 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
3450 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
3451 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
3453 Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
3455 * configure.in: Use AC_SET_MAKE.
3456 * Makefile.in: Use @SET_MAKE@.
3457 Reported by Jim Meyering.
3459 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
3460 Reported by Ian Taylor.
3462 Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
3464 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
3465 because siginfo.h is unrelated to standard headers, and siginfo.h
3466 is already checked for.
3467 Reported by Joseph E. Sacco.
3469 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
3471 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
3474 Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
3476 * builtin.c (substitute): Use \& to represent this part of the
3477 string which was matched by the whole regexp, instead of
3478 representing the whole string. Any usage of \0 issues a warning
3479 and acts like \&, it will disappear in some subsequent release.
3481 Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
3483 * m4.c: Complete prototype for forwarded declaration of usage.
3485 * input.c (init_macro_token): Correct own reference in error
3486 message. Previous name get_macro_func was referred to instead.
3487 (next_char): Correct own reference in error message. Previous
3488 name advance_input was referred to instead.
3490 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
3491 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
3492 and_term, not_term, logical_not_term, cmp_term, shift_term,
3493 add_term, mult_term, exp_term, unary_term, simple_term): Add
3494 prototype to forwarded declarations. Declare parameter v1 as
3495 eval_t * instead of int *. Same for local variable v2 in dyadic
3496 functions. Same for result in exp_term.
3497 * builtin.c (m4_eval): Declare value as eval_t instead of int.
3498 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
3499 unsigned_eval_t instead of unsigned int. Change casts accordingly.
3500 (shipout_int): Cast first argument of ntoa to eval_t.
3501 Reported by Thorsten Ohl.
3503 * macro.c: Complete the prototypes of forwarded expand_macro and
3505 Reported by Thorsten Ohl.
3507 * m4.h: Define voidstar as void * or char * depending on __STDC__.
3508 The Ultrix 3.1 compiler cannot do much with void pointers.
3510 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
3511 * m4.c (xfree): Replace void * by voidstar.
3512 Reported by Tom McConnell.
3514 * ansi2knr.1: New, from elsewhere.
3515 * Makefile.in (DISTFILES): Distribute ansi2knr.1
3517 * Makefile.in (stamp-h.in): Avoid running ./config.status if
3518 stamp-h does not exist yet. This avoids running it a second time
3519 just after the initial ./configure.
3520 Reported by David MacKenzie and Tom McConnell.
3522 * m4.h: Replace the enum debug_info declaration with a series of
3523 #define's. The Ultrix 3.1 compiler would otherwise need casting
3524 (int) to most references, when used in expressions.
3525 Reported by Tom McConnell.
3527 Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
3529 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
3530 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
3531 calls the compiler. Previously, FP_PROTOTYPES was only calling
3532 the preprocessor; by not being subject to CFLAGS, this was
3533 discouraging those flags asking for ANSI compilation.
3534 * acconfig.h: Document HAVE_PROTOTYPES.
3535 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
3536 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
3537 Reported by Eric Backus.
3539 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
3540 from the environment. Default CFLAGS to -g if not set.
3541 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
3542 * lib/Makefile.in: Have CFLAGS substituted from configure.
3543 Reported by Eric Backus and Tom McConnell.
3545 * configure.in: m4_undefine changeword before using AC_ENABLE.
3547 * m4.h: Declare prototypes for error (for ANSI compilers only),
3548 prefix_all_builtins and reference_error.
3549 Reported by Tom McConnell.
3551 * input.c (set_word_regexp): Do not try to initialize the array
3552 test from a string, this does not work with non-ANSI compilers.
3553 Reported by Eric Backus.
3555 * Makefile.in (dist): Clean examples/ before saving it.
3556 (distclean-local): Also remove stamp-h.
3557 Reported by Eric Backus.
3559 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
3561 Reported by Tom McConnell.
3563 * checks/Makefile.in (clean): Depends on mostlyclean.
3564 (mostlyclean): New goal.
3566 Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
3568 * Makefile.in (DISTFILES): Distribute install.sh.
3569 * install.sh: New file, copied from elsewhere.
3570 Reported by Assar Westerlund and Kaveh R. Ghazi.
3572 Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
3574 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
3575 * acconfig.h: Explain ENABLE_CHANGEWORD.
3577 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
3578 from code provided by Pete Chown]
3579 * m4.h: Add original_text field to u_t variant of union u.
3580 Declare TOKEN_DATA_FUNC macro.
3581 * builtin.c: Declare changeword.
3582 (m4_changeword): New function.
3583 * input.c: Include "regex.h", define variables with word regexps.
3584 (input_init): Initialize the word regexp.
3585 (set_word_regexp): New.
3586 (next_token): Declare local variables, use the previous code if
3587 default_word_regexp is true. Else, match using a new code. Save
3589 * macro.c (expand_token): Ship out original text if not a macro
3591 Reported by Krste Asanovic and Pete Chown.
3593 [These modifs all depend upon ENABLE_CHANGEWORD]
3594 * m4.h: Declare external user_word_regexp.
3595 * m4.c: Declare user_word_regexp, and initialize it from
3596 --word-regexp or -W, or NULL if not specified.
3597 * input.c: Use user_word_regexp if specified, instead of
3598 DEFAULT_WORD_REGEXP.
3600 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
3603 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
3604 * checks/Makefile.in: Empty the suffix list.
3605 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
3607 * m4.c: Declare nesting_limit and initialize it to 250.
3608 Implement -LNUMBER or --nesting-limit=NUMBER to change its
3610 * m4.h: Declare nesting_limit as external.
3611 * macro.c (expand_macro): Stop execution whenever nesting limit
3613 Reported by Bengt Mertensson.
3615 * eval.c (evaluate): Diagnose excess characters in eval input.
3616 Things like `eval(08)' used to return 0 with no diagnostic.
3618 * m4.h: Capitalize first letter of all macro arguments in
3621 * m4.c: Declare warning_status, initialize it to 0. Add new
3622 option -E, or --fatal-warnings, which sets warning_status to
3623 EXIT_FAILURE instead.
3624 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
3625 EXIT_FAILURE if not otherwise done by header files.
3626 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3627 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3628 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3629 argument of all M4ERROR calls.
3630 Reported by Noah Friedman.
3632 * examples/incl-test.m4: Renamed from incl_test.m4.
3633 * examples/include.m4: Include incl-test.m4 instead of
3635 * examples/multiquotes.m4: Renamed from multi-quotes.m.
3637 Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
3639 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
3640 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3641 also tested it on a Sun Sparc workstation running SunOS 4.x.
3643 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3644 49.format check, abusing a `union values' argument with sprintf
3645 without selecting the proper field. Now, save the formatting type
3646 first, delaying the fetch of the corresponding argument.
3647 Reported by Joseph E. Sacco and Tom Quinn.
3649 * format.c (format): Remove const from char *fmt declaration when
3650 not HAVE_EFGCVT, because a NUL may be forced into it.
3652 * m4.h: Declare atof() when not STDC_HEADERS.
3653 Reported by Joseph E. Sacco.
3655 * Regenerate configure using Autoconf 1.11, this corrects a
3656 problem about an incorrect cpp seting on NeXT 3.1.
3657 Reported by Alexander Lehmann.
3659 Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
3661 * m4.h (_): Change argument from `x' to `Args'.
3663 Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
3665 * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3666 bringing more evil than good on a few systems.
3667 Reported by Greg A. Woods.
3669 Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
3671 * m4.h: Rename Args() to _().
3672 * m4.h: Remove extern specifier from all function declarations.
3674 Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
3676 * stackovf.c: New file implementing stack-overflow detection.
3677 * configure.in: Check for getrlimit, sigaction. If all of
3678 standard headers, getrlimit and sigaction, define USE_STACKOVF and
3679 substitute ${U}stackovf.o for STACKOVF.
3680 * acconfig.h: Declare USE_STACKOVF.
3681 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3682 * m4.h: Declare setup_stackovf_trap().
3683 * m4.c: Call setup_stackovf_trap().
3684 * tests/stackovf_test.sh: New file.
3686 Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
3688 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3690 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3692 Sun Jan 30 14:24:19 1994 (pinard at icule)
3694 * m4.h: Remove definition of volatile, not used anymore.
3695 Reported by Jim Meyering and Joseph E. Sacco.
3697 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3698 of `if ... else /* nothing */' for if macros.
3699 Reported by Jim Meyering.
3701 * builtin.c (m4_regexp): Reorganize the code for avoiding a
3702 warning from gcc about `repl' possibly used before defined.
3703 Reported by Jim Meyering.
3705 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3706 Reported by Jim Meyering.
3708 Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
3710 * m4.h: Move the conditional definition of volatile after the
3711 inclusion of system files, because they may define it first.
3713 Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
3715 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3716 get around a problem with Alpha make seeing a syntax error, there.
3717 Reported by Vern Paxson.
3719 Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
3721 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3722 Reported by Richard Stallman.
3724 Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
3726 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3727 instead of AC_HAVE_FUNCS.
3728 Reported by Noah Friedman.
3730 Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
3732 * m4.c: Initialize show_help and show_version to zero.
3734 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3735 Use them in exit() and usage() calls.
3737 Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
3739 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3740 syserr() macro. Delete errref, add reference_error and M4ERROR.
3741 * m4.c: Replace errref, which was returning an input reference
3742 string, with reference_error, which prints it on standard error.
3743 * builtin.c, output.c: Use errno as second parameter to error,
3744 instead of using syserr() with %s.
3745 * *.c: Use M4ERROR instead of error: no more errref() with %s.
3746 Doing so, the program name appears after the input reference
3747 instead of before, which eases M-x next-error processing.
3749 Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
3751 * checks/get-them: Escape braces with backslashes in patterns,
3752 because HPUX-9.01 awk needs this.
3753 Reported by Jim Meyering.
3755 Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
3757 * builtin.c: Declare "FILE *popen ();".
3759 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3760 macros, replace error_message_prefix() declaration by errref()'s.
3761 Declare xrealloc, for use in errref().
3762 * m4.c: Delete error_message_prefix() function, add errref().
3763 * *.c: Use error() systematically in place of all error macros,
3764 now that error() flushes stdout first. Make needed adjustments.
3766 * m4.h: Remove const in sys_errlist[] declaration, it creates
3767 conflicts on SGI and Alpha.
3768 Reported by Kaveh R. Ghazi.
3770 Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
3772 * m4.c: Include <getopt.h> instead of "getopt.h".
3774 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
3775 * acconfig.h: New, for documenting HAVE_EFGCVT.
3776 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3777 use them wherever appropriate. Also use -I. for compilations.
3778 * lib/Makefile.in: Use -I.. for compilations.
3779 * *.c: Include <config.h> or "config.h".
3781 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3782 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3784 Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
3786 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3788 * input.c (input_init): Initialize quote and comment strings
3789 explicitely instead of calling set_quotes and set_comment: by
3790 doing so, we ensure we do not free uninitialized variables.
3792 * checks/check-them: Reverse arguments to both diff, so the
3793 expected is on the left and the obtained on the right.
3795 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3796 macros. Delete declarations for m4error, warning, fatal and
3797 internal_error, add declaration for error_message_prefix.
3798 * m4.c: Delete m4error, warning, fatal and internal_error
3799 routines, add error_message_prefix routine.
3800 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3801 warning with WARNING*, fatal with FATAL* and internal_error with
3803 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3804 this is not needed anymore.
3806 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
3807 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
3808 and debug_message, add declaration for debug_message_prefix.
3809 * debug.c: Remove static specifier for FILE *debug declaration.
3810 Delete debug_print and debug_message routines, add
3811 debug_message_prefix routine.
3812 * builtin.c, debug.c: Replace debug_print routine calls with
3813 DEBUG_PRINT* macro calls.
3814 * input.c, path.c: Replace debug_message routine calls with
3815 DEBUG_MESSAGE* macro calls.
3817 * m4.h: Remove inclusion of <varargs.h>.
3818 * debug.c: Include <stdarg.h> or <varargs.h>.
3819 (trace_format): Use stdarg instead of varargs if __STDC__.
3821 * configure.in: Remove checks for vfprintf and _doprnt. These
3822 implementations use varargs tricks which are not portable enough.
3823 * lib/vfprintf.c: Deleted.
3824 * lib/_doprnt.c: Deleted.
3825 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
3826 Reported by Joel Sherrill.
3828 * path.c (add_include_directory): Use xstrdup.
3830 * builtin.c (find_builtin_by_name): Declare static.
3832 * *.[ch]: Add const to a few "char *" declarations.
3834 * configure.in: Remove commented tests for fileno() and fstat().
3835 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3837 * debug.c (debug_flush_files): New.
3838 * m4.h: Declares it.
3839 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3840 Reported by Nicolas Pioch.
3842 Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
3844 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3845 Reported by Joel Sherrill.
3847 * builtin.c (prefix_all_builtins): Instead of the table size, use
3848 the null entry at end for stopping the loop. It was overwritten.
3849 Reported by Andreas Schwab and Jim Meyering.
3851 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3852 Reported by Kaveh R. Ghazi.
3854 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3855 Reported by Karl Vogel.
3857 Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
3859 * m4.h: Do not define volatile if already defined.
3860 Reported by Rene' Seindal.
3862 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
3864 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3865 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3867 Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
3869 * m4.h: Define strchr and strrchr in terms of index and rindex,
3870 instead of the other way around.
3871 * builtin.c, m4.c, path.c: Use strchr instead of index.
3873 * input.c (next_char): Remove a "break;" after a "return ...;".
3874 Reported by Tom McConnell.
3876 Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
3880 * configure.in: Do not copy check files in the build hierarchy.
3881 * checks/check-them: Identify the m4 version being checked. For
3882 finding m4, look in $PATH instead of in the parent directory.
3883 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3884 * checks/Makefile.in (.all-stamp): Always create check files in
3885 the source hierarchy, not anymore in the build hierarchy.
3886 (check): cd to the source hierarchy before performing checks.
3887 Do not copy nor clean COPYING anymore, take it from `..'.
3888 Reported by Tom McConnell.
3890 * Makefile.in (Makefile): Use $(SHELL).
3891 (config.status): Use $(SHELL). Use "config.status --recheck"
3892 instead of "configure --no-create", which is obsolete.
3893 Reported by Tom McConnell.
3895 Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
3897 * m4.c (usage): Use "%s" instead of "m4" in format string.
3898 Reported by Jim Meyering.
3900 * Makefile.in: Distribute mkinstalldirs.
3901 Reported by Pierre Gaumond.
3902 Reported by Jim Meyering.
3903 Reported by Tom McConnell.
3904 Reported by Andreas Gustafsson.
3906 * checks/check-them: Renamed from checks/check_them.
3907 * checks/get-them: Renamed from checks/get_them.
3908 * checks/.all-stamp: Renamed from checks/.all_stamp.
3909 * checks/Makefile.in: Changed accordingly.
3910 Reported by Jim Meyering.
3912 Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
3914 * lib/Makefile.in (dist): Correct permissions on files.
3916 * output.c: Declare tmpfile, some systems don't.
3918 Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
3920 * checks/Makefile.in (dist): Correct permissions on files.
3922 * Makefile.in (dist): Ensure recursive linking for subdirectory
3923 `examples', also set read/write permissions on all its files.
3925 * mkinstalldirs: New, from elsewhere.
3926 * Makefile.in: Use it.
3928 * debug.c: Synchronize debug messages and regular output when
3929 the debug file and stdout are redirected to the same file.
3930 * configure.in: Add (commented) checks for fileno and fstat.
3931 Reported by Jim Avera.
3933 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3934 etc., arguments, then ignore the superfluous one. m4 used to
3935 diagnose missing arguments and return the empty string.
3936 Reported by Nick S. Kanakakorn.
3938 Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
3940 * m4.c (main): At end of all input, ensure all undiverted text
3941 goes to the main output stream.
3942 Reported by Andreas Gustafsson.
3944 * m4.c (main): exit (0), instead of return 0.
3946 * m4.c: Implement -P and --prefix-builtins.
3947 * builtin.c: Delete const specifier on builtin_tab.
3948 (prefix_all_builtins): New.
3949 Reported by Noah Friedman.
3950 Reported by Scott Bartram.
3952 * c-boxes.el: New, from elsewhere.
3953 * Makefile.in: Distribute it.
3955 * m4.h: Do not define bcopy if <string.h> defines it.
3956 Reported by Stephen Perkins.
3958 * builtin.c (define_macro): Allow a missing second argument, in
3959 which case it is implied empty. Affects define and pushdef.
3960 Reported by Eric Allman.
3962 Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
3964 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3965 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3966 * builtin.c: Initialize all the blindness fields in builtin_tab.
3967 (define_builtin): Copy the blindness of a builtin into its symbol.
3968 * macro.c (expand_token): Avoid processing a blind builtin if the
3969 next character is not an opening parenthesis.
3970 Reported by David MacKenzie.
3971 Reported by Noah Friedman.
3973 * configure.in: Ensure an exit status of 0 on completion.
3974 Reported by Vivek P. Singhal.
3976 * eval.c (eval_lex): Admit both lower and upper case letters for
3977 bases greater than 10. Only lower case letters were accepted.
3979 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3980 Reported by Krste Asanovic.
3982 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
3983 * eval.c (logical_not_term): New name for not_term.
3984 * eval.c (xor_term): New, between or_term and and_term.
3985 * eval.c (not_term): New, between and_term and logical_not_term.
3986 * eval.c (shift_term): New, between cmp_term and add_term.
3987 Reported by Krste Asanovic: ~, ^, <<, >>.
3988 Reported by Ben A. Mesander: ** vs ^.
3990 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3991 * m4.h: Delete xrealloc.c.
3992 * lib/xmalloc.c: New, from elsewhere.
3993 * lib/xstrdup.c: New, from elsewhere.
3994 * lib/Makefile.in: Distribute and compile them.
3996 * m4.c: Change progname to program_name.
3997 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3998 * lib/error.c: New, from elsewhere.
3999 * lib/Makefile.in: Distribute and compile error.c.
4000 * configure.in: Check AC_VPRINTF and for strerror.
4001 * m4.c: Delete cmd_error. Use error instead.
4002 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
4004 * m4.h: Delete #define const, let Autoconf takes care of this.
4006 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
4007 Merge parse_args into main. Declare argv to be `char *const *',
4008 then remove superfluous casts.
4010 * m4.c: Rename --no-gnu-extensions to --traditional.
4011 Reported by Ben A. Mesander.
4013 * m4.c (usage): Add a status parameter. Supply one in various
4014 calls. Add --help processing. Remove -V for --version.
4016 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
4018 * lib/Makefile.in: Have an AR=ar declaration.
4019 Reported by Eric Backus.
4020 Reported by Bjorn R. Bjornsson.
4021 Reported by Tom Tromey.
4022 Reported by Kristine Lund.
4023 Reported by Marion Hakanson.
4025 Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
4027 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
4028 Reported by Noah Friedman.
4030 Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
4032 * Makefile.in: Remove MDEFINES and cleanup.
4034 Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
4036 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
4039 Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
4041 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
4042 ensure 777 mode for directories, so older tar's will restore file
4045 Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
4047 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
4048 so the installer can override automatically configured choices.
4049 Reported by Karl Berry.
4051 Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
4053 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
4054 previous version was not working properly on m68k-hp-bsd4.3.
4055 Reported by Roland McGrath.
4057 * lib/_doprnt.c: Stolen from Oleo distribution.
4058 * configure.in: Check for _doprnt.c if vfprintf.c selected.
4059 * lib/Makefile.in: Distribute _doprnt.c.
4060 Do not distribute regex.[ch].old anymore.
4062 Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
4064 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
4065 Richard wants it there.
4067 Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
4069 * Makefile.in: Add DEFS to MDEFINES.
4070 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
4071 (libm4.a): Remove the library before creating it.
4072 (distclean): Remove tags and TAGS too.
4074 Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
4076 * Makefile.in (dvi, m4.dvi): New goals.
4078 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
4079 macro.c, output.c, path.c, symtab.c: Change Copyright from
4080 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
4082 * examples/divert.m4: Deleted, this bug has been corrected.
4084 * Makefile.in (texclean, mostlyclean): New goals.
4086 * Makefile.in (clean): Remove clutter from ansi2knr.
4087 Reported by Pierre Gaumond.
4088 Reported by Greg A. Woods.
4090 Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
4092 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
4093 might well use CFLAGS is s/he needs it.
4095 * Makefile.in: Allow installation of info files from a separate
4097 Reported by Jason Merrill.
4098 Reported by David MacKenzie.
4099 Reported by Skip Montanaro.
4100 Reported by Erez Zadok.
4101 Reported by Assar Westerlund.
4103 Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
4106 This is still a beta release for the future GNU m4 version 1.1.
4108 * lib/alloca.c: New, from elsewhere.
4109 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
4111 * m4.h: Do not define index/rindex if already defined. If
4112 FALSE/TRUE are already defined, do not redefine them, but merely
4113 define boolean typedef to int.
4115 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
4116 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
4117 because some C compilers do not like connectives with #ifdef.
4118 * m4.h: Define `volatile' only if __GNUC__, instead of once for
4119 __GNUC__ and once for __STDC__.
4120 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
4122 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
4123 Makefile dependencies. Without it, make keeps destroying and
4124 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
4126 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
4127 to diversion/DIVERSION, this was a spelling error.
4129 * m4.c: Declare version[], remove #include "version.h".
4130 * version.h: Deleted.
4131 * Makefile.in: Remove references to version.h.
4133 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
4134 production, by using a simpler and more robust algorithm. This
4135 solves the problem of synclines sometimes written in the middle of
4136 an output line. Delete sync_line() and output_lines variable.
4137 * m4.h: Remove sync_line prototype and output_lines declaration.
4138 * input.c (next_char), output.c (shipout_text): Remove references
4140 * input.c (push_file, pop_file): Merely put the value -1 in
4141 output_current_line instead of calling sync_line, for delaying a
4142 single `#line NUM FILE' before next output line. Do not test
4143 for sync_output, because this is unnecessary clutter.
4144 * output.c (make_divertion, insert_divertion): Idem.
4145 * input.c: Rename must_advance_line to start_of_input_line, for
4148 * debug.c (trace_header): Select a new debug line format, which
4149 better complies with GNU standards for formatting error messages.
4150 With option `-dfl', M-x next-error might be used on the output.
4151 * m4.c (vmesg): Adjust format of error output to GNU standards.
4152 * m4.texinfo: Adjust examples for `make check' to work.
4154 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
4155 case for enum debug_info constants, which were all lower case.
4157 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
4159 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
4160 collected patches. I tried a few times using newer regex.[ch], it
4161 mysteriously stopped aborting with this one. Insecure feeling...
4162 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
4164 Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
4166 * m4.c: Change `--no-warnings' to `--silent'.
4167 Reported by David MacKenzie.
4169 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
4170 leave it off for now. See comment in m4.c for justification.
4171 Reported by David MacKenzie.
4173 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
4174 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
4176 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
4178 * Makefile.in: Ensure recursive cleaning is done before local
4179 cleaning for all clean goals.
4181 * builtin.c (ntoa): Ensure the value is always interpreted as a
4182 signed quantity, whatever the radix is.
4184 Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
4186 * builtin.c, format.c, input.c: Split long lines.
4187 * m4.c: Use typedef macro_definition instead of struct
4189 * symtab.c: Use typedef symbol instead of struct symbol.
4191 Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
4193 * *.[ch]: Remove all trailing whitespace, in code and comments.
4195 * configure.in: Find some awk.
4196 * Makefile.in: Add $(AWK) to MDEFINES.
4197 * checks/Makefile.in: Transmit $(AWK) to get_them.
4198 * checks/get_them: Use $AWK instead of gawk. Add a close in the
4199 awk script when switching files, because without this, mawk runs
4200 out of file descriptors.
4202 Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
4204 * Makefile.in (realclean): Delete m4.info*.
4205 Reported by Jim Meyering.
4207 * Makefile.in: Adjust and link with checks/Makefile.
4208 * checks/Makefile.in: New.
4209 * configure.in: Output checks/Makefile.
4211 * checks/get_them: Have the dnl header of each test more
4212 recognizable by next-error, also use a better message.
4214 Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
4216 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
4217 And use that only if __GNUC__ since we're using it's GCC-specific
4218 semantics that tell the compiler the associated function doesn't
4221 * builtin.c (substitute): Don't use character as an array index.
4222 (dumpdef_cmp): Make formal arguments `const void *' to avoid
4223 warnings with gcc -W -Wall on systems with qsort prototype.
4224 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
4227 * eval.c (most functions): Add parentheses to assignments used
4228 as truth values go avoid warnings from gcc -Wall.
4230 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
4231 any functions that don't need external scope.
4233 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
4234 (many functions and arrays): Declare `const'.
4236 Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
4238 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
4239 removing the declaration from m4.h. Also rename false to FALSE
4242 * lib/Makefile.in (Makefile): New goal.
4244 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
4245 so heavily loaded. It gets more easily overridable, calling make.
4246 Reported by Jim Meyering.
4248 * Makefile.in (dist): Get .fname from the current directory name,
4249 instead of from version.h. I need updating many files manually,
4250 when the version changes, version.h is just one of them.
4252 Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
4254 * m4.h: Remove the tag `boolean' on the enum introducing typedef
4255 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
4256 Reported by Tom McConnell.
4258 Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
4260 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
4261 39.cleardiv, which were describing missing or spurious newlines.
4262 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
4263 do not depend on machine word size, `/bin/false' implementation,
4264 or `wc' output format. `make check' is more dependable, now.
4266 * checks/check_them: Summarize the failed tests by listing their
4267 name, at end. If none, issue `All checks successful'. Output
4268 `Checking' instead of `Input file:'.
4270 * checks/get_them, checks/check_them: Reindented.
4272 * Makefile.in (dist): chmod a+r before making the tar file.
4274 Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
4276 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
4278 * input.c (next_token): Reinitialize token_buttom just after using
4279 it as a watermark with obstack_free. Or else, a future token, big
4280 enough for triggering reallocation of the obstack chunk, could
4281 void the initialized value of token_buttom, later causing panic in
4282 obstack_free. Rename token_buttom to token_bottom everywhere.
4284 * m4.h: Before declaring errno, first include <errno.h> and
4285 ensure that it does not define errno.
4286 Reported by Richard Stallman.
4288 Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
4290 * builtin.c: Define and use DECLARE macro for builtins.
4292 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
4293 argument, this is a common idiom for introducing long comments.
4295 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
4296 arguments. The last argument was silently ignored.
4298 * m4.c (cmd_error): Add a missing semicolon before va_end().
4300 Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
4302 * Makefile.in: Now handle protoized sources. Define and use U.
4303 Compile and use ansi2knr with old compilers. Update DISTFILES.
4304 Add `aclocal.m4' to `configure' dependencies.
4305 * ansi2knr.c: New, from Ghostscript distribution.
4306 * configure.in: Define U through FP_PROTOTYPES for old compilers.
4307 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
4308 * aclocal.m4: New, provide FP_PROTOTYPES.
4309 * m4.h: Conditionnaly protoized through Args, save for varags.
4310 * builtin.c: Protoized. Then:
4311 Include <sys/types.h> if size_t is not defined, before "regex.h".
4312 (m4_ifelse): Fetch built-in name properly for diagnostic.
4313 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
4314 (m4_regexp): Add const to `msg' declaration.
4315 (m4_patsubst): Add const to `msg' declaration.
4316 * debug.c: Protoized, save for varargs.
4317 * eval.c: Protoized.
4318 * format.c: Protoized.
4319 * input.c: Protoized.
4320 * m4.c: Protoized, save for varargs. Then:
4321 (xfree): Accept void * instead of char *.
4322 (xmalloc): Return void * instead of char *.
4323 (xrealloc): Accept and return void * instead of char *.
4324 * macro.c: Protoized.
4325 * output.c: Protoized.
4326 * path.c: Protoized. Then cast some (char *) over xmalloc's.
4327 * symtab.c: Protoized.
4329 Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
4331 * m4.texinfo: Remove directory from diagnostics in 30.include,
4332 51.eval, 56.errprint and 57.m4exit tests.
4334 * m4.h: Remove declarations for int or void system functions, they
4335 cause more conflicting trouble than they make good.
4337 * configure.in: Avoid configuration header file. Add some tests.
4338 * m4.h: Remove #include "config.h".
4339 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
4340 Then, rewritten for better compliance with GNU standards.
4342 Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
4344 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
4345 because of a misplaced #endif.
4347 * Many *.[hc] files: Correct intra-line spacing here and there,
4348 according to GNU indent 1.6 advice.
4350 * configure.in: New, using Autoconf 1.2.
4351 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
4352 * Delete old configure.in, configure, etc/configure.in,
4353 etc/configure, lib/configure.in, lib/configure and config/*.
4354 Reported by Jason Merrill.
4356 * symtab.c (hash): Change (char) NULL to '\0'.
4357 Reported by Jason Merrill.
4359 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
4360 etc/nextvers.sh. Release numbers will be edited `by hand'.
4361 * version.h: De-automatize, force value in.
4363 * m4.c: Changes in order to use a newer getopt.h.
4364 Reported by David MacKenzie.
4366 * checks/: New name for examples/.
4367 * checks/get_them: New location for etc/get_examples.
4368 * checks/check_them: New location for etc/check_examples.
4369 * Makefile.in, checks/get_them, checks/check_them: Adjust.
4370 * lib/vfprintf.c: New location for etc/vfprintf.c.
4371 * Delete empty etc/.
4372 * examples/: New name for test/.
4374 Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
4376 * Makefile.in (check): Add m4 as dependency.
4378 * m4.c: Accept --no-warnings instead of --no_warnings, and
4379 --no-gnu-extensions instead of --no_gnu_extensions. Make the
4380 usage message more informative.
4381 Reported by David MacKenzie.
4383 Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
4385 * etc/check_examples: New name for check_examples.sh.
4386 * etc/get_examples: New name for get_examples.sh.
4387 * Makefile.in, etc/Makefile.in: Use new names.
4389 * Makefile.in: Transmit $(CC) while making in lib.
4391 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
4392 code disposition by hand.
4394 Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
4396 * m4.h: Delete definitions for abort() and exit().
4397 Reported by Richard Stallman.
4399 * config/hmake-unicos, config/s-unicos.h: New files.
4400 Reported by Hal Peterson.
4402 * eval.c (exp_term): Have N^0 return 1.
4403 Reported by Michael Fetterman.
4405 * eval.c, input.c, m4.h: Remove last comma in enums.
4406 Reported by Mike Lijewski.
4408 * Transfer of maintenance duties from Rene' to Franc,ois.
4410 Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
4412 * Release 1.0. Many thanks to those, who provided me with bug
4413 reports and feedback.
4415 * Uses GNU configure, taken from the gdb distribution.
4417 * Uses GNU getopt(), with long option names.
4419 * The -Q/+quiet option is added, which suppresses warnings about
4420 missing or superflous arguments to built-in macros.
4422 * Added default options via the M4OPTS environment variable.
4424 * The built-in format can now be configured to use sprintf as
4425 the formatting engine, for systems without [efg]cvt(3).
4427 * GNU library code is moved to the ./lib subdirectory; other
4428 utility files are now in ./etc.
4430 * Several minor bugs have been fixed.
4432 Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
4434 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
4435 Francois Pinard and Roland H. Pesch for providing me with reports.
4437 * The builtins incr and decr are now implemented without use of
4440 * The builtin indir is added, to allow for indirect macro calls
4441 (allows use of "illegal" macro names).
4443 * The debugging and tracing facilities has been enhanced
4444 considerably. See the manual for details.
4446 * The -tMACRO option is added, marks MACRO for tracing as soon
4449 * Builtins are traced after renaming iff they were before.
4451 * Named files can now be undiverted.
4453 * The -Nnum option can be used to increase the number of
4454 divertions available.
4456 * Calling changecom without arguments now disables all comment
4459 * The function m4_patsubst() is now consistently declared
4462 * A bug in dnl is fixed.
4464 * A bug in the multi-character quoting code is fixed.
4466 * Several typos in the manual has been corrected. More probably
4469 * The m4.info file is now installed along with the program.
4471 Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
4473 * Updated and enhanced version. Release 0.75, manual 0.07.
4475 * Implemented search path for include files (-I option and
4476 M4PATH envronment variable).
4478 * Implemented builtin "format" for printf-like formatting.
4480 * Implemented builtin "regexp" for searching for regular
4483 * Implemented builtin "patsubst" for substitution with regular
4486 * Implemented builtin "esyscmd", which expands to a shell
4489 * Implemented "__file__" and "__line__" for use in error
4492 * Implemented character ranges in "translit".
4494 * Implemented control over debugging output.
4496 * Implemented multi-character quotes.
4498 * Implemented multi-character comment delimiters.
4500 * Changed predefined macro "gnu" to "__gnu__".
4502 * Changed predefined macro "unix" to "__unix__", when the -G
4503 option is not used. With -G, "unix" is still defined.
4505 * Changed "shift", "$@" and "$*" to not insert spaces afters
4508 * Added program name to error messages.
4510 * Fixed two missing null bytes bugs.
4512 Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
4514 * Initial beta release. Release 0.50, manual 0.05.
4522 Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
4523 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4525 Copying and distribution of this file, with or without
4526 modification, are permitted provided the copyright notice
4527 and this notice are preserved.