summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* initial stage34: cache ref-counting in back-refsargv_refEric Blake2009-04-171-1/+11
|
* Stage33: make appending to existing macros linearEric Blake2009-04-174-58/+172
|
* Stage32: avoid copying text from defnEric Blake2009-04-174-18/+116
|
* Stage31: speed up defn by tracking quote_ageEric Blake2009-04-178-26/+105
|
* Stage30: add qindir builtinEric Blake2009-04-1722-814/+549
|
* Stage29: read input by buffers, not bytesEric Blake2009-02-162-11/+295
| | | | Reported by Bruno Haible.
* Stage28: allow NUL in warning messagesEric Blake2009-02-1013-93/+192
|
* Stage27: allow NUL in text processing macrosEric Blake2008-11-2815-114/+894
|
* Stage26: allow NUL in macro definitionsEric Blake2008-08-0313-121/+317
|
* Stage25: allow NUL in quote, comment delimitersEric Blake2008-06-1713-295/+207
|
* Stage24: allow NUL in macro namesEric Blake2008-05-2315-353/+379
|
* Stage23: allow tracing indirect macro namesEric Blake2008-05-0811-238/+360
|
* Stage22: allow builtin concatenation outside $@Eric Blake2008-05-0315-341/+423
|
* Stage21: $@ concatenates builtins, m4wrap takes builtinsEric Blake2008-04-0914-280/+306
|
* Stage20: make m4wrap obey POSIX fifo orderingEric Blake2008-03-1710-112/+495
|
* Stage19: allow builtin tokens in more macrosEric Blake2008-03-147-126/+491
|
* Stage18: avoid extra references in argv recursionEric Blake2008-02-224-55/+83
|
* Stage17: pass argv through quoted stringsEric Blake2008-02-224-55/+194
|
* Stage16: cache quotes and improve arg_printEric Blake2008-02-2013-159/+302
|
* Stage15: return argv refs back to collect_argumentsEric Blake2008-02-1410-83/+285
|
* Stage14: allow pushing argv referencesEric Blake2008-02-014-112/+318
|
* Stage13: push composite text tokensEric Blake2008-01-263-73/+141
|
* Stage12: make token_chain a union, add string_pairEric Blake2008-01-227-221/+264
|
* Stage11: full circle for single argument referencesEric Blake2008-01-193-118/+348
|
* Stage10: avoid extra copying of strings and commentsEric Blake2008-01-149-123/+257
|
* Stage 9: share rather than copy single-arg refsEric Blake2007-12-2013-83/+156
|
* Stage 8: extend life of references into argvEric Blake2007-12-174-73/+329
|
* Stage 7: add chained token support to input parserEric Blake2007-12-113-41/+234
|
* Stage 6: convert builtins to push arg at a timeEric Blake2007-12-0710-132/+264
|
* Stage 5: add notion of quote ageEric Blake2007-12-066-124/+355
|
* Stage 4: route indir, builtin through ref; make argv opaqueEric Blake2007-11-294-129/+285
|
* Stage 3: cache length, rather than computing itEric Blake2007-11-287-70/+122
|
* Stage 2: use accessors, not direct reference, into argvEric Blake2007-11-265-47/+125
|
* Stage 1: convert token_data** into new objectEric Blake2007-11-236-162/+232
|
* More error messages tied to macro names.Eric Blake2007-11-226-35/+45
| | | | | | | | | | | | | | | | * src/input.c (set_word_regexp): Take additional parameter. (input_init): Adjust caller. * src/debug.c (debug_set_file, debug_set_output): Take additional parameter. (debug_init): Adjust caller. (expansion_level): Move declaration... * src/m4.h (expansion_level): ...here. (debug_set_output, set_word_regexp): Adjust prototypes. * src/builtin.c (m4_changeword, m4_m4exit, m4_debugfile): Adjust callers. * src/m4.c (main): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Refactor error messages to avoid macros.Eric Blake2007-11-2213-241/+289
| | | | | | | | | | | | | | | | | | | | | | | * src/m4.h (_): Define, as a placeholder for now. (M4ERROR, M4ERROR_AT_LINE): Delete. (m4_error, m4_error_at_line): Change prototype. (m4_warn, m4_warn_at_line): New prototypes. * src/m4.c (m4_verror_at_line): New helper function. (m4_error, m4_error_at_line): Use new function, and properly call va_end. (m4_warn, m4_warn_at_line): New functions. (stackovf_handler, main): All callers changed. * src/builtin.c: Likewise. * src/debug.c: Likewise. * src/eval.c: Likewise. * src/format.c: Likewise. * src/freeze.c: Likewise. * src/input.c: Likewise. * src/macro.c: Likewise. * doc/m4.texinfo (Indir, Builtin, Dumpdef, Incr, Eval, Substr) (Improved forloop): Adjust tests accordingly. Signed-off-by: Eric Blake <ebb9@byu.net>
* Security fix: avoid arbitrary code execution with 'm4 -F'.Eric Blake2007-11-223-3/+11
| | | | | | | | * src/freeze.c (produce_frozen_state): Never pass raw file name as printf format. * NEWS: Document this fix. Signed-off-by: Eric Blake <ebb9@byu.net>
* Consistently report macro name first in messages.Eric Blake2007-11-217-194/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/m4.h (evaluate): Adjust prototype. * src/builtin.c (bad_argc, numeric_arg, m4_placeholder): Alter wording to match head. (mkstemp_helper, substitute): Adjust signature. All callers changed. (m4_dumpdef, m4_builtin, m4_indir, m4_defn, m4_esyscmd, m4_eval) (m4_undivert, m4_maketemp, m4_m4exit, m4_debugmode) (m4_debugfile, m4_regexp, m4_patsubst): Mention macro name in message. (m4_format): Adjust call. * src/format.c (format): No longer skip argv[0]. * src/eval.c (evaluate): Mention macro name in message. (logical_or_term, logical_and_term, or_term, xor_term, and_term) (equality_term, cmp_term, shift_term, add_term, mult_term) (exp_term, unary_term, simple_term): Adjust signature. * src/macro.c (warn_builtin_concat): Likewise. (expand_argument): Adjust caller. * doc/m4.texinfo (Macro Arguments, Ifdef, Ifelse, Debug Output) (Dnl, Improved fatal_error, Defn, Builtin, Index macro, Regexp) (Substr, Translit, Patsubst, Format, Eval, Dumpdef, Include) (Improved forloop, Indir, Trace, Incr): Adjust tests to match. Signed-off-by: Eric Blake <ebb9@byu.net>
* Make argument checking a bit more sane.Eric Blake2007-11-212-105/+103
| | | | | | | | * src/builtin.c (bad_argc): Adjust signature, and don't force callers to add 1. Adjust all callers. (numeric_arg): Adjust signature. Adjust all callers. Signed-off-by: Eric Blake <ebb9@byu.net>
* Make dnl diagnostic print macro name.Eric Blake2007-11-215-18/+27
| | | | | | | | | | | | * src/m4.h (skip_line): Adjust prototype. * src/input.c (skip_line): Report error on behalf of caller. * src/builtin.c (m4_dnl): Adjust caller. (dump_args, m4_dumpdef, m4_changequote, m4_changecom) (m4_changeword, m4_traceon, m4_traceoff, expand_user_macro): Use ARG macro instead of open-coding. * doc/m4.texinfo (Dnl): Adjust test. Signed-off-by: Eric Blake <ebb9@byu.net>
* * Makefile.am (EXTRA_DIST): gendocs.sh is gone here.Ralf Wildenhues2007-11-202-1/+5
|
* Avoid builtin concatenation in macro arguments.Eric Blake2007-11-144-28/+77
| | | | | | | | | * doc/m4.texinfo (Defn): Add tests. * src/macro.c (warn_builtin_concat): New function. (expand_argument): Use it to warn on more corner cases. * NEWS: Mention new warning. Signed-off-by: Eric Blake <ebb9@byu.net>
* Simplify previous patch.Eric Blake2007-11-132-38/+31
| | | | | | | * src/input.c (pop_input): Change signature. (push_string_init, next_char_1): Adjust callers. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix memory leak in tail recursion.Eric Blake2007-11-133-12/+50
| | | | | | | | | * src/input.c (push_string_init): Let go of memory earlier. (next_char_1): Make end of string detection reliable. (match_input): Simplify use of push_string_init. * NEWS: Document this fix. Signed-off-by: Eric Blake <ebb9@byu.net>
* More corner-case testing.Eric Blake2007-11-072-0/+13
| | | | | | * doc/m4.texinfo (Pseudo Arguments): Test more corner cases. Signed-off-by: Eric Blake <ebb9@byu.net>
* Use assert, rather than INTERNAL ERROR.Eric Blake2007-11-0511-76/+50
| | | | | | | | | | | | | | | | | | * src/m4.h: Include <assert.h>. * src/builtin.c (m4_dumpdef, define_macro, m4_defn): Use assert. * src/debug.c (trace_pre): Likewise. * src/eval.c (evaluate, cmp_term, shift_term, mult_term): Likewise. * src/freeze.c (produce_frozen_state): Likewise. * src/input.c (push_string_init, pop_input, init_macro_token) (peek_input, next_char_1, set_word_regexp): Likewise. * src/m4.c (main): Likewise. * src/macro.c (expand_token, expand_argument, call_macro): Likewise. * src/output.c (make_diversion): Likewise. * src/symtab.c (symtab_init): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Use build-aux directory.Eric Blake2007-11-057-12/+25
| | | | | | | | | | | | * configure.ac (PACKAGE, VERSION): Delete, since Automake does this now. (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux instead of the top level. * bootstrap: Adjust accordingly. * m4/gnulib-cache.m4: Add --aux-dir option. * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing. Signed-off-by: Eric Blake <ebb9@byu.net>
* Update some documentation about version control.Eric Blake2007-11-026-488/+34
| | | | | | | | | | * NEWS: M4 is now stored in git. * HACKING: Likewise. * README: Likewise. * bootstrap: Likewise. * commit: Delete, now that CVS commits are no longer necessary. Signed-off-by: Eric Blake <ebb9@byu.net>
* start work on HACKING updatesEric Blake2007-11-021-4/+13
|
* Adjust to recent gnulib change.Eric Blake2007-11-022-2/+8
| | | | | | | * m4/gnulib-cache.m4: Drop vasprintf-posix and xvasprintf, and use xvasprintf-posix instead. Signed-off-by: Eric Blake <ebb9@byu.net>