|
|
2002-11-04 Akim Demaille <akim@epita.fr>
* config/Makefile.am (ACLOCAL_MACROS): Ship the Gettext macros.
2002-11-04 Akim Demaille <akim@epita.fr>
* configure.ac: Automake 1.7.1, Autoconf 2.54, Gettext 0.11.5,
used as `external', and Libtool 1.4.3.
(LINGUAS): Remove.
(LTLIBOBJS): Don't play with it.
* intl/: Remove.
* Makefile.am (SUBDIRS): Remove intl.
(ACLOCAL_AMFLAGS): Add -I config.
(EXTRA_DIST): Add config/config.rpath.
* po/LINGUAS: New.
* po/Makevars: New.
* modules/perl.c (M4INIT_HANDLER): Don't prototype xs_init.
2002-05-29 Gary V. Vaughan <gary@gnu.org>
Preparations for refactoring syntax tables to allow reverse
lookups [fetch me a M4_SYNTAX_OPEN], without compromising the
speed of normal lookups in an array of unsigned short.
* m4/input.c (single_quotes, single_comments, use_macro_escape):
Moved from here...
* m4/m4private.h (m4__single_quotes, m4__single_comments,
m4__use_macro_escape): ...to here, and renamed. The `m4__' prefix
is for internal symbols which unavoidably pollute the global
namespace, but are not published APIs.
Adjusted all callers.
* m4/input.c (m4_syntax_init, m4_syntax_code, m4_set_quotes,
m4_set_comment, m4_set_syntax, set_syntax_internal,
unset_syntax_attribute): Moved from this file...
* m4/syntax.c: New. ...to this file.
Also added an m4_syntax_exit stub for orthogonality.
* src/main.c (main): Use it.
* m4/Makefile.am (libm4_la_SOURCES): Add syntax.c.
* m4/m4module.h: Reformatting. New prototypes.
2002-05-29 Gary V. Vaughan <gary@gnu.org>
* bootstrap (aclocal_apiversion): The aclocal apiversion is
distinct from the automake release number (in that the apiversion
apparently has no micro-version-component).
(aclocal_apilibdir): Use it.
2002-05-28 Gary V. Vaughan <gary@gnu.org>
* m4/hash.c (m4_hash_resize): New function.
* m4/hash.h: Add prototype.
* m4/symtab.c (m4_symtab_init): Use it. This could do with some
benchmarking to find a good value for, say, autoconf. This is
already a little quicker than before for me.
* m4/symtab.c (m4_symtab_hash, m4_symtab_cmp): Moved from here...
* m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): .. to here,
and reenamed.
* m4/hash.h: Adjust prototypes.
2002-01-22 Akim Demaille <akim@epita.fr>
* bootstrap (aclocal_apilibdir): New, to cope with Automake's new
APIVERSION scheme.
* tests/Makefile.am (package.m4): New.
* tests/atlocal.in: Adjust to CVS Autotest.
* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use AC_LIBOBJ.
* configure.ac: LIBOBJ is a forbidden string.
Simplify AM_INIT_AUTOMAKE invocation.
* config/Makefile.am (ACLOCAL_MACROS): Add amversion.m4 and
options.m4.
2001-10-19 Akim Demaille <akim@epita.fr>
* m4/module.c, m4/output.c, src/main.c: Normalize error messages.
2001-10-19 Akim Demaille <akim@epita.fr>
* m4/input.c (m4_next_token): Display where was opened what is
not closed.
2001-10-19 Akim Demaille <akim@epita.fr>
* m4/macro.c (expand_argument): Display where was opened what is
not closed.
2001-10-18 Akim Demaille <akim@epita.fr>
* m4/input.c, modules/m4.c: Formatting changes.
2001-10-17 Gary V. Vaughan <gary@gnu.org>
* bootstrap: s/configure.in/configure.ac/
2001-10-16 Gary V. Vaughan <gary@gnu.org>
* m4/symtab.c (m4_symbol_destroy): This function calls
m4_symbol_popdef, which recycles a symbols memory when the last
definition is popped. Since we were passing the address of the
symbol name found in the symbol table, and it was being removed
partway through m4_symbol_destroy() we were referencing freed
memory for the balance of the function. Now we take a copy of the
symbol name tring and use that as a key into the symbol
table... that way if the original symbol name is freed, the copy
is still valid.
2001-10-13 Akim Demaille <akim@epita.fr>
* m4/ltdl.c: Update.
2001-10-13 Akim Demaille <akim@epita.fr>
* src/main.c, src/freeze.c, m4/debug.c, m4/input.c, m4/macro.c:
Don't gettextize internal error messages.
2001-10-13 Akim Demaille <akim@epita.fr>
* tests/macros.at (Arity and defn): New failing test.
(Arity, defn, and freeze): New.
Fix `Arity and defn'.
* m4/input.c (m4_push_macro): Don't forget the arity.
* modules/m4.c (defn): Likewise.
2001-10-13 Akim Demaille <akim@epita.fr>
* tests/builtins.at (pushdef/popdef, trace, trace2, trace3): Move
to...
* tests/macros.at (pushdef/popdef, Tracing Hanoi Towers)
(Propagation of traceon, Propagation of --trace): this new file.
2001-10-13 Akim Demaille <akim@epita.fr>
* m4/utility.c (m4_numeric_arg): Use the usual (argc, argv, ...)
interface instead of (name, argc...).
Upon failure, specify which argument was guilty.
Adjust callers.
2001-10-13 Akim Demaille <akim@epita.fr>
* modules/evalparse.c: Save translators' time: don't translate
internal error messages.
(m4_evaluate): Simplify/normalize error messages.
* doc/m4.texinfo (Eval): Adjust.
2001-10-13 Akim Demaille <akim@epita.fr>
* m4/macro.c (expand_macro): Let m4_bad_argc handle the cases
where no checking is needed.
* m4/utility.c (m4_bad_argc): Use the usual (argc, argv, ...)
interface instead of (name, argc...).
Adjust callers.
* modules/gnu.c (m4_patsubst_do): Don't check argc, done
elsewhere.
2001-10-13 Akim Demaille <akim@epita.fr>
* m4/utility.c (m4_bad_argc): Display user argument counts, i.e.,
exclude the builtin name from the count.
* modules/m4.c (ifelse): Do not use the regular argc mechanism, as
calling ifelse with a single argument is valid.
* doc/m4.texinfo (Ifelse): Add an example where ifelse is invoked
with 1 and 2 args, mostly to strengthen the test suite.
2001-10-13 Akim Demaille <akim@epita.fr>
* m4/output.c (m4_make_diversion, m4_insert_file)
(m4_insert_diversion, +m4_freeze_diversions): Ansify.
2001-10-12 Gary V. Vaughan <gary@gnu.org>
* m4/input.c (init_builtin_token): Renamed from init_macro_token,
since we call these things builtins in the rest of the code!
* modules/gnu.c (m4_regexp_compile): s/%0/%s/
2001-10-12 Gary V. Vaughan <gary@gnu.org>
Rather than forcing each builtin definition to manage its own
argument range checking, tabulate the maxima and minima for all
builtins in each module. This forces us to consider what the
valid ranges for each builtin should be, and moves the checking
code out of each builtin implementation and into the builtin
caller infrastructure.
* m4/m4module.h (struct m4_builtin): Add argument minima and
maxima.
* m4/m4private.h (struct m4_token): Reflect them here too.
* m4/input.c (struct input_block): ...and here.
(m4_token_copy): New function for token copying.
(init_macro_token): Copy them from a token to the input stack.
(m4_next_token): Don't forget to initialise them for text
macros.
* m4/macro.c (expand_argument): Use m4_token_copy, and also
check argument counts before calling the builtin handler.
* m4/symtab.c (m4_symbol_builtin): Take minima and maxima params.
(m4_symbol_macro): Likewise.
* m4/builtin.c (m4_builtin_pushdef): Add min_args and max_args
parameters. Updated all callers.
(m4_builtin_define): Ditto.
(m4_macro_pushdef, m4_macro_define): Ditto.
* m4/symtab.c (m4_symbol_builtin, m4_symbol_define): Ditto.
* modules/evalparse.c: Declare argument counts for defined
builtins and remove explicit calls to m4_bad_argc().
* modules/gnu.c: Ditto.
* modules/load.c: Ditto.
* modules/m4.c: Ditto.
* modules/modtest.c: Ditto.
* modules/mpeval.c: Ditto.
* modules/perl.c: Ditto.
* modules/shadow.c: Ditto.
* modules/stdlib.c: Ditto.
* modules/time.c: Ditto.
* TODO: Updated.
2001-10-10 Gary V. Vaughan <gary@gnu.org>
The trace semantics now attach the trace bit to a symbol name.
For as long as a traceon(`foo') is active, calls to foo will be
traced regardless of intervening undefines or module unloads.
Fixed the flag propogation issues differently to the fixes
reverted with the last attempt at nailing down trace:
* m4/m4private.h: This file is not visible outside of the m4
source tree, so I removed all the `M4_' and `m4_' prefixes to save
on typing. Updated all clients.
(m4_token): New typedef contains the fields that need to be passed
around with the low level tokeniser.
(m4_token_data): Removed.
(m4_symbol): Now contains the traced flag again.
* m4/symtab.c: Rewritten again. Now we don't remove symbols with
the trace bit set. This change is contained entirely within this
module and doesn't leak out into the callers. Updated all
clients.
(m4_symbol_builtin, m4_symbol_macro): Adjusted to make use of the
new fields in m4_token. Updated all clients.
* m4/builtin.c (m4_builtin_pushdef): Needs a flags argument so
that `groks_macro_args' and `blind_if_no_args' flags are retained
when defn() results are passed around in m4 code. Updated all
callers.
(m4_builtin_define): Ditto.
(m4_macro_pushdef, m4_macro_define): Ditto.
* m4/input.c (struct input_block): Add a flags field to facilitate
the above.
(m4_push_macro): ...use it.
(init_macro_token): Retrieve it.
(m4_next_token): Initialise it.
* m4/macro.c (expand_argument): Copy it.
* m4/m4module.h: Adjust.
* tests/builtins.at: Adjust the expected output of the trace
tests to reflect the change in semantics.
* tests/modules.at (modules: trace): Check that unloading a
module which supplies a traced symbol definition doesn't lose te
trace bit.
2001-10-07 Gary V. Vaughan <gary@gnu.org>
* modules/gnu.c (m4_macro_table): Display the timetamp when
expanding __m4_version__.
* configure.ac (--with-modules): Forgot a comma in the
AC_HELP_STRING parameter list.
2001-10-05 Gary V. Vaughan <gary@gnu.org>
* bootstrap: Remove aclocal.m4t when it is no longer required.
2001-10-05 Akim Demaille <akim@epita.fr>
* tests/Makefile.am: Adjust for gnuprog2.
* tests/m4.in: There can be a leading path.
* tests/modules.at (AT_CHECK_M4_MODTEST): No need for $4 and $5.
* tests/testsuite.at: Adjust to the most recent Autotest.
(AT_CHECK_M4_FILTER): Fix and rename as...
(AT_TEST_M4): this.
* tests/others.at: Use it.
* config/gmp.m4 (_AC_LIB_GMP): In order to read the content of a
variable in shell scripts, one uses `$'...
2001-10-04 Gary V. Vaughan <gary@gnu.org>
* configure.ac: `rm -f $m4_getopt_h' was lost.
2001-10-04 Gary V. Vaughan <gary@gnu.org>
* configure.ac (TIMESTAMP): Display with AS_BOX at configure
time. Define it for config.h in order to...
* src/main.c (main): ...display the timestamp for --version.
2001-10-04 Akim Demaille <akim@epita.fr>
* modules/gnu.c (m4_regexp_do, m4_patsubst_do): Extracted from
previous builtins `regexp' and `patsubst'.
(regexp, patsubst): Use them.
(eregexp, epatsubst): New builtins.
* doc/m4.texinfo (Patsubst, Regexp): Rename and complete as...
(Epatsubst and Patsubst, Eregexp and Regexp): these.
(Extensions): More info on REs.
2001-10-04 Akim Demaille <akim@epita.fr>
* modules/modtest.c (init_handler): Consistently output to stderr.
(finish_handler): New.
(test): The `if' is an `assert'.
* tests/modules.at: Adjust.
2001-10-04 Akim Demaille <akim@epita.fr>
* m4/utility.c (m4_bad_argc): Detail the mismatches.
2001-10-01 Akim Demaille <akim@epita.fr>
* tests/generate.awk: Tag the tests with `documentation'.
* tests/modules.at (AT_CHECK_M4_MODTEST): New.
Use the make the existing modtest tests more uniform, and complete
the set of possibilities.
2001-10-01 Akim Demaille <akim@epita.fr>
* config/gmp.m4: Consult the user before using GMP: use
--without-gmp.
* configure.ac: Adjust.
* modules/gmp.c: No protection needed as the module is not built
if GMP is not used.
2001-10-01 Akim Demaille <akim@epita.fr>
* tests/generate.awk: Remove debugging code.
(fatal): Specify the current location.
* m4/debug.c, m4/macro.c, m4/utility.c, modules/format.c,
* modules/gnu.c, modules/m4.c: Use M4ARG.
2001-10-01 Akim Demaille <akim@epita.fr>
* modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE): New.
(m4_regexp_compile): New.
(regexp, patsubst): Use it.
2001-09-30 Gary V. Vaughan <gary@gnu.org>
Reinstate the memory handling improvements from the patch I just
reverted. Relevant ChangeLog entries repeated here:
* m4/module.c (m4_module_remove): New function that holds the core
of the old m4_module_unload.
(m4_module_unload): Use it.
(m4_module_unload_all): When we know the modules will never be
used again (i.e. on exit), free up as much module memory as
possible. There are still some artifacts from resident modules
living inside ltdl.c, but everything else is freed.
* m4/debug.c (m4_debug_exit): Free memory allocated in
m4_debug_init().
* m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
* m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
* src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
* m4/m4module.h: Updated prototypes.
* m4/hash.c (m4_hash_exit): Free the nodes on the free list.
* m4/hash.h: Updated prototypes.
* src/main.c (main): Use all these new functions to clean up as
much memory as possible before exit.
2001-09-30 Gary V. Vaughan <gary@gnu.org>
Reverted my large patch for removing the old m4_symbol
structure on 2001-09-20. We are still not happy about the way
trace works in conjunction with defn and undefine, and leaving
the reverted patch active prevents us from moving the traced
bit from the definition back to the symbol.
2001-09-30 Gary V. Vaughan <gary@gnu.org>
* configure.in: Moved to...
* configure.ac: ...here. Added a libtool like timestamped
banner, and tidied up the libltdl cruft.
* config/mkstamp: Script to extract a timestamp from ChangeLog.
* modules/Makefile.am (INCLTDL): Removed. This is required
only when libltdl is configured in a subdirectory.
* src/Makefile.am: Ditto.
(LIBADD_DL): No need to add this again, libtool already knows
that libm4.la depends on it.
* m4/Makefile.am: Automake sets variables from AC_SUBST. Use
them.
* TODO: stackovf.c is basically broken.
Reported by Marc Espie <espie@schutzenberger.liafa.jussieu.fr>
2001-09-28 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (EXTRA_DIST): `m4' is not to be shipped.
2001-09-27 Akim Demaille <akim@epita.fr>
* tests/m4.in: Don't use short options.
Simplify the stderr signature normalization.
2001-09-27 Akim Demaille <akim@epita.fr>
tests/m4 shall be position independent.
* tests/m4.in: New.
* tests/m4: Remove.
* tests/testsuite.at: No args to AT_INIT.
* configure.in, tests/Makefile.am: Adjust.
2001-09-22 Akim Demaille <akim@epita.fr>
Autotest has changed again.
* tests/Makefile.am (DISTCLEANFILES): Add package.m4.
(package.m4): Remove.
* configure.in: Adjust to LIBADD_GMP.
2001-09-21 Gary V. Vaughan <gary@gnu.org>
* config/gmp.m4 (AC_ARG_WITH): Removed.
(GMP_LIB): Renamed to LIBADD_GMP for consistency.
(AC_LIB_GMP): When performing a test compile against libgmp,
include the header gmp.h if possible, and link against -lgmp. If
they both work define USE_GMP.
* modules/Makefile.am (mpeval_la_LIBADD): Add LIBADD_GMP.
(mpeval_LTX_init_func): Complain on load that there was no libgmp
at compile time.
2001-09-20 Gary V. Vaughan <gary@gnu.org>
* m4/evalparse.c: Moved to...
* modules/evalparse.c: ...here. This code is shared between
modules/mpeval.c and modules/m4.c, so there is no need to pollute
the libm4 API with its details. Moderately rewritten to interface
into its clients more simply.
* m4/eval.c: Deleted. Migrated functionality to...
* modules/m4.c: ...here.
(builtin_eval): Implemented in terms of the new interface style.
* modules/mpeval.c (builtin_mpeval): Ditto.
* m4/m4module.h: Removed references to the former m4/eval.c.
* m4/Makefile.am (libm4_la_SOURCES): Removed eval.c.
(EXTRA_libm4_la_SOURCES): Deleted.
* modules/Makefile.am (EXTRA_m4_la_SOURCES): Reference evalparse.c.
(EXTRA_mpeval_la_SOURCES): Reference evalparse.c.
2001-09-20 Akim Demaille <akim@epita.fr>
* config/gmp.m4 (AM_WITH_GMP): Rename as...
(AC_LIB_GMP): this.
By default, use gmp.
Massive revamping.
* configure.in: Adjust.
Use Automake conditionals for USE_GMP.
Always compute sizeof (long long int).
This was a bug BTW, as `eval' (not `mpeval') depends on it:
before, it was used _only_ if mpeval was not activated.
* modules/Makefile.am (pkglibexec2dir, +pkglibexec2_LTLIBRARIES)
(mpeval_la_LIBADD): New macros.
* modules/mpeval.c: No longer be conditioned by WITH_GMP.
Indent.
* tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Create package.m4.
* tests/atlocal.in, tests/builtins.at: Depend upon USE_GMP, not
WITH_GMP.
2001-09-20 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (package.m4): New.
* tests/testsuite.at: Adjust AT_INIT and AT_VICTIMS.
2001-09-20 Gary V. Vaughan <gary@gnu.org>
More cleanup. After the last patch, m4_symbol holds nothing but
the head of a chain of m4_token_data. So I have removed the old
m4_symbol, so that m4_token_data chains are stored directly in the
value cell of a hash table node. But there's more... m4_symbol
was a more natural name for the symbol value cell, and now that it
is gone I have renamed the former m4_token_data structure to
m4_symbol. This change turned out to be a pig to get right, since
the original code didn't need to modify the value cell itself,
since changing the chain happened inside the m4_symbol that used
to be returned -- I had to pass the address of the value cell
across various function calls, incase the head value changed. I
also tightened up the memory management to help me find a nasty
memory corruption bug that took me all night to track down...
* m4/m4private.h (struct m4_symbol): Removed.
(struct m4_token_data): Renamed to `struct m4_symbol'. Updated
all references.
* m4/hash.c (m4_hash_iterator_value): Return the address of the
value cell. Updated all callers.
* m4/symtab.c: Took advantage of the simplification in the data
structures to rewrite a lot of this file more simply. There is
still some room for optimisation here, but we should tackle that
systematically closer to the release.
* m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
revealed. This version is ahead of CVS libtool until I get chance
to flush my changes.
* m4/module.c (m4_module_remove): New function that holds the core
of the old m4_module_unload.
(m4_module_unload): Use it.
(m4_module_unload_all): When we know the modules will never be
used again (i.e. on exit), free up as much module memory as
possible. There are still some artifacts from resident modules
living inside ltdl.c, but everything else is freed.
* m4/debug.c (m4_debug_exit): Free memory allocated in
m4_debug_init().
* m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
* m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
* src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
* m4/m4module.h: Updated prototypes.
* m4/hash.c (m4_hash_exit): Free the nodes on the free list.
* m4/hash.h: Updated prototypes.
* src/main.c (main): Use all these new functions to clean up as
much memory as possible before exit.
2001-09-18 Gary V. Vaughan <gary@gnu.org>
The `traced' flag needs to be attached to the definition of a
symbol rather than the current symbol containing the definition.
Implementing this showed up some long standing post 1.4 bugs in
flag propogation which I also fixed.
* m4/m4private.h (struct m4_symbol): Remove the traced flag.
(struct m4_token_data): And add it back in here.
* m4/input.c (init_macro_token): Propogate the traced flag
correctly.
* m4/macro.c (expand_argument): Ditto.
* tests/builtins.at (trace2, trace3): New tests based on Akim's
sadistic email ;-)
2001-09-08 Gary V. Vaughan <gary@gnu.org>
* m4/m4private.h (struct m4_token_data): Simplified by removing
the redundant `traced' flag, and one level of structure nesting.
(M4_TOKEN_DATA_FUNC_TRACED): Removed.
* m4/input.c (init_macro_token): No need to initialise removed
`traced' field.
* m4/macro.c (expand_argument): No need to copy it either.
* m4/utility.c (m4_token_data_func_traced): Or provide an access
function.
* m4/hash.c (m4_hash_bucket_insert): Symbol shadowing is no longer
dependant on multiple symbols with the same key, so preserving
relative symbol order in each bucket during resizing is no longer
required. The resize function is considerably faster as a result.
* m4/m4module.h, m4/builtin.c, m4/symtab.c:
s/m4_symbol_insert/m4_symbol_define/g;
s/m4_builtin_insert/m4_builtin_define/g;
s/m4_macro_insert/m4_macro_define/g. Updated all callers.
2001-09-08 Gary V. Vaughan <gary@gnu.org>
Get rid of m4_symbol_lookup_t entirely. With Akim's earlier
commits, the m4_lookup_symbol dispatch function is split into
specialised functions that must be called directly.
* m4/m4module.h (m4_symbol_lookup_t): Removed.
* m4/symtab.c (m4_lookup_symbol): Removed.
(m4_symbol_builtin, m4_symbol_macro): New functions.
* m4/builtin.c (m4_builtin_define): Split into...
(m4_builtin_pushdef, m4_builtin_insert): ...these.
(m4_macro_define): Split into...
(m4_macro_pushdef, m4_macro_insert): ...these.
* src/main.c (main): Set command line macros from `-D' parameters
using `m4_macro_define'.
2001-09-08 Gary V. Vaughan <gary@gnu.org>
* m4/symtab.c (m4_symtab_remove_module_references): Renamed as
this from m4_remove_table_reference_symbols().
* m4/m4module.h, m4/module.c: Updated all references.
2001-09-07 Akim Demaille <akim@epita.fr>
* modules/stdlib.c, modules/times.c: Misc cleanups.
2001-09-07 Akim Demaille <akim@epita.fr>
* configure.in: We now need Autoconf 2.52e.
* m4/m4module.h (m4_symbol_lookup_t): Remove `M4_SYMBOL_POPDEF'
and `M4_SYMBOL_DELETE'.
* m4/symtab.c (m4_lookup_symbol, symtab_debug): Adjust.
* src/main.c (main): Adjust.
2001-09-06 Gary V. Vaughan <gary@gnu.org>
Fix the obstack.h problem once and for all! At configure time we
can test for a system supplied obstack.h: depending on the
result, we now generate system.h with an #include of the correct
header. As a bonus, I've also added a --with-included-obstack,
incase the user doesn't like the system obstack for some
reason... and also we can test the shipped obstack on a system
that has oe of its own. We also now need to be careful to add
build directories to the include search path, since the generated
system.h will be in the build tree.
* configure.in (AC_CONFIG_FILES): Generate system.h from
system-h.in.
* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Determine whether to
include the system obstack header or the copy shipped with M4.
Allow the user to override configure and force the build to use
the shipped version.
* m4/system-h.in: New file, template for...
* m4/system.h: ...this. Now deleted.
* m4/m4module.h: Include system.h before everything else.
* src/freeze.c: Ditto.
* m4/Makefile.am (dist-hook): Remove generated system.h.
(INCLUDES): Check builddir for generated headers before checking
srcdir.
* modules/Makefile.am (INCLUDES): Ditto.
* src/Makefile.am (INCLUDES): Ditto.
2001-09-05 Gary V. Vaughan <gary@gnu.org>
* TODO: Remove the items that have been addressed already.
2001-09-05 Akim Demaille <akim@epita.fr>
* src/main.c (main): Standardize --version.
2001-09-05 Akim Demaille <akim@epita.fr>
* modules/format.c (format): Have a bigger `str'.
2001-09-05 Akim Demaille <akim@epita.fr>
Rationalize warnings, reporting the macro name as if it were a
program name, and assertions.
* m4/m4module.h (m4_lookup_symbol): Prototype, it is still used.
(M4WARN): New.
* m4/symtab.c (m4_lookup_symbol, m4_symbol_popdef)
(m4_symbol_delete):
Use assert for internal errors.
* m4/utility.c (m4_bad_argc, m4_numeric_arg, m4_dump_symbols): Use
M4WARN.
* modules/m4.c (undefine, defn, traceon, traceoff, dumpdef): use
M4WARN and assert.
* tests/builtins.at (pushpop): Adjust.
2001-09-05 Akim Demaille <akim@epita.fr>
* m4/symtab.c (m4_symbol_insert): Don't use `foo () || bar ()'
with pointers.
2001-09-05 Akim Demaille <akim@epita.fr>
* m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_LOOKUP.
* m4/macro.c, m4/symtab.c: Adjust.
2001-09-05 Akim Demaille <akim@epita.fr>
* m4/symtab.c (m4_symbol_popdef, m4_symbol_delete): Rename as...
(m4_symbol_pop, m4_symbol_del): this.
(m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_insert)
(m4_symbol_popdef, m4_symbol_delete): New.
(m4_lookup_symbol): Adjust.
* m4/m4module.h, src/main.c, modules/gnu.c, modules/m4.c: Adjust.
2001-09-05 Akim Demaille <akim@epita.fr>
* m4/m4module.h (m4_symbol_lookup): Rename as...
(m4_symbol_lookup_t): this.
2001-09-05 Akim Demaille <akim@epita.fr>
* m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_IGNORE,
unused.
* m4/symtab.c (m4_lookup_symbol): Adjust.
2001-09-03 Gary V. Vaughan <gary@gnu.org>
Bootstrap will now work with Libtool 1.4.1 or higher:
* bootstrap: Remove stale autom4te.cache files when
rebootstrapping.
* config/Makefile.am (ACLOCAL_MACROS): Add ltdl.m4 and
libtool.m4.
* bootstrap: Ignore acinclude.m4 now the we include ltdl.m4 and
libtool.m4 directly.
Run libtoolize to refresh ltmain.sh.
* config/ltmain.sh: Deleted.
* acinclude.m4: Deleted.
* m4/ltdl.c, m4/ltdl.h: Updated from libtool-1.4.1.
* config/debug.m4 (AC_LIBTOOL_COMPILER_OPTION): Provide a fallback
implementation for the cvs impaired libtool user.
2001-09-03 Akim Demaille <akim@epita.fr>
* m4/symtab.c (m4_lookup_symbol): Give more details when reporting
internal errors.
Avoid using `default' in switch, as it hides useful compiler
warnings when a case is forgotten.
2001-09-03 Akim Demaille <akim@epita.fr>
* src/main.c (MODULE_SHORTOPT, MODULEPATH_SHORTOPT): Remove, there
is no such thing as `WITH_MODULES'.
2001-09-03 Akim Demaille <akim@epita.fr>
Improve the test suite's selfcontainedness.
* doc/m4.texinfo: Let `input.m4' be the input file, not `in'.
(Include, Undivert): Tag the other input files.
* tests/generate.awk: Catch `@comment file:'.
`-I $src' is no longer needed.
`next' is really like `return': the rest is skipped.
Adjust to `input.m4'.
(fatal): New function.
* tests/foo, tests/incl.m4: Remove.
2001-09-01 Gary V. Vaughan <gary@gnu.org>
The shadowing mechanism and, infact, the whole symbol table
implementation was creaking under the weight of the features piled
on top of it. We now have a separate hash table module which will
dynamically resize to keep symbol density withing good performace
limits, and a new symtab module layered above it. Symbol lookups
are now marginally more efficient (since the shadowed flag is no
longer required) and symbol removal, such as on module unload, is
considerably faster due to a reorganisation of the data structures
used in symtab.c.
* src/main.c (main): Don't mention `-H'.
* doc/m4.texinfo (Invoking m4): Document that -H no longer has any
effect.
* NEWS: Updated.
* m4/hash.c: New generalised dynamic hash table data structure
management module.
* m4/hash.h: Public interface.
* m4/Makefile.am (pkginc_HEADERS): Add hash.h.
(libm4_la_SOURCES): Add hash.c.
* m4/symtab.c: More or less rewritten from scratch, within the
bounds of the previous API.
(m4_symtab_apply): A cleaner version of the old hack_all_symbols
call. Updated all callers.
* m4/m4module.c: #include <m4/hash.h>, and changed all affected
declarations to reflect API changes.
(M4INIT): Generate a declaration too, to avoid the warning with
--enable-debug builds.
(M4FINISH): Ditto.
(HASHMAX): Removed.
* m4/utility.c (hash_table_size): Removed.
(m4_dump_symbols): Rewritten to build and qsort an array of symbol
names, which are then looked up by builtin_dumpdef() as necessary.
This implies a small speedup in builtin_symbols(), which discarded
all of the symbol info under the old call.
* m4/m4private.h (m4_symbol): Removed shadowed flag -- symbol
shadowing is implicit in respect to the new data structures.
symbol names are no longer duplicated here, they are stored in the
key field of the hash table.
Moved macro_args and blind_no_args...
(m4_token_data): ...to here.
m4/macro.c (expand_macro): Added a name argument since the symbol
name is no longer copied into each struct m4_symbol. Modified all
callers.
(collect_arguments): Ditto.
* modules/m4.c (set_trace): Ditto.
* modules/gnu.c (builtin_symbols): Updated.
* src/freeze.c (produce_symbol_dump): Much improved in light of
the improved symbol table layout.
2001-09-01 Gary V. Vaughan <gary@gnu.org>
* m4/m4private.h (SYMBOL_NEXT): Move into m4's name space; renamed
to M4_SYMBOL_NEXT.
(SYMBOL_TRACED): Similarly renamed by prefixing with `M4_'.
(SYMBOL_SHADOWED, SYMBOL_MACRO_ARGS, SYMBOL_BLIND_NO_ARGS,
SYMBOL_NAME, SYMBOL_TYPE, SYMBOL_TEXT, SYMBOL_FUNC,
SYMBOL_HANDLE): Ditto.
* m4/builtin.c, m4/macro.c, m4/symtab.c, m4/utility.c,
modules/gnu.c, modules/m4.c, src/freeze.c,
src/main.c: Updated all references.
* src/Makefile.am (m4_SOURCES): Don't list $(M4OBJS) here, since
Automake 1.5 chokes on dynamic source file lists, Besides, it is
already listed in m4_LDADD... how did that ever used to work?
* configure.in (getopt.h): Use AC_CONFIG_LINKS instead of a manual
link.
* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
Suggested by Tim Van Holder <tim.van.holder@pandora.be>
* tests/m4: Don't call the m4 wrapper script with libtool, it
works fine all by itself.
2001-08-30 Gary V. Vaughan <gary@gnu.org>
The experimental `changeword' feature never took off, and has
no obvious advantages over `changesyntax' to compensate the
enormous speed penalty it carries:
* configure.in (ENABLE_CHANGEWORD): Removed.
* m4/m4module.h (m4_set_word_regexp): Removed.
* m4/m4private.h (m4_token_data): Removed original_text field.
* m4/utility.c (m4_token_data_orig_text): Removed.
* m4/input,c: Removed all conditional ENABLE_CHANGEWORD code.
* m4/macro.c: Ditto.
* src/main.c: Ditto.
* modules/Makefile.am (changeword.la): Removed.
* modules/changeword.c: File removed.
* doc/m4.texinfo: References to changeword and --word-regexp
removed.
* po/POTFILES.in: modules/changeword.c removed.
* tests/atlocal.in (ENABLE_CHANGEWORD): Removed.
* tests/builtins.at (changeword): Test removed.
2001-08-30 Akim Demaille <akim@epita.fr>
* bootstrap.sh: Create aclocal.m4 instead of modifying it.
This also help having a single list of m4 files: in
config/Makefile.am.
* config/Makefile.am (STANDARD_MACROS): Rename as...
(ACLOCAL_MACROS): this.
(list-standard-macros): Remove.
(spy): New.
2001-08-29 Gary V. Vaughan <gary@gnu.org>
In an attempt to moderate my egomania...
* tests/modules.at: Remove attributions.
* tests/generate.awk: When making substitutions to "@&t@", either
"&" or "\&" in the substitution string argument to gsub refer back
to the matched text. "@\\&t@" seems to work though, Tests 43 and
67 now pass for me.
2001-08-29 Akim Demaille <akim@epita.fr>
* tests/others.at (changeword, ddivert, debug, esyscmd, exp, gmp)
(include, indir, multiquotes, patsubst, pushdef/popdef, regexp)
(sync-lines, trace, translit, undivert, wrap): Move to...
* tests/builtins.at: this new file.
* tests/others.at (Discard comments, import-environment): Move to...
* tests/options.at: this new file.
2001-08-29 Akim Demaille <akim@epita.fr>
* tests/others.at (Freezing modules)
(--module-directory: absolute path, modpath2, modpath3)
(M4MODPATH: absolute path, modtest, shadow, unload): Move to...
* tests/modules.at: here, new file.
* tests/others.at, tests/generate.awk: Add a banner.
* tests/testsuite.at: Adjust.
(AT_CHECK_M4_FILTER): New, but unused.
2001-08-29 Akim Demaille <akim@epita.fr>
* tests/testsuite.at (AT_CHECK_M4): Don't pass -I, let the tests
handle that.
* tests/others.at (wrap): Inline wrap.m4.
(shadow): Inline shadow.m4.
(iso8859): Don't specify the path from top_srcdir, but from srcdir.
* tests/m4: Simplify.
2001-08-29 Akim Demaille <akim@epita.fr>
* tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Use autom4te's
--language.
2001-08-29 Akim Demaille <akim@epita.fr>
* tests/generate.awk (normalize): s/@__@/@&t@/.
2001-08-28 Akim Demaille <akim@epita.fr>
* examples/indir.m4, tests/others.at (indir): s/nonsens/nonsense/.
2001-08-28 Gary V. Vaughan <gary@gnu.org>
* bootstrap (generate.awk): Generate test cases with new script.
2001-08-27 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (installcheck-local): Don't use
`dc_install_base' which is not visible here, but `exec_prefix'
which is clearly the RT anyway.
* tests/testsuite.at (AT_CHECK_M4): Don't pass -M here since it is
related to testing a now installed m4.
* tests/m4: Do it here.
2001-08-27 Akim Demaille <akim@epita.fr>
* tests/others.at (indir): Formatting change.
2001-08-27 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (installcheck-local): New.
* tests/testsuite.at (AT_CHECK_M4): Pass `-b' so that C-c works on
the test suite.
Prefer options over envvars.
* src/main.c (main): First bug caught by the test suite (yeah!):
--batch lacked a `break' which resulted in an accidental
invocation of --discard-comments.
2001-08-27 Akim Demaille <akim@epita.fr>
* tests/others.at (capitalize, changeword, comments, ddivert)
(debug, esyscmd, exp, foreach, forloop, fstab, hanoi, include)
(misc, multiquotes, patsubst, pushdef/popdef, regexp, reverse)
(sysv-args, trace, translit, undivert): Don't rely on files in
examples/: AT_DATA them.
2001-08-27 Akim Demaille <akim@epita.fr>
Let the test suite use a wrapper around the not installed m4 to
pretend it is (installed).
* bootstrap (aclocal.m4): Output AC_SUBST's and AM_CONDITIONAL's in
such a way that m4 does not process them.
* configure.in: The package name seems to be `m4', not `M4'.
* tests/m4: New.
* tests/atlocal.in (at_package, M4): Remove.
* tests/testsuite.at, tests/others.at: Use m4, not $M4.
2001-08-27 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (CLEANFILES): Remove.
(DISTCLEANFILES, clean-local): New.
* examples/mktests.sh: Remove.
2001-08-27 Akim Demaille <akim@epita.fr>
* Makefile.am (AUTOMAKE_OPTIONS): 1.5.
Don't use aclocal: it's written by hand.
* aclocal.m4: m4_include all the files instead of being built by
aclocal.
* bootstrap: Help automake find the AC_SUBSTs and AM_CONDITIONALs
until it reads the traces by itself.
* configure.in: Require Autoconf 2.42c as we are now using
AC_CONFIG_TESTDIR instead of AT_CONFIG.
Catch unexpanded `jm_' macros.
* config/atconfig.m4: Remove.
* config/error.m4: new.
* config/Makefile.am: Ship the files included by aclocal.m4.
* tests/Makefile.am (TESTSUITE_SOURCES): Rename as...
(TESTSUITE_AT): this, to please Automake.
(TESTSUITE): This target uses autotest/autotest.m4, not
autotest/general.m4.
* tests/testsuite.at: Prereq Autotest 2.52c.
* examples/Makefile.am (pkgdata_DATA): Rename as...
(dist_pkgdata_DATA): this.
* doc/Makefile.am (man_MANS): Rename as...
(dist_man_mans): this.
2001-08-20 Gary V. Vaughan <gary@gnu.org>
* m4/system.h [cygwin*]: Thanks to Paul Sokolovsky and
Robert Collins, building on Cygwin no longer requires Windows
import and export symbol decorations.
* m4/m4module.h (M4_SCOPE) [cygwin*]: Deleted all occurences.
* m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
* m4/debug.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* m4/error.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* m4/input.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* m4/macro.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* m4/output.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
* configure.in (LIBM4_DLL_IMPORT) [cygwin*]: Don't set this
anymore.
* src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
* modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.
2001-08-20 Gary V. Vaughan <gary@gnu.org>
Ansify the source. Previously we had a mix, where my code was
in a K&R compatible style, and the preexisting code was in ANSI
style. Nothing is lost wrt release 1.4 by reverting to ANSI,
and now the code base is much cleaner.
* m4/system.h: Remove M4_PARAMS macro and all users. Remove
VOID macro and all users.
* m4/m4module.h: Ansify function prototypes and headers.
* m4/builtin.c: Ditto.
* m4/evalparse.c: Ditto.
* m4/input.c: Ditto.
* m4/macro.c: Ditto.
* m4/module.c: Ditto.
* m4/output.c: Ditto.
* m4/path.c: Ditto.
* m4/symtab.c: Ditto.
* m4/utility.c: Ditto.
* modules/format.c: Ditto.
* modules/gnu.c: Ditto.
* modules/m4.c: Ditto.
* modules/mpeval.c: Ditto.
* src/freeze.c: Ditto.
* src/m4.h: Ditto.
* src/main.c: Ditto.
2001-08-20 Akim Demaille <akim@epita.fr>
* config/atconfig.m4: s/EOF/ATEOF/, so that configure can be
generated with stock 2.52.
2001-08-20 Akim Demaille <akim@epita.fr>
* config/atconfig.m4: New, until part of Autoconf per se.
* configure.in (AT_CONFIG): Use it.
Adjust.
* tests/mkconfig.sh, tests/atconfig.in, tests/defs: Remove.
* tests/atlocal.in: New.
* tests/generate.awk: For the time being, the empty quadrigraph is
`@__@'.
* tests/others.at (changeword, gmp): Check the configuration
variable against `yes'.
* tests/testsuite.at (dnl): Allow it, as it's used all over the
place.
2001-08-20 Akim Demaille <akim@epita.fr>
* m4/utility.c (m4_numeric_arg): Spell out the culprit.
* modules/m4.c (undivert): Disable the possibility of undiverting
several files at once: it is not documented, it is inconsistent
with the other macros, it can be straightforwardly mocked by
several invocations, and most importantly, it prevents the
possibility of other kinds of extension.
Use `m4_numeric_arg'.
2001-08-20 Akim Demaille <akim@epita.fr>
* examples/include.m4: Typo.
* tests/generate.awk: Really add it.
* tests/Makefile.am: Adjust.
* tests/others.at (Discard comments): It sure fails without `-c'.
(include, undivert): Add -I examples/.
2001-08-20 Akim Demaille <akim@epita.fr>
Use sprintf, not ecft and friends since it is standard, portable,
simplifies the code, and since the latter is even deprecated
according to the GNU libc documentation.
* modules/format.c: Drop evct support.
2001-08-19 Gary V. Vaughan <gary@gnu.org>
* config/debug.m4 (M4_AC_CHECK_DEBUGGING): Cleaned up. Don't test
for `-pipe' here...
* configure.in: ...do it here instead.
* c-boxes.el: Deleted.
* m4/builtin.c: Reformat box comments to be closer to GNU
standards.
* m4/debug.c: Ditto.
* m4/eval.c: Ditto.
* m4/evalparse.c: Ditto.
* m4/input.c: Ditto.
* m4/m4module.h: Ditto.
* m4/macro.c: Ditto.
* m4/output.c: Ditto.
* m4/symtab.c: Ditto.
* m4/utility.c: Ditto.
* modules/changeword.c: Ditto.
* modules/format.c: Ditto.
* modules/gnu.c: Ditto.
* modules/load.c: Ditto.
* modules/m4.c: Ditto.
* modules/modtest.c: Ditto.
* modules/mpeval.c: Ditto.
* modules/perl.c: Ditto.
* modules/shadow.c: Ditto.
* modules/stdlib.c: Ditto.
* modules/time.c: Ditto.
* src/freeze.c: Ditto.
* src/main.c: Ditto.
2001-08-17 Gary V. Vaughan <gary@gnu.org>
* m4/module.c: Fixup some errors in the description comment.
2001-08-17 Akim Demaille <akim@epita.fr>
* tests/others.at (iso8859): Specify the path to the M4 test file.
* tests/testsuite.at (AT_CHECK_M4): Normalize the path of input
files in error messages.
2001-08-17 Akim Demaille <akim@epita.fr>
* tests/testsuite.at (AT_CHECK_M4): Anchor M4PATH in $top_srcdir.
* tests/others.at: Adjust input files paths.
* tests/atconfig.in: Set top_builddir.
* tests/Makefile.am: Adjust.
`testsuite' is in src, not build.
2001-08-17 Akim Demaille <akim@epita.fr>
* tests/Makefile.am (EXTRA_DIST): Ship generate.awk.
(generate.at): Install a temporary hack until the actual
generate.awk is added to the repository.
* tests/atconfig.in: New.
2001-08-17 Akim Demaille <akim@epita.fr>
Really apply the patch ``Drop Autoconf 2.13 compatibility.''
2001-08-17 Akim Demaille <akim@epita.fr>
* doc/m4.texinfo: Promote proper quotation.
2001-08-17 Akim Demaille <akim@epita.fr>
Remove the non Autotest tests.
* tests/other-tests/capitalize.test,
* tests/other-tests/changeword.test,
* tests/other-tests/comments.test, tests/other-tests/ddivert.test,
* tests/other-tests/debug.test,
* tests/other-tests/discard-comments.m4,
* tests/other-tests/discard-comments.test,
* tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
* tests/other-tests/foreach.test, tests/other-tests/forloop.test,
* tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
* tests/other-tests/gmp.m4, tests/other-tests/gmp.test,
* tests/other-tests/hanoi.test,
* tests/other-tests/import-environment.m4,
* tests/other-tests/import-environment.test,
* tests/other-tests/include.test, tests/other-tests/indir.test,
* tests/other-tests/iso8859.m4, tests/other-tests/iso8859.test,
* tests/other-tests/misc.test, tests/other-tests/modfreeze.test,
* tests/other-tests/modpath1.test, tests/other-tests/modpath2.test,
* tests/other-tests/modpath3.test, tests/other-tests/modpath4.test,
* tests/other-tests/modtest.test,
* tests/other-tests/multiquotes.test,
* tests/other-tests/patsubst.test, tests/other-tests/pushpop.test,
* tests/other-tests/regexp.test, tests/other-tests/reverse.test,
* tests/other-tests/shadow.test, tests/other-tests/stackovf.test,
* tests/other-tests/sync-lines.m4,
* tests/other-tests/sync-lines.test,
* tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
* tests/other-tests/translit.test, tests/other-tests/undivert.test,
* tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
* tests/other-tests/wrap.test: Remove.
* tests/run-test, tests/get-them: Remove.
* tests/Makefile.am: Adjust.
2001-08-17 Akim Demaille <akim@epita.fr>
others.at no longer depends on other-tests/.
* tests/others.at (stackovf): You're actually...
(sync-lines): this.
(modfreeze, modpath1, modpath2, modpath3, modpath4, modtest, shadow)
(unload.test): Keep their authorship.
(discard-comments, gmp, import-environment, modfreeze)
(sync-lines): Embed the input files.
* tests/stackovf.test: Copy from other-tests/stackovf.test.
* tests/iso8850.m4: Copy from other-tests/iso8859.m4.
2001-08-17 Akim Demaille <akim@epita.fr>
* doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
(M4exit): Tag the exit status of the example.
* tests/get-them: Adjust.
* tests/generate.awk: New, based on get-them.
* tests/Makefile.am: Adjust to generate `generated.at'.
* tests/testsuite.at: Adjust.
(AT_CHECK_M4): Don't overquote. Blush...
2001-08-17 Akim Demaille <akim@epita.fr>
Start using Autotest. atconfig creation is still lacking.
* examples/patsubst.m4, modules/modtest.m4, modules/shadow.m4,
* examples/reverse.m4, tests/other-tests/import-environment.m4,
* tests/other-tests/iso8859.m4: Don't produce trailing blanks.
* tests/other-tests/import-environment.test: Don't check LANGUAGE
as it might be `unset', or set to `C'.
* tests/other-tests/iso8859.test, tests/other-tests/modpath1.test,
* tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
* tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
* tests/other-tests/patsubst.test, tests/other-tests/reverse.test,
* tests/other-tests/shadow.test: Adjust.
* tests/testsuite.at, tests/others.at: New.
* tests/Makefile.am: Adjust.
2001-08-17 Akim Demaille <akim@epita.fr>
Drop Autoconf 2.13 compatibility.
* configure.in (changeword): No need to undefine it, as anyway if
it's defined, M4sugar moved it as m4_changeword.
And anyway, proper quotation is enough.
(m4_pattern_allow): As it exists in 2.50, just use it.
(AC_OUTPUT): Split in AC_CONFIG_FILES and AC_CONFIG_COMMANDS.
Don't handle Gettext's duties, let it handle them.
* config/gnu-obstack.m4: Use m4_pattern_allow directly.
2001-08-17 Akim Demaille <akim@epita.fr>
* modules/m4.c (m4_dumpdef): Output to stderr, not m4_debug.
(m4_errprint): Use fputs.
* doc/m4.texinfo (Invoking m4) <--error-output>: errprint and
dumpdef are not concerned.
(Dumpdef, Errprint): Emphasize their insensitivity to
--error-output.
* doc/Makefile.am: Add `TAGS' support.
(MAINTAINERCLEANFILES): Remove texinfo.tex and mdate-sh which are
in `config/' now.
* config/Makefile.am (MAINTAINERCLEANFILES): New.
2001-08-17 Akim Demaille <akim@epita.fr>
* modules/Makefile.am (ETAGS_ARGS): New.
2001-08-17 Akim Demaille <akim@epita.fr>
* m4/symtab.c (m4_hack_all_symbols, m4_lookup_symbol): Formatting
changes.
2001-08-17 Akim Demaille <akim@epita.fr>
* m4/builtin.c (m4_macro_define): Do not reset SYMBOL_TRACED.
2001-08-17 Akim Demaille <akim@epita.fr>
* m4/m4module.h (m4/list.h): Don't include it.
2001-08-16 Gary V. Vaughan <gary@gnu.org>
m4_modules are no more, we use lt_dlhandles directly and let
latest libltdl features manage the list of loaded modules.
* acinclude.m4: Regenerated.
* m4/ltdl.c: Updated from master copy.
* m4/module.c: Reimplemented to take advantage of advances in
libltdl.
* m4/builtin.c (m4_builtin_find_by_name): Traverse loaded module
list with lt_dlhandle_next.
(m4_builtin_find_by_func): Ditto.
(m4_builtin_table_install): Use lt_dlhandle.
(m4_macro_define): Ditto.
(m4_macro_table_install): Ditto.
m4/module.h: Prototype new module management API.
(m4_modules): No longer required.
(m4_module_init_t, m4_module_finish_t): POSIX namespace
violations, renamed to...
(m4_module_init_func, m4_module_finish_func): ...these,
respectively.
(M4INIT_HANDLER): Clean way to declare init functions in modules.
(M4FINISH_HANDLER): And similarly for finish functions.
* m4/system.h (_CONC): Used by M4INIT_HANDLER and M4FINISH_HANDLER
-- Add indirection to the CONC macro so that arguments are
correctly expanded.
* modules/modtest.c (m4_init_module): Replaced with M4INIT_HANDLER.
* modules/shadow.c (m4_init_module): Ditto.
Due to new init function semantics, be careful to perform the
initialisation only on first load.
* modules/perl.c (m4_init_module): Ditto. And Ditto.
(m4_finish_module): Replaced with M4FINISH_HANDLER.
Due to new finish function semantics, be careful to perform the
finalisation only on first load.
* m4/m4private.h (m4_module): Removed in favour of...
(m4_module_data): ...structure without all the wrapper fields.
Instances of this new structure are stored associated lt_dlhandles
with lt_dlcaller_data_set().
* m4/builtin.c (m4_builtin_define): Takes a handle argument
instead of the old module argument.
(m4_builtin_table_install): Ditto.
* modules/load.c (m4_resident_module): Removed. This is no
longer implemented as a magic symbol...
* modules/m4.c (m4_resident_module): Ditto.
* modules/load.c (M4INIT_HANDLER): ...the module init function now
uses the ltdl api to make the module resident.
* modules/m4.c (M4INIT_HANDLER): Ditto.
* modules/load.c (builtin_modules): Traverse the loaded module
list with lt_dlhandle_next.
(builtin_load): Much simplified in light of the reimplemented
module loader.
* src/freeze.c (produce_module_dump): Cleaned up and optimised in
light of the m4/module.c rewrite.
(produce_symbol_dump): Ditto.
(reload_frozen_state): Ditto.
* m4/list.c, m4/list.h: Files deleted. No longer required.
* m4/Makefile.am (pkginc_HEADERS): Delete list.h reference.
(libm4_la_SOURCES): Delete list.c reference.
* m4/m4private.h (m4_token_data): Add a handle field. This
eliminates many of the searches to find the handle associated with
various tokens that are passed between functions.
(struct m4_symbol): Removed the module field. The
module association does not belong with the symbol...
* m4/input.c (struct m4_builtin): ...it belongs with the builtin
that the module implementation code is from. Added a handle
field.
(m4_push_macro): Add a `handle' argument. Changed all callers.
(init_macro_token): Set the `handle' field for the
m4_token_data.
* m4/macro.c (expand_argument): Copy the new handle field during
reassignment.
* modules/m4.c (macro_install): Use the new handle field to
optimise the search for the correct builtin structure, and pass
the handle details to m4_builtin_define.
2001-08-15 Akim Demaille <akim@epita.fr>
* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Be sure `m4/' exists
when creating `m4/obstack.h'.
* tests/Makefile.am (TESTS_ENVIRONMENT): Pass top_srcdir and
top_builddir.
* tests/defs: Make them absolute.
(CDPATH) Neutralize.
* tests/gethem: Use them.
2001-08-14 Gary V. Vaughan <gary@gnu.org>
* config/ltmain.sh: Doh! Import again for a quoting fix that
prevented any regression test from passing.
* m4/m4module.h (obstack.h): Choose between installed version
and shipped version based on configure tests.
* src/freeze.c (obstack.h): Ditto.
* acconfig.h: Removed. No longer required.
* bootstrap: Rewritten to play nicely with Autoconf 2.5x.
* configure.in (MY_NAME, MY_VERSION): Define these once, and feed
them to AC_INIT and AM_INIT_AUTOMAKE.
* Makefile.am (AUTOMAKE_OPTIONS): Remove `gnits' which would
disallow MY_NAME and MY_VERSION arguments to AM_INIT_AUTOMAKE.
* config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Don't choke on
shell variable m4_cv_func_obstack_h.
* tests/defs (M4): Be more careful about relative path to libtool
script and m4 binary by using $srcdir.
* src/main.c (main): Use lt_dlinsertsearchdir to prepend -M
optargs to the existing libltdl search path.
* acinclude.m4: Regenerate from latest libtool,m4 and ltdl.m4.
* m4/ltdl.c: Updated.
* m4/ltdl.h: Ditto.
* config/ltmain.sh: Ditto.
2001-08-11 Gary V. Vaughan <gary@gnu.org>
* src/main.c (main): Add `-b' (for `batch') mode switch to force
interactive mode off.
2001-08-10 Akim Demaille <akim@epita.fr>
* configure.in: Require Autoconf 2.52.
(AC_ARG_PROGRAM): Remove, handled by Automake.
(m4_getopt): Rename as...
(m4_getopt_h): this.
Allow the tokens `m4_cv_*', `m4_top_srcdir', and `m4_getopt_h'.
Undefine `changeword' only if defined.
* config/gnu-obstack.m4: Require Autoconf 2.52.
(M4_AC_FUNC_OBSTACK): Rename `m4_obstack' and `m4_obstack_h'.
Allow this token.
2001-08-09 Yuji Minejima <ggb01164@nifty.ne.jp>
* doc/m4.texinfo: Fix some typos, and apply some small
clarifications.
2001-08-09 Andreas Schwab <schwab@suse.de>
* src/main.c (main): Fix improper uses of error (missing format
string).
2001-08-07 Akim Demaille <akim@epita.fr>
Improve `make distcheck'.
* configure.in: Be sure to be able to run `mkconfig.sh' when src
!= build.
* Makefile.am (dist-hook): Remove, as it is no longer needed.
* doc/m4.texinfo (Include): Add missing blank.
* m4/Makefile.am (EXTRA_DIST): Distribute gnu-obstack.h and
obstack.c.
2001-08-07 Akim Demaille <akim@epita.fr>
* m4/evalparse.c: A better introductory comment.
* m4/m4module.h (M4_DEBUG_PRINT2): s/M4_debug/m4_debug/.
* m4/macro.c: Adjust old comments.
* modules/README: Typo.
2001-08-07 Akim Demaille <akim@epita.fr>
* config/gnu-obstack.m4: New.
2001-08-07 Akim Demaille <akim@epita.fr>
* config/Makefile.am, config/stackovf.m4: New.
* configure.in, Makefile.am: Adjust.
2001-04-08 Roderick Koehle <Roderick.Koehle@infineon.com>
* modules/format.c (format): Formatting for %f was not
interpreting the position of the decimal point correctly for
whole numbers.
2000-12-01 Gary V. Vaughan <gary@gnu.org>
* TODO: Removed m4exit bug.
* modules/load.c (m4_resident_module): Make this module resident.
* module/m4.c (m4_resident_module): Ditto.
* m4/modules.c (m4_module_load): Use new ltdl resident modules
feature to mark modules as resident if they export
`m4_resident_module' as TRUE.
(m4_module_unload): Do not remove resident modules, and take care
with symbol insertion and deletion with resident modules.
* m4/ltdl.c, m4/ltdl.h: Update to latest unreleased versions to
use resident modules feature.
2000-11-30 Gary V. Vaughan <gary@gnu.org>
* TODO: Updated. Removed some cruft that has since been fixed
or implemented. Added some more entries.
* NEWS: Updated.
* README: Updated.
* modules/README: Updated.
* doc/m4.texinfo: Updated.
* modules/gnu.c (builtin_functions): Make indir orthogonal to
builtin, in that each is recognised as a macro only with parameters
(builtin_indir): Passing 0 arguments is now an error, as with
builtin.
* src/main.c (usage): Added missing description of `-c' option.
2000-11-29 Gary V. Vaughan <gary@gnu.org>
Consolidate the myriad of dispersed test scripts into the
tests subdirectory. I think I now have all the file where I
want them, so there shouldn't be anymore upheaval =)O|
Honest!
* tests/Makefile.am: Updated to run the new tests added below.
* tests/other-tests/capitalize.test, tests/other-tests/comments.test,
tests/other-tests/ddivert.test, tests/other-tests/debug.test,
tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
tests/other-tests/foreach.test, tests/other-tests/forloop.test,
tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
tests/other-tests/hanoi.test, tests/other-tests/include.test,
tests/other-tests/indir.test, tests/other-tests/misc.test,
tests/other-tests/modfreeze.test, tests/other-tests/modpath1.test,
tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
tests/other-tests/multiquotes.test, tests/other-tests/patsubst.test,
tests/other-tests/pushpop.test, tests/other-tests/regexp.test,
tests/other-tests/reverse.test, tests/other-tests/shadow.test,
tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
tests/other-tests/translit.test, tests/other-tests/undivert.test,
tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
tests/other-tests/wrap.test: New tests based on the contents
of the tests removed below.
* examples/Makefile.am, modules/Makefile.am: Updated to
reflect removed tests.
* examples/defs,modules/defs: Removed.
* examples/capitalize.test, examples/comments.test,
examples/ddivert.test, examples/debug.test,
examples/esyscmd.test, examples/exp.test,
examples/foreach.test, examples/forloop.test,
examples/fstab.test, examples/hanoi.test,
examples/include.test, examples/indir.test,
examples/misc.test, examples/multiquotes.test,
examples/patsubst.test, examples/pushpop.test,
examples/regexp.test, examples/reverse.test,
examples/sysv-args.test, examples/trace.test,
examples/translit.test, examples/undivert.test,
examples/wrap.test, modules/frozen.m4, modules/modfreeze.test,
modules/modpath1.test, modules/modpath2.test,
modules/modpath3.test, modules/modpath4.test,
modules/modtest.test, modules/shadow.test,
modules/unfrozen.m4, modules/unload.test: Removed.
Move the implementation of GMP support for the mpeval() builtin
into a loadable module that depends on libgmp. mpeval() and
eval() share a common parser, now in m4/evalparser.c; the code
in m4/numb.c and m4/numb.h is now physically split between
m4/eval.c (the eval() backend) and modules/mpeval.c (the
mpeval() backend), rather than being differentiated by cpp
macros and multiple inclusion. The mpeval module is always
built but will generate an diagnostic if it is used from an
installation that didn't link in the gmp library.
* modules/Makefile.am: build and install the new mpeval module.
* modules/mpeval.c: Now contains the former parts of m4/numb.c
and m4/numb.h that are required for gmp support in mpeval().
* m4/Makefile.am (libm4_la_SOURCES): Removed evalmp.c.
* m4/evalmp.c: Removed.
* m4/m4module.h: Removed conditional prototype for
m4_mp_evaluate().
* m4/eval.c: Rewritten. Contains the former parts of m4/numb.c
and m4/numb.h that do not rely on gmp.
* m4/evalparse.c: New file, contains the shared parts of the
eval() and evalmp() parser implementations, and is no longer
unencumbered by cpp magic to uncover the right parts.
* m4/numb.h: Removed. It's former contents are split between
m4/eval.c and modules/mpeval.c.
* m4/numb.c: ditto.
* tests/other-tests/changeword.test: New test. Rudimentary
testing of changeword builtin runs only if --wnable-changeword
was used at configure time.
* tests/mkconfig.sh: Solaris sed (at least) does not parse nested
alternation correctly. Split into two expressions to compensate.
* m4/input.c (m4_input_init): Use m4_ prefix on m4_set_word_regexp.
* modules/Makefile.am: Build changeword module.
* modules/changeword.c (m4_macro_table): Define __m4_changeword__
only when --enable-changeword was passed to configure.
(builtin_changeword): If --enable-changeword was not used, then
report that changeword() builtin has no support in m4 binary.
2000-11-28 Gary V. Vaughan <gary@gnu.org>
* src/main.c (main): Fixed a particularly nasty bug is
user_search_path setting -- the -M flag processing must be
extremely careful with search path ordering, or else the default
installed module directory (possibly containing modules from a
previous release) is placed earlier in the search path than any -M
arguments (which are relied upon to load uninstalled modules with
most of the tests in the regresion suite).
* modules/load.c (builtin_load): Nasty hack to prevent adding
symbols to symtab again if a module is loaded more than once.
* modules/m4.c (builtin_ifelse): removed unused variable argv0.
* m4/symtab.c (m4_remove_table_reference_symbols): Fixed a
possible NULL pointer dereference.
* m4/module.c (m4_module_find_by_modname): Renamed from
m4_module_modname_find. Fixed all references.
(m4_module_find_by_builtin): New function.
* modules/modfreeze.test: load the `load' module with each
invocation.
* src/freeze.c (produce_frozen_state): Simplified in light of
module field in m4_symbol. Allow a third argument for text macros
to name the originating module.
(reload_frozen_state): ditto.
* m4/m4module.h: Fixup prototypes.
* m4/builtin.h (m4_builtin_define): Add a module argument so
that symbols can be registered against the defining module.
(m4_macro_define): ditto.
* m4/m4private.h (m4_symbol): Make the module field const to save
on casting in the rest of the code.
(SYMBOL_MODULE): New macro.
* m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
symbol reference maintenance bugs when removing a symbol from the
symtab.
* src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.
2000-11-27 Gary V. Vaughan <gary@gnu.org>
* configure.in (m4_cv_func_obstack): A better check for whether
libc has an obstack implementation.
* m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.
* configure.in (--with-modules): Changed semantics. This
option is now used to list modules to be preopened.
* src/m4.h: #include "ltdl.h" unconditionally.
* src/main.c: Removed all dependencies on WITH_MODULES.
* src/freeze.c: ditto.
* modules/Makefile.am: ditto.
* m4/m4.c (builtin_m4exit): ditto.
* modules/modpath1.test: ditto.
* modules/modpath2.test: ditto.
* modules/modpath3.test: ditto.
* modules/modpath4.test: ditto.
* modules/modtest.test: ditto.
* modules/shadow.test: ditto.
* modules/unload.test: ditto.
* m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
comes up on demand in LTLIBOBJS now.
* configure.in (getopt_long): Creating and relying on a link for
getopt.h on hosts with no getopt_long() of thier own works
correctly now. This is necessary so that callers of getopt_long()
can simply `#include <getopt.h>': the naive way of doing this
would end up using our own getopt.h and the installed
getopt_long(), which is asking for trouble!
(obstack_init): A similar argument applies to obstack.h and
obstack_init().
* m4/ltdl.c: Upgraded to latest bleeding edge version again.
On Solaris-2.5 (at least) the native dlopen implementation
gets confused about m4.o when looking for module "m4". This
version always looks for .la an .$lib_ext suffixed names first
to work around the problem. Sigh.
* po/POTFILES.in: Take account of these file movements.
* src/Makefile.am (m4_SOURCES): removed eval.c.
(EXTRA_m4_SOURCES): removed numb.c and numb.h.
* m4/Makefile.am (libm4_la_SOURCES): added eval.c.
(EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
* modules/m4.c (builtin_eval): Use m4_evaluate().
* m4/eval.c: Moved here from src/eval.c to facilitate
implementation of eval() builtin as part of the `m4' loadable
module.
(m4_evaluate): renamed from evaluate for namespace cleanliness.
* m4/numb.c: Moved here from src/numb.c, since it is #included
into eval.c at compile time.
* m4/m4module.h (m4_evaluate): Added prototype.
* src/m4.h (evaluate): Removed prototype.
2000-11-25 Gary V. Vaughan <gary@gnu.org>
* modules/perl.c (builtin_perleval): Use PL_na for
compatibility with perl-5.6.
* src/main.c (main): It is now safe to
``m4_module_install("m4")'', without tripping over the m4
binary itself!
* m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
versions having fixed the insidious module search order bug.
* m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.
* configure.in: Figure out whether to use the installed
getopt.h or the supplied one.
* src/Makefile.am: ditto.
* po/POTFILES.in: List files in their new positions.
* config/ltmain.sh: This needs to be checked in to match the
libtool macros copied to acinclude.m4 (until a released
libtool copes with m4's needs).
* bootstrap: Run gettextize.
2000-11-24 Gary V. Vaughan <gary@gnu.org>
* AUTHORS: Added my details.
* TODO: updated.
* NEWS: updated.
* bootstrap: temporary update until released libtool catches up.
* All files: Use new GNU GPL copyright blurb with current contact
address.
* configure.in (LTLIBOBJS): Use canonical code for calculation of
this variable.
* config: renamed acm4 directory to config to be more like
other autoconfiscated packages.
* configure.in (M4_AC_CHECK_DEBUGGING): Use it.
* config/debug.m4: New file implementing configure macros to add
suitable debug flags to the compiler invocation.
* modules/load.c: New file implementing the ``load'' and
``unload'' builtins.
* tests/get-them: Set the module search directory to the modules
build directory in generated tests.
* modules/shadow.test: ditto.
* modules/modtest.test: ditto.
* modules/modpath1.test: ditto.
* modules/modpath2.test: ditto.
* modules/modpath3.test: ditto.
* modules/modpath4.test: ditto.
* modules/modtest.test: ditto.
* modules/modfreeze.test: ditto.
* modules/unload.test: ditto.
* modules/changeword.c: New file implementing the ``changeword''
builtin as a loadable module.
* modules/mpeval.c: New file implementing the ``mpeval'' builtin
as a loadable module.
* src/main.c (main): Load the gnu module if m4 was started
normally -- i.e. without the -G option.
* modules/gnu.c: New file implementing a new loadable module wuth
definitions for all the gnu extension builtins.
* modules/format.c: Moved here from src/format.c. Now included
directly by gnu.c.
* src/main.c (main): Load the traditional module if m4 was
started in `no_gnu_extensions' mode.
* modules/traditional.c: New file implementing the ``unix'' macro,
required when m4 is executed in traditional mode, as a loadable
module.
* src/main.c: Renamed from m4.c to avoid confusion with
modules/m4.c.
(main): Always load the m4 module.
* modules/m4.c: New file implementing a new loadable module with
definitions for all m4 builtins that are not gnu extensions.
* m4/Makefile.am: Adjusted to take new files below into account.
* m4/m4module.h: Prototypes for exported functions and types moved
to this directory from the src directory.
* m4/m4private.h: Moved here from src/m4private.h to facilitate
the migration of all builtin implementations to loadable modules.
* m4/macro.c: Moved this file here from the src directory,
renaming all exported symbols to use the prefix ``m4_''.
* m4/builtin.c: ditto.
* m4/module.c: ditto.
* m4/symtab.c: ditto.
* m4/debug.c: ditto.
* m4/input.c: ditto.
* m4/output.c: ditto.
* m4/path.c: ditto.
* m4/ltdl.h, m4/ltdl.c: ditto.
* m4/utility.c: Odd functions moved here from files in the src
directory to facilitate builtin migration.
2000-08-12 Gary V. Vaughan <gary@gnu.org>
* src/builtin.c (dump_symbols): Use "Undefined name `%s'" for
error message, to make translators' jobs a little easier.
(builtin_builtin): ditto.
(builtin_traceon): ditto.
(builtin_traceoff): ditto.
Reported by Akim Demaille <akim@epita.fr>
* m4/Makefile.am (pkgincdir): Deleted. Use automake's built in
pkgincludedir instead.
* m4/m4module.h (rquote): Renamed with a prefix of `m4_' since
it is exported globally. Fixed all references.
(lquote): ditto.
(bcomm): ditto.
(ecomm): ditto.
(DEF_RQUOTE): Renamed with a prefix of `M4_' since it is exported
globally. Fixed all references.
(DEF_LQUOTE): ditto.
(DEF_BCOMM): ditto.
(DEF_ECOMM): ditto.
2000-07-28 Gary V. Vaughan <gary@gnu.org>
* NEWS: updated.
* TODO: updated.
* configure.in (AC_CHECK_FUNCS): added bzero and calloc.
(AC_OUTPUT): touch stamp-h.in, not stamp-h.
* doc/m4.texinfo: Fixed to work with --html option of makeinfo.
Removed `Prev', `Next' and `Up' fields of all @nodes now that
makeinfo calculates them for us, and to make any future
reorganisation easier.
(Frozen files): Document format version 2.
`V' now takes argument `2'.
`F' can take a single argument if symbol and builtin names
are the same, or 3 arguments if the builtin is from a module.
New `S' specification for saving syntax table contents.
New `M' specification for saving loaded module names.
* src/freeze.c: Implement them.
* src/input.c (syntax_code): For interpreting frozen syntax
state.
* examples/Makefile.am: Add the contents of the WWW directory to
the distribution.
* examples/WWW/Makefile: ditto,
(%.htm): Compares file contents (not just sizes) to determine
whether a change has occured.
* examples/WWW/_header.htm: Bumped version number.
* examples/WWW: Regenerated content.
* m4/Makefile.am (AUTOMAKE_OPTIONS): Support for non-ANSI
compilers comes much easier without ansi2knr.
* src/Makefile.am (AUTOMAKE_OPTIONS): ditto.
* m4/list.c: New generic list container type.
* m4/list.h: Interface to new container type.
* m4/Makefile.am (pkginc_HEADERS): Install list.h.
(libm4_la_SOURCES): compile and link list.c.
* src/builtin.c (builtin_tables): Use list container.
* src/module.c (symtab): ditto.
* src/symtab.c (symtab): ditto.
* m4/system.h: New file for common preprocessor definitions.
* m4/Makefile.am (pkginc_HEADERS): install system.h.
* m4/error.c: Use system.h in place of inline preprocessor.
* m4/error.h: ditto.
* m4/module.c: ditto.
* m4/module.h: ditto.
* m4/xmalloc.c: ditto.
* m4/error.h (error_one_per_line): Make M4_GLOBAL_DATA for WIN32
compatibility.
* m4/xmalloc.c (xmalloc_exit_failure): ditto.
* m4module.h (syntax_table): Renamed with a prefix of `m4_' since
it is exported globally. Fixed all references.
(builtin): ditto.
(module_init_t): ditto.
(module_finish_t): ditto.
(token_data): ditto.
(SYNTAX_OTHER): Renamed with a prefix of `M4_' since
it is exported globally. Fixed all references.
(SYNTAX_IGNORE): ditto.
(SYNTAX_SPACE): ditto.
(SYNTAX_OPEN): ditto.
(SYNTAX_CLOSE): ditto.
(SYNTAX_COMMA): ditto.
(SYNTAX_DOLLAR): ditto.
(SYNTAX_ACTIVE): ditto.
(SYNTAX_ESCAPE): ditto.
(SYNTAX_ALPHA): ditto.
(SYNTAX_NUM): ditto.
(SYNTAX_ALNUM): ditto.
(SYNTAX_LQUOTE): ditto.
(SYNTAX_RQUOTE): ditto.
(SYNTAX_BCOMM): ditto.
(SYNTAX_ECOMM): ditto.
(SYNTAX_VALUE): ditto.
(SYNTAX_MASKS): ditto.
(IS_OTHER): ditto.
(IS_IGNORE): ditto.
(IS_SPACE): ditto.
(IS_OPEN): ditto.
(IS_CLOSE): ditto.
(IS_COMMA): ditto.
(IS_DOLLAR): ditto.
(IS_ACTIVE): ditto.
(IS_ESCAPE): ditto.
(IS_ALPHA): ditto.
(IS_NUM): ditto.
(IS_ALNUM): ditto.
(IS_LQUOTE): ditto.
(IS_RQUOTE): ditto.
(IS_BCOMM): ditto.
(IS_ECOMM): ditto.
(TOKEN_EOF): ditto.
(TOKEN_NONE): ditto.
(TOKEN_STRING): ditto.
(TOKEN_SPACE): ditto.
(TOKEN_WORD): ditto.
(TOKEN_SIMPLE): ditto.
(TOKEN_MACDEF): ditto.
* m4/m4module.h (voidstar): Removed in favour of `VOID' for
consistency. Fixed all references.
(STRING): Renamed to `m4_string' for consistency, and because if
is exported globally. Fixed all references.
(token_type): Renamed to `m4_token_t' for the same reasons.
(token_data_type): Renamed to `m4_token_data_t' for the same
reasons.
* m4/m4module.h (XCALLOC): Wrapper macro which handles type
sizes.
(XMALLOC): ditto.
(XREALLOC): ditto.
(XFREE): Wrapper macro which avoids freeing NULL pointers.
* m4/m4module.h (m4_macro): New type for module defined user
macros.
* modules/modtest.c (m4_macro_table): Define module user macros.
* modules/shadow.c (m4_macro_table): ditto.
* m4/m4module.h (M4BUILTIN_HANDLER): For defining handlers
declared with M4BUILTIN.
* m4/xmalloc.c: Use memset if bzero is not available when
emulating calloc with malloc.
(xcalloc): Fallback to malloc/bzero if calloc is not available.
(xfree): Added for consistency. Will not try to free NULL
pointers.
* src/m4.c (xfree): Deleted in favour of the above.
* m4/xmalloc.c (WITH_DMALLOC): preprocess away the entire file if
linking with libdmalloc.
* m4/xstrdup.c (WITH_DMALLOC): ditto.
* modules/frozen.m4: New test case.
* modules/unfrozen.m4: ditto.
* modules/modfreeze.test: New test.
* modules/unload.test: ditto.
* modules/Makefile.am (EXTRA_DIST): Distribute them.
(TESTS): Use them.
* modules/modpath1.test: Don't try this test if module support is
not compiled in.
* modules/modpath2.test: ditto.
* modules/modpath3.test: ditto.
* modules/modpath4.test: ditto.
* modules/modtest.test: ditto.
* modules/shadow.test: ditto.
* modules/perl.c: New module.
* modules/perl.m4: Example of using it.
* modules/Makefile.am (perl_la_SOURCES): Build new perl module.
* src/m4.c (main): Assume interactive mode if STDIN is connected
to a tty.
Changed startup sequence slightly so that syntax is not
initialised from here when loading a frozen file.
* src/builtin.c: Much improved macro definition style.
* src/m4private.h: Internal structures for m4_builtin and
m4_macro instances. These are not exposed to module writers.
* src/module.c (module_modname_find): Find a module structure
from the its name.
(make_macro_table): Build an internal macro table from a external
definition.
(make_builtin_table): Build an internal builtin table from an
external definition.
* src/module.c (module_unload): Be extremely careful to remove
builtins and macros that match the module being unloaded -- no
longer assume that the top element can be removed incase another
odule defines an identical name.
* src/symtab.c (remove_table_reference_symbols): remove all symbol
table entries which refer to a given builtin table.
* src/builtin.c (remove_tables): Use it!
2000-07-13 Thomas Tanner <tanner@ffii.org>
* Makefile.am (SUBDIRS): we need modules/ for "make dist"
* acm4/modules.m4: deleted
* bootstrap: don't libtoolize libltdl!
* configure.in: AC_SUBST INCLTDL and LIBLTDL, -with-modules flag:
if set, enable WITH_MODULES and add modules to DLPREOPEN
* examples/misc.test: redirect standard output
* lib/Makefile.am: don't use DLLDFLAGS
* lib/m4module.c: include necessary headers to silence GCC -Wall
* lib/m4regex.c: fixes to silence GCC -Wall
* modules/Makefile.am: don't use DLLDFLAGS, add INCLTDL to INCLUDES,
build modules conditionally
* modules/shadow.c: define symbol aliases before using them
* modules/test.c: define symbol aliases before using them
* po/de.po: update translation
* src/Makefile.am: delete pathconf.h, set MODULE_PATH to
pkglibexecdir, don't use DLLDFLAGS, add INCLTDL to INCLUDES and
LIBLTDL to LIBS.
* src/m4.c: initialize libltdl's preloaded symbols via
LTDL_SET_PRELOADED_SYMBOLS
* src/module.c: libltdl's memory management must be initialized
before calling lt_dlinit!, fix warnings
2000-01-18 Gary V. Vaughan <gary@gnu.org>
* README: Caveat about nls not supported by dll architecture on
Windows.
* TODO (MODULE SPECIFIC ISSUES): more ideas for the future.
* tests/Makefile.am (stamp-TESTS): now works with VPATH.
* src/Makefile.am (m4_LDADD): use $(builddir) for VPATH.
* modules/Makefile.am (LIBS): ditto.
(INCLUDES): search $(top_srcdir) (for eg. <m4/error.h>) and then
$(top_srcdir)/m4 (for only <m4module.h>).
* modules/shadow.test: fixed for VPATH.
* modules/modtest.test: ditto.
* modules/modpath4.test: ditto.
* modules/modpath3.test: ditto.
* modules/modpath2.test: ditto.
* modules/modpath1.test: ditto.
* modules/time.test: Removed due to timezone dependence,
* modules/Makefile.am (TESTS): Removed time.test.
* configure.in: Use $3 of AC_DEFINE so that we can,,,
* acconfig.h: Remove everything except the gettext parameters.
* acm4/gmp.m4: Add a serial number, and take advantage of $3 of
AC_DEFINE.
* acm4/ltdl.m4: Updated to latest from libtool cvs.
* acm4/modules.m4: Remove code which duplicates ltdl.m4 and
increment serial number.
* Makefile.am (SUBDIRS): Moved @MODULES_DIR@ to compile before
src dir and immediately after libm4 is built for confidence that
it doesn't rely on the src directory.
(SUBDIRS): Moved doc dir to the end since helptoman.pl and
makeinfo stop the build on cygwin (because they don't work).
* src/m4.h: use GNU standard #if HAVE_CONFIG_H ideom.
* m4/m4private.h: ...is not a public header, so moved to src.
Add `#include <config.h>', `#define _COMPILING_M4' and
`#include "m4.h".
* m4/Makefile.am (noinst_HEADERS): remove m4private.h.
* src/Makefile.am (noinst_HEADERS): add m4private.h.
* src/builtin.c: `#include "m4private.h"' now takes care of the
above. Duplicates removed.
* src/debug.c: ditto.
* src/eval.c: ditto.
* src/evalmp.c: ditto.
* src/format.c: ditto.
* src/freeze.c: ditto.
* src/input.c: ditto.
* src/m4.c: ditto.
* src/macro.c: ditto.
* src/module.c: ditto.
* src/numb.h: ditto.
* src/output.c: ditto.
* src/path.c: ditto.
* stackovf.c: ditto.
* symtab.c: ditto.
* po/POTFILES.in: compensate for renaming of lib/*.
* m4/Makefile.am (CLEANFILES): @EXEEXT@ left libtool wrapper behind.
(INCLUDES): Look first in $(top_srcdir) (for eg. <m4/error.h>),
and then in $(top_srcdir)/lib (for eg. "m4private.h").
* src/Makefile.am (m4_LDADD): replace libi/libm4.la with
m4/libm4.la.
* m4/m4error.h: Renamed error.h, for installation to
$prefix/include/m4..
* m4/m4obstack.h: Renamed obstack.h, for same reason.
* m4/m4regex.h: Renamed regex.h, for same reason.
* m4/m4error.c: Renamed error.c, and use #include "error.h".
* m4/m4obstack.c: Renamed obstack.c, and fix #includes.
* m4/m4regex.c: Renamed regex.c, and fix #includes.
* lib: moved to m4 to easily support header installation to
$prefix/include/m4.
* Makefile.am (SUBDIRS): renamed lib dir to m4.
* configure.in (AC_OUTPUT): reference m4/Makefile.in.
* acm4/regex.m4: Point to m4/regex.c.
* examples/foreach.m4: Sanitise quoting.
* examples/foreach.test: New torture test.
From Akim Demaille <akim@epita.fr>
2000-01-17 Gary V. Vaughan <gary@gnu.org>
* src/ltdl.c: Use access() to abort doomed module load attempts
if module file does not exist.
* src/Makefile.am (m4_SOURCES, EXTRA_SOURCES): getopt.o and
getopt1.o will already be used if appropriate, so I moved getopt.c
and getopt1.c from m4_SOURCES to EXTRA_SOURCES.
* modules/modpath1.test: Use correct filename in header line.
* modules/modpath2.test: ditto.
* modules/modpath3.test: ditto.
* modules/modpath4.test: ditto.
Without these changes lt_dlopen("test") attempts to
LoadLibrary("/bin/test") on Windows, which although harmless
generates a spurious error message which spoils most of the tests:
* modules/Makefile.am (EXTRA_DIST): s/test.m4 /modtest.m4 /
(TESTS): s/test.test /modtest.test /
(pkglibexec_LTLIBRARIES): s/test.la /modtest.la /
(test_la_SOURCES, test_la_LDFLAGS): renamed to use modtest.
* modules/modpath1.test: s/test.m4 /modtest.m4 /
* modules/modpath2.test: ditto.
* modules/modpath4.test: ditto.
* modules/modpath3.test: s/-m test /-m modtest /
* modules/shadow.m4: use {un,}loadmodule(`modtest').
2000-01-16 Gary V. Vaughan <gary@gnu.org>
* src/ltdl.c (find_file): Updated to new version with fixed memory
allocation bug in `next'.
* src/ltdl.h: updated to match.
* modules/Makefile.am: Cleaned up and reordered.
2000-01-16 Rene' Seindal <rene@seindal.dk>
* modules/Makefile.am (TESTS): New tests for the module system.
* modules/*.test: New files.
* src/m4.c (main): Added call to module_init().
Treats -M and -m as the arguments -D -U and -t, ie deferred.
* src/m4.h: Added declaration of module_init().
* src/module.c (module_init): No longer static
* modules/Makefile.am ({test,shadow,time,stdlib}_la_LDFLAGS):
Added to shut up automake about non standard libtool library
names.
* src/module.c: Disabled DEBUG by default.
* modules/README: Changed example from unload.m4 to shadow.m4
* modules/shadow.m4: Renamed from unload.m4
* modules/Makefile.am (EXTRA_DIST): Removed unload.m4.
* src/m4.c (main): Functionality for -m and -M were reversed.
Fixed.
2000-01-12 Gary V. Vaughan <gary@gnu.org>
* doc/help2man.pl: updated to version 1.020.
* lib/COPYING.LIB: updated to version 2.1.
* lib/m4module.h: restructure the M4_SCOPE code to work when
creating a dll which links with libm4.la and both DLL_EXPORT
(for the new dll) and LIBM4_DLL_IMPORT (for m4module.h) are
both defined.
2000-01-11 Gary V. Vaughan <gary@gnu.org>
Merged the following changes from my tree:
1999-06-15 Gary V. Vaughan <gary@gnu.org>
* configure.in (AC_LIBTOOL_WIN32_DLL): Declare that m4 has been
ported to compile shared libs.
* configure.in (LIBM4_DLL_IMPORT): Discover whether we need to
use `__declspec(dllimport)' when linking libm4.la on win32.
* src/Makefile.am (m4_LDFLAGS): Use dllimport if necessary.
* configure.in (M4OBJS): Discover whether we need the shipped
implementation of getopt_long.
* src/Makefile.am (m4_LDADD): Link the getopt objects into the
main binary here, as opposed to the module library in lib/libm4.la.
1999-06-14 Gary V. Vaughan <gary@gnu.org>
* modules/README: Updated to describe the improved libltdl based
module scheme.
* README (cygwin): Added some compilation notes for building m4
correctly under cygwin.
* TODO: Cleaned out the entries for the module system since they
are now implemented.
* *.[ch]: __P is in the compiler's reserved namespace, so replaced
all instances of __P with M4_PARAMS.
* lib/getdate.h: removed unreferenced file.
* lib/m4private.h: New file to define the private interface to the
token_data struct, which must be shared between m4module.c, and
builtin.c but not exported to modules built from the installed
m4module.h since it's size changes depending on compile time
options.
* src/m4.h: Lots of stuff moved to lib/m4module.h.
* lib/m4module.h: New file to define the interface available when
compiling m4 modules.
* lib/m4module.c: Moved parts of builtin.c, and m4.c which are
necessary for module compilation into this new file.
* lib/Makefile.am (include_HEADERS): install headers (renamed to
avoid nameclash with other system headers) necessary for compiling
modules.
(libm4_la_SOURCES): always include error.c, obstack.c and regex.c
so that modules can include the (renamed) installed headers and
be guaranteed a matching implementation.
* lib/m4error.h: renamed from error.h.
* lib/m4obstack.h: renamed from obstack.h.
* lib/m4regex.h: renamed from regex.h.
* configure.in (AC_REPLACE_FUNCS): Don't look for a system
implementation, simply include the shipped version
unconditionally, otherwise it is hard for a module to know
whether the m4obstack.h header it is using matches the
implementation it ends up linking against.
(jm_WITH_REGEX): Include regex into libm4 unconditionally for
the same reason.
1999-05-18 Gary V. Vaughan <gary@gnu.org>
* examples/misc.test: Don't run this test on machines which don't
have a root user in /etc/passwd (e.g. cygwin).
* tests/get-them (/^@example$/): Error messages might have a
``.exe'' suffix to the program name, or else use the libtool
``.libs/lt-m4'' binary, or generally have an unexpected path. All
of these cases are now catered for when comparing error messages
in generated tests.
* tests/other-tests/*.test: ditto.
* examples/*.test: ditto.
* tests/defs (M4): use libtool execute mode.
* examples/defs (M4): ditto.
* tests/get-them (END): explicitly close any open file.
(printthem): In a regular expression, '{' is the start of a repeat
count! Use `[{]' for a literal open brace.
(/^@node /): Don't use substr on a string shorter than the trim
length.
1999-05-17 Gary V. Vaughan <gary@gnu.org>
* configure.in (LTLIBOBJS): calculated from LIBOBJS, and
substituted.
(AC_LIBTOOL_DLOPEN): declare that this package will use dlopen.
2000-01-10 Andreas Schwab <schwab@suse.de>
* tests/other-tests/gmp.test: Find config.sh in build directory.
* configure.in: Find tests/mkconfig.sh in $srcdir.
* configure.in: Define HAVE_SIGINFO_T if siginfo_t is defined in
<signal.h> (for SUS2 compliant systems).
* src/stackovf.c: Check for HAVE_SIGINFO_T in addition to
HAVE_SIGINFO_H.
2000-01-10 Rene' Seindal <rene@seindal.dk>
* Prerelease 1.4o.
* TODO, NEWS: Cleaned up and updated.
* src/m4.c (main): New variable exit_status for exit status in
case of unreadable files. Now m4 will exit with EXIT_FAILURE if a
file cannot be read instead of EXIT_SUCCESS.
* src/builtin.c (m4_indir): Changed error message to help
translators (from Akim Demaille <demaille@inf.enst.fr>).
* lib/obstack.[hc], getopt*.[ch]: Updated to newest version from
Cygnus.
* lib/error.[hc], lib/regex.[hc], lib/strtol.c: Updated to version
from glic 2.1.2.
* src/input.c (match_input): Reordering of code, to avoid multiple
calls to push_string_init() from obstack_grow(), which can happen
with some compilers (found and fixed by James Bonfield
<jkb@mrc-lmb.cam.ac.uk>).
* src/stackovf.c: Added prototypes for ultrix.
(setup_stackovf_trap): Added __P to cast.
(Both reported by John David Anglin <dave@hiauly1.hia.nrc.ca>)
2000-01-09 Rene' Seindal <rene@seindal.dk>
* doc/m4.texinfo (Changequote): Added comment about changing
quotes when the old quote is a part of the new.
* src/builtin.c (expand_ranges): Added break after trailing dash.
This caused misbehavious on some systems (found and fixed by Akim
Demaille <demaille@inf.enst.fr>).
* AUTHORS: Thomas Tanner included
* acconfig.h: Added entry for ss_sp (see below).
* configure.in (use_stackovf): Added check for stack_t with member
ss_base instead of ss_sp (BSDI notably). (Reported by Paul Eggert
<eggert@twinsun.com>).
* doc/m4.texinfo (Frozen files): Added a simpler example for
generating frozen files from several input files.
1999-11-14 Paul Eggert <eggert@twinsun.com>
* po/POTFILES.in: Add lib/getopt.c, lib/obstack.c,
lib/regex.c, lib/xmalloc.c.
1999-11-10 Rene' Seindal <rene@seindal.dk>
* Makefile.am (ACLOCAL_AMFLAGS): Passes -I acm4 to aclocal.
* src/module.c: reindented.
(module_load): return if this is a repeated load of same module.
(module_init): slight change of logic to avoid repeated
initialisation debug messages.
* Makefile.am (DIST_SUBDIRS): Added to ensure modules/ is included
in the distribution.
* modules/Makefile.am (test_la_LDFLAGS): set to -module to silence
automake warnings about missing lib prefix.
(time_la_LDFLAGS): ditto
(stdlib_la_LDFLAGS): ditto
1999-11-10 Paul Eggert <eggert@twinsun.com>
* src/m4.h: Include error.h, since our macros use error.
* src/m4.c: Don't need to include error.h.
1999-11-09 Paul Eggert <eggert@twinsun.com>
* src/m4.h (voidstar): Define to void * if __STDC__ is defined
and zero, as Solaris 7 cc does.
(bcopy): Remove macro; no longer needed with new obstack.h.
* src/output.c (freeze_diversions): Don't assume that a
diversion size can fit in `int'. Check for diversion file
size too large to be printed with `unsigned long'.
* src/Makefile.am (CFLAGS): Omit -Wall.
* src/stackovf.c (setup_stackovf_trap): Remove cast to unsigned.
* src/debug.c (trace_format):
Use ANSI C if (defined __STDC__ && __STDC__) || defined PROTOTYPES.
* src/freeze.c (produce_frozen_state):
Don't assume string lengths fit in int.
1999-10-13 Rene' Seindal <rene@seindal.dk>
* configure.in (ALL_LINGUAS): Added Greek translation (el).
(ALL_LINGUAS): Added Czech translation (cs).
1999-03-30 Gary V. Vaughan <gary@gnu.org>
* src/builtin.c: moved module loading functions into...
* src/module.c: entirely new implementation using libltdl.
* po/POTFILES.in: added src/module.c.
* modules/Makefile.am (LTLIBRARIES): Removed lib prefix as these
are modules, not linktime libraries.
(LDFLAGS): added -no-undefined -module and -avoid-version flags.
* modules/stdlib.c (m4_macro_table): use <name>_LTX collision
avoidance on exported symbols.
* modules/test.c (m4_macro_table, m4_init_module,
m4_finish_module): ditto.
* modules/time.c (m4_macro_table): ditto.
* modules/time2.m4: new file which requires command line loading
of modules.
* src/m4.c (--load-module): dynamically load named runtime module
into running executable before reading the source.
(--module-directory): prepend a directory to the module search
path.
(module_init()): Do this the first time we load a module instead;
if the module subsystem is broken normal m4 scripts can still run.
* src/m4.h (install_builtin_table): is now exported.
1999-03-26 Gary V. Vaughan <gary@gnu.org>
* src/module.c: removed. No longer required.
* po/POTFILES.in: removed src/module.c.
* Makefile.am (MAINTAINERCLEANFILES): Remove all the files that
the bootstrap script can recreate.
* acm4/Makefile.am (MAINTAINERCLEANFILES): ditto.
* doc/Makefile.am (MAINTAINERCLEANFILES): ditto.
* examples/Makefile.am (MAINTAINERCLEANFILES): ditto.
* lib/Makefile.am (MAINTAINERCLEANFILES): ditto.
(AUTOMAKE_OPTIONS): reduced strictness to allow COPYING.LIB.
* modules/Makefile.am (MAINTAINERCLEANFILES): ditto.
* src/Makefile.am (MAINTAINERCLEANFILES): ditto.
* tests/Makefile.am (MAINTAINERCLEANFILES): ditto.
* acinclude.m4: removed. `aclocal -I acm4' handles this much
better.
* acm4/Makefile.am (ACINCLUDE_M4): ditto.
* acm4/gettext.m4: removed. It causes a multiple definition vs.
the installed gettext.m4 file when running aclocal.
1999-03-25 Gary V. Vaughan <gary@gnu.org>
* configure.in (AM_INIT_AUTOMAKE): bumped version number to
distinguish this from the last prerelease.
(AC_LIBLTDL_CONVENIENCE): build libltdl as a convenience library
in its own subdirectory.
* modules/Makefile.am (*_SOURCES): renamed to use libtool's "no
lib prefix on a module" feature.
(LDFLAGS): Added `-module -avoid-version' flags to build
versionless module libraries.
* src/builtin.c (m4_load_module): use libltdl.
(module_unload_all): use libltdl.
* src/m4.c (module_init): initialise module loading on demand for
better diagnostics, and so that m4 will still work even if
the module code is broken.
* src/m4.h (module_init): removed. No longer relevant.
* modules/stdlib.c (m4_macro_table): use stdlib_LTX_ prefix on
exported symbols for compatibility with dlpreopening.
* modules/test.c (m4_macro_table, m4_init_module,
m4_finish_module): ditto.
* modules/time.c (m4_macro_table): ditto.
* bootstrap: New file. Runs all the autoutils in the right order
after a fresh checkout, or a make maintainer-clean.
1999-02-18 Akim Demaille <demaille@inf.enst.fr>
* src/builtin.c (dump_symbols): New function, factoring common
content of m4_dumpdef and m4_symbols.
(m4_dumpdef): Use it.
(m4_symbols): New function, implementing `symbols'. Use it.
* doc/m4.texinfo: Fixed missing commas after @xref, so that the
file compile with modern makeinfo.
(Symbols): New node, documenting symbols.
(direntry): Modernize.
1998-12-11 Rene' Seindal <rene@seindal.dk>
* src/builtin.c (predefined_tab): New predefined macros
__m4_changeword__, __m4_gmp__ and __m4_modules__ for testing for
configure time options.
1998-12-01 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* src/module.c (module_try_load): Don't try to be clever and
overwrite argument string. Instead allocate all constructed
strings locally, since they can have arbitrary lengths. Make
arguments pointers to const.
(module_search): Simplify due to above change.
1998-11-29 Rene' Seindal <rene@seindal.dk>
* Prerelease 1.4n.
* tests/Makefile.am (OTHER_TESTS, OTHER_FILES): New tests.
* tests/other-tests/import-environment.{m4,test}: New test.
* tests/other-tests/discard-comments.{m4,test}: New test.
* doc/m4.texinfo (Invoking m4): Updated for --discard-comments.
* src/m4.c (main): New option -c --discard-comments.
New global variable discard_comments.
* src/m4.h (token_type): New TOKEN_NONE for tokens to be
discarded, ie never returned from next_token().
Added declaration of discard_comments.
* src/input.c (next_token): Now loops until token type is not
TOKEN_NONE. Comments are now given this type when comments should
be discarded.
* doc/m4.texinfo (Invoking m4): Updated for --import-environment
and mpeval.
1998-11-28 Rene' Seindal <rene@seindal.dk>
* src/m4.c (main): New option --import-environment (no single
letter option).
* When configured with --with-gmp both the normal (fast) eval()
and the gmp aware mpeval() are defined. To restore previous
bahaviour use "define(`eval', defn(`mpeval'))".
* tests/other-tests/gmp.m4: Changed to use mpeval().
* src/evalmp.c: New file for compiling eval.c as gmp aware.
Just defines USE_GMP if WITH_GMP is defined and includes eval.c.
* src/eval.c: Now includes "numb.c" directly. Everything in this
file must by static, except evaluate(), which is changed to
mp_evaluate() if USE_GMP in force.
* src/numb.c: Changed to be included by eval.c instead of being
compiled separately. Everything is declared static.
* src/numb.h: Removed declarations of functions, as numb.c is now
included by eval.c.
* src/builtin.c: Declaration of m4_mpeval() added.
Inserted `mpeval' in builtin table.
(do_eval): New function with common code for m4_eval and m4_mpeval.
(m4_mpeval): New function for gmp version of eval.
* src/m4.h: Declaration of mp_evaluate().
* src/Makefile.am (m4_SOUCES): Includes mpeval.c.
(EXTRA_m4_SOURCES): Now has numb.c and numb.h
* src/m4.c (main): m4 --version also shows which options were used
for compilation, such as: "GNU m4 1.4n (options: modules gmp)"
1998-11-27 Rene' Seindal <rene@seindal.dk>
* Error messages now always print program name before input file
name as specified by GNU coding standards. Reported by Akim
Demaille <demaille@inf.enst.fr>.
* doc/m4.texinfo (Include): Change due to changed error message
format.
(Eval): Do.
* tests/get-them: Minor change to sed script due to changed error
message format.
* src/m4.c (print_program_name): New func used to print program
name, input file and line number in error (). Used as an
error_print_progname handler.
(reference_error): Removed.
(main): Assigns error_print_progname.
* src/m4.h (M4ERROR): Removed reference_error ().
1998-11-25 Rene' Seindal <rene@seindal.dk>
* Updated to libtool 1.2b.
* src/builtin.c (install_builtin_table): Added braces to avoid
warning of ambiguous 'else'.
* src/module.c: Inserted search path code from path.c modified to
use new interface.
(module_init): Configured default path used only if M4MODPATH is
not set.
(module_try_load): Now reads libMODULE.la as generated by libtool
for actual module name.
(module_load): Gives better error messages on failure.
* src/m4.h: Added declarations of structures and functions for
generic search path handling.
* src/path.c: Removed all module specific code and introduced new
functions of more generic search path handling.
1998-11-24 Rene' Seindal <rene@seindal.dk>
* configure.in: Defines INTLINCL to -I$(top_srcdir)/intl if using
included gettext, as <libintl.h> might not be found
otherwise. Reported by Andrew Bettison <andrewb@zip.com.au>.
1998-11-22 Rene' Seindal <rene@seindal.dk>
* src/output.c (insert_diversion): Fixed bug that might cause m4
to read from standard output! Triggered by input
'divert(1)undivert(0)'. Test for divnum>0 changed to divnum>=0,
so now 'undivert(0)' does nothing.
1998-11-18 Rene' Seindal <rene@seindal.dk>
* Prerelease 1.4m.
* src/input.c (set_word_regexp): Fixed a bug, where word_regexp
could be changed when compiling a illegal regexp, causing later
use of the regexp to dump core.
* src/module.c (module_load): Changed error message to conform to
standards.
* src/m4.c (usage): Added message about reporting bugs.
* doc/m4.texinfo (Changeword): Corrected a wrong example.
(Changeword): Added note about the type of regexps used.
* ltconfig, ltmain.sh: New files from Libtool 1.2.
* configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
and AM_PROG_LIBTOOL.
* acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
with libtool.
* modules/Makefile.am: Changed completely to compile modules using
libtool. The modules are compiled as shared libraries, and are
renamed when installed.
* src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
USE_SHL_LOAD to HAVE_SHL_LOAD
* src/builtin.c (shipout_string): Now tests for a NULL string.
* src/module.c: New level of indirection around non-portable
functions to load shared objects. Intended to encapsulate the non
portable parts better and to reduce the number of #ifdefs in the
code.
* Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
directory modules/ to the distribution.
1998-11-15 Rene' Seindal <rene@seindal.dk>
* Prerelease 1.4l.
* modules/stdlib.c: New module `stdlib' defining some standard
functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.
* src/builtin.c (shipout_string): New convenience function for
builtins and modules.
* src/module.c (module_load): Tentative support for
shl_load/shl_findsym, but I cannot test it. Copied from MetaHTML.
* Makefile.am (SUBDIRS): Directory modules added if configured.
* modules/Makefile.am: Now correctly compiles and installs
modules in pkglibexecdir.
* src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
These two are now initialised by autoconf macros.
* src/path.c (module_env_init): MODULE_PATH is always on the
search path.
* src/Makefile.am: Now generated pathconf.h which defined the
default MODULE_PATH.
* configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
where modules are installed.
* acm4/modules.m4: Enhanced with code from MetaHTML, contributed
by Brian J. Fox <bfox@datawave.net>. This change allow modules to
build and install automatically, and it is prepared for other
interfacec than dlopen().
* src/builtin.c (predefined_tab): Added __m4_version__ for the
current version of GNU m4. It is a GNU extension.
1998-11-14 Rene' Seindal <rene@seindal.dk>
* tests/Makefile.am (GENERATED_TESTS): Added new
generated-tests/changesy.8.test
* doc/m4.texinfo (Changesyntax): Documentation for escape
syntax class.
* src/macro.c (expand_token): Check for escaped macro call before
symbol table lookup.
* src/builtin.c (m4_changesyntax): Added `@' flag to define escape
characters
* src/input.c: New static variable use_macro_escape, which is TRUE
iff some character has code SYNTAX_ESCAPE
(input_init): Added initialisation of use_macro_escape.
(check_use_macro_escape): New function to synchronise
use_macro_escape with the syntax table.
(set_quotes): Added call to check_use_macro_escape()
(set_comment): Do.
(set_syntax): Do.
(next_token): Added new case for IS_ESCAPE.
* src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.
1998-10-13 René Seindal <rene@seindal.dk>
* Prerelease 1.4k.
* tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
generated-tests.
* tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
maintained tests in tests/other-tests. These currently tests for
8-bit transparency, multiple precision arithmetic and sync-line
output. Test for stackoverflow detection does not work.
* examples/Makefile.am (TESTS): Added tests for all example files.
* examples/mktests.sh: New file. Help program for creating test
files.
* tests/mkconfig.sh: New file to generate tests/config.m4 and
tests/config.sh. This is for tests of configure selectable
features. Picks up all set WITH_ and ENABLE_ veriables from
config.h
* src/path.c (path_search): Added argument 'char **expanded_name'
to return the expanded name.
* src/m4.h: Added 2nd argument to declaration of path_search().
* src/m4.c (main): Added 2nd argument to path_search().
* src/freeze.c (reload_frozen_state): Do.
* src/builtin.c (m4_undivert): Do.
(include): Do.
1998-10-11 René Seindal <rene@seindal.dk>
* acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4
* acm4/modules.m4: New file. Defines AM_WITH_MODULES.
* acm4/gmp.m4: New file. Defines AM_WITH_GMP.
* configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.
* AUTHORS, ChangeLog: Changed all dates to ISO 8601.
* intl/: Updated to GNU gettext 0.10.35.
* doc/m4.texinfo (Format): Documented that format is blind.
* src/builtin.c (builtin_tab): Builtin format marked as blind.
1998-10-07 René Seindal <rene@seindal.dk>
* Prerelease 1.4j.
* tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
.test, as the files are no longer just m4 input.
* tests/get-them (FILE): Changed .m4 extension to .test.
* src/m4.h (token_type): New token type TOKEN_SPACE introduced.
Otherwise quoted strings with leading whitespace first in a macro
argument would be eliminated.
* src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
(expand_argument): Do.
* src/input.c (next_token): SPACE and NUM/OTHER characters are only
grouped together iff both quote and comment strings are single
character. Otherwise they might include a comment/quote leader.
(next_token): Returns new token type TOKEN_SPACE.
* src/builtin.c (push_builtin_table): New function to push a
builtin_table on the stack without installing its contents.
(find_builtin_by_name): Added call to push_builtin_table() if
reading frozen files. Otherwise the builtins named in the frozen
files could not be found.
(install_builtin_table): Changed to use push_builtin_table()
1998-10-04 René Seindal <rene@seindal.dk>
* Prerelease 1.4i.
* configure.in (ALL_LINGUAS): Added Polish pl.po
1998-10-03 René Seindal <rene@seindal.dk>
* Many files: Incorporated changes to implement dynamic modules.
Detailed comments in src/modules.c and modules/README
* src/module.c: New file, implements the OS dependant parts of
dynamic module loading.
* src/Makefile.am (m4_SOURCES): Added module.c
* src/builtin.h: New file, declares some functions from builtin.c
that are of use for other modules (shipout_int, numeric_arg,
skip_space, bad_argc), and the macros ARG() and DECLARE().
* src/builtin.c (install_builtin_table): New function. Each
module brings in a builtin_table, which is pushed on a stack.
(struct builtin_table): New struct for list of builtin_tables.
(m4_loadmodule): New function to implement builtin "loadmodule".
(shipout_int): No longer static, to be used by modules.
(numeric_arg): do.
(skip_space): do.
(bad_argc): do.
(builtin_init): changed to call install_builtin_table()
(find_builtin_by_name): Now searches all builtin_tables
(find_builtin_by_addr): do.
* src/path.c: Reorganised to allow for two search paths, one for
include files and one for modules.
* src/m4.h: Added declarations for new functions in module.c and
in path.c.
* src/m4.c (main): Added call to module_init().
* modules: New directory with a few demo modules.
* Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
in SUBDIRS.
* configure.in: Added modules/Makefile to AC_OUTPUT.
* configure.in: Added code to implement --with-modules. Tests for
<dlfcn.h> and -ldl.
* acconfig.h: Added WITH_MODULES
1998-10-02 René Seindal <rene@seindal.dk>
* examples/Makefile.am (pkgdata_DATA): Removed special target for
check and variables TESTS. These tests are now run from the
tests/ directory.
* tests/Makefile.am (OTHER_TESTS): Added tests from the example/
directory. The files stay there but the tests are run from the
tests/ directory.
* tests/Makefile.am (EXTRA_DIST): Added run-test.
* tests/run-test: New file. Run a test manually
* tests/Makefile.am, tests/get_them: Moved automatically generated
tests (from the manual) to sub directory tests/gentest/. The
tests/ directory had gotten a bit messy.
1998-09-06 Erick Branderhorst <Erick.Branderhorst@asml.nl>
* examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
wrap}.test: Added a few testcases.
1998-08-21 Erick Branderhorst <Erick.Branderhorst@asml.nl>
* Prerelease 1.4h.
* lib/Makefile.am (noinst_HEADERS): regex.h added
* configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
* acm4/Makefile.am: created providing rules to create
$(top_srcdir)/acinclude.m4 to be used by aclocal.
* tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
`C'. Reported by Ulrich Drepper.
* Makefile.am (SUBDIRS): Removed checks directory
* configure.in (AC_OUTPUT): Removed checks/Makefile
* doc/m4.texinfo (Patsubst,example): @comment added to preserve
the space when m4.texinfo is edited and whitespace.el is active.
(Defn,example): idem.
1998-08-20 Erick Branderhorst <Erick.Branderhorst@asml.nl>
* doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
../COPYING. ../Makefile is a file which is certainly present when
test is executed in testSubDir. One can't be sure that the COPYING
file is in .. or ../.. in all situations, the ../Makefile is
always there.
* doc/m4.texinfo (Include): adjusted expected test output
according to new tests, i.e. the input will always come from the
file `in' created by the test.
* tests/Makefile.am: Added three lines at the top to get
esyscmd.1.test working.
* tests/get-them: modified to generate clearer tests who will need
less maintenance when new test examples are created in
`doc/m4.texinfo'. All tests are small (nearly stand-alone, they
need the generic file `defs') shell scripts creating `in', `ok',
`out' and when apropriate `okerr' and `err' in the directory
`testSubDir' when executed. The compare of `ok' and `out'
(and of `okerr' and `err') will be the exit status of the test.
`out' must match `ok' (and `okerr' must match `err') for the test
to be succesful.
* tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
the tests generated by tests/get-them getting it input normally
from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
(dot) before the numeric part) is reserved for all other (hand
written) tests. The `+' means one or more times.
1998-08-12 Erick Branderhorst <Erick.Branderhorst@asml.nl>
* doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
supported short man page to refer to info documentation
* helptoman.pl: added
* configure.in: AC_PATH_PROG(PERL,perl)
* Makefile.am (SUBDIRS): doc after src
* libitized with libit 0.5 from
ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
* configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
* lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
replacement functions, (libm4_a_LIBADD): @LIBOBJS@
* configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
lib/rx.{c,h}: added
* configure.in (AC_CHECK_FUNC): getopt_long
* src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
* TODO: added entry about dependencies
1998-08-10 René Seindal <rene@seindal.dk>
* Prerelease 1.4f
* doc/m4.texinfo (Changesyntax): Added documentation for the macro
"changesyntax".
* src/builtin.c (m4_changesyntax): Added builtin macro
"changesyntax" to modify the syntax table.
* src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
table. All categories are assigned a syntax code and tokens are
read according to this table.
1998-08-09 René Seindal <rene@seindal.dk>
* src/numb.{c,h}: New files, implements multiple precision eval
using GNU gmp. Originally submitted by John Gerard Makecki
(johnm@vlibs.com), later modified. Tested with GNU gmp 2.0.2.
* doc/m4.texinfo (Eval): Added documentation for multiple
precision arithmetic library support.
* src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
to accommodate multiple precision eval.
1998-08-07 René Seindal <rene@seindal.dk>
* src/input.c (MATCH, match_input), src/m4.h: changed definition
of comment and quote strings to `unsigned int' to allow eight bit
chars (reported by andrewb@zip.com.au (Andrew Bettison)).
* src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
patch from Mike Howard <mike@clove.com>
1998-08-06 René Seindal <rene@seindal.dk>
* gettext.m4: corrected AM_WITH_NLS to handle use of installed
-lintl.
1998-08-03 René Seindal <rene@seindal.dk>
* Prerelease 1.4e
* src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
and _ macro. M4 now builds with --disable-nls.
* src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
to look for right message catalogs. Call indef'ed by ENABLE_NLS.
* configure.in (ALL_LINGUAS): Added complete list of translations:
de fr it ja nl ru sv.
1998-05-22 Erick Branderhorst <Erick.Branderhorst@asml.nl>
* Prerelease 1.4d.
* src/m4.c: #include <signal.h> not <sys/signal.h>.
* src/Makefile.am: CFLAGS = -Wall @CFLAGS@.
* checks/Makefile.am: explicit list tests in CHECKS.
* configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
mkinstalldirs, install-sh: Added automake (1.3) support.
* lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
Used libitize (0.4) to update.
* configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
(0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
README accordingly.
* src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
stack overflow functionality.
1994-12-03 François Pinard <pinard@iro.umontreal.ca>
* Prerelease 1.4.1.
* Makefile.in (realclean-local): Delete stamp-h.in.
* configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
Localize, adapting from how it is done in sharutils.
* fr.tt: New file, for French.
* configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
src/freeze.c: Rename PRODUCT to PACKAGE.
1994-11-26 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Check for <libintl.h> and <locale.h>.
* src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
src/stackovf.c: Rename _ to __P.
* src/m4.h: Declare _ as a macro returning its argument, or else,
include <libintl.h> and declare _ as gettext.
* src/m4.c: Possibly include <locale.h> and call setlocale.
* src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
src/input.c, src/macro.c, src/output.c, src/path.c,
src/stackovf.c, src/symtab.c: Use _ macro over all localizable
strings.
1994-11-07 François Pinard <pinard@iro.umontreal.ca>
* doc/Makefile.in (stamp-vti): Use new -r option to date.
* configure.in: Put --with-gmp in place, in prevision for John
Gerard's work.
* acconfig.h: Document WITH_GMP.
1994-11-05 François Pinard <pinard@iro.umontreal.ca>
* Release 1.4.
* doc/Makefile.in (realclean): Also remove stamp-vti.
Reported by Eric Backus.
1994-11-02 François Pinard <pinard@iro.umontreal.ca>
* src/freeze.c (produce_frozen_state): If the frozen file cannot
be opened, return immediately after producing the error message.
Reported by Andreas Schwab.
* configure.in: Check for const only after having found possible
ANSIfying compiler flags, this is of no use to check it before.
Reported by Alexander Lehmann.
1994-11-01 François Pinard <pinard@iro.umontreal.ca>
* src/macro.c (collect_arguments): Cast obstack arguments to
(voidstar), so avoiding compiler warnings.
Reported by Joseph E. Sacco.
* src/freeze.c (produce_frozen_state): Cast printed lengths to
(int) so they correspond to %d format items.
Reported by Joseph E. Sacco.
* src/m4.c (main): Cast the argument to xfree to (voidstar).
* src/symtab.c (free_symbol): Idem.
Reported by Karl Vogel.
1994-10-31 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (DISTFILES): Distribute BACKLOG.
* configure.in: Define PRODUCT and VERSION.
* acconfig.h: Document PRODUCT and VERSION.
* src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
constant string m4 and variable or parameter named version.
1994-10-30 François Pinard <pinard@iro.umontreal.ca>
* src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
__STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
defines __STDC__ to 0, for indicating it is *not* ANSI!
Reported by Kaveh R. Ghazi.
* configure.in: Added obsolescent tests for AIX and Minix.
* doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
which texclean does not exist anymore.
Reported by Eric Backus, Jim Meyering, John David Anglin and
Joseph E. Sacco.
1994-10-29 François Pinard <pinard@iro.umontreal.ca>
* aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
Reported by John David Anglin.
* src/ansi2knr.c: New version, sent by Peter Deutsch.
* aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
ANSI2KNR, depending on the fact the compiler is ANSI or not.
* src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
Remove the sed filter after ansi2knr for debug.c. Use $O instead
of $U, put underline in extensions rather than in basenames. Use
implicit rules, now that regularity makes this possible.
Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
of ansi2knr whenever it is needed.
* configure.in: Adjusted for correct STACKOVF substitution.
* src/debug.c (trace_format): When not __STDC__, use (...) as a
parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
Reported by David MacKenzie.
* Makefile.in: Remove binprefix. Use transform_name instead.
Reported by David MacKenzie.
* doc/Makefile.in: Create version.texi, use it, clean it.
Reported by Jim Meyering.
1994-10-28 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (all, install, uninstall): Depend on Makefile.
* Makefile.in: For actions invoking $(MAKE) from within compound
sh statements, exit non-zero if the sub-make fails. Otherwise,
the top-level make may exit successfully when it should fail.
Reported by Jim Kingdon.
* {,/*}Makefile.in: Use && after all cd, in case they fail.
* {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
(dist): Use PRODUCT and VERSION instead of tricks on .fname.
* configure.in: Substitute PRODUCT and VERSION.
* {,*/}Makefile.in (dist): Always try a hard link before a copy.
1994-10-27 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (mostlyclean-local): Do not remove *~.
* */Makefile.in (mostlyclean): Idem.
Reported by Robert E. Brown and Richard Stallman.
1994-10-09 François Pinard <pinard@iro.umontreal.ca>
* src/m4.h: Get rid of CONFIG_BROKETS.
1994-10-02 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Use AC_ARG_PROGRAM.
* aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
Reported by David MacKenzie.
1994-10-01 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Do not add -O to CFLAGS for GNU C, now that
configure does it automatically.
Reported by Jim Meyering.
1994-09-23 François Pinard <pinard@iro.umontreal.ca>
* src/stackovf.c: Declare the handler_t typedef earlier in the
code, use it for stackovf_handler.
(setup_stackovf_trap): Use RETSIGTYPE instead of void while
casting sigsegv_handler.
Reported by Robert Bernstein.
* src/m4.c (main): Initialize program_name to argv[0] without
basename'ing it.
Reported by Karl Berry.
1994-09-18 François Pinard <pinard@iro.umontreal.ca>
* src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
Reported by Karl Berry.
1994-09-14 François Pinard <pinard@iro.umontreal.ca>
* lib/Makefile.in (mostlyclean): Added.
(TAGS): Make in $(srcdir).
* configure.in: Use `choke me' in test, like everywhere!
* {doc,examples,lib,src}/Makefile.in (check): Deleted, as
unreacheable and useless.
* doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
* lib/Makefile.in (DISTFILES): Distribute TAGS.
(distclean): Do not remove TAGS.
(realclean): Remove it.
* Makefile.in: Make TAGS in lib also, not just in src.
Reported by Karl Berry.
* Makefile.in (distclean, realclean): Instead of recursively
calling $(MAKE) for the -local part, allow parallel execution of
-recursive and -local, only delay the removal of config.status,
which is repeated in both goals.
1994-09-13 François Pinard <pinard@iro.umontreal.ca>
* Release 1.3.
* Makefile.in: Group all *clean-recursive goals in one, using sed
to remove `-recursive' while calling make recursively. Also, use
a subshell for each recursive $(MAKE).
Reported by Jim Meyering.
* src/m4.h (memcpy): Define with bcopy for BSD systems.
Reported by Kaveh R. Ghazi.
* src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
4.1.3 requires -ldl to link even ansik2nr, and we need a way to
specify it.
* configure.in: Use date instead of touch for stamp-h.
* Makefile.in (stamp-h.in): Idem.
* Makefile.in (distclean, realclean): Force serial execution of
both goals, in case parallel makes are being used.
Reported by Jim Meyering.
* src/Makefile.in (DISTFILES): Distribute TAGS.
(distclean): Do not remove TAGS.
(realclean): Remove it.
Reported by Karl Berry.
1994-09-10 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
to old names, for following Autoconf.
1994-09-08 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (MDEFINES): Remove INSTALL substitutions, for
./install.sh will not be correctly referred to in sub-Makefiles.
Reported by John David Anglin.
* doc/Makefile.in (texclean): Remove *.cps and *.fns too.
Reported by Eric Backus.
* Makefile.in, checks/Makefile.in, doc/Makefile.in,
examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
config.status into remaking this directory's Makefile only.
* Makefile.in (stamp-h): Do not check nor touch stamp-h.
* configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
Reported by Jim Meyering.
1994-09-06 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Correct stack overflow detection logic, taking
care of systems having only incomplete implementations (like for
Pyramid 9820 OSx 5.0d).
Reported by Kaveh R. Ghazi.
* src/Makefile.in (TAGS): Remote -t from etags call.
1994-09-02 François Pinard <pinard@iro.umontreal.ca>
* lib/Makefile.in (install): Depend on all.
1994-08-31 François Pinard <pinard@iro.umontreal.ca>
* examples/Makefile.in (mostlyclean): Do not depend on texclean.
Reported by Jim Meyering and John David Anglin.
* Makefile.in (distclean-local): Delete config.log.
Reported by Jim Meyering.
Solidify frozen files with respect to -P:
* src/m4.c: Have -P set prefix_all_buitins variable instead of
calling a function by that name. Declare the variable.
* src/m4.h: Adjust declaration for prefix_all_buitins.
* src/builtin.c (builtin_init): Merge in functionality from
previous prefix_all_buitins function, while making entries in the
symbol table, but not modifying the builtin description itself.
* src/freeze.c (reload_frozen_state): Add a useless `break;',
because *many* compilers do not accept an empty `default:'.
Reported by Akiko Matsushita, Eric Backus, John David Anglin,
Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
* configure.in: Use AC_TYPE_SIGNAL.
* src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
Reported by Robert Bernstein.
* checks/Makefile.in (check): Modify PATH so check-them will find
m4 in the src directory.
* Makefile.in (check): Don't.
Reported by Akiko Matsushita and Jim Meyering.
* src/output.c (make_room_for, output_character_helper): New
functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
a per buffer MAXIMUM_BUFFER_SIZE.
* src/output.c (output_text): New function, for optimizing the
output of strings of characters. Use it.
1994-08-30 François Pinard <pinard@iro.umontreal.ca>
* doc, src: New directories reorganizing the distribution.
* doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
files.
* Makefile.in: Adjusted.
* configure.in: Configure new Makefiles.
* m4.h: Declare STRING typedef. Use it for comment and quote
strings, adjusting all references. (This is the rudiments of a
beginning for the eventual withdrawal of NUL terminated strings.)
* output.c (shipout_text): Accept a length parameter, and use it.
All callers adjusted.
1994-08-29 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Include <unistd.h> if it exists.
* stackovf.c: Don't.
Clean up for current_diversion variable:
* output.c: Move current_diversion from builtin.c.
* m4.h: Declare current_diversion so builtin.c can access it.
* output.c (output_init, make_diversion): Initialize or update
current_diversion.
* builtin.c (builtin_init, m4_divert): Leave current_diversion
alone.
Remove limit on number of diversions:
* output.c: Replace ndiversion by diversions, declare it.
(output_init): Allocate only diversion 0.
(make_diversion): Allocate new diversions as needed.
* m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
* m4.c: Still accept -N, but do nothing with it.
Reported by David MacKenzie.
Freeze diversions:
* output.c (freeze_diversions): New function.
* m4.h: Declare freeze_diversions.
* freeze.c: Document frozen file format, revise it, call
freeze_diversions to add diversions to frozen format, and code to
reload them properly.
* m4.c: Do not undivert automatically at end when status being
frozen. Do not call builtin_init when reloading frozen state.
Speed up diversion processing:
* output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
structure and variables, cached variables out of output_diversion,
reallocate_diversion_for and OUTPUT_CHARACTER.
(shipout_text, make_diversion, insert_diversion): Adapted to new
structures.
(insert_file): Use better buffering.
Reported by David MacKenzie.
1994-08-28 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
dist works from another build directory.
1994-08-27 François Pinard <pinard@iro.umontreal.ca>
* symtab.c (hack_all_symbols): Use hash_table_size instead of
constant HASHMAX, for -H option to work better.
* builtin.c (DECLARE): Simplify by using _ ().
* freeze.c: New file.
* Makefile.in: Compile it, distribute it.
* m4.c: Recognize, document and process --freeze-state (-F) and
--reload-state (-R) options. Pass a true flag to builtin_init
only if no reloading some state.
* builtin.c (define_builtin): Remove static specifier.
(find_builtin_by_name): Remove static specifier.
(builtin_init): Accept and obey a flag argument.
* m4.h: Add declarations for freeze.c, changes for builtin.c.
1994-08-24 François Pinard <pinard@iro.umontreal.ca>
* builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
specifier.
* configure.in: Implement --with-dmalloc.
* acconfig.h: Document WITH_DMALLOC.
* m4.h: Add code for when WITH_DMALLOC.
1994-08-15 François Pinard <pinard@iro.umontreal.ca>
* m4.c (long_options): Use "error-output", the dash was missing.
Reported by Akiko Matsushita.
1994-08-12 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Include <sys/types.h>.
* builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
* m4.h: Declare len_lquote and len_rquote as size_t, not int.
int.
* input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
as size_t, not int.
* builtin.c (dump_args): Declare len as size_t, not int.
* debug.c: Prototype the forward declaration of debug_set_file.
* builtin.c (m4_undivert): Replace div by file, for avoiding the
shadowing of this variable.
* output.c (insert_diversion): Idem.
* input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
(input_init): Duplicate default quote and comment strings.
(set_quotes): Free previous quote strings in all cases. Duplicate
even default quote strings.
(set_comment): Free previous comment strings in all cases.
Duplicate even default comment strings.
* configure.in: Updated for Autoconf 2.0.
* Makefile.in (distclean-local): Also delete config.cache.
* m4.c (usage): Reorganize the --help output by topic. Include a
description for debugging flags.
1994-07-29 François Pinard <pinard@iro.umontreal.ca>
* configure.in: If sigaction is available and SA_ONSTACK defined,
use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
defined, use sigvec. Else don't compile stackovf.c.
* stackovf.c (setup_stackovf_trap): Idem.
Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
and Simon Leinen.
1994-07-21 François Pinard <pinard@iro.umontreal.ca>
* m4.c (usage): Replace printf par fputs.
1994-07-18 François Pinard <pinard@iro.umontreal.ca>
* Release 1.2
1994-07-17 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Check for sigaction and sigvec. Add a new delayed
check for RLIMIT_STACK, combine in the checking for getrlimit.
All those things are not universally available.
* stackovf.c: Split setting up the trap handler and catching
signals, for better taking care of various configure outcomes.
* examples/stackovf.sh: Correct a typo.
Reported by Eric Backus, Jim Avera and Jim Meyering.
1994-07-16 François Pinard <pinard@iro.umontreal.ca>
* ansi2knr.c: New version sent by its author, Peter Deutsch.
1994-07-15 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in: Modify so parallel make will not try making
lib/libm4.a twice simultaneously.
Reported by Jim Meyering.
1994-07-14 François Pinard <pinard@iro.umontreal.ca>
* stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
error message, for when no code possibility exists. Even if this
line is completely #ifdef'ed out, it brings a syntax error.
Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
* Makefile.in (install): Have install depend on all too, for lib
to be remade as needed.
* examples/stackovf.sh: Try ksh, bsh and bash for shells
providing ulimit, instead of using only ksh.
Reported by Jim Avera and Joseph E. Sacco.
1994-07-12 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (check): Have it depend on all instead of m4. In
this way, a change in lib will be detected and processed.
* builtin.c (numeric_arg): Use strtol and verify the conversion,
instead of using sscanf which stops as soon as there is a
non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
and divert(1xyzzy) were all accepted without any warning or error
messages.
* m4.h: Declare strtol as long if not including stdlib.h.
* configure.in: Check for limits.h, and replace strtol if missing.
* lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
* lib/strtol.c: New file, from elsewhere.
Reported by Andreas Schwab.
1994-07-07 François Pinard <pinard@iro.umontreal.ca>
* macro.c (expand_macro): Cast value to (boolean) prior to
assigning it to traced.
Reported by Tom McConnell.
* Makefile.in (m4): Always make all in lib first.
Reported by Jim Meyering.
1994-07-06 Jim Avera <jima@netcom.com>
* stackovf.c: Isolated OS-dependent sections; Improved portability,
adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
handlers), and a default error message if the fault address is not
available (when neither siginfo.h nor BSD sigcontext are supported).
* configure.in: Changes for stackovf.h: Check for sigcontext,
sigaction, sigstack, and define rlim_t as int if necessary.
* acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
* examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
* ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
1994-07-05 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Use AC_SET_MAKE.
* Makefile.in: Use @SET_MAKE@.
Reported by Jim Meyering.
* checks/check-them: Do not trap on SIGQUIT or SIGALRM.
Reported by Ian Taylor.
1994-07-02 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
because siginfo.h is unrelated to standard headers, and siginfo.h
is already checked for.
Reported by Joseph E. Sacco.
* acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
PROTOTYPES.
* aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
AC_PROTOTYPES.
1994-06-29 François Pinard <pinard@iro.umontreal.ca>
* builtin.c (substitute): Use \& to represent this part of the
string which was matched by the whole regexp, instead of
representing the whole string. Any usage of \0 issues a warning
and acts like \&, it will disappear in some subsequent release.
1994-06-27 François Pinard <pinard@iro.umontreal.ca>
* m4.c: Complete prototype for forwarded declaration of usage.
* input.c (init_macro_token): Correct own reference in error
message. Previous name get_macro_func was referred to instead.
(next_char): Correct own reference in error message. Previous
name advance_input was referred to instead.
* m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
* eval.c (logical_or_term, logical_and_term, or_term, xor_term,
and_term, not_term, logical_not_term, cmp_term, shift_term,
add_term, mult_term, exp_term, unary_term, simple_term): Add
prototype to forwarded declarations. Declare parameter v1 as
eval_t * instead of int *. Same for local variable v2 in dyadic
functions. Same for result in exp_term.
* builtin.c (m4_eval): Declare value as eval_t instead of int.
(ntoa): Declare value as eval_t instead of int. Declare uvalue as
unsigned_eval_t instead of unsigned int. Change casts accordingly.
(shipout_int): Cast first argument of ntoa to eval_t.
Reported by Thorsten Ohl.
* macro.c: Complete the prototypes of forwarded expand_macro and
expand_token.
Reported by Thorsten Ohl.
* m4.h: Define voidstar as void * or char * depending on __STDC__.
The Ultrix 3.1 compiler cannot do much with void pointers.
* builtin.c (dumpdef_cmp): Replace void * by voidstar.
* m4.c (xfree): Replace void * by voidstar.
Reported by Tom McConnell.
* ansi2knr.1: New, from elsewhere.
* Makefile.in (DISTFILES): Distribute ansi2knr.1
* Makefile.in (stamp-h.in): Avoid running ./config.status if
stamp-h does not exist yet. This avoids running it a second time
just after the initial ./configure.
Reported by David MacKenzie and Tom McConnell.
* m4.h: Replace the enum debug_info declaration with a series of
#define's. The Ultrix 3.1 compiler would otherwise need casting
(int) to most references, when used in expressions.
Reported by Tom McConnell.
1994-06-25 François Pinard <pinard@iro.umontreal.ca>
* aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
calls the compiler. Previously, FP_PROTOTYPES was only calling
the preprocessor; by not being subject to CFLAGS, this was
discouraging those flags asking for ANSI compilation.
* acconfig.h: Document HAVE_PROTOTYPES.
* configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
* m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
Reported by Eric Backus.
* configure.in: Substitute CFLAGS and LDFLAGS, taking their value
from the environment. Default CFLAGS to -g if not set.
* Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
* lib/Makefile.in: Have CFLAGS substituted from configure.
Reported by Eric Backus and Tom McConnell.
* configure.in: m4_undefine changeword before using AC_ENABLE.
* m4.h: Declare prototypes for error (for ANSI compilers only),
prefix_all_builtins and reference_error.
Reported by Tom McConnell.
* input.c (set_word_regexp): Do not try to initialize the array
test from a string, this does not work with non-ANSI compilers.
Reported by Eric Backus.
* Makefile.in (dist): Clean examples/ before saving it.
(distclean-local): Also remove stamp-h.
Reported by Eric Backus.
* Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
non ANSI compilers.
Reported by Tom McConnell.
* checks/Makefile.in (clean): Depends on mostlyclean.
(mostlyclean): New goal.
1994-06-24 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (DISTFILES): Distribute install.sh.
* install.sh: New file, copied from elsewhere.
Reported by Assar Westerlund and Kaveh R. Ghazi.
1994-06-23 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
* acconfig.h: Explain ENABLE_CHANGEWORD.
[These modifs all depend upon ENABLE_CHANGEWORD and are adapted
from code provided by Pete Chown]
* m4.h: Add original_text field to u_t variant of union u.
Declare TOKEN_DATA_FUNC macro.
* builtin.c: Declare changeword.
(m4_changeword): New function.
* input.c: Include "regex.h", define variables with word regexps.
(input_init): Initialize the word regexp.
(set_word_regexp): New.
(next_token): Declare local variables, use the previous code if
default_word_regexp is true. Else, match using a new code. Save
the original text.
* macro.c (expand_token): Ship out original text if not a macro
name.
Reported by Krste Asanovic and Pete Chown.
[These modifs all depend upon ENABLE_CHANGEWORD]
* m4.h: Declare external user_word_regexp.
* m4.c: Declare user_word_regexp, and initialize it from
--word-regexp or -W, or NULL if not specified.
* input.c: Use user_word_regexp if specified, instead of
DEFAULT_WORD_REGEXP.
* Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
agree with it.
* Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
* checks/Makefile.in: Empty the suffix list.
Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
* m4.c: Declare nesting_limit and initialize it to 250.
Implement -LNUMBER or --nesting-limit=NUMBER to change its
value.
* m4.h: Declare nesting_limit as external.
* macro.c (expand_macro): Stop execution whenever nesting limit
is exceeded.
Reported by Bengt Mertensson.
* eval.c (evaluate): Diagnose excess characters in eval input.
Things like `eval(08)' used to return 0 with no diagnostic.
* m4.h: Capitalize first letter of all macro arguments in
definitions.
* m4.c: Declare warning_status, initialize it to 0. Add new
option -E, or --fatal-warnings, which sets warning_status to
EXIT_FAILURE instead.
* m4.h: Declare external warning_status. Define EXIT_SUCCESS and
EXIT_FAILURE if not otherwise done by header files.
* m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
* m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
argument of all M4ERROR calls.
Reported by Noah Friedman.
* examples/incl-test.m4: Renamed from incl_test.m4.
* examples/include.m4: Include incl-test.m4 instead of
incl_test.m4.
* examples/multiquotes.m4: Renamed from multi-quotes.m.
1994-06-22 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
also tested it on a Sun Sparc workstation running SunOS 4.x.
* format.c (format): When not HAVE_EFGCVT, m4 was failing the
49.format check, abusing a `union values' argument with sprintf
without selecting the proper field. Now, save the formatting type
first, delaying the fetch of the corresponding argument.
Reported by Joseph E. Sacco and Tom Quinn.
* format.c (format): Remove const from char *fmt declaration when
not HAVE_EFGCVT, because a NUL may be forced into it.
* m4.h: Declare atof() when not STDC_HEADERS.
Reported by Joseph E. Sacco.
* Regenerate configure using Autoconf 1.11, this corrects a
problem about an incorrect cpp seting on NeXT 3.1.
Reported by Alexander Lehmann.
1994-06-05 François Pinard <pinard@iro.umontreal.ca>
* m4.h (_): Change argument from `x' to `Args'.
1994-04-22 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Rename Args() to _().
* m4.h: Remove extern specifier from all function declarations.
1994-04-22 Jim Avera <jima@netcom.com>
* stackovf.c: New file implementing stack-overflow detection.
* configure.in: Check for getrlimit, sigaction. If all of
standard headers, getrlimit and sigaction, define USE_STACKOVF and
substitute ${U}stackovf.o for STACKOVF.
* acconfig.h: Declare USE_STACKOVF.
* Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
* m4.h: Declare setup_stackovf_trap().
* m4.c: Call setup_stackovf_trap().
* tests/stackovf_test.sh: New file.
1994-04-13 François Pinard <pinard@iro.umontreal.ca>
* checks/Makefile.in: Rename .all-stamp to stamp-checks.
* Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
1994-01-30 <pinard@iro.umontreal.ca>
* m4.h: Remove definition of volatile, not used anymore.
Reported by Jim Meyering and Joseph E. Sacco.
* m4.h: Consistently use `do { ... } while (0)' in macros, instead
of `if ... else /* nothing */' for if macros.
Reported by Jim Meyering.
* builtin.c (m4_regexp): Reorganize the code for avoiding a
warning from gcc about `repl' possibly used before defined.
Reported by Jim Meyering.
* m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
Reported by Jim Meyering.
1994-01-25 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Move the conditional definition of volatile after the
inclusion of system files, because they may define it first.
1994-01-04 François Pinard <pinard@iro.umontreal.ca>
* checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
get around a problem with Alpha make seeing a syntax error, there.
Reported by Vern Paxson.
1994-01-03 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
Reported by Richard Stallman.
1993-12-25 François Pinard <pinard@iro.umontreal.ca>
* configure.in: Correct test for strerror, AC_FUNC_CHECK was used
instead of AC_HAVE_FUNCS.
Reported by Noah Friedman.
1993-12-01 François Pinard <pinard@iro.umontreal.ca>
* m4.c: Initialize show_help and show_version to zero.
* m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
Use them in exit() and usage() calls.
1993-11-27 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Delete extern sys_nerr, sys_errlist declarations, and
syserr() macro. Delete errref, add reference_error and M4ERROR.
* m4.c: Replace errref, which was returning an input reference
string, with reference_error, which prints it on standard error.
* builtin.c, output.c: Use errno as second parameter to error,
instead of using syserr() with %s.
* *.c: Use M4ERROR instead of error: no more errref() with %s.
Doing so, the program name appears after the input reference
instead of before, which eases M-x next-error processing.
1993-11-24 François Pinard <pinard@iro.umontreal.ca>
* checks/get-them: Escape braces with backslashes in patterns,
because HPUX-9.01 awk needs this.
Reported by Jim Meyering.
1993-11-22 François Pinard <pinard@iro.umontreal.ca>
* builtin.c: Declare "FILE *popen ();".
* m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
macros, replace error_message_prefix() declaration by errref()'s.
Declare xrealloc, for use in errref().
* m4.c: Delete error_message_prefix() function, add errref().
* *.c: Use error() systematically in place of all error macros,
now that error() flushes stdout first. Make needed adjustments.
* m4.h: Remove const in sys_errlist[] declaration, it creates
conflicts on SGI and Alpha.
Reported by Kaveh R. Ghazi.
1993-11-20 François Pinard <pinard@iro.umontreal.ca>
* m4.c: Include <getopt.h> instead of "getopt.h".
* configure.in: Output to config.h. Use HAVE_FUNCS preferably.
* acconfig.h: New, for documenting HAVE_EFGCVT.
* Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
use them wherever appropriate. Also use -I. for compilations.
* lib/Makefile.in: Use -I.. for compilations.
* *.c: Include <config.h> or "config.h".
* m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
* configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
1993-11-17 François Pinard <pinard@iro.umontreal.ca>
* builtin.c (m4_eval): Cast strlen to (int) before comparing.
* input.c (input_init): Initialize quote and comment strings
explicitely instead of calling set_quotes and set_comment: by
doing so, we ensure we do not free uninitialized variables.
* checks/check-them: Reverse arguments to both diff, so the
expected is on the left and the obtained on the right.
* m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
macros. Delete declarations for m4error, warning, fatal and
internal_error, add declaration for error_message_prefix.
* m4.c: Delete m4error, warning, fatal and internal_error
routines, add error_message_prefix routine.
* *.c: Replace m4error routine calls with MESSAGE* macro calls,
warning with WARNING*, fatal with FATAL* and internal_error with
INTERNAL_ERROR*.
* Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
this is not needed anymore.
* m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
and debug_message, add declaration for debug_message_prefix.
* debug.c: Remove static specifier for FILE *debug declaration.
Delete debug_print and debug_message routines, add
debug_message_prefix routine.
* builtin.c, debug.c: Replace debug_print routine calls with
DEBUG_PRINT* macro calls.
* input.c, path.c: Replace debug_message routine calls with
DEBUG_MESSAGE* macro calls.
* m4.h: Remove inclusion of <varargs.h>.
* debug.c: Include <stdarg.h> or <varargs.h>.
(trace_format): Use stdarg instead of varargs if __STDC__.
* configure.in: Remove checks for vfprintf and _doprnt. These
implementations use varargs tricks which are not portable enough.
* lib/vfprintf.c: Deleted.
* lib/_doprnt.c: Deleted.
* lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
Reported by Joel Sherrill.
* path.c (add_include_directory): Use xstrdup.
* builtin.c (find_builtin_by_name): Declare static.
* *.[ch]: Add const to a few "char *" declarations.
* configure.in: Remove commented tests for fileno() and fstat().
* debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
* debug.c (debug_flush_files): New.
* m4.h: Declares it.
* builtin.c (m4_syscmd, m4_esyscmd): Use it.
Reported by Nicolas Pioch.
1993-11-12 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
Reported by Joel Sherrill.
* builtin.c (prefix_all_builtins): Instead of the table size, use
the null entry at end for stopping the loop. It was overwritten.
Reported by Andreas Schwab and Jim Meyering.
* builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
Reported by Kaveh R. Ghazi.
* macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
Reported by Karl Vogel.
1993-11-09 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Do not define volatile if already defined.
Reported by René Seindal.
* lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
1993-11-08 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Define strchr and strrchr in terms of index and rindex,
instead of the other way around.
* builtin.c, m4.c, path.c: Use strchr instead of index.
* input.c (next_char): Remove a "break;" after a "return ...;".
Reported by Tom McConnell.
1993-11-08 François Pinard <pinard@iro.umontreal.ca>
* Release 1.1
* configure.in: Do not copy check files in the build hierarchy.
* checks/check-them: Identify the m4 version being checked. For
finding m4, look in $PATH instead of in the parent directory.
* Makefile.in (check): Prepend `pwd` to $PATH before checking.
* checks/Makefile.in (.all-stamp): Always create check files in
the source hierarchy, not anymore in the build hierarchy.
(check): cd to the source hierarchy before performing checks.
Do not copy nor clean COPYING anymore, take it from `..'.
Reported by Tom McConnell.
* Makefile.in (Makefile): Use $(SHELL).
(config.status): Use $(SHELL). Use "config.status --recheck"
instead of "configure --no-create", which is obsolete.
Reported by Tom McConnell.
1993-11-05 François Pinard <pinard@iro.umontreal.ca>
* m4.c (usage): Use "%s" instead of "m4" in format string.
Reported by Jim Meyering.
* Makefile.in: Distribute mkinstalldirs.
Reported by Pierre Gaumond.
Reported by Jim Meyering.
Reported by Tom McConnell.
Reported by Andreas Gustafsson.
* checks/check-them: Renamed from checks/check_them.
* checks/get-them: Renamed from checks/get_them.
* checks/.all-stamp: Renamed from checks/.all_stamp.
* checks/Makefile.in: Changed accordingly.
Reported by Jim Meyering.
1993-11-04 François Pinard <pinard@iro.umontreal.ca>
* lib/Makefile.in (dist): Correct permissions on files.
* output.c: Declare tmpfile, some systems don't.
1993-11-03 François Pinard <pinard@iro.umontreal.ca>
* checks/Makefile.in (dist): Correct permissions on files.
* Makefile.in (dist): Ensure recursive linking for subdirectory
`examples', also set read/write permissions on all its files.
* mkinstalldirs: New, from elsewhere.
* Makefile.in: Use it.
* debug.c: Synchronize debug messages and regular output when
the debug file and stdout are redirected to the same file.
* configure.in: Add (commented) checks for fileno and fstat.
Reported by Jim Avera.
* builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
etc., arguments, then ignore the superfluous one. m4 used to
diagnose missing arguments and return the empty string.
Reported by Nick S. Kanakakorn.
1993-11-02 François Pinard <pinard@iro.umontreal.ca>
* m4.c (main): At end of all input, ensure all undiverted text
goes to the main output stream.
Reported by Andreas Gustafsson.
* m4.c (main): exit (0), instead of return 0.
* m4.c: Implement -P and --prefix-builtins.
* builtin.c: Delete const specifier on builtin_tab.
(prefix_all_builtins): New.
Reported by Noah Friedman.
Reported by Scott Bartram.
* c-boxes.el: New, from elsewhere.
* Makefile.in: Distribute it.
* m4.h: Do not define bcopy if <string.h> defines it.
Reported by Stephen Perkins.
* builtin.c (define_macro): Allow a missing second argument, in
which case it is implied empty. Affects define and pushdef.
Reported by Eric Allman.
1993-11-01 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
* builtin.c: Initialize all the blindness fields in builtin_tab.
(define_builtin): Copy the blindness of a builtin into its symbol.
* macro.c (expand_token): Avoid processing a blind builtin if the
next character is not an opening parenthesis.
Reported by David MacKenzie.
Reported by Noah Friedman.
* configure.in: Ensure an exit status of 0 on completion.
Reported by Vivek P. Singhal.
* eval.c (eval_lex): Admit both lower and upper case letters for
bases greater than 10. Only lower case letters were accepted.
* eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
Reported by Krste Asanovic.
* eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
* eval.c (logical_not_term): New name for not_term.
* eval.c (xor_term): New, between or_term and and_term.
* eval.c (not_term): New, between and_term and logical_not_term.
* eval.c (shift_term): New, between cmp_term and add_term.
Reported by Krste Asanovic: ~, ^, <<, >>.
Reported by Ben A. Mesander: ** vs ^.
* m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
* m4.h: Delete xrealloc.c.
* lib/xmalloc.c: New, from elsewhere.
* lib/xstrdup.c: New, from elsewhere.
* lib/Makefile.in: Distribute and compile them.
* m4.c: Change progname to program_name.
* builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
* lib/error.c: New, from elsewhere.
* lib/Makefile.in: Distribute and compile error.c.
* configure.in: Check AC_VPRINTF and for strerror.
* m4.c: Delete cmd_error. Use error instead.
* m4.c: Change label capitalisation to "ERROR", "Warning", etc.
* m4.h: Delete #define const, let Autoconf takes care of this.
* m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
Merge parse_args into main. Declare argv to be `char *const *',
then remove superfluous casts.
* m4.c: Rename --no-gnu-extensions to --traditional.
Reported by Ben A. Mesander.
* m4.c (usage): Add a status parameter. Supply one in various
calls. Add --help processing. Remove -V for --version.
* lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
* lib/Makefile.in: Have an AR=ar declaration.
Reported by Eric Backus.
Reported by Bjorn R. Bjornsson.
Reported by Tom Tromey.
Reported by Kristine Lund.
Reported by Marion Hakanson.
1993-10-30 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
Reported by Noah Friedman.
1993-10-25 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in: Remove MDEFINES and cleanup.
1993-06-09 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
Create a gzip file.
1993-02-06 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
ensure 777 mode for directories, so older tar's will restore file
modes properly.
1993-01-17 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
so the installer can override automatically configured choices.
Reported by Karl Berry.
1993-01-15 François Pinard <pinard@iro.umontreal.ca>
* lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
previous version was not working properly on m68k-hp-bsd4.3.
Reported by Roland McGrath.
* lib/_doprnt.c: Stolen from Oleo distribution.
* configure.in: Check for _doprnt.c if vfprintf.c selected.
* lib/Makefile.in: Distribute _doprnt.c.
Do not distribute regex.[ch].old anymore.
1993-01-01 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
Richard wants it there.
1992-12-27 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in: Add DEFS to MDEFINES.
* lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
(libm4.a): Remove the library before creating it.
(distclean): Remove tags and TAGS too.
1992-12-23 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (dvi, m4.dvi): New goals.
* builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
macro.c, output.c, path.c, symtab.c: Change Copyright from
1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
* examples/divert.m4: Deleted, this bug has been corrected.
* Makefile.in (texclean, mostlyclean): New goals.
* Makefile.in (clean): Remove clutter from ansi2knr.
Reported by Pierre Gaumond.
1992-12-20 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
might well use CFLAGS is s/he needs it.
* Makefile.in: Allow installation of info files from a separate
build directory.
Reported by Jason Merrill.
Reported by David MacKenzie.
Reported by Skip Montanaro.
Reported by Erez Zadok.
Reported by Assar Westerlund.
1992-12-19 François Pinard <pinard@iro.umontreal.ca>
* Release 1.0.3
This is still a beta release for the future GNU m4 version 1.1.
* lib/alloca.c: New, from elsewhere.
* lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
* m4.h: Do not define index/rindex if already defined. If
FALSE/TRUE are already defined, do not redefine them, but merely
define boolean typedef to int.
* Makefile.in: Use $(DEFS) while compiling ansi2knr.
* ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
because some C compilers do not like connectives with #ifdef.
* m4.h: Define `volatile' only if __GNUC__, instead of once for
__GNUC__ and once for __STDC__.
* lib/regex.h: Leave const alone, AC_CONST will take care of it.
* checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
Makefile dependencies. Without it, make keeps destroying and
remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
* m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
to diversion/DIVERSION, this was a spelling error.
* m4.c: Declare version[], remove #include "version.h".
* version.h: Deleted.
* Makefile.in: Remove references to version.h.
* output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
production, by using a simpler and more robust algorithm. This
solves the problem of synclines sometimes written in the middle of
an output line. Delete sync_line() and output_lines variable.
* m4.h: Remove sync_line prototype and output_lines declaration.
* input.c (next_char), output.c (shipout_text): Remove references
to output_lines.
* input.c (push_file, pop_file): Merely put the value -1 in
output_current_line instead of calling sync_line, for delaying a
single `#line NUM FILE' before next output line. Do not test
for sync_output, because this is unnecessary clutter.
* output.c (make_divertion, insert_divertion): Idem.
* input.c: Rename must_advance_line to start_of_input_line, for
consistency.
* debug.c (trace_header): Select a new debug line format, which
better complies with GNU standards for formatting error messages.
With option `-dfl', M-x next-error might be used on the output.
* m4.c (vmesg): Adjust format of error output to GNU standards.
* m4.texinfo: Adjust examples for `make check' to work.
* m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
case for enum debug_info constants, which were all lower case.
* builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
re_search_2.
* lib/regex.[ch]: Use new version from textutils 1.3.6, with some
collected patches. I tried a few times using newer regex.[ch], it
mysteriously stopped aborting with this one. Insecure feeling...
* lib/Makefile.in: Distribute regex.[ch].old, just in case!
1992-12-18 François Pinard <pinard@iro.umontreal.ca>
* m4.c: Change `--no-warnings' to `--silent'.
Reported by David MacKenzie.
* m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
leave it off for now. See comment in m4.c for justification.
Reported by David MacKenzie.
* configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
* m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
* Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
* Makefile.in: Ensure recursive cleaning is done before local
cleaning for all clean goals.
* builtin.c (ntoa): Ensure the value is always interpreted as a
signed quantity, whatever the radix is.
1992-11-18 Jim Meyering <meyering@idefix>
* builtin.c, format.c, input.c: Split long lines.
* m4.c: Use typedef macro_definition instead of struct
macro_definition.
* symtab.c: Use typedef symbol instead of struct symbol.
1992-11-17 François Pinard <pinard@iro.umontreal.ca>
* *.[ch]: Remove all trailing whitespace, in code and comments.
* configure.in: Find some awk.
* Makefile.in: Add $(AWK) to MDEFINES.
* checks/Makefile.in: Transmit $(AWK) to get_them.
* checks/get_them: Use $AWK instead of gawk. Add a close in the
awk script when switching files, because without this, mawk runs
out of file descriptors.
1992-11-16 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (realclean): Delete m4.info*.
Reported by Jim Meyering.
* Makefile.in: Adjust and link with checks/Makefile.
* checks/Makefile.in: New.
* configure.in: Output checks/Makefile.
* checks/get_them: Have the dnl header of each test more
recognizable by next-error, also use a better message.
1992-11-16 Jim Meyering <meyering@idefix>
* m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
And use that only if __GNUC__ since we're using it's GCC-specific
semantics that tell the compiler the associated function doesn't
return.
* builtin.c (substitute): Don't use character as an array index.
(dumpdef_cmp): Make formal arguments `const void *' to avoid
warnings with gcc -W -Wall on systems with qsort prototype.
(m4_errprint): Cast obstack_finish to `char *' to avoid warnings
from gcc -W -Wall.
* eval.c (most functions): Add parentheses to assignments used
as truth values go avoid warnings from gcc -Wall.
* input.c, m4.c, output.c, path.c, symtab.c: Declare static
any functions that don't need external scope.
* builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
(many functions and arrays): Declare `const'.
1992-11-15 François Pinard <pinard@iro.umontreal.ca>
* *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
removing the declaration from m4.h. Also rename false to FALSE
and true to TRUE.
* lib/Makefile.in (Makefile): New goal.
* Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
so heavily loaded. It gets more easily overridable, calling make.
Reported by Jim Meyering.
* Makefile.in (dist): Get .fname from the current directory name,
instead of from version.h. I need updating many files manually,
when the version changes, version.h is just one of them.
1992-11-14 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Remove the tag `boolean' on the enum introducing typedef
`boolean'. This tag conflicts with <sys/types.h> on SVR4.
Reported by Tom McConnell.
1992-11-13 François Pinard <pinard@iro.umontreal.ca>
* m4.texinfo: Correct the examples for 33.divert, 38.divnum,
39.cleardiv, which were describing missing or spurious newlines.
Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
do not depend on machine word size, `/bin/false' implementation,
or `wc' output format. `make check' is more dependable, now.
* checks/check_them: Summarize the failed tests by listing their
name, at end. If none, issue `All checks successful'. Output
`Checking' instead of `Input file:'.
* checks/get_them, checks/check_them: Reindented.
* Makefile.in (dist): chmod a+r before making the tar file.
1992-11-12 François Pinard <pinard@iro.umontreal.ca>
* builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
* input.c (next_token): Reinitialize token_buttom just after using
it as a watermark with obstack_free. Or else, a future token, big
enough for triggering reallocation of the obstack chunk, could
void the initialized value of token_buttom, later causing panic in
obstack_free. Rename token_buttom to token_bottom everywhere.
* m4.h: Before declaring errno, first include <errno.h> and
ensure that it does not define errno.
Reported by Richard Stallman.
1992-11-11 François Pinard <pinard@iro.umontreal.ca>
* builtin.c: Define and use DECLARE macro for builtins.
* builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
argument, this is a common idiom for introducing long comments.
* builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
arguments. The last argument was silently ignored.
* m4.c (cmd_error): Add a missing semicolon before va_end().
1992-11-10 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in: Now handle protoized sources. Define and use U.
Compile and use ansi2knr with old compilers. Update DISTFILES.
Add `aclocal.m4' to `configure' dependencies.
* ansi2knr.c: New, from Ghostscript distribution.
* configure.in: Define U through FP_PROTOTYPES for old compilers.
Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
* aclocal.m4: New, provide FP_PROTOTYPES.
* m4.h: Conditionnaly protoized through Args, save for varags.
* builtin.c: Protoized. Then:
Include <sys/types.h> if size_t is not defined, before "regex.h".
(m4_ifelse): Fetch built-in name properly for diagnostic.
(m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
(m4_regexp): Add const to `msg' declaration.
(m4_patsubst): Add const to `msg' declaration.
* debug.c: Protoized, save for varargs.
* eval.c: Protoized.
* format.c: Protoized.
* input.c: Protoized.
* m4.c: Protoized, save for varargs. Then:
(xfree): Accept void * instead of char *.
(xmalloc): Return void * instead of char *.
(xrealloc): Accept and return void * instead of char *.
* macro.c: Protoized.
* output.c: Protoized.
* path.c: Protoized. Then cast some (char *) over xmalloc's.
* symtab.c: Protoized.
1992-11-06 François Pinard <pinard@iro.umontreal.ca>
* m4.texinfo: Remove directory from diagnostics in 30.include,
51.eval, 56.errprint and 57.m4exit tests.
* m4.h: Remove declarations for int or void system functions, they
cause more conflicting trouble than they make good.
* configure.in: Avoid configuration header file. Add some tests.
* m4.h: Remove #include "config.h".
* Makefile.in, lib/Makefile.in: Implement Autoconf interface.
Then, rewritten for better compliance with GNU standards.
1992-11-05 François Pinard <pinard@iro.umontreal.ca>
* format.c (format): Avoid syntax error if not HAVE_EFGCVT,
because of a misplaced #endif.
* Many *.[hc] files: Correct intra-line spacing here and there,
according to GNU indent 1.6 advice.
* configure.in: New, using Autoconf 1.2.
* m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
* Delete old configure.in, configure, etc/configure.in,
etc/configure, lib/configure.in, lib/configure and config/*.
Reported by Jason Merrill.
* symtab.c (hash): Change (char) NULL to '\0'.
Reported by Jason Merrill.
* Delete .vers, etc/newdist.sh, etc/newvers.sh and
etc/nextvers.sh. Release numbers will be edited `by hand'.
* version.h: De-automatize, force value in.
* m4.c: Changes in order to use a newer getopt.h.
Reported by David MacKenzie.
* checks/: New name for examples/.
* checks/get_them: New location for etc/get_examples.
* checks/check_them: New location for etc/check_examples.
* Makefile.in, checks/get_them, checks/check_them: Adjust.
* lib/vfprintf.c: New location for etc/vfprintf.c.
* Delete empty etc/.
* examples/: New name for test/.
1992-03-10 François Pinard <pinard@iro.umontreal.ca>
* Makefile.in (check): Add m4 as dependency.
* m4.c: Accept --no-warnings instead of --no_warnings, and
--no-gnu-extensions instead of --no_gnu_extensions. Make the
usage message more informative.
Reported by David MacKenzie.
1992-03-09 François Pinard <pinard@iro.umontreal.ca>
* etc/check_examples: New name for check_examples.sh.
* etc/get_examples: New name for get_examples.sh.
* Makefile.in, etc/Makefile.in: Use new names.
* Makefile.in: Transmit $(CC) while making in lib.
* Many *.[hc] files: GNU indent'ed, with further fine tuning of
code disposition by hand.
1992-03-08 François Pinard <pinard@iro.umontreal.ca>
* m4.h: Delete definitions for abort() and exit().
Reported by Richard Stallman.
* config/hmake-unicos, config/s-unicos.h: New files.
Reported by Hal Peterson.
* eval.c (exp_term): Have N^0 return 1.
Reported by Michael Fetterman.
* eval.c, input.c, m4.h: Remove last comma in enums.
Reported by Mike Lijewski.
* Transfer of maintenance duties from René to François.
1991-10-24 René Seindal <seindal@diku.dk>
* Release 1.0. Many thanks to those, who provided me with bug
reports and feedback.
* Uses GNU configure, taken from the gdb distribution.
* Uses GNU getopt(), with long option names.
* The -Q/+quiet option is added, which suppresses warnings about
missing or superflous arguments to built-in macros.
* Added default options via the M4OPTS environment variable.
* The built-in format can now be configured to use sprintf as
the formatting engine, for systems without [efg]cvt(3).
* GNU library code is moved to the ./lib subdirectory; other
utility files are now in ./etc.
* Several minor bugs have been fixed.
1991-07-26 René Seindal <seindal@diku.dk>
* Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
Francois Pinard and Roland H. Pesch for providing me with reports.
* The builtins incr and decr are now implemented without use of
eval.
* The builtin indir is added, to allow for indirect macro calls
(allows use of "illegal" macro names).
* The debugging and tracing facilities has been enhanced
considerably. See the manual for details.
* The -tMACRO option is added, marks MACRO for tracing as soon
as it is defined.
* Builtins are traced after renaming iff they were before.
* Named files can now be undiverted.
* The -Nnum option can be used to increase the number of
divertions available.
* Calling changecom without arguments now disables all comment
handling.
* The function m4_patsubst() is now consistently declared
static.
* A bug in dnl is fixed.
* A bug in the multi-character quoting code is fixed.
* Several typos in the manual has been corrected. More probably
persist.
* The m4.info file is now installed along with the program.
1990-11-15 René Seindal <seindal@diku.dk>
* Updated and enhanced version. Release 0.75, manual 0.07.
* Implemented search path for include files (-I option and
M4PATH envronment variable).
* Implemented builtin "format" for printf-like formatting.
* Implemented builtin "regexp" for searching for regular
expressions.
* Implemented builtin "patsubst" for substitution with regular
expressions.
* Implemented builtin "esyscmd", which expands to a shell
commands output.
* Implemented "__file__" and "__line__" for use in error
messages.
* Implemented character ranges in "translit".
* Implemented control over debugging output.
* Implemented multi-character quotes.
* Implemented multi-character comment delimiters.
* Changed predefined macro "gnu" to "__gnu__".
* Changed predefined macro "unix" to "__unix__", when the -G
option is not used. With -G, "unix" is still defined.
* Changed "shift", "$@" and "$*" to not insert spaces afters
commas.
* Added program name to error messages.
* Fixed two missing null bytes bugs.
1990-01-22 René Seindal <seindal@diku.dk>
* Initial beta release. Release 0.50, manual 0.05.
$Revision: 1.162 $ $Date: 2002/11/04 16:32:56 $
|