summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid risk of stack overflow.Eric Blake2009-02-182-4/+8
| | | | | | | | * m4/output.c (insert_file): Avoid stack allocation of large buffer. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 01f216c3c98d41db7878b18c93d23e8dc38d8643)
* Synchronize THANKS with branch.Eric Blake2009-02-182-1/+7
| | | | | | * THANKS: Import more names. Signed-off-by: Eric Blake <ebb9@byu.net>
* Improve handling of $ in syntax table.Eric Blake2009-02-187-83/+142
| | | | | | | | | | | | | | | | | | | | * m4/m4module.h (m4_is_syntax_single_dollar): New function. (M4_SYNTAX_DOLLAR, M4_SYNTAX_LBRACE, M4_SYNTAX_RBRACE): Change to be context rather than basic syntax categories. (M4_SYNTAX_MASKS): Adjust macro. * m4/m4private.h (struct m4_syntax_table): Add dollar and is_single_dollar members. (m4_is_syntax_single_dollar): Add fast alternative. * m4/syntax.c (m4_syntax_create, reset_syntax_set): Adjust to account for change to context categories. (m4_set_syntax): Manage is_single_dollar. (m4_is_syntax_single_dollar): New function. * m4/macro.c (locate_dollar): New helper function. (process_macro): Use it to speed up macro expansion. * m4/input.c (m4__next_token): Adjust client. * doc/m4.texinfo (Changesyntax): Document this. Signed-off-by: Eric Blake <ebb9@byu.net>
* Sync changecom documentation with branch.Eric Blake2009-02-173-13/+18
| | | | | | | * doc/m4.texinfo (Changecom): Tweak wording. * NEWS: Import changes from the branch. Signed-off-by: Eric Blake <ebb9@byu.net>
* Stage 29b: Process quotes and comments by buffer, not bytes.Eric Blake2009-02-174-9/+119
| | | | | | | | | * ltdl/m4/gnulib-cache.m4: Import memchr2 module. * m4/input.c (m4__next_token): Add buffer reads to quote and comment parsing. * NEWS: Document this. Signed-off-by: Eric Blake <ebb9@byu.net>
* Stage 29a: Process dnl and macro names by buffer, not bytes.Eric Blake2009-02-163-37/+304
| | | | | | | | | | | | | | | | | | * ltdl/m4/gnulib-cache.m4: Import freadptr and freadseek modules. * m4/input.c (struct input_funcs): Add virtual functions buffer_func and consume_func. (file_buffer, file_consume, string_buffer, string_consume) (composite_buffer, composite_consume, eof_buffer): Implement them. (file_funcs, string_funcs, composite_funcs, eof_funcs): Update vtables accordingly. (buffer_retry): New sentinel. (next_buffer, consume_buffer): New functions. (m4_skip_line, match_input, consume_syntax): Use them for faster parsing. Suggested by Bruno Haible. Signed-off-by: Eric Blake <ebb9@byu.net>
* Unify single and multi-character delimiter handling.Eric Blake2009-02-163-149/+90
| | | | | | | | | | | * m4/input.c (MATCH): Add a parameter. (m4__next_token): Simplify logic and reduce redundancy. (m4__next_token_is_open): Adjust caller. * m4/syntax.c (m4_set_comment, m4_set_quotes): Handle delimiters of differing lengths. (m4_set_syntax): Recognize restoration of single delimiters. Signed-off-by: Eric Blake <ebb9@byu.net>
* Revamp changesyntax vs. changequote interactions.Eric Blake2009-02-166-292/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | * m4/m4module.h (M4_SYNTAX_VALUE): Delete unused macro. (M4_SYNTAX_SUSPECT): New macro. * m4/m4private.h (struct m4_syntax_table): Add suspect field. * m4/syntax.c (check_is_single_quotes, check_is_single_comments) (check_is_macro_escaped): Delete, by inlining body... (m4_set_syntax): ...into here. Improves handling between changesyntax and changequote/changecom. (add_syntax_set, subtract_syntax_set, set_syntax_set): Simplify, and let suspect field track needed cleanup. (m4_set_quotes, m4_set_comment): Adjust meaning of is_single_quotes and is_single_comment flags to always be true if only one delimiter exists, regardless of its length. Ensure that the syntax categories M4_SYNTAX_LQUOTE and M4_SYNTAX_BCOMM are only used on 1-byte delimiters. (add_syntax_attribute, remove_syntax_attribute): Change signature to allow the use of fewer casts. Adjust the suspect field when necessary. (m4_reset_syntax, set_quote_age): Adjust callers. * m4/input.c (m4__next_token, m4__next_token_is_open): Simplify callers. * doc/m4.texinfo (Changesyntax): Update documentation and tests. Signed-off-by: Eric Blake <ebb9@byu.net>
* Improve changesyntax documentation.Eric Blake2009-02-162-134/+131
| | | | | | | * doc/m4.texinfo (Changesyntax): Merge two tables into one multitable. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix regression in multicharacter quotes, from 2008-01-26.Eric Blake2009-02-163-10/+20
| | | | | | | * m4/input.c (m4__next_token): Fix typo. * tests/builtins.at (changequote): Enhance test. Signed-off-by: Eric Blake <ebb9@byu.net>
* Speed up parsing when detecting input file change.Eric Blake2009-02-132-2/+9
| | | | | | | * m4/input.c (next_char): Clear input_change flag. Bug introduced 2006-10-25. Signed-off-by: Eric Blake <ebb9@byu.net>
* Avoid quadratic code when walking definition stack.Eric Blake2009-02-124-13/+39
| | | | | | | | | | | * examples/stack_sep.m4: Use linear, not quadratic implementation. * doc/m4.texinfo (Improved copy): Fix documentation, based on recent autoconf bug fix. * tests/others.at (recursion): Enhance test. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 72506c2eb1d10571bcd2351aa1f3d2427be3c669)
* Stage 28c: Warn on embedded NUL in remaining cases.Eric Blake2009-02-1115-66/+170
| | | | | | | | | | | | | | | | | | | | | | * m4/m4module.h (m4_debug_decode, m4_parse_truth_arg): Add parameter. * m4/macro.c (m4_macro_call): Improve diagnostic. * modules/m4.c (defn): Likewise. * m4/debug.c (m4_debug_decode): Handle embedded NUL. * m4/utility.c (m4_parse_truth_arg): Likewise. * modules/format.c (arg_int, arg_long, arg_double): Likewise. (arg_string): New function. (ARG_INT, ARG_LONG, ARG_STR, ARG_DOUBLE): Update callers. * src/main.c (main): Likewise. * src/freeze.c (reload_frozen_state): Likewise. * modules/gnu.c (debugmode, syncoutput): Likewise. * tests/options.at (--regexp-syntax): Adjust test. * tests/freeze.at (reloading nul): Likewise. * tests/null.m4: Likewise. * tests/null.out: Likewise. * tests/null.err: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Stage 28b: Warn on embedded NUL in file arguments.Eric Blake2009-02-119-23/+72
| | | | | | | | | | | | | | * m4/path.c (m4_path_search): Quote file names in message. * modules/m4.c (syscmd, include, m4_make_temp): Handle embedded NUL. * modules/gnu.c (debugfile, esyscmd): Likewise. * tests/others.at (nul character): Adjust test. * tests/builtins.at (mkdtemp, mkstemp): Likewise. * tests/null.m4: Likewise. * tests/null.out: Likewise. * tests/null.err: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Stage 28a: Warn on embedded NUL in numeric arguments.Eric Blake2009-02-1113-48/+99
| | | | | | | | | | | | | | | | | | | * m4/m4module.h (m4_numeric_arg): Adjust prototype. * m4/utility.c (m4_numeric_arg): Add parameter. * modules/gnu.c (debuglen): Adjust callers. * modules/m4.c (incr, decr, divert, undivert, m4exit, substr) (index): Likewise. * modules/evalparse.c (m4_evaluate): Likewise. * modules/stdlib.c (setenv, getpwuid, srand): Likewise. * modules/time.c (ctime, gmtime, localtime, mktime, strftime): Likewise. * doc/m4.texinfo (Changesyntax): Fix typo. * tests/others.at (nul character): Adjust test. * tests/null.m4: Likewise. * tests/null.out: Likewise. * tests/null.err: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Avoid regression in popdef(undef).Eric Blake2009-02-112-1/+17
| | | | | | | | * doc/m4.texinfo (Trace): Enhance test, to cover regression recently fixed on the branch. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit f35224878771517f1d7c13568c1b65a59e7908a4)
* Enhance index to support starting offset.Eric Blake2009-02-094-9/+59
| | | | | | | | | | * modules/m4.c (index): Add optional third argument. * NEWS: Document this. * doc/m4.texinfo (Index macro): Likewise. (Macro Arguments): Adjust tests. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit b9c165b394c06d2da657caae33efd5843689ff3b)
* Add URLs to --help output.Eric Blake2009-01-242-8/+7
| | | | | | | * src/main.c (usage): Use enhanced version-etc features. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit d499df171ddb2161d1e75055009a9b3d18131591)
* Enhance substr to support replacement text.Eric Blake2009-01-074-6/+62
| | | | | | | | | * doc/m4.texinfo (Substr): Document new semantics. * modules/m4.c (substr): Support optional fourth argument. * NEWS: Document this. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 59d3cfafa8d73e43a974bc066722cd6220cb479f)
* Enhance substr to support negative values.Eric Blake2009-01-074-27/+193
| | | | | | | | | | * doc/m4.texinfo (Substr): Document new semantics, and how to simulate old. * modules/m4.c (substr): Support negative values. * NEWS: Document this. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit e9e4abba45f7e9f368cf497e14bc2ce64b867a02)
* Maintainer cleanups.Eric Blake2009-01-055-190/+40
| | | | | | | | | | * HACKING: Remove mention of xdelta. * Makefile.am (EXTRA_DIST, MAINTAINERCLEANFILES): Let gnulib take care of distributing gendocs.sh. * maint.mk (web-manual): Use new feature of gendocs. * ltdl/m4/gnulib-cache.m4: Regenerate. Signed-off-by: Eric Blake <ebb9@byu.net>
* Relax eval as allowed by POSIX 2008.Eric Blake2008-12-245-13/+28
| | | | | | | | | | * modules/evalparse.c (m4_evaluate): Warn, not error, on invalid operator. Quote expression in warning. * modules/mpeval.c (includes): Add quotearg.h. * doc/m4.texinfo (Eval, Improved forloop): Update tests. * NEWS: Update to reflect 1.6 support for `?:'. Signed-off-by: Eric Blake <ebb9@byu.net>
* Add debugmode(o) to control dumpdef output location.Eric Blake2008-12-238-26/+90
| | | | | | | | | | | | | | | | | * m4/m4module.h (M4_DEBUG_TRACE_OUTPUT_DUMPDEF): New enumerator. (M4_DEBUG_TRACE_VERBOSE): Update. * m4/debug.c (m4_debug_decode): Support new debug option. * src/freeze.c (produce_debugmode_state): Likewise. * modules/m4.c (dumpdef): When set, force dumpdef to stderr rather than the debug file. * src/main.c (usage): Document it. * doc/m4.texinfo (Debugmode, Dumpdef, Debugging options) (Debugfile): Likewise. * NEWS: Likewise. Based on an autoconf bug report by Paolo Bonzini. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit df6bfeeaac6bdc1ef8e5406c6ac051af2c10d0d8)
* Make --debugfile argument optional.Eric Blake2008-12-235-28/+77
| | | | | | | | | | | | | | * src/main.c (long_options): Make the argument optional, to allow setting debug file back to stderr. (main): Make --debugfile order-dependent. (usage): Document this. * doc/m4.texinfo (Debugging options): Likewise. * NEWS: Likewise. * tests/options.at (--debugfile): Enhance test. (--safer): Adjust to new semantics. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit c59c67993219ec04965b1347b44a7e3d09ff425c)
* Use @var correctly.Eric Blake2008-12-222-80/+88
| | | | | | | | | | * doc/m4.texinfo (Operation modes, Preprocessor features) (Limits control, Frozen state, Debugging options) (Dynamic loading features): Use lower case names in @var. (Improved copy): Use @code, not @var, as appropriate. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit a40a4d17b52d260a6629e2d02052e283a787ad66)
* Deal with M4 1.4.x limitation on builtin tokens.Eric Blake2008-12-185-5/+140
| | | | | | | | | | | | * doc/m4.texinfo (Composition): Mention limitation on curry. (Improved copy): New node. (Stacks): Fix typo. * examples/stack.m4: Likewise. * examples/stack_sep.m4: New file. * Makefile.am (dist_pkgdata_DATA): Distribute it. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 92f059a8d7e6e6f96e791fcc14d6dcbdba7b3b9c)
* Double size of temp file cache.Eric Blake2008-12-152-21/+75
| | | | | | | | | | | * m4/output.c (tmp_file, tmp_file_owner): Split... (tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into two variables. (tmp_file2_recent): New variable. (m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename) (m4_output_exit): Adjust callers. Signed-off-by: Eric Blake <ebb9@byu.net>
* Use fewer seeks on cached files.Eric Blake2008-12-152-17/+27
| | | | | | | | | * m4/output.c (m4_tmpfile): Use write, not append mode. (m4_tmpopen): Add parameter to decide when to skip seeks. (m4_tmprename, m4_make_diversion, insert_diversion_helper) (m4_freeze_diversions): Adjust callers. Signed-off-by: Eric Blake <ebb9@byu.net>
* Cache most recently spilled diversion.Eric Blake2008-12-155-9/+119
| | | | | | | | | | | | | | | | | | * m4/output.c (tmp_file, tmp_file_owner): New variables, for 1-deep cache of spilled diversions. (m4_tmpfile): Open in append mode, since we might revisit diversion without closing it now. (m4_tmpopen): Check cache first. (m4_tmpclose): Update cache, rather than closing. Add parameter. (m4_tmpremove): Close cache before removing. (m4_tmprename): Deal with open files when renaming. (m4_output_exit): Close cache before exiting. (make_room_for, m4_make_diversion, insert_diversion_helper): Adjust callers. * ltdl/m4/m4-rename.m4 (M4_RENAME): New file. * configure.ac (M4_RENAME): Invoke it. Signed-off-by: Eric Blake <ebb9@byu.net>
* Correctly track size of in-memory diversions.Eric Blake2008-12-152-0/+10
| | | | | | | * m4/output.c (insert_diversion_helper): Correctly track total in-memory diversion size after undivert. Signed-off-by: Eric Blake <ebb9@byu.net>
* Avoid quadratic behavior for some cases of divert/undivert.Eric Blake2008-12-155-53/+155
| | | | | | | | | | | | | | | * m4/output.c (struct m4_diversion): Improve comments. (m4_tmpname, m4_make_diversion): Strengthen preconditions. (m4_tmprename): New function. (m4_output_init, m4_output_exit): Move after internal functions. (make_room_for): Don't bother copying uninitialized bytes. (insert_diversion_helper): Transfer metadata, rather than copying contents, when undiverting into a previously unused diversion. * tests/builtins.at (divert): Add a check to the test. * doc/m4.texinfo (Undivert): Enhance test. * NEWS: Document the speedup. Signed-off-by: Eric Blake <ebb9@byu.net>
* Stage 27: Allow embedded NUL in text processing macros.Eric Blake2008-12-0212-100/+204
| | | | | | | | | | | | | | | | | | | | | | | | * modules/m4.c (m4_expand_ranges): Don't append extra bytes. (translit): Manage NUL bytes. * modules/format.c (format): Likewise. * modules/gnu.c (substitute, regexp_substitute): Likewise. (m4_resyntax_encode_safe): Add parameter. (regexp, patsubst, renamesyms): Update callers. (regexp_compile): Adjust error message. * modules/evalparse.c (m4_evaluate): Use consistent message. (end_text): New variable. (eval_init_lex): Add parameter. (eval_lex): Detect embedded NUL. * src/freeze.c (reload_frozen_state): Likewise. * doc/m4.texinfo (Format): Update to cover new behavior. (Eval): Mention that result is unquoted. * tests/freeze.at (reloading nul): Enhance test. * tests/null.m4: Likewise. * tests/null.err: Update expected output. * tests/null.out: Likewise. * tests/options.at (--regexp-syntax): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Resync NEWS with branches.Eric Blake2008-11-282-11/+55
| | | | | | * NEWS: Mention 1.4.12, update state of 1.6. Signed-off-by: Eric Blake <ebb9@byu.net>
* Keep COPYING in repository.Eric Blake2008-11-265-3/+684
| | | | | | | | | | | * Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING. * .cvsignore: Don't ignore it. * .gitignore: Likewise. * COPYING: Store in repository, per automake 1.10.2 recommendation. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit a33b562827fd0d1b9f2fbb4aed6b3e29900c5ecc)
* Document optimized forloop.Eric Blake2008-11-264-0/+72
| | | | | | | | | | * doc/m4.texinfo (Improved forloop): Mention alternate style that avoids define overhead. * examples/forloop3.m4: New file. * Makefile.am (dist_pkgdata_DATA): Distribute it. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 5ace13749e5afae1351d9b6035c2ba9309ac20cd)
* Document copy composite using stack_foreach and curry.Eric Blake2008-11-265-57/+294
| | | | | | | | | | | | | | * doc/m4.texinfo (Stacks): New node, to document pushdef stack manipulation. (Ifelse): Move define_blind... (Composition): ...to this new node. Document currying, then use it to implement copy and rename. * examples/curry.m4: New file. * examples/stack.m4: Likewise. * Makefile.am (dist_pkgdata_DATA): Distribute them. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit cacb2125cc8d3e14dfdcc24260d2daf2a7684640)
* Upgrade to FDL 1.3.Eric Blake2008-11-046-7/+15
| | | | | | | | | * ltdl/m4/gnulib-cache.m4: Replace fdl module with fdl-1.3. * Makefile.am (doc_m4_TEXINFOS, MAINTAINERCLEANFILES): Reflect file change. * doc/m4.texinfo (GNU Free Documentation License): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Give nicer error if user modifies testsuite but lacks autoconf.Eric Blake2008-10-222-1/+6
| | | | | | * Makefile.am (AUTOM4TE): Use missing in the definition. Signed-off-by: Eric Blake <ebb9@byu.net>
* Allow user to choose which sed to use in testsuite.Eric Blake2008-10-097-30/+52
| | | | | | | | | | | | | | | | * tests/atlocal.in (SED): Inherit from configure results. * tests/builtins.at (__m4_@&t@version__, divert, esyscmd) (mkstemp, syscmd): Use $SED. * tests/generate.awk (new_test): Likewise. * tests/options.at (deprecated options, unknown option) (--debugmode, --help and --version): Likewise. * tests/testsuite.at (AT_CHECK_M4): Likewise. * tests/others.at (directory, stderr closed, stdin seekable) (stdout closed): Likewise. (nul character): Likewise. Also, skip test if sed can't handle NUL bytes. Signed-off-by: Eric Blake <ebb9@byu.net>
* Clean up testsuite invocation.Eric Blake2008-10-093-16/+30
| | | | | | | | | * tests/atlocal.in: Fix copyright notice. * Makefile.am (TESTS_ENVIRONMENT): Delete; it wasn't being used. (check-local, installcheck-local): Adjust clients. Add missing dependency. Signed-off-by: Eric Blake <ebb9@byu.net>
* Tweak error message on command line failure.Eric Blake2008-09-2511-33/+58
| | | | | | | | | | | | | | | | | | * m4/m4private.h (includes): Use "quotearg.h". * src/main.c (process_file, main): Use nicer quotes for file name in error messages. * m4/input.c (file_clean, m4_push_file): Likewise. * m4/module.c (m4__module_open): Likewise. * src/freeze.c (produce_frozen_state, reload_frozen_state): Likewise. * modules/gnu.c (debugfile): Likewise. * modules/m4.c (undivert, include): Likewise. * tests/others.at (directory, stdin closed): Update tests. * tests/options.at (file names, --debugmode): Likewise. * doc/m4.texinfo (Debugmode): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 5116db0fcd37e4480062b4819dca17a98a7890d7)
* Unify error handling for reading directories.Eric Blake2008-09-254-10/+46
| | | | | | | | | | | * m4/path.c (m4_path_search): Factor open attempts... (m4_fopen): ...into new function, to reject directories. * tests/others.at (directory): Enhance test. * doc/m4.texinfo (Include): Document that directories cannot be input files. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit eed62f0d2729c243d7c081c48d789f9d86fa340f)
* Avoid bugs on platforms that mishandle trailing /.Eric Blake2008-09-253-1/+40
| | | | | | | | * ltdl/m4/gnulib-cache.m4: Import fopen module. * tests/others.at (directory): New test. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit ce1f8f6861b928b7b587d69eee2000a0101e3381)
* Fix bootstrap for Solaris /bin/sh.Eric Blake2008-09-162-2/+7
| | | | | | | * bootstrap: Avoid shell quoting pitfall. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit ce29ff7a556f2ddd44263caa1123346f7af2d80a)
* Typos in source code comments.Ralf Wildenhues2008-09-014-6/+14
| | | | | | | | * modules/m4.c: Fix typos in comments. * m4/input.c: Likewise. * src/main.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix manual date information.Eric Blake2008-08-292-2/+10
| | | | | | | | | * doc/m4.texinfo: UPDATED refers to the day the manual was built, not the release date of M4. Based on a bison patch by Akim Demaille. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 56c30ca5f9dbbdc93bbdfe2dc78baac08515d75e)
* Tweak -d examples.Eric Blake2008-08-272-2/+9
| | | | | | | | * doc/m4.texinfo (Invoking m4): Fix example, since order of -d matters. (Dumpdef): Fix typo. Signed-off-by: Eric Blake <ebb9@byu.net>
* Allow debugmode control over whether defn(undef) warns.Eric Blake2008-08-2313-94/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ltdl/m4/gnulib-cache.m4: Import verify module. * m4/m4module.h (M4_DEBUG_TRACE_DEREF, M4_DEBUG_TRACE_INITIAL): New values. (M4_DEBUG_TRACE_VERBOSE, M4_DEBUG_TRACE_DEFAULT): Adjust. * m4/m4.c (m4_create): Start with debugmode = d. * src/main.c (usage): Mention this. (main): Let -E impact debug mode. * m4/utility.c (m4_symbol_value_lookup): Squelch undefined warning if flag is clear. * modules/gnu.c (builtin, inder): Likewise. * m4/debug.c (m4_debug_decode): Parse new mode. * src/freeze.c (produce_debugmode_state): Accomodate new mode. * doc/m4.texinfo (Debugging options): Mention change in the default behavior. (Debugmode): Mention new flag d. (Operation modes): Mention interaction with -E. (Undefine, Defn, Pushdef, Indir, Builtin, Dumpdef): Document and test its effect. * tests/options.at (--debugmode): Update tests. * tests/freeze.at (reloading debugmode): Likewise. * NEWS: Document this. Reported by Ralf Wildenhues; without this patch, M4 1.6+ would be incompatible with Autoconf 2.62. Signed-off-by: Eric Blake <ebb9@byu.net>
* Improve --debugmode behavior.Eric Blake2008-08-227-52/+55
| | | | | | | | | | | | | * m4/m4module.h (m4_debug_decode): Simplify interface. * m4/debug.c (m4_debug_decode): Remove parameter, and handle setting the new value. * modules/gnu.c (debugmode): Adjust caller. * src/freeze.c (reload_frozen_state): Likewise. * src/main.c (main): Likewise. (usage): Fix default for --debug. * doc/m4.texinfo (Debugging options): Add an example. Signed-off-by: Eric Blake <ebb9@byu.net>
* Avoid regression in defn(undef).Eric Blake2008-08-212-1/+10
| | | | | | | * doc/m4.texinfo (Trace): Enhance test, to cover regression recently fixed on the branch. Signed-off-by: Eric Blake <ebb9@byu.net>