1 2006-07-19 Eric Blake <ebb9@byu.net>
3 * doc/m4.texinfo (copying): Relax restriction on front-cover and
6 2006-07-17 Eric Blake <ebb9@byu.net>
8 * src/format.c (format): Support F, g, and G specifiers.
9 * doc/m4.texinfo (Format): Document this.
10 * NEWS: Document this addition.
12 * doc/m4.texinfo (Builtin): Delete redundant text.
14 * configure.ac (AC_INIT): Bump version number.
15 * src/builtin.c (substitute): Bah. Fix buffer overrun.
16 * NEWS: Document this fix.
18 2006-07-15 Eric Blake <ebb9@byu.net>
22 * configure.ac (AC_INIT): Bump version number.
23 * NEWS: Describe changes since 1.4.4.
25 * src/m4.c (usage): Document exit status.
26 * doc/m4.texinfo: Use `exit status', not `exit code'.
27 (Invoking m4): Document exit status.
29 * bootstrap: Backport --help, --version from head.
30 (func_update): New function, for easily grabbing up-to-date files
32 * Makefile.maint (web-manual): Fix for VPATH builds.
34 2006-07-14 Eric Blake <ebb9@byu.net>
36 * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
37 looks bad in info. Use @deffn rather than @example for
38 describing prototypes. Fix awkward wording and grammar.
40 * src/builtin.c (substitute): Warn on bad escape sequences.
41 Ignore trailing backslash.
42 * doc/m4.texinfo (Regexp): Add documentation for this.
43 * NEWS: Document this change.
45 * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
46 * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
48 (Dnl): Update example to show side effects.
49 * checks/get-them: Generate three digit test names.
50 * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
52 2006-07-13 Eric Blake <ebb9@byu.net>
54 * src/input.c (input_init): Simplify.
55 (set_word_regexp): Treat empty string as default, since empty
56 regexp would disable word parsing.
57 * src/m4.c (user_word_regexp): Default to empty string.
58 * src/builtin.c (builtin_tab): Make changeword blind.
59 * doc/m4.texinfo (Changeword): Document this.
60 * NEWS: Document this.
61 * TODO: Knock off completed items.
63 * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
65 * doc/m4.texinfo (Undefine, Pushdef): Test this.
66 * NEWS: Document this change.
68 * src/builtin.c (numeric_arg): Treat empty string as 0, with a
69 warning. Detect quoted leading space and overflow as warnings.
70 (m4_eval): Treat empty radix as 10, and allow output in radix 1.
71 Treat width as minimum number of digits, as required by POSIX.
72 (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
74 (m4_substr): Likewise. Silently treat empty start as 0.
75 (m4_undivert): Treat ` 1a' as file, not diversion 1.
76 * src/eval.c (eval_lex): Parse radix 1 numbers.
77 * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
79 (Manual): Document behavior of numeric parsing of empty string.
80 (Divert, Incr): Document error handling.
81 (Eval): Document radices better.
82 (Incompatibilities): Document translit incompatibility.
83 * NEWS: Document these changes.
85 * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
86 (web-manual): Simplify.
87 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
88 * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
89 (MAINTAINERCLEANFILES): Clean it as well.
90 * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
91 (MAINTAINERCLEANFILES): Clean it as well.
93 2006-07-12 Eric Blake <ebb9@byu.net>
95 * doc/m4.texinfo (Extensions): Document how to overcome
96 implementation difference in > 9 positional parameters.
98 * src/m4.c (usage): Sort within sections.
99 (nesting_limit): Raise default from 250 to 1024.
100 * doc/m4.texinfo: Use file name, not filename, per GNU coding
101 standard. Use @option where appropriate.
102 (Invoking m4): Sort to match --help output.
103 (Debug Levels): Sort.
104 (Frozen files): Sort and break into two nodes.
106 * src/m4.c (nesting_limit): Raise default from 250 to 1024.
107 * NEWS: Document raised -L limit.
109 2006-07-11 Eric Blake <ebb9@byu.net>
111 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
112 stress-test changeword before a release.
113 * doc/m4.texinfo: More doc cleanups.
114 (Copying This Manual): New node; actually include the FDL in the
116 * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
117 * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
118 * NEWS: Mention documentation improvements.
120 * src/m4.h (OS2): New platform macro.
121 * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
123 * doc/m4.texinfo (Platform macros): Document it.
124 (Sysval): Remove non-portable test of system("").
125 * NEWS: Document this change.
126 Reported by Andreas Buening.
128 2006-07-09 Eric Blake <ebb9@byu.net>
130 * doc/m4.texinfo (Undivert): Fix typo in last commit.
131 * src/m4.c (usage): Document M4PATH.
132 * src/path.c (path_search): Reject empty string.
133 * src/output.c (insert_diversion): Ignore diversion 0.
134 * src/builtin.c (m4_undivert): Ignore empty string.
135 * NEWS: Document this fix.
137 2006-07-08 Eric Blake <ebb9@byu.net>
139 * checks/get-them: Make filtering easier.
140 * checks/check-them: Filter non-input lines, so line counts are
141 more realistic in the documentation, and so changeword tests work
142 even when dnl is disabled.
143 * doc/m4.texinfo: Adjust example line numbers. Clean up
144 front-matter, following autoconf's example.
145 (Changeword): Enable tests, skipping if changeword not supported.
146 (Define, Defn, Ifelse): Backport more examples from head.
147 (Input processing, Answers): New nodes, backported from head.
148 (Include): Expand test to cover empty filename.
149 (Undivert): Add test of undivert(0).
151 2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
153 * doc/m4.texinfo: Fix spelling errors.
155 2006-07-07 Eric Blake <ebb9@byu.net>
159 * doc/Makefile.am (m4.1): No need to go through a temporary file;
160 this also ensures timestamps are updated.
161 * src/m4.h (includes): Require config.h. Assume string.h,
162 stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
163 than prototyping ourselves.
164 (builtin_func): Add parameter type-checking.
165 (voidstar): Delete, now that we assume C89.
166 * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
168 * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
171 2006-07-06 Eric Blake <ebb9@byu.net>
173 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
175 * src/m4.h (includes): Add binary-io.h for O_BINARY.
176 * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
177 #ifdef. Fixes patch from 2005-02-03 for cygwin.
178 * NEWS: Mention this fix.
180 * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
181 * src/builtin.c (m4_syscmd): Work around OS/2 bug.
183 * Makefile.am (SUBDIRS): Build . before src, so that autoheader
184 runs first when needed.
185 * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
186 once in srcdir rather than multiple times in VPATH builds.
188 2006-07-03 Eric Blake <ebb9@byu.net>
190 * checks/check-them: Use portable = in test.
191 * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
192 directory, as required by Solaris cc. Include built headers, as
193 required by Solaris make in VPATH build.
194 * checks/Makefile.in: Use $(srcdir) where needed.
195 (CHECKS): Factor $(srcdir) into macro.
196 (DISTFILES): Likewise. Automake takes care of distributing
199 (Makefile): Use modern syntax of config.status.
200 * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
201 Avoid overfull and underfull hboxes in dvi.
203 Fix 'make check' in VPATH build. All files included by testsuite
204 now live in a single directory. Use forloop.m4 in testsuite.
205 * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
207 * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
209 * checks/Makefile.in (DISTFILES): Don't distribute moved files.
210 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
211 * checks/check-them: Avoid s/// when filename is in pattern.
212 * examples/forloop.m4: Fix to match documentation.
213 * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
215 (Loops, Format): Actually use forloop.m4 in tests.
217 2006-07-02 Eric Blake <ebb9@byu.net>
219 * checks/Makefile.in (exec_prefix, prefix): New macros, so that
220 $(bindir) works in installcheck.
221 (check, installcheck): No longer change directory, so that
222 distcheck works with a read-only builddir.
223 * checks/check-them: Work when pwd is no longer builddir.
225 2006-07-01 Eric Blake <ebb9@byu.net>
227 * GNUmakefile: New file, borrowed from coreutils.
228 * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
229 * Makefile.maint (Makefile): Delete this rule, now that
230 GNUmakefile includes Makefile.
232 2006-06-30 Eric Blake <ebb9@byu.net>
234 For compatibility with other m4 implementations, sysval returns
235 signal<<8 rather than 0 if syscmd is terminated by a signal.
236 * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
237 * src/builtin.c (include): Include sys/wait.h when stdlib.h does
238 not provide wait macros.
239 (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
240 (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
241 (m4_esyscmd): Set sysval to -1 on failure.
242 (m4_sysval): Print 127 on failure, and accomodate signals if they
244 * NEWS: Document this change.
245 * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
247 * checks/check-them: Likewise.
248 * src/debug.c (debug_set_file): Work around mingw fstat bug.
250 * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
251 * src/freeze.c (produce_frozen_state): Use new spelling of
253 * src/builtin.c (predefined_tab): Add __windows__ on non-unix
255 (m4_syscmd, m4_esyscmd): The empty command is successful.
256 * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
257 Document platform-dependence of system().
258 (Syscmd): Add example.
259 (Esyscmd): Make example more robust, and actually demonstrate
261 (Sysval): Expand test to cover esyscmd code path, and to check
262 that empty command is successful. Add conditional check for
264 (Other Incompatibilities): Move platform macros from here...
265 (Platform macros): ...to this new node. Add windows macro.
266 Check that exactly one platform macro is provided.
267 * checks/check-them: Improve trap cleanup. Tolerate dirname and
268 .exe in error messages. Allow for skipping checks.
269 * configure.ac (HAVE_EFGCVT): Kill dead configure check.
270 * NEWS: Document platform macros.
272 2006-06-29 Eric Blake <ebb9@byu.net>
274 Fix buffer overrun bug.
275 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
277 * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
278 variant instead, since [efg]cvt are obsolete and our use of them
279 was buggy (savannah sr #104303).
280 (format): Fix buffer overflow by using xasprintf.
281 * doc/m4.texinfo (Format): Expand format test to catch both bugs.
282 * NEWS: Document this fix.
284 * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
286 (AC_CACHE_CHECK): Cache search for ecvt.
288 2006-06-27 Eric Blake <ebb9@byu.net>
290 * doc/m4.texinfo (Eval): Document 32-bit signed limitations
291 required by POSIX, and add example that exposed core dump on x86
293 (Incompatibilities): Document incompatibility in eval precedence.
294 * src/eval.c (shift_term): Explicitly mask, to avoid undefined
296 (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
297 * NEWS: Document this change.
299 * doc/m4.texinfo: Use @noindent consistently.
300 (Quoting Arguments): Document that unquoted parentheses group
302 (Pseudo Arguments): Expand tests to show this.
303 (Incompatibilities): Contrast traditional behavior of
306 2006-06-24 Eric Blake <ebb9@byu.net>
308 * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
309 (AC_CHECK_HEADERS_ONCE): Use this new feature.
310 (AC_CHECK_FUNCS_ONCE): Likewise.
312 2006-06-23 Eric Blake <ebb9@byu.net>
314 * doc/m4.texinfo: Quoting cleanup throughout - follow
315 autoconf-recommended style of one level of quote per parenthesis
316 in the normal case. Adjust error messages to match GNU coding
317 standards (and to allow 'make check' to pass again).
318 (Quoted strings, Inhibiting Invocation): Turn more examples into
320 (Comments): Resolve FIXME by adding example.
321 (Define): Add example about underquoting.
322 (Defn): Add example about use of $0.
323 (Indir, Format): Resolve FIXME done in last commit.
324 (Ifelse): Add example about creating blind macro.
325 (Debugging): Fix grammar.
326 (Dnl): Add example about dnl with arguments.
327 (M4wrap): Be explicit that LIFO order is non compliant, and will
329 (Undivert): Resolve FIXME by adding example.
330 (Frozen files): Document that m4wrap and sysval will not work
331 consistently until m4 2.0.
332 (Incompatibilities): Document another POSIX compliance bug, this
333 time with changequote. Document a traditional incompatibility
334 with partial input spanning file boundaries.
336 Make error messages more consistent with GNU coding standards -
337 start with lower case, and don't end sentence with punctuation.
338 * src/debug.c (trace_pre): Update message wording.
339 * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
341 * src/freeze.c (produce_frozen_state, issue_expect_message),
342 (reload_frozen_state): Likewise.
343 * src/input.c (push_string_init, pop_init, init_macro_token),
344 (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
345 * src/m4.c (stackovf_handler, main): Likewise.
346 * src/macro.c (expand_token, expand_argument, call_macro),
347 (expand_macro): Likewise.
348 * src/output.c (make_room_for, output_text, insert_file),
349 (freeze_diversions): Likewise.
350 * src/symtab.c (symtab_init, lookup_symbol): Likewise.
352 * src/builtin.c (builtin_tab): Make format and indir blind.
353 (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
354 * NEWS: Mention the change to builtins.
356 2006-06-22 Eric Blake <ebb9@byu.net>
358 Robustify frozen file format.
359 * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
360 macro. Require V first, and only accept it once. For F, use
361 placeholder if builtin is not found, rather than warning.
362 * src/m4.h (m4_placeholder): New prototype.
363 * src/builtin.c: Unify error message style.
364 (m4_placeholder): New function, warn if invoked.
365 (builtin_tab): Add m4_placeholder.
366 (m4_defn): Warn if placeholder is encountered.
367 (find_builtin_by_addr): Handle placeholder.
368 (find_builtin_by_name): Return placeholder on failure.
369 (m4_builtin): Treat placeholder as undefined.
370 * doc/m4.texinfo (Frozen files): Document changes in V and F.
371 * NEWS: Document this change.
372 Reported by Bruno Haible.
374 * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
375 (tabchar): New macro, so that 'make check' still works.
376 (Invoking m4): Document that ignored compatibility options -B, -S,
377 and -T each consume an argument.
378 * checks/get-them: Honor @tabchar{}.
380 Avoid compiler warnings during -DDEBUG.
381 * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
382 [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
383 * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
384 (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
385 (next_token) [DEBUG_INPUT]: Print before returning.
386 * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
387 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
389 Avoid mkstemp bugs on various platforms.
390 * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
391 * src/output.c [! HAVE_MKSTEMP]: Delete.
392 * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
393 * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
394 * NEWS: Document this.
396 * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
397 Reported by Bruno Haible.
399 2006-06-21 Eric Blake <ebb9@byu.net>
401 Avoid obsolete sigstack when POSIX sigaltstack is available.
402 * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
404 * configure.ac (AC_CHECK_HEADERS): Likewise.
405 (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
406 obsolete and most hosts now have it in signal.h.
407 (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
408 (AC_CACHE_CHECK): Cache decision to use stackovf.
409 (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
410 * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
411 (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
413 (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
414 in case of dereferencing a member of a NULL pointer.
415 (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
417 (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
418 EXIT_FAILURE in error, indent preprocessor directives.
419 [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
421 [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
422 Reported by Santiago Vila.
424 2006-06-19 Eric Blake <ebb9@byu.net>
428 2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
430 * checks/Makefile.in (PATH_SEPARATOR): New macro.
431 (check, installcheck): Use it, for OS/2.
433 2006-06-18 Eric Blake <ebb9@byu.net>
435 Consistently use "GNU M4" as package name, "m4" as executable
437 * NEWS: Document previous fix.
439 * README: Fix grammar. Document that --enable-changeword is on
441 * doc/m4.texinfo (Top, Changeword): Likewise.
442 (Sysval): Enhance this test.
443 (History): Backport this section from CVS head, and update.
445 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
446 Eric Blake <ebb9@byu.net>
448 * src/builtin.c (WEXITSTATUS): Provide fallback definition.
449 (m4_esyscmd): Set sysval to 0xffff, to accomodate both
450 big-endian and little-endian wait status definitions.
451 (m4_sysval): Use WEXITSTATUS.
452 Reported by Andreas Buening.
454 2006-06-18 Eric Blake <ebb9@byu.net>
456 * configure.ac (AC_INIT): Bump version number.
457 * NEWS: Describe changes in 1.4.4c.
459 2006-06-17 Eric Blake <ebb9@byu.net>
463 * configure.ac (AC_INIT): Bump version number.
464 * NEWS: Describe changes since 1.4.4.
465 * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
467 * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
469 * checks/Makefile.in (maintainer-clean): Add missing target.
470 * COPYING: Remove generated file from CVS.
472 2006-06-16 Eric Blake <ebb9@byu.net>
474 * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
476 2006-06-15 Eric Blake <ebb9@byu.net>
478 * checks/wrapfifo.m4: New file. Use it...
479 * doc/m4.texinfo (Incompatibilities): here, in a new test case to
480 demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
482 * src/m4.h (to_uchar): New function.
483 * src/eval.c (eval_lex): Use it to avoid passing signed char to
484 isdigit, isalpha, isupper, islower, isspace, isalnum.
485 * src/builtin.c (expand_user_macro): Likewise.
486 * src/format.c (format): Likewise.
487 * src/macro.c (expand_argument): Likewise.
488 * NEWS: Document this security fix.
491 * src/symtab.c (lookup_symbol): Use invalid, not illegal.
492 * src/freeze.c (reload_frozen_state): Fix typo in message.
493 (produce_frozen_state): Standardize on builtin, not built-in.
494 * src/builtin.c (numeric_arg, bad_argc): Likewise.
496 * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
497 (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
498 (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
500 * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
501 * m4/gnulib-cache.m4: New file, from gnulib.
502 * bootstrap: Invoke gnulib-tool --update.
503 * src/m4.c (main): Cast away const.
504 * NEWS: Document that regex is updated.
507 2006-06-08 Eric Blake <ebb9@byu.net>
509 * configure.ac (changeword): Work even when changeword is not a
511 (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
512 Delete; now done by automake.
513 (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
515 2006-06-07 Eric Blake <ebb9@byu.net>
517 * lib/regex.c (bcmp_translate): Canonicalize type name.
518 * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
519 * configure.ac (changeword): Disable changeword for the creation
520 of configure, in case of bootstrapping with an m4 configured with
523 Distribute a rudimentary man page.
524 * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
526 * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
527 (SUFFIXES, m4.1): New macros and rules to build m4.1.
529 2006-06-06 Eric Blake <ebb9@byu.net>
531 * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
532 compiler warnings at -O2.
533 * lib/getopt.c (_getopt_internal): Likewise.
535 Cleanup of previous patches.
536 * src/input.c (struct input_block): Remove traced member.
537 (push_macro, init_macro_token): Don't pass trace status around.
538 * src/m4.h (struct token_data): Remove traced member.
539 (struct symbol, struct builtin): Reduce unused space.
540 (TOKEN_DATA_FUNC): Simplify.
541 (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
542 (push_macro, define_builtin): Remove unused parameter.
543 * src/builtin.c (define_builtin, builtin_init, define_macro),
544 (m4_defn): Don't pass trace status around.
545 * src/macro.c (expand_argument): Likewise.
546 * src/freeze.c (reload_frozen_state): Likewise.
547 * src/symtab.c: Whitespace cleanup.
548 * NEWS: Clean up wording.
549 * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
550 ensure tests actually expose bugs prior to today's patches.
552 Trace status of builtins is no longer inherited across
553 define(...,defn(...)). Fixes bug that autom4te had been working
555 * src/builtin.c (define_builtin): Don't override trace status.
556 * doc/m4.texinfo (Trace): Add test for this.
557 * NEWS: Document this.
559 When changing macro definitions inside the arguments to the macro,
560 consistently preserve the old definition that was in effect before
561 argument collection, similar to the C pre-processor.
562 Reported by John Brzustowski.
563 * NEWS: Document this change.
564 * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
565 this policy, and add tests that expose core dumps prior to this
567 * src/m4.h (struct symbol): New members to track when a symbol is
568 still in use after removal from the symbol table.
569 (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
570 (free_symbol): Prototype.
571 * src/macro.c (expand_macro): Track pending expansions of a
572 symbol. On completion, if a symbol is deleted and no longer
573 pending, free its memory.
574 * src/symtab.c (free_symbol): Export. Don't free memory if symbol
576 (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
578 (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
579 in use as deleted and remove from the table without freeing
581 (symtab_print_list) [DEBUG_SYM]: More debug output.
583 * src/symtab.c (hack_all_symbols): Allow certain modifications of
584 the symbol table during traversal.
585 * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
586 SYMBOL_POPDEF, since only the latter is safe with
589 Solve crash when passing "indir(`foo')" to "m4 -tfoo".
590 * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
591 Preserve placeholder when macro is being traced.
592 * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
593 symbol is not defined.
594 (set_trace): Remove placeholder when no longer traced.
595 (m4_traceon): On named traces, always reserve a slot in the
597 (m4_traceoff): Don't warn about untracing a nonexistent symbol.
598 * NEWS: Document new trace behavior.
599 * doc/m4.texinfo (Trace): Tracing by name now consistently works
600 no matter whether that macro is currently defined.
601 (Incompatibilities): Document differences between traditional and
604 2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
605 Eric Blake <ebb9@byu.net>
607 * src/m4.h (hash_table_size): Now size_t instead of int.
608 * src/m4.c (hash_table_size): Likewise.
609 (main): Adjust to this; use atol rather than atoi.
610 * src/symtab.c: Include <limits.h>, for CHAR_BIT.
611 (symtab_init, lookup_symbol, hack_all_symbols):
612 Use size_t for sizes and indexes, not int.
613 (symtab_print_list) [DEBUG_SYM]: Likewise.
614 (hash): Likewise. Don't case-fold in the hash function.
615 Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
616 Don't assume hash word is 32 bits.
617 NEWS: Document this change.
619 2006-06-04 Eric Blake <ebb9@byu.net>
621 * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
622 to allow compilation, for use in debugger.
623 (profiles, current_mode) [DEBUG_SYM]: New variables.
624 (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
625 determining hash table performance.
627 2006-05-31 Eric Blake <ebb9@byu.net>
628 John Brzustowski <jbrzusto@fastmail.fm>
630 * src/input.c (input_stack): Delete; use current_input instead.
631 (wrapup_stack): Dynamically allocate, so that recursion is handled
633 (push_wrapup): Use current wrapup stack.
634 (pop_wrapup): Rotate wrapup stack to current, and create new
636 (input_init): Dynamically allocate stacks.
637 * NEWS: Update, now that recursive m4wrap can no longer cause
640 2006-05-31 Eric Blake <ebb9@byu.net>
642 * lib/getopt.c: Fix copyright year.
643 * lib/obstack.c: Ditto.
644 * src/builtin.c: Ditto.
646 2006-05-30 Eric Blake <ebb9@byu.net>
648 * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
649 Reported by John Brzustowski.
650 (Incompatibilities): Document known POSIX incompatibilities.
653 2006-05-29 Eric Blake <ebb9@byu.net>
655 * doc/m4.texinfo (Maketemp): Work even when running 'make check'
659 * Makefile.am: New file.
660 * doc/Makefile.am: Ditto.
661 * examples/Makefile.am: Ditto.
662 * lib/Makefile.am: Ditto.
663 * src/Makefile.am: Ditto.
664 * acinclude.m4: New file, renamed from aclocal.m4.
665 * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
666 (AC_ARG_PROGRAM): Now redundant.
667 (STACKOVF): Turn into automake conditional.
668 (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
669 * checks/Makefile.in: Converting this dir to automake was not
670 trivial; for now, just add missing targets demanded by top-level.
671 * INSTALL: Remove files that are now generated from CVS.
672 * Makefile.in: Ditto.
675 * mkinstalldirs: Ditto.
676 * doc/Makefile.in: Ditto.
677 * doc/texinfo.tex: Ditto.
678 * examples/Makefile.in: Ditto.
679 * lib/Makefile.in: Ditto.
680 * src/Makefile.in: Ditto.
682 * AUTHORS: Backport from CVS head, and update.
683 * doc/m4.texinfo (Changeword): Fix examples to match behavior.
685 2006-05-27 Eric Blake <ebb9@byu.net>
687 * lib/regex.c (regex_compile): Kill compiler warnings.
688 * lib/getopt.c: Likewise.
689 * lib/obstack.c: Likewise.
690 * src/builtin.c (builtin_init): Likewise.
691 * src/path.c (path_search): Likewise.
693 * doc/m4.texinfo: Fix usage of a vs. an.
694 (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
695 overfull hbox warnings.
696 (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
698 * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
700 * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
701 (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
703 (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
704 * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
705 * src/Makefile.in: Delete remains of ansi2knr.
706 * src/ansi2knr.1: Delete.
707 * src/ansi2knr.c: Delete.
709 2006-05-25 Eric Blake <ebb9@byu.net>
711 * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
714 * doc/m4.texinfo (Francois): No longer needed as a tex variable.
715 Reported by Karl Berry.
717 2006-05-24 Eric Blake <ebb9@byu.net>
719 * Makefile.in (html): New target.
720 * doc/Makefile.in (html, m4.html): Likewise.
721 (MAKEINFOHTML): New macro.
722 * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
724 (Regexp) [ifhtml]: Make cross-reference to emacs manual an
726 Reported by Bob Badour.
728 * THANKS: Update. Move reporter's email addresses here, instead
731 2006-05-11 Eric Blake <ebb9@byu.net>
734 * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
735 patched on 2005-12-04.
736 Reported by Ilya N. Golubev.
738 * bootstrap: New file, so that generated files need not be stored
740 * Makefile.in (DISTFILES): Add bootstrap.
742 Make testsuite less sensitive to doc changes.
743 * doc/m4.texinfo: Use m4.input instead of filename.
744 * checks/check-them (xerr): Turn m4.input into filename.
745 * checks/Makefile.in (dist): Depend on stamp-checks.
747 Portability updates for OS/2.
748 * src/Makefile.in (EXEEXT, OBJEXT): Define.
751 * lib/Makefile.in (OBJEXT): Define.
753 * doc/Makefile.in (install, uninstall): Install info files into
755 Reported by Andreas Buening.
757 2006-05-09 Eric Blake <ebb9@byu.net>
759 * install-sh: Update to newer upstream version.
760 * mkinstalldirs: Likewise.
761 Reported by Andreas Buening.
763 * src/m4.c (main): Bump copyright year.
764 * Makefile.in (datarootdir): Define, for autoconf 2.59c.
765 * doc/Makefile.in (datarootdir): Likewise.
767 2006-05-08 Eric Blake <ebb9@byu.net>
770 * doc/m4.texinfo (Bugs): Backport bug email address from head.
771 Reported by Stepan Kasal.
773 2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
775 * input.c (match_input): Do not pass expression with side effect
776 to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
779 2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
781 * doc/m4.texinfo (How to debug macros and input): s/woould/would/
782 Reported by Damian Menscher.
784 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
786 * configure.ac (AC_INIT): Bump to 1.4.4a.
788 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
792 * configure.ac (AC_INIT): Bump to 1.4.4.
793 * NEWS: Describe 1.4.4's changes.
794 * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
796 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
798 * src/m4.c: fix return code when non-existent files are processed
800 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
802 * README: update email address for bug reports.
804 2005-10-17 Gary V. Vaughan <gary@gnu.org>
806 * doc/m4.info: Generated files are not kept in the repository.
808 2005-05-01 Gary V. Vaughan <gary@gnu.org>
810 The FSF are moving offices today. Changed their contact address
811 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
812 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
814 Also, some of the files here were never updated from the previous
815 '675 Mass Ave, Cambridge, MA 02139', so changed those to the
816 '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
818 2005-03-31 Mike Frysinger <vapier@gentoo.org>
820 * Makefile.in (bindir, infodir): Substitute from configure rather
822 * doc/Makefile.in (infodir): Ditto.
823 * src/Makefile.in (bindir): Ditto.
826 2005-03-31 Gary V. Vaughan <gary@gnu.org>
828 Changes needed to automate the release process for 1.4.3:
830 * Makefile.in (dist): Make .tar.bz2 tarball too.
831 * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
832 (cvs-news): Look 1 line further down for NEWS release number.
833 (cvs-dist): We don't use automake, so make dist is fine.
834 Remove double . before suffixes.
835 (cvs-release): Don't mention manual.html.
836 (fetch): Get latest gendocs files.
837 (web-manual): Rewritten to use gendoc for multiformat manuals.
838 * doc/gendocs.sh: Don't save an old version in m4 CVS!
839 * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
840 preserving, but case insensitive, so generating html docs per node
841 clashes between Index.html, the node file, and index.html, the
842 top-level of the document tree...
843 (Index macro): ...so renamed to this. Changed all references.
845 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
847 * configure.ac (AC_INIT): Bump to 1.4.3a.
849 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
853 * configure.in (AC_INIT): Bump to 1.4.3.
854 * NEWS: Describe 1.4.3's changes.
856 2005-03-31 Gary V. Vaughan <gary@gnu.org>
858 * Makefile.maint: New file with release rules, from CVS libtool.
859 * Makefile.in (DISTFILES): Add Makefile.maint.
860 * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
863 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
865 * doc/m4.texinfo (Patsubst): Re-add trailing space required by
866 checks/47.patsubst, with a redundant @comment to prevent emacs
867 from removing it accidentally again.
868 * checks/get-them: Allow for trailing spaces tucked behind
871 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
873 * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
874 * src/Makefile.in (install, uninstall): Likewise.
876 2005-02-07 Gary V. Vaughan <gary@gnu.org>
878 * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
880 Reported by Eric Blake.
882 2005-02-04 Gary V. Vaughan <gary@gnu.org>
884 * lib/regex.c, lib/regex.h: Updated from gnulib.
885 * src/input.c (set_word_regexp): Don't change the word_regexp
886 unless it compiles correctly.
888 Reported by Frank Schwidom.
890 * Makefile.in (stamp-h): Regenerate config.h properly.
892 2005-02-03 Gary V. Vaughan <gary@gnu.org>
894 * configure.ac (AC_DEFINE): Fix overquoting of description
897 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
899 * src/freeze.c (produce_frozen_state): Use \n line-endings even
900 on Windows, so that the frozen file reader will work.
901 Reported by Josef T. Burger.
903 * src/m4.c (main): Modernise the --version output.
905 2005-02-03 Gary V. Vaughan <gary@gnu.org>
907 Modernise the configury a little to prevent spurious errors from
908 Autoconf-2.59's autoreconf:
910 * config.h.in: Renamed to...
911 * config-h.in: ...this to better support DOS 8.3 file systems.
912 * acconfig.h: Removed.
913 * configure.in: Renamed to...
914 * configure.ac: ...this, and AC_DEFINE used to declare config.h
915 entry comments. Slight reorganisation and reformatting.
916 * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
918 (AC_INIT): Use a modern 3 argument call.
919 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
920 examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
922 * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
923 config.h.in. Added configure.ac, config-h.in.
924 (stamp-h.in): Removed acconfig.h from dependencies.
925 (configure): Depends on configure.ac, not configure.in.
926 * doc/Makefile.in (stamp-vti): Ditto.
927 * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
928 difference between PRODUCT="m4" and PACKAGE="GNU M4".
929 * configure: Regenerated.
931 2005-02-03 Noah Misch <noah@cs.caltech.edu>
933 * src/output.c (mkstemp): Make non-static, and build regardless of
934 HAVE_TMPFILE; src/builtin.c also needs this replacement.
937 2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
939 * configure.in (AC_CHECK_HEADERS): Commit works best when you save
940 changes from your editor buffer first.
942 * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
943 * src/m4.c: And include them as appropriate.
946 2004-09-09 Andreas Schwab <schwab@suse.de>
948 Refactoring of the string read case in next_char provides about a
949 20% speedup of M4 as typically used by autoconf:
951 * src/input.c (next_char_1): Renamed from next_char.
952 (next_char): New macro.
955 2004-08-21 Gary V. Vaughan <gary@gnu.org>
957 * configure.in (VERSION): Bump to 1.4.2a.
959 2004-08-19 Paul Eggert <eggert@twinsun.com>
963 * configure.in (VERSION): Bump to 1.4.2.
964 * News: Describe 1.4.2's changes.
966 * src/m4.c (reference_error): Preserve errno, since M4ERROR
968 * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
969 (m4_maketemp): Clear errno before calling mkstemp.
970 * src/path.c (path_search): Don't let "free" trash errno when
972 * src/output.c (insert_file): Don't assume errno has a valid
973 value simply because fread returns zero. This fixes a
974 portability bug reported by Marion Hakanson in
975 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
977 2004-06-09 Gary V. Vaughan <gary@gnu.org>
979 * configure.in (VERSION): Bump to 1.4.1a.
980 * NEWS: Place holder for next stable release.
982 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
986 * configure.in (VERSION): Bump to 1.4.1.
987 * NEWS: Describe 1.4.1's changes.
989 * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
990 pacify Autoconf 2.59.
992 * doc/m4.texinfo: Insert commas after @xref's that lack them,
993 to pacify Texinfo 4.7.
994 * doc/Makefile.in (info): Remove info-1, info-2, info-3.
996 * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
997 pacify Sun C compilers.
999 2003-09-28 Akim Demaille <akim@epita.fr>
1001 * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
1004 2003-09-03 Santiago Vila <sanvila@debian.org>
1006 * examples/stackovf.sh: Use tempfile if available.
1008 2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
1010 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
1011 * src/output.c (m4_insert_file): Do not mix buffered and
1012 unbuffered I/O, as this breaks on the Hurd. (trivial change)
1014 2001-02-01 Santiago Vila <sanvila@debian.org>
1016 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
1017 * src/m4.c (main): Fix format vulnerabilities. (trivial change)
1019 2001-02-01 Matt Kraai <kraai@debian.org>
1021 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
1022 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
1023 empty file rather than to a nonexistent file. This closes a common
1025 * src/builtin.c (m4_maketemp): Implement the above, by using
1026 mkstemp rather than mktemp. (trivial change)
1028 2000-01-09 Akim Demaille <demaille@inf.enst.fr>
1030 * src/builtin.c (expand_ranges): Added break after trailing dash.
1031 This caused misbehaviors on some systems.
1033 Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
1037 * doc/Makefile.in (realclean): Also remove stamp-vti.
1038 Reported by Eric Backus.
1040 Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
1042 * src/freeze.c (produce_frozen_state): If the frozen file cannot
1043 be opened, return immediately after producing the error message.
1044 Reported by Andreas Schwab.
1046 * configure.in: Check for const only after having found possible
1047 ANSIfying compiler flags, this is of no use to check it before.
1048 Reported by Alexander Lehmann.
1050 Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
1052 * src/macro.c (collect_arguments): Cast obstack arguments to
1053 (voidstar), so avoiding compiler warnings.
1054 Reported by Joseph E. Sacco.
1056 * src/freeze.c (produce_frozen_state): Cast printed lengths to
1057 (int) so they correspond to %d format items.
1058 Reported by Joseph E. Sacco.
1060 * src/m4.c (main): Cast the argument to xfree to (voidstar).
1061 * src/symtab.c (free_symbol): Idem.
1062 Reported by Karl Vogel.
1064 Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
1066 * Makefile.in (DISTFILES): Distribute BACKLOG.
1068 * configure.in: Define PRODUCT and VERSION.
1069 * acconfig.h: Document PRODUCT and VERSION.
1070 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
1071 constant string m4 and variable or parameter named version.
1073 Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
1075 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
1076 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
1077 defines __STDC__ to 0, for indicating it is *not* ANSI!
1078 Reported by Kaveh R. Ghazi.
1080 * configure.in: Added obsolescent tests for AIX and Minix.
1082 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
1083 which texclean does not exist anymore.
1084 Reported by Eric Backus, Jim Meyering, John David Anglin and
1087 Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
1089 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
1090 Reported by John David Anglin.
1092 * src/ansi2knr.c: New version, sent by Peter Deutsch.
1093 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
1094 ANSI2KNR, depending on the fact the compiler is ANSI or not.
1095 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
1096 Remove the sed filter after ansi2knr for debug.c. Use $O instead
1097 of $U, put underline in extensions rather than in basenames. Use
1098 implicit rules, now that regularity makes this possible.
1099 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
1100 of ansi2knr whenever it is needed.
1101 * configure.in: Adjusted for correct STACKOVF substitution.
1102 * src/debug.c (trace_format): When not __STDC__, use (...) as a
1103 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
1104 Reported by David MacKenzie.
1106 * Makefile.in: Remove binprefix. Use transform_name instead.
1107 Reported by David MacKenzie.
1109 * doc/Makefile.in: Create version.texi, use it, clean it.
1110 Reported by Jim Meyering.
1112 Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
1114 * Makefile.in (all, install, uninstall): Depend on Makefile.
1116 * Makefile.in: For actions invoking $(MAKE) from within compound
1117 sh statements, exit non-zero if the sub-make fails. Otherwise,
1118 the top-level make may exit successfully when it should fail.
1119 Reported by Jim Kingdon.
1121 * {,/*}Makefile.in: Use && after all cd, in case they fail.
1123 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
1124 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
1125 * configure.in: Substitute PRODUCT and VERSION.
1127 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
1129 Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
1131 * Makefile.in (mostlyclean-local): Do not remove *~.
1132 * */Makefile.in (mostlyclean): Idem.
1133 Reported by Robert E. Brown and Richard Stallman.
1135 Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
1137 * src/m4.h: Get rid of CONFIG_BROKETS.
1139 Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
1141 * configure.in: Use AC_ARG_PROGRAM.
1142 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
1143 Reported by David MacKenzie.
1145 Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
1147 * configure.in: Do not add -O to CFLAGS for GNU C, now that
1148 configure does it automatically.
1149 Reported by Jim Meyering.
1151 Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
1153 * src/stackovf.c: Declare the handler_t typedef earlier in the
1154 code, use it for stackovf_handler.
1155 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
1156 casting sigsegv_handler.
1157 Reported by Robert Bernstein.
1159 * src/m4.c (main): Initialize program_name to argv[0] without
1161 Reported by Karl Berry.
1163 Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
1165 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
1166 Reported by Karl Berry.
1168 Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
1170 * lib/Makefile.in (mostlyclean): Added.
1171 (TAGS): Make in $(srcdir).
1173 * configure.in: Use `choke me' in test, like everywhere!
1175 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
1176 unreacheable and useless.
1178 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
1180 * lib/Makefile.in (DISTFILES): Distribute TAGS.
1181 (distclean): Do not remove TAGS.
1182 (realclean): Remove it.
1183 * Makefile.in: Make TAGS in lib also, not just in src.
1184 Reported by Karl Berry.
1186 * Makefile.in (distclean, realclean): Instead of recursively
1187 calling $(MAKE) for the -local part, allow parallel execution of
1188 -recursive and -local, only delay the removal of config.status,
1189 which is repeated in both goals.
1191 Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
1195 * Makefile.in: Group all *clean-recursive goals in one, using sed
1196 to remove `-recursive' while calling make recursively. Also, use
1197 a subshell for each recursive $(MAKE).
1198 Reported by Jim Meyering.
1200 * src/m4.h (memcpy): Define with bcopy for BSD systems.
1201 Reported by Kaveh R. Ghazi.
1203 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
1204 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
1207 * configure.in: Use date instead of touch for stamp-h.
1208 * Makefile.in (stamp-h.in): Idem.
1210 * Makefile.in (distclean, realclean): Force serial execution of
1211 both goals, in case parallel makes are being used.
1212 Reported by Jim Meyering.
1214 * src/Makefile.in (DISTFILES): Distribute TAGS.
1215 (distclean): Do not remove TAGS.
1216 (realclean): Remove it.
1217 Reported by Karl Berry.
1219 Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
1221 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
1222 to old names, for following Autoconf.
1224 Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
1226 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
1227 ./install.sh will not be correctly referred to in sub-Makefiles.
1228 Reported by John David Anglin.
1230 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
1231 Reported by Eric Backus.
1233 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1234 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
1235 config.status into remaking this directory's Makefile only.
1236 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
1237 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
1238 Reported by Jim Meyering.
1240 Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
1242 * configure.in: Correct stack overflow detection logic, taking
1243 care of systems having only incomplete implementations (like for
1244 Pyramid 9820 OSx 5.0d).
1245 Reported by Kaveh R. Ghazi.
1247 * src/Makefile.in (TAGS): Remote -t from etags call.
1249 Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
1251 * lib/Makefile.in (install): Depend on all.
1253 Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
1255 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
1256 Reported by Jim Meyering and John David Anglin.
1258 * Makefile.in (distclean-local): Delete config.log.
1259 Reported by Jim Meyering.
1261 Solidify frozen files with respect to -P:
1262 * src/m4.c: Have -P set prefix_all_buitins variable instead of
1263 calling a function by that name. Declare the variable.
1264 * src/m4.h: Adjust declaration for prefix_all_buitins.
1265 * src/builtin.c (builtin_init): Merge in functionality from
1266 previous prefix_all_buitins function, while making entries in the
1267 symbol table, but not modifying the builtin description itself.
1269 * src/freeze.c (reload_frozen_state): Add a useless `break;',
1270 because *many* compilers do not accept an empty `default:'.
1271 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
1272 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
1274 * configure.in: Use AC_TYPE_SIGNAL.
1275 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
1276 Reported by Robert Bernstein.
1278 * checks/Makefile.in (check): Modify PATH so check-them will find
1279 m4 in the src directory.
1280 * Makefile.in (check): Don't.
1281 Reported by Akiko Matsushita and Jim Meyering.
1283 * src/output.c (make_room_for, output_character_helper): New
1284 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
1285 a per buffer MAXIMUM_BUFFER_SIZE.
1287 * src/output.c (output_text): New function, for optimizing the
1288 output of strings of characters. Use it.
1290 Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
1292 * doc, src: New directories reorganizing the distribution.
1293 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
1295 * Makefile.in: Adjusted.
1296 * configure.in: Configure new Makefiles.
1298 * m4.h: Declare STRING typedef. Use it for comment and quote
1299 strings, adjusting all references. (This is the rudiments of a
1300 beginning for the eventual withdrawal of NUL terminated strings.)
1301 * output.c (shipout_text): Accept a length parameter, and use it.
1302 All callers adjusted.
1304 Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
1306 * m4.h: Include <unistd.h> if it exists.
1307 * stackovf.c: Don't.
1309 Clean up for current_diversion variable:
1310 * output.c: Move current_diversion from builtin.c.
1311 * m4.h: Declare current_diversion so builtin.c can access it.
1312 * output.c (output_init, make_diversion): Initialize or update
1314 * builtin.c (builtin_init, m4_divert): Leave current_diversion
1317 Remove limit on number of diversions:
1318 * output.c: Replace ndiversion by diversions, declare it.
1319 (output_init): Allocate only diversion 0.
1320 (make_diversion): Allocate new diversions as needed.
1321 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
1322 * m4.c: Still accept -N, but do nothing with it.
1323 Reported by David MacKenzie.
1326 * output.c (freeze_diversions): New function.
1327 * m4.h: Declare freeze_diversions.
1328 * freeze.c: Document frozen file format, revise it, call
1329 freeze_diversions to add diversions to frozen format, and code to
1330 reload them properly.
1331 * m4.c: Do not undivert automatically at end when status being
1332 frozen. Do not call builtin_init when reloading frozen state.
1334 Speed up diversion processing:
1335 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
1336 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
1337 structure and variables, cached variables out of output_diversion,
1338 reallocate_diversion_for and OUTPUT_CHARACTER.
1339 (shipout_text, make_diversion, insert_diversion): Adapted to new
1341 (insert_file): Use better buffering.
1342 Reported by David MacKenzie.
1344 Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
1346 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
1347 dist works from another build directory.
1349 Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
1351 * symtab.c (hack_all_symbols): Use hash_table_size instead of
1352 constant HASHMAX, for -H option to work better.
1354 * builtin.c (DECLARE): Simplify by using _ ().
1356 * freeze.c: New file.
1357 * Makefile.in: Compile it, distribute it.
1358 * m4.c: Recognize, document and process --freeze-state (-F) and
1359 --reload-state (-R) options. Pass a true flag to builtin_init
1360 only if no reloading some state.
1361 * builtin.c (define_builtin): Remove static specifier.
1362 (find_builtin_by_name): Remove static specifier.
1363 (builtin_init): Accept and obey a flag argument.
1364 * m4.h: Add declarations for freeze.c, changes for builtin.c.
1366 Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
1368 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
1371 * configure.in: Implement --with-dmalloc.
1372 * acconfig.h: Document WITH_DMALLOC.
1373 * m4.h: Add code for when WITH_DMALLOC.
1375 Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
1377 * m4.c (long_options): Use "error-output", the dash was missing.
1378 Reported by Akiko Matsushita.
1380 Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
1382 * m4.h: Include <sys/types.h>.
1383 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
1384 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
1386 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
1388 * builtin.c (dump_args): Declare len as size_t, not int.
1390 * debug.c: Prototype the forward declaration of debug_set_file.
1392 * builtin.c (m4_undivert): Replace div by file, for avoiding the
1393 shadowing of this variable.
1394 * output.c (insert_diversion): Idem.
1396 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
1397 (input_init): Duplicate default quote and comment strings.
1398 (set_quotes): Free previous quote strings in all cases. Duplicate
1399 even default quote strings.
1400 (set_comment): Free previous comment strings in all cases.
1401 Duplicate even default comment strings.
1403 * configure.in: Updated for Autoconf 2.0.
1404 * Makefile.in (distclean-local): Also delete config.cache.
1406 * m4.c (usage): Reorganize the --help output by topic. Include a
1407 description for debugging flags.
1409 Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
1411 * configure.in: If sigaction is available and SA_ONSTACK defined,
1412 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
1413 defined, use sigvec. Else don't compile stackovf.c.
1414 * stackovf.c (setup_stackovf_trap): Idem.
1415 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
1418 Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
1420 * m4.c (usage): Replace printf par fputs.
1422 Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
1426 Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
1428 * configure.in: Check for sigaction and sigvec. Add a new delayed
1429 check for RLIMIT_STACK, combine in the checking for getrlimit.
1430 All those things are not universally available.
1431 * stackovf.c: Split setting up the trap handler and catching
1432 signals, for better taking care of various configure outcomes.
1433 * examples/stackovf.sh: Correct a typo.
1434 Reported by Eric Backus, Jim Avera and Jim Meyering.
1436 Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
1438 * ansi2knr.c: New version sent by its author, Peter Deutsch.
1440 Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
1442 * Makefile.in: Modify so parallel make will not try making
1443 lib/libm4.a twice simultaneously.
1444 Reported by Jim Meyering.
1446 Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
1448 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
1449 error message, for when no code possibility exists. Even if this
1450 line is completely #ifdef'ed out, it brings a syntax error.
1451 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
1453 * Makefile.in (install): Have install depend on all too, for lib
1454 to be remade as needed.
1456 * examples/stackovf.sh: Try ksh, bsh and bash for shells
1457 providing ulimit, instead of using only ksh.
1458 Reported by Jim Avera and Joseph E. Sacco.
1460 Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
1462 * Makefile.in (check): Have it depend on all instead of m4. In
1463 this way, a change in lib will be detected and processed.
1465 * builtin.c (numeric_arg): Use strtol and verify the conversion,
1466 instead of using sscanf which stops as soon as there is a
1467 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
1468 and divert(1xyzzy) were all accepted without any warning or error
1470 * m4.h: Declare strtol as long if not including stdlib.h.
1471 * configure.in: Check for limits.h, and replace strtol if missing.
1472 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
1473 * lib/strtol.c: New file, from elsewhere.
1474 Reported by Andreas Schwab.
1476 Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
1478 * macro.c (expand_macro): Cast value to (boolean) prior to
1479 assigning it to traced.
1480 Reported by Tom McConnell.
1482 * Makefile.in (m4): Always make all in lib first.
1483 Reported by Jim Meyering.
1485 Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
1487 * stackovf.c: Isolated OS-dependent sections; Improved portability,
1488 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
1489 handlers), and a default error message if the fault address is not
1490 available (when neither siginfo.h nor BSD sigcontext are supported).
1491 * configure.in: Changes for stackovf.h: Check for sigcontext,
1492 sigaction, sigstack, and define rlim_t as int if necessary.
1493 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
1494 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
1495 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
1497 Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
1499 * configure.in: Use AC_SET_MAKE.
1500 * Makefile.in: Use @SET_MAKE@.
1501 Reported by Jim Meyering.
1503 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
1504 Reported by Ian Taylor.
1506 Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
1508 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
1509 because siginfo.h is unrelated to standard headers, and siginfo.h
1510 is already checked for.
1511 Reported by Joseph E. Sacco.
1513 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
1515 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
1518 Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
1520 * builtin.c (substitute): Use \& to represent this part of the
1521 string which was matched by the whole regexp, instead of
1522 representing the whole string. Any usage of \0 issues a warning
1523 and acts like \&, it will disappear in some subsequent release.
1525 Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
1527 * m4.c: Complete prototype for forwarded declaration of usage.
1529 * input.c (init_macro_token): Correct own reference in error
1530 message. Previous name get_macro_func was referred to instead.
1531 (next_char): Correct own reference in error message. Previous
1532 name advance_input was referred to instead.
1534 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
1535 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
1536 and_term, not_term, logical_not_term, cmp_term, shift_term,
1537 add_term, mult_term, exp_term, unary_term, simple_term): Add
1538 prototype to forwarded declarations. Declare parameter v1 as
1539 eval_t * instead of int *. Same for local variable v2 in dyadic
1540 functions. Same for result in exp_term.
1541 * builtin.c (m4_eval): Declare value as eval_t instead of int.
1542 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
1543 unsigned_eval_t instead of unsigned int. Change casts accordingly.
1544 (shipout_int): Cast first argument of ntoa to eval_t.
1545 Reported by Thorsten Ohl.
1547 * macro.c: Complete the prototypes of forwarded expand_macro and
1549 Reported by Thorsten Ohl.
1551 * m4.h: Define voidstar as void * or char * depending on __STDC__.
1552 The Ultrix 3.1 compiler cannot do much with void pointers.
1554 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
1555 * m4.c (xfree): Replace void * by voidstar.
1556 Reported by Tom McConnell.
1558 * ansi2knr.1: New, from elsewhere.
1559 * Makefile.in (DISTFILES): Distribute ansi2knr.1
1561 * Makefile.in (stamp-h.in): Avoid running ./config.status if
1562 stamp-h does not exist yet. This avoids running it a second time
1563 just after the initial ./configure.
1564 Reported by David MacKenzie and Tom McConnell.
1566 * m4.h: Replace the enum debug_info declaration with a series of
1567 #define's. The Ultrix 3.1 compiler would otherwise need casting
1568 (int) to most references, when used in expressions.
1569 Reported by Tom McConnell.
1571 Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
1573 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
1574 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
1575 calls the compiler. Previously, FP_PROTOTYPES was only calling
1576 the preprocessor; by not being subject to CFLAGS, this was
1577 discouraging those flags asking for ANSI compilation.
1578 * acconfig.h: Document HAVE_PROTOTYPES.
1579 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
1580 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
1581 Reported by Eric Backus.
1583 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
1584 from the environment. Default CFLAGS to -g if not set.
1585 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
1586 * lib/Makefile.in: Have CFLAGS substituted from configure.
1587 Reported by Eric Backus and Tom McConnell.
1589 * configure.in: m4_undefine changeword before using AC_ENABLE.
1591 * m4.h: Declare prototypes for error (for ANSI compilers only),
1592 prefix_all_builtins and reference_error.
1593 Reported by Tom McConnell.
1595 * input.c (set_word_regexp): Do not try to initialize the array
1596 test from a string, this does not work with non-ANSI compilers.
1597 Reported by Eric Backus.
1599 * Makefile.in (dist): Clean examples/ before saving it.
1600 (distclean-local): Also remove stamp-h.
1601 Reported by Eric Backus.
1603 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
1605 Reported by Tom McConnell.
1607 * checks/Makefile.in (clean): Depends on mostlyclean.
1608 (mostlyclean): New goal.
1610 Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
1612 * Makefile.in (DISTFILES): Distribute install.sh.
1613 * install.sh: New file, copied from elsewhere.
1614 Reported by Assar Westerlund and Kaveh R. Ghazi.
1616 Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
1618 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
1619 * acconfig.h: Explain ENABLE_CHANGEWORD.
1621 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
1622 from code provided by Pete Chown]
1623 * m4.h: Add original_text field to u_t variant of union u.
1624 Declare TOKEN_DATA_FUNC macro.
1625 * builtin.c: Declare changeword.
1626 (m4_changeword): New function.
1627 * input.c: Include "regex.h", define variables with word regexps.
1628 (input_init): Initialize the word regexp.
1629 (set_word_regexp): New.
1630 (next_token): Declare local variables, use the previous code if
1631 default_word_regexp is true. Else, match using a new code. Save
1633 * macro.c (expand_token): Ship out original text if not a macro
1635 Reported by Krste Asanovic and Pete Chown.
1637 [These modifs all depend upon ENABLE_CHANGEWORD]
1638 * m4.h: Declare external user_word_regexp.
1639 * m4.c: Declare user_word_regexp, and initialize it from
1640 --word-regexp or -W, or NULL if not specified.
1641 * input.c: Use user_word_regexp if specified, instead of
1642 DEFAULT_WORD_REGEXP.
1644 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
1647 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
1648 * checks/Makefile.in: Empty the suffix list.
1649 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
1651 * m4.c: Declare nesting_limit and initialize it to 250.
1652 Implement -LNUMBER or --nesting-limit=NUMBER to change its
1654 * m4.h: Declare nesting_limit as external.
1655 * macro.c (expand_macro): Stop execution whenever nesting limit
1657 Reported by Bengt Mertensson.
1659 * eval.c (evaluate): Diagnose excess characters in eval input.
1660 Things like `eval(08)' used to return 0 with no diagnostic.
1662 * m4.h: Capitalize first letter of all macro arguments in
1665 * m4.c: Declare warning_status, initialize it to 0. Add new
1666 option -E, or --fatal-warnings, which sets warning_status to
1667 EXIT_FAILURE instead.
1668 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
1669 EXIT_FAILURE if not otherwise done by header files.
1670 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
1671 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
1672 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
1673 argument of all M4ERROR calls.
1674 Reported by Noah Friedman.
1676 * examples/incl-test.m4: Renamed from incl_test.m4.
1677 * examples/include.m4: Include incl-test.m4 instead of
1679 * examples/multiquotes.m4: Renamed from multi-quotes.m.
1681 Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
1683 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
1684 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
1685 also tested it on a Sun Sparc workstation running SunOS 4.x.
1687 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
1688 49.format check, abusing a `union values' argument with sprintf
1689 without selecting the proper field. Now, save the formatting type
1690 first, delaying the fetch of the corresponding argument.
1691 Reported by Joseph E. Sacco and Tom Quinn.
1693 * format.c (format): Remove const from char *fmt declaration when
1694 not HAVE_EFGCVT, because a NUL may be forced into it.
1696 * m4.h: Declare atof() when not STDC_HEADERS.
1697 Reported by Joseph E. Sacco.
1699 * Regenerate configure using Autoconf 1.11, this corrects a
1700 problem about an incorrect cpp seting on NeXT 3.1.
1701 Reported by Alexander Lehmann.
1703 Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
1705 * m4.h (_): Change argument from `x' to `Args'.
1707 Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
1709 * Makefile.in: Remove all occurrences of $(MFLAGS), which were
1710 bringing more evil than good on a few systems.
1711 Reported by Greg A. Woods.
1713 Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
1715 * m4.h: Rename Args() to _().
1716 * m4.h: Remove extern specifier from all function declarations.
1718 Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
1720 * stackovf.c: New file implementing stack-overflow detection.
1721 * configure.in: Check for getrlimit, sigaction. If all of
1722 standard headers, getrlimit and sigaction, define USE_STACKOVF and
1723 substitute ${U}stackovf.o for STACKOVF.
1724 * acconfig.h: Declare USE_STACKOVF.
1725 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
1726 * m4.h: Declare setup_stackovf_trap().
1727 * m4.c: Call setup_stackovf_trap().
1728 * tests/stackovf_test.sh: New file.
1730 Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
1732 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
1734 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
1736 Sun Jan 30 14:24:19 1994 (pinard at icule)
1738 * m4.h: Remove definition of volatile, not used anymore.
1739 Reported by Jim Meyering and Joseph E. Sacco.
1741 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
1742 of `if ... else /* nothing */' for if macros.
1743 Reported by Jim Meyering.
1745 * builtin.c (m4_regexp): Reorganize the code for avoiding a
1746 warning from gcc about `repl' possibly used before defined.
1747 Reported by Jim Meyering.
1749 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
1750 Reported by Jim Meyering.
1752 Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
1754 * m4.h: Move the conditional definition of volatile after the
1755 inclusion of system files, because they may define it first.
1757 Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
1759 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
1760 get around a problem with Alpha make seeing a syntax error, there.
1761 Reported by Vern Paxson.
1763 Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
1765 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
1766 Reported by Richard Stallman.
1768 Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
1770 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
1771 instead of AC_HAVE_FUNCS.
1772 Reported by Noah Friedman.
1774 Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
1776 * m4.c: Initialize show_help and show_version to zero.
1778 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
1779 Use them in exit() and usage() calls.
1781 Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
1783 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
1784 syserr() macro. Delete errref, add reference_error and M4ERROR.
1785 * m4.c: Replace errref, which was returning an input reference
1786 string, with reference_error, which prints it on standard error.
1787 * builtin.c, output.c: Use errno as second parameter to error,
1788 instead of using syserr() with %s.
1789 * *.c: Use M4ERROR instead of error: no more errref() with %s.
1790 Doing so, the program name appears after the input reference
1791 instead of before, which eases M-x next-error processing.
1793 Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
1795 * checks/get-them: Escape braces with backslashes in patterns,
1796 because HPUX-9.01 awk needs this.
1797 Reported by Jim Meyering.
1799 Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
1801 * builtin.c: Declare "FILE *popen ();".
1803 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
1804 macros, replace error_message_prefix() declaration by errref()'s.
1805 Declare xrealloc, for use in errref().
1806 * m4.c: Delete error_message_prefix() function, add errref().
1807 * *.c: Use error() systematically in place of all error macros,
1808 now that error() flushes stdout first. Make needed adjustments.
1810 * m4.h: Remove const in sys_errlist[] declaration, it creates
1811 conflicts on SGI and Alpha.
1812 Reported by Kaveh R. Ghazi.
1814 Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
1816 * m4.c: Include <getopt.h> instead of "getopt.h".
1818 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
1819 * acconfig.h: New, for documenting HAVE_EFGCVT.
1820 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
1821 use them wherever appropriate. Also use -I. for compilations.
1822 * lib/Makefile.in: Use -I.. for compilations.
1823 * *.c: Include <config.h> or "config.h".
1825 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
1826 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
1828 Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
1830 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
1832 * input.c (input_init): Initialize quote and comment strings
1833 explicitely instead of calling set_quotes and set_comment: by
1834 doing so, we ensure we do not free uninitialized variables.
1836 * checks/check-them: Reverse arguments to both diff, so the
1837 expected is on the left and the obtained on the right.
1839 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
1840 macros. Delete declarations for m4error, warning, fatal and
1841 internal_error, add declaration for error_message_prefix.
1842 * m4.c: Delete m4error, warning, fatal and internal_error
1843 routines, add error_message_prefix routine.
1844 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
1845 warning with WARNING*, fatal with FATAL* and internal_error with
1847 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
1848 this is not needed anymore.
1850 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
1851 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
1852 and debug_message, add declaration for debug_message_prefix.
1853 * debug.c: Remove static specifier for FILE *debug declaration.
1854 Delete debug_print and debug_message routines, add
1855 debug_message_prefix routine.
1856 * builtin.c, debug.c: Replace debug_print routine calls with
1857 DEBUG_PRINT* macro calls.
1858 * input.c, path.c: Replace debug_message routine calls with
1859 DEBUG_MESSAGE* macro calls.
1861 * m4.h: Remove inclusion of <varargs.h>.
1862 * debug.c: Include <stdarg.h> or <varargs.h>.
1863 (trace_format): Use stdarg instead of varargs if __STDC__.
1865 * configure.in: Remove checks for vfprintf and _doprnt. These
1866 implementations use varargs tricks which are not portable enough.
1867 * lib/vfprintf.c: Deleted.
1868 * lib/_doprnt.c: Deleted.
1869 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
1870 Reported by Joel Sherrill.
1872 * path.c (add_include_directory): Use xstrdup.
1874 * builtin.c (find_builtin_by_name): Declare static.
1876 * *.[ch]: Add const to a few "char *" declarations.
1878 * configure.in: Remove commented tests for fileno() and fstat().
1879 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
1881 * debug.c (debug_flush_files): New.
1882 * m4.h: Declares it.
1883 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
1884 Reported by Nicolas Pioch.
1886 Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
1888 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
1889 Reported by Joel Sherrill.
1891 * builtin.c (prefix_all_builtins): Instead of the table size, use
1892 the null entry at end for stopping the loop. It was overwritten.
1893 Reported by Andreas Schwab and Jim Meyering.
1895 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
1896 Reported by Kaveh R. Ghazi.
1898 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
1899 Reported by Karl Vogel.
1901 Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
1903 * m4.h: Do not define volatile if already defined.
1904 Reported by Rene' Seindal.
1906 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
1908 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
1909 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
1911 Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
1913 * m4.h: Define strchr and strrchr in terms of index and rindex,
1914 instead of the other way around.
1915 * builtin.c, m4.c, path.c: Use strchr instead of index.
1917 * input.c (next_char): Remove a "break;" after a "return ...;".
1918 Reported by Tom McConnell.
1920 Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
1924 * configure.in: Do not copy check files in the build hierarchy.
1925 * checks/check-them: Identify the m4 version being checked. For
1926 finding m4, look in $PATH instead of in the parent directory.
1927 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
1928 * checks/Makefile.in (.all-stamp): Always create check files in
1929 the source hierarchy, not anymore in the build hierarchy.
1930 (check): cd to the source hierarchy before performing checks.
1931 Do not copy nor clean COPYING anymore, take it from `..'.
1932 Reported by Tom McConnell.
1934 * Makefile.in (Makefile): Use $(SHELL).
1935 (config.status): Use $(SHELL). Use "config.status --recheck"
1936 instead of "configure --no-create", which is obsolete.
1937 Reported by Tom McConnell.
1939 Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
1941 * m4.c (usage): Use "%s" instead of "m4" in format string.
1942 Reported by Jim Meyering.
1944 * Makefile.in: Distribute mkinstalldirs.
1945 Reported by Pierre Gaumond.
1946 Reported by Jim Meyering.
1947 Reported by Tom McConnell.
1948 Reported by Andreas Gustafsson.
1950 * checks/check-them: Renamed from checks/check_them.
1951 * checks/get-them: Renamed from checks/get_them.
1952 * checks/.all-stamp: Renamed from checks/.all_stamp.
1953 * checks/Makefile.in: Changed accordingly.
1954 Reported by Jim Meyering.
1956 Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
1958 * lib/Makefile.in (dist): Correct permissions on files.
1960 * output.c: Declare tmpfile, some systems don't.
1962 Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
1964 * checks/Makefile.in (dist): Correct permissions on files.
1966 * Makefile.in (dist): Ensure recursive linking for subdirectory
1967 `examples', also set read/write permissions on all its files.
1969 * mkinstalldirs: New, from elsewhere.
1970 * Makefile.in: Use it.
1972 * debug.c: Synchronize debug messages and regular output when
1973 the debug file and stdout are redirected to the same file.
1974 * configure.in: Add (commented) checks for fileno and fstat.
1975 Reported by Jim Avera.
1977 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
1978 etc., arguments, then ignore the superfluous one. m4 used to
1979 diagnose missing arguments and return the empty string.
1980 Reported by Nick S. Kanakakorn.
1982 Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
1984 * m4.c (main): At end of all input, ensure all undiverted text
1985 goes to the main output stream.
1986 Reported by Andreas Gustafsson.
1988 * m4.c (main): exit (0), instead of return 0.
1990 * m4.c: Implement -P and --prefix-builtins.
1991 * builtin.c: Delete const specifier on builtin_tab.
1992 (prefix_all_builtins): New.
1993 Reported by Noah Friedman.
1994 Reported by Scott Bartram.
1996 * c-boxes.el: New, from elsewhere.
1997 * Makefile.in: Distribute it.
1999 * m4.h: Do not define bcopy if <string.h> defines it.
2000 Reported by Stephen Perkins.
2002 * builtin.c (define_macro): Allow a missing second argument, in
2003 which case it is implied empty. Affects define and pushdef.
2004 Reported by Eric Allman.
2006 Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
2008 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
2009 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
2010 * builtin.c: Initialize all the blindness fields in builtin_tab.
2011 (define_builtin): Copy the blindness of a builtin into its symbol.
2012 * macro.c (expand_token): Avoid processing a blind builtin if the
2013 next character is not an opening parenthesis.
2014 Reported by David MacKenzie.
2015 Reported by Noah Friedman.
2017 * configure.in: Ensure an exit status of 0 on completion.
2018 Reported by Vivek P. Singhal.
2020 * eval.c (eval_lex): Admit both lower and upper case letters for
2021 bases greater than 10. Only lower case letters were accepted.
2023 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
2024 Reported by Krste Asanovic.
2026 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
2027 * eval.c (logical_not_term): New name for not_term.
2028 * eval.c (xor_term): New, between or_term and and_term.
2029 * eval.c (not_term): New, between and_term and logical_not_term.
2030 * eval.c (shift_term): New, between cmp_term and add_term.
2031 Reported by Krste Asanovic: ~, ^, <<, >>.
2032 Reported by Ben A. Mesander: ** vs ^.
2034 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
2035 * m4.h: Delete xrealloc.c.
2036 * lib/xmalloc.c: New, from elsewhere.
2037 * lib/xstrdup.c: New, from elsewhere.
2038 * lib/Makefile.in: Distribute and compile them.
2040 * m4.c: Change progname to program_name.
2041 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
2042 * lib/error.c: New, from elsewhere.
2043 * lib/Makefile.in: Distribute and compile error.c.
2044 * configure.in: Check AC_VPRINTF and for strerror.
2045 * m4.c: Delete cmd_error. Use error instead.
2046 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
2048 * m4.h: Delete #define const, let Autoconf takes care of this.
2050 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
2051 Merge parse_args into main. Declare argv to be `char *const *',
2052 then remove superfluous casts.
2054 * m4.c: Rename --no-gnu-extensions to --traditional.
2055 Reported by Ben A. Mesander.
2057 * m4.c (usage): Add a status parameter. Supply one in various
2058 calls. Add --help processing. Remove -V for --version.
2060 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
2062 * lib/Makefile.in: Have an AR=ar declaration.
2063 Reported by Eric Backus.
2064 Reported by Bjorn R. Bjornsson.
2065 Reported by Tom Tromey.
2066 Reported by Kristine Lund.
2067 Reported by Marion Hakanson.
2069 Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
2071 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
2072 Reported by Noah Friedman.
2074 Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
2076 * Makefile.in: Remove MDEFINES and cleanup.
2078 Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
2080 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
2083 Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
2085 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
2086 ensure 777 mode for directories, so older tar's will restore file
2089 Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
2091 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
2092 so the installer can override automatically configured choices.
2093 Reported by Karl Berry.
2095 Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
2097 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
2098 previous version was not working properly on m68k-hp-bsd4.3.
2099 Reported by Roland McGrath.
2101 * lib/_doprnt.c: Stolen from Oleo distribution.
2102 * configure.in: Check for _doprnt.c if vfprintf.c selected.
2103 * lib/Makefile.in: Distribute _doprnt.c.
2104 Do not distribute regex.[ch].old anymore.
2106 Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
2108 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
2109 Richard wants it there.
2111 Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
2113 * Makefile.in: Add DEFS to MDEFINES.
2114 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
2115 (libm4.a): Remove the library before creating it.
2116 (distclean): Remove tags and TAGS too.
2118 Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
2120 * Makefile.in (dvi, m4.dvi): New goals.
2122 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
2123 macro.c, output.c, path.c, symtab.c: Change Copyright from
2124 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
2126 * examples/divert.m4: Deleted, this bug has been corrected.
2128 * Makefile.in (texclean, mostlyclean): New goals.
2130 * Makefile.in (clean): Remove clutter from ansi2knr.
2131 Reported by Pierre Gaumond.
2132 Reported by Greg A. Woods.
2134 Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
2136 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
2137 might well use CFLAGS is s/he needs it.
2139 * Makefile.in: Allow installation of info files from a separate
2141 Reported by Jason Merrill.
2142 Reported by David MacKenzie.
2143 Reported by Skip Montanaro.
2144 Reported by Erez Zadok.
2145 Reported by Assar Westerlund.
2147 Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
2150 This is still a beta release for the future GNU m4 version 1.1.
2152 * lib/alloca.c: New, from elsewhere.
2153 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
2155 * m4.h: Do not define index/rindex if already defined. If
2156 FALSE/TRUE are already defined, do not redefine them, but merely
2157 define boolean typedef to int.
2159 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
2160 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
2161 because some C compilers do not like connectives with #ifdef.
2162 * m4.h: Define `volatile' only if __GNUC__, instead of once for
2163 __GNUC__ and once for __STDC__.
2164 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
2166 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
2167 Makefile dependencies. Without it, make keeps destroying and
2168 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
2170 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
2171 to diversion/DIVERSION, this was a spelling error.
2173 * m4.c: Declare version[], remove #include "version.h".
2174 * version.h: Deleted.
2175 * Makefile.in: Remove references to version.h.
2177 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
2178 production, by using a simpler and more robust algorithm. This
2179 solves the problem of synclines sometimes written in the middle of
2180 an output line. Delete sync_line() and output_lines variable.
2181 * m4.h: Remove sync_line prototype and output_lines declaration.
2182 * input.c (next_char), output.c (shipout_text): Remove references
2184 * input.c (push_file, pop_file): Merely put the value -1 in
2185 output_current_line instead of calling sync_line, for delaying a
2186 single `#line NUM FILE' before next output line. Do not test
2187 for sync_output, because this is unnecessary clutter.
2188 * output.c (make_divertion, insert_divertion): Idem.
2189 * input.c: Rename must_advance_line to start_of_input_line, for
2192 * debug.c (trace_header): Select a new debug line format, which
2193 better complies with GNU standards for formatting error messages.
2194 With option `-dfl', M-x next-error might be used on the output.
2195 * m4.c (vmesg): Adjust format of error output to GNU standards.
2196 * m4.texinfo: Adjust examples for `make check' to work.
2198 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
2199 case for enum debug_info constants, which were all lower case.
2201 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
2203 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
2204 collected patches. I tried a few times using newer regex.[ch], it
2205 mysteriously stopped aborting with this one. Insecure feeling...
2206 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
2208 Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
2210 * m4.c: Change `--no-warnings' to `--silent'.
2211 Reported by David MacKenzie.
2213 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
2214 leave it off for now. See comment in m4.c for justification.
2215 Reported by David MacKenzie.
2217 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
2218 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
2220 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
2222 * Makefile.in: Ensure recursive cleaning is done before local
2223 cleaning for all clean goals.
2225 * builtin.c (ntoa): Ensure the value is always interpreted as a
2226 signed quantity, whatever the radix is.
2228 Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
2230 * builtin.c, format.c, input.c: Split long lines.
2231 * m4.c: Use typedef macro_definition instead of struct
2233 * symtab.c: Use typedef symbol instead of struct symbol.
2235 Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
2237 * *.[ch]: Remove all trailing whitespace, in code and comments.
2239 * configure.in: Find some awk.
2240 * Makefile.in: Add $(AWK) to MDEFINES.
2241 * checks/Makefile.in: Transmit $(AWK) to get_them.
2242 * checks/get_them: Use $AWK instead of gawk. Add a close in the
2243 awk script when switching files, because without this, mawk runs
2244 out of file descriptors.
2246 Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
2248 * Makefile.in (realclean): Delete m4.info*.
2249 Reported by Jim Meyering.
2251 * Makefile.in: Adjust and link with checks/Makefile.
2252 * checks/Makefile.in: New.
2253 * configure.in: Output checks/Makefile.
2255 * checks/get_them: Have the dnl header of each test more
2256 recognizable by next-error, also use a better message.
2258 Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
2260 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
2261 And use that only if __GNUC__ since we're using it's GCC-specific
2262 semantics that tell the compiler the associated function doesn't
2265 * builtin.c (substitute): Don't use character as an array index.
2266 (dumpdef_cmp): Make formal arguments `const void *' to avoid
2267 warnings with gcc -W -Wall on systems with qsort prototype.
2268 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
2271 * eval.c (most functions): Add parentheses to assignments used
2272 as truth values go avoid warnings from gcc -Wall.
2274 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
2275 any functions that don't need external scope.
2277 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
2278 (many functions and arrays): Declare `const'.
2280 Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
2282 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
2283 removing the declaration from m4.h. Also rename false to FALSE
2286 * lib/Makefile.in (Makefile): New goal.
2288 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
2289 so heavily loaded. It gets more easily overridable, calling make.
2290 Reported by Jim Meyering.
2292 * Makefile.in (dist): Get .fname from the current directory name,
2293 instead of from version.h. I need updating many files manually,
2294 when the version changes, version.h is just one of them.
2296 Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
2298 * m4.h: Remove the tag `boolean' on the enum introducing typedef
2299 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
2300 Reported by Tom McConnell.
2302 Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
2304 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
2305 39.cleardiv, which were describing missing or spurious newlines.
2306 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
2307 do not depend on machine word size, `/bin/false' implementation,
2308 or `wc' output format. `make check' is more dependable, now.
2310 * checks/check_them: Summarize the failed tests by listing their
2311 name, at end. If none, issue `All checks successful'. Output
2312 `Checking' instead of `Input file:'.
2314 * checks/get_them, checks/check_them: Reindented.
2316 * Makefile.in (dist): chmod a+r before making the tar file.
2318 Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
2320 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
2322 * input.c (next_token): Reinitialize token_buttom just after using
2323 it as a watermark with obstack_free. Or else, a future token, big
2324 enough for triggering reallocation of the obstack chunk, could
2325 void the initialized value of token_buttom, later causing panic in
2326 obstack_free. Rename token_buttom to token_bottom everywhere.
2328 * m4.h: Before declaring errno, first include <errno.h> and
2329 ensure that it does not define errno.
2330 Reported by Richard Stallman.
2332 Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
2334 * builtin.c: Define and use DECLARE macro for builtins.
2336 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
2337 argument, this is a common idiom for introducing long comments.
2339 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
2340 arguments. The last argument was silently ignored.
2342 * m4.c (cmd_error): Add a missing semicolon before va_end().
2344 Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
2346 * Makefile.in: Now handle protoized sources. Define and use U.
2347 Compile and use ansi2knr with old compilers. Update DISTFILES.
2348 Add `aclocal.m4' to `configure' dependencies.
2349 * ansi2knr.c: New, from Ghostscript distribution.
2350 * configure.in: Define U through FP_PROTOTYPES for old compilers.
2351 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
2352 * aclocal.m4: New, provide FP_PROTOTYPES.
2353 * m4.h: Conditionnaly protoized through Args, save for varags.
2354 * builtin.c: Protoized. Then:
2355 Include <sys/types.h> if size_t is not defined, before "regex.h".
2356 (m4_ifelse): Fetch built-in name properly for diagnostic.
2357 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
2358 (m4_regexp): Add const to `msg' declaration.
2359 (m4_patsubst): Add const to `msg' declaration.
2360 * debug.c: Protoized, save for varargs.
2361 * eval.c: Protoized.
2362 * format.c: Protoized.
2363 * input.c: Protoized.
2364 * m4.c: Protoized, save for varargs. Then:
2365 (xfree): Accept void * instead of char *.
2366 (xmalloc): Return void * instead of char *.
2367 (xrealloc): Accept and return void * instead of char *.
2368 * macro.c: Protoized.
2369 * output.c: Protoized.
2370 * path.c: Protoized. Then cast some (char *) over xmalloc's.
2371 * symtab.c: Protoized.
2373 Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
2375 * m4.texinfo: Remove directory from diagnostics in 30.include,
2376 51.eval, 56.errprint and 57.m4exit tests.
2378 * m4.h: Remove declarations for int or void system functions, they
2379 cause more conflicting trouble than they make good.
2381 * configure.in: Avoid configuration header file. Add some tests.
2382 * m4.h: Remove #include "config.h".
2383 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
2384 Then, rewritten for better compliance with GNU standards.
2386 Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
2388 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
2389 because of a misplaced #endif.
2391 * Many *.[hc] files: Correct intra-line spacing here and there,
2392 according to GNU indent 1.6 advice.
2394 * configure.in: New, using Autoconf 1.2.
2395 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
2396 * Delete old configure.in, configure, etc/configure.in,
2397 etc/configure, lib/configure.in, lib/configure and config/*.
2398 Reported by Jason Merrill.
2400 * symtab.c (hash): Change (char) NULL to '\0'.
2401 Reported by Jason Merrill.
2403 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
2404 etc/nextvers.sh. Release numbers will be edited `by hand'.
2405 * version.h: De-automatize, force value in.
2407 * m4.c: Changes in order to use a newer getopt.h.
2408 Reported by David MacKenzie.
2410 * checks/: New name for examples/.
2411 * checks/get_them: New location for etc/get_examples.
2412 * checks/check_them: New location for etc/check_examples.
2413 * Makefile.in, checks/get_them, checks/check_them: Adjust.
2414 * lib/vfprintf.c: New location for etc/vfprintf.c.
2415 * Delete empty etc/.
2416 * examples/: New name for test/.
2418 Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
2420 * Makefile.in (check): Add m4 as dependency.
2422 * m4.c: Accept --no-warnings instead of --no_warnings, and
2423 --no-gnu-extensions instead of --no_gnu_extensions. Make the
2424 usage message more informative.
2425 Reported by David MacKenzie.
2427 Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
2429 * etc/check_examples: New name for check_examples.sh.
2430 * etc/get_examples: New name for get_examples.sh.
2431 * Makefile.in, etc/Makefile.in: Use new names.
2433 * Makefile.in: Transmit $(CC) while making in lib.
2435 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
2436 code disposition by hand.
2438 Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
2440 * m4.h: Delete definitions for abort() and exit().
2441 Reported by Richard Stallman.
2443 * config/hmake-unicos, config/s-unicos.h: New files.
2444 Reported by Hal Peterson.
2446 * eval.c (exp_term): Have N^0 return 1.
2447 Reported by Michael Fetterman.
2449 * eval.c, input.c, m4.h: Remove last comma in enums.
2450 Reported by Mike Lijewski.
2452 * Transfer of maintenance duties from Rene' to Franc,ois.
2454 Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
2456 * Release 1.0. Many thanks to those, who provided me with bug
2457 reports and feedback.
2459 * Uses GNU configure, taken from the gdb distribution.
2461 * Uses GNU getopt(), with long option names.
2463 * The -Q/+quiet option is added, which suppresses warnings about
2464 missing or superflous arguments to built-in macros.
2466 * Added default options via the M4OPTS environment variable.
2468 * The built-in format can now be configured to use sprintf as
2469 the formatting engine, for systems without [efg]cvt(3).
2471 * GNU library code is moved to the ./lib subdirectory; other
2472 utility files are now in ./etc.
2474 * Several minor bugs have been fixed.
2476 Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
2478 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
2479 Francois Pinard and Roland H. Pesch for providing me with reports.
2481 * The builtins incr and decr are now implemented without use of
2484 * The builtin indir is added, to allow for indirect macro calls
2485 (allows use of "illegal" macro names).
2487 * The debugging and tracing facilities has been enhanced
2488 considerably. See the manual for details.
2490 * The -tMACRO option is added, marks MACRO for tracing as soon
2493 * Builtins are traced after renaming iff they were before.
2495 * Named files can now be undiverted.
2497 * The -Nnum option can be used to increase the number of
2498 divertions available.
2500 * Calling changecom without arguments now disables all comment
2503 * The function m4_patsubst() is now consistently declared
2506 * A bug in dnl is fixed.
2508 * A bug in the multi-character quoting code is fixed.
2510 * Several typos in the manual has been corrected. More probably
2513 * The m4.info file is now installed along with the program.
2515 Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
2517 * Updated and enhanced version. Release 0.75, manual 0.07.
2519 * Implemented search path for include files (-I option and
2520 M4PATH envronment variable).
2522 * Implemented builtin "format" for printf-like formatting.
2524 * Implemented builtin "regexp" for searching for regular
2527 * Implemented builtin "patsubst" for substitution with regular
2530 * Implemented builtin "esyscmd", which expands to a shell
2533 * Implemented "__file__" and "__line__" for use in error
2536 * Implemented character ranges in "translit".
2538 * Implemented control over debugging output.
2540 * Implemented multi-character quotes.
2542 * Implemented multi-character comment delimiters.
2544 * Changed predefined macro "gnu" to "__gnu__".
2546 * Changed predefined macro "unix" to "__unix__", when the -G
2547 option is not used. With -G, "unix" is still defined.
2549 * Changed "shift", "$@" and "$*" to not insert spaces afters
2552 * Added program name to error messages.
2554 * Fixed two missing null bytes bugs.
2556 Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
2558 * Initial beta release. Release 0.50, manual 0.05.