| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* m4/output.c (insert_file): Avoid stack allocation of large
buffer.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit 01f216c3c98d41db7878b18c93d23e8dc38d8643)
|
|
|
|
|
|
| |
* THANKS: Import more names.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
* doc/m4.texinfo (Changecom): Tweak wording.
* NEWS: Import changes from the branch.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
* doc/m4.texinfo (Changesyntax): Merge two tables into one
multitable.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
| |
* m4/input.c (m4__next_token): Fix typo.
* tests/builtins.at (changequote): Enhance test.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
| |
* m4/input.c (next_char): Clear input_change flag. Bug introduced
2006-10-25.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
| |
* src/main.c (usage): Use enhanced version-etc features.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit d499df171ddb2161d1e75055009a9b3d18131591)
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
* m4/output.c (insert_diversion_helper): Correctly track total
in-memory diversion size after undivert.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
* NEWS: Mention 1.4.12, update state of 1.6.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
* Makefile.am (AUTOM4TE): Use missing in the definition.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
| |
* bootstrap: Avoid shell quoting pitfall.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit ce29ff7a556f2ddd44263caa1123346f7af2d80a)
|
|
|
|
|
|
|
|
| |
* modules/m4.c: Fix typos in comments.
* m4/input.c: Likewise.
* src/main.c: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
| |
* doc/m4.texinfo (Invoking m4): Fix example, since order of -d
matters.
(Dumpdef): Fix typo.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
* doc/m4.texinfo (Trace): Enhance test, to cover regression
recently fixed on the branch.
Signed-off-by: Eric Blake <ebb9@byu.net>
|