* bootstrap: Correct typo in --download-po argument parsing.
[m4/ericb.git] / ChangeLog
blob551b8b82818556f56f5cb8cbe47fb63e7edfdbe5
1 2006-07-17  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
3         * bootstrap: Correct typo in --download-po argument parsing.
5 2006-07-15  Eric Blake  <ebb9@byu.net>
7         * ltdl/m4/gnulib-cache.m4: Augment with `gnulib-tool --import
8         gendocs fdl'.
9         * tests/generate.awk (normalize): Recognize @tabchar.
10         * doc/m4.texinfo (Top): Start merging from branch.  Remove tabs.
11         Fix menus.  Upgrade FDL license from 1.1 to 1.2.  Fix overfull
12         hboxes.
13         (Index macro, Shell commands, Incompatiblities): Rename nodes
14         from Index, UNIX commands, Other incompat.
15         (Platform macros, Using frozen files, Frozen file format 1)
16         (Frozen file format 2, Copying This Manual, Indices): New nodes.
17         * Makefile.am (EXTRA_DIST): Distribute gendocs.
18         (MAINTAINERCLEANFILES): Clean up files from gnulib.
19         (doc_m4_TEXINFOS): Depend on fdl.texi.
20         (web-manual): New maintainer target.
22 2006-07-14  Gary V. Vaughan  <gary@gnu.org>
24         * doc/m4.texinfo (Modules):  RMS asked me for an explanation of
25         the modular architecture of M4.  The result is paraphrased here
26         for the benefit of future readers of the manual.
28 2006-07-14  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
30         * Makefile.am (TESTSUITE_AT): Add missing tests/freeze.at.
32 2006-07-14  Eric Blake  <ebb9@byu.net>
34         * src/main.c (main): Avoid compiler warning.
35         * modules/gnu.c (renamesyms): Remove unused variable.
37 2006-07-14  Gary V. Vaughan  <gary@gnu.org>
39         * m4/m4module.h (m4_regexp_syntax_decode, m4_regexp_syntax_encode)
40         (m4_get_regexp_syntax_opt, m4_set_regexp_syntax_opt): Declare
41         new functions for managing regexp syntax options.
42         * m4/m4private.h (m4): Add regexp_syntax field.
43         * m4/resyntax.c: New file implements the above.
44         * Makefile.am (m4_libm4_la_SOURCES): Add m4/resyntax.c.
45         * modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE, builtin_eregexp)
46         (builtin_epatsubst, builtin_erenamsyms, m4_regexp_do)
47         (m4_patsubst_do, m4_renamesyms_do): Removed.
48         (builtin_changeresyntax): New builtin to change regular expression
49         syntax.
50         (m4_resyntax_encode_safe): Factor out diagnostics code.
51         * src/freeze.c (produce_resyntax_dump): New function to dump
52         default regexp syntax specifier to frozen file.
53         (reload_frozen_state): Updated to action 'R' directive.
54         * src/main.c (usage): Describe new -r option.
55         (long_options, OPTSTRING): Declare it.
56         (main): Encode and store cli regexp syntax option argument.
57         * tests/freeze.at (regexp syntax): New test that regexp syntax
58         survives freezing.
59         * tests/generate.awk (m4_pattern_allow): Updated for renamesyms.
60         * doc/m4.texinfo (Erenamesyms and Renamesyms, Eregexp and Regexp)
61         (Epatsubst and Patsubst): Renamed to...
62         (Renamesyms, Regexp, Patsubst): ...these respectively. Updated
63         documentation and added new examples.
64         (Changeresyntax): New section describing changeresyntax builtin,
65         and regexp syntax names.
66         (Regular expression syntax): New section describing differences
67         between various regular expression syntaxes.
68         (Frozen files): Document 'R' directive.
69         * NEWS: Updated.
71 2006-07-13  Gary V. Vaughan  <gary@gnu.org>
73         * bootstrap: Enhanced to work more like our other scripts:
74         Add a copyright statement; support --version and --help; accept a
75         --download-po option with argument as a substitute for DOWNLOAD_PO
76         in the environment.
78 2006-07-11  Eric Blake  <ebb9@byu.net>
80         * Makefile.am (doc/m4.1): Port patch from branch that avoids
81         intermediate file.
82         * ltdl/m4/gnulib-cache.m4: Regenerate since upstream gnulib-tool
83         changed.
85 2006-07-10  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
87         * tests/builtin.at (patsubst, regexp):  Adjust these tests, now
88         that `\0' is no longer accepted.
90         * src/main.c (usage): Alphabetize options within their sections.
92         * modules/gnu.c (m4_regexp_search, regsub, substitute)
93         (esyscmd):  Improve comments.
95         * modules/gnu.c (substitute): Remove old warning for \0.
96         (substitute_warned): No longer required.  Removed.
98         * modules/gnu.c: Put macro definitions into alphabetical order.
100 2006-07-07  Eric Blake  <ebb9@byu.net>
102         * tests/freeze.at (loading format 1): New file, with new test.
103         * tests/testsuite.at: Include it.
104         * tests/macros.at (Arity, defn, and freeze): Add frozen keyword.
105         * tests/modules.at (Freezing modules): Likewise.
107         * configure.ac (AC_PREREQ): Autoconf 2.60 is now out.
108         (AC_CHECK_HEADERS): Assume signal.h.
109         (AC_CHECK_HEADERS_ONCE): Use new feature to shrink configure.
110         (AC_CHECK_FUNCS_ONCE): Likewise.
111         * src/m4.h (includes): Assume signal.h.
113 2006-07-05  Eric Blake  <ebb9@byu.net>
115         Fix all testsuite failures on cygwin.
116         * doc/m4.texinfo (Syscmd, Esyscmd): Forward-port updates from
117         branch-1_4.  Solves testsuite failure when uninstalled m4 is
118         shadowed by redefinition of PATH in libtool wrapper.
119         * Makefile.am (module_ldflags): Don't forget AM_LDFLAGS, which
120         contains the -no-undefined required by cygwin.
121         (TESTS_ENVIRONMENT): Export abs_top_builddir.
122         * tests/others.at (misc): Port to platforms where /etc/passwd
123         does not exist or does not contain user named root.
124         * tests/modules.at (AT_CHECK_M4_MODTEST): Look in correct
125         directory.
126         * tests/builtins.at (define, divert): Avoid overquoting.
127         * tests/generate.awk (new_group): Likewise.
129 2006-07-05  Gary V. Vaughan  <gary@gnu.org>
131         The regs_allocated field in a struct re_pattern_buffer refers
132         to the state of a particular re_registers struct when used in
133         successive matches using the same compiled pattern.  Avoid a
134         SEGV in `renamesyms' resulting from using a new re_registers
135         with an existing re_pattern_buffer:
137         * modules/gnu.c (m4_pattern_buffer): Wrapper struct for associated
138         pattern buffer and registers.
139         (m4_regexp_search): New function to call re_regexp_search with
140         correctly matched pattern buffer and register instantiations.
141         (m4_regexp_compile): Return an m4_pattern_buffer.  Adust all
142         callers.
144 2006-07-04  Gary V. Vaughan  <gary@gnu.org>
146         * ltdl/m4/m4-getopt.m4 (M4_GETOPT): Update to take into account
147         changes to gnulib getopt.m4 since last build.
148         * Makefile.am (src_m4_SOURCES): Only compile shipped getopt module
149         if the system getopt fails M4_GETOPT tests.
151 2006-06-22  Eric Blake  <ebb9@byu.net>
153         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
154         Reported by Bruno Haible.
156 2006-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
158         * m4/module.c (m4__module_exit): Avoid ltdl memory leak.
160 2006-06-19  Eric Blake  <ebb9@byu.net>
162         * THANKS: Update.
164 2006-06-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
166         * Makefile.am (src_m4_DEPENDENCIES): Make dependency explicit.
167         (clean-local): Split into and depend upon...
168         (clean-local-tests, clean-local-src): ...these two.  The latter
169         removes the libtool object directory below `src', to work around
170         a buglet in Automake, failing to list it.
171         (EXTRA_DIST): Distribute modules/perl.c.
173 2006-06-19  Eric Blake  <ebb9@byu.net>
175         * Makefile.am ($(srcdir)/doc/m4.1): No need to list $(srcdir) in
176         right side of dependency; VPATH does that.
177         (stamp-vcl): Update to use libtool's algorithm.
178         (EXTRA_DIST): Distribute stamp-vcl.
179         Reported by Ralf Wildenhues.
180         (TESTSUITE): Revert earlier change that used absolute path, as
181         that broke 'make dist' in VPATH.  Stick with $(srcdir) instead.
182         (EXTRA_DIST): Revert earlier change of $(TESTSUITE).
183         (TESTS_ENVIRONMENT) [USE_GMP]: Revert earlier addition, since
184         atlocal takes care of it instead.
185         (check-local, installcheck-local, clean-local): Inline absolute
186         path to testsuite here, rather than relative path to testsuite
187         elsewhere.
189 2006-06-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
191         * m4/m4private.h (DELETE): Cast away const here...
192         * src/stackovf.c (stackovf_exit): ...to avoid cast-as-lvalue here.
193         * src/freeze.c (reload_frozen_state): Avoid uninitialized
194         variable warning.
196 2006-06-19  Eric Blake  <ebb9@byu.net>
198         * Makefile.am (doc/m4.1): Build in $(srcdir), to match where
199         .info pages are built.
200         Reported by Ralf Wildenhues.
201         (EXTRA_DIST): Inline definition of testsuite, so that make dist
202         works again.
204 2006-06-16  Eric Blake  <ebb9@byu.net>
206         Follow recommendations from autoconf manual for autotest.
207         * Makefile.am (TESTSUITE): Factor the $(srcdir) out of uses, and
208         turn it into an absolute path until autotest provides an option
209         that allows us to avoid changing directories.  Properly quote
210         throughout.
211         (TESTS_ENVIRONMENT) [USE_GMP]: Inform testsuite about GMP.
212         (check-recursive): Delete unused target.
213         ($(TESTSUITE)): Atomically update testsuite.
214         (CD_TESTDIR): Simplify.
215         (m4__cd): Delete unused macro.
216         (check-local): Let TESTSUITEFLAGS influence the run.
217         (installcheck-local): Let TESTSUITEFLAGS override
218         AUTOTEST_PATH.  Add dependencies.
219         (clean-local): Clean up.
220         (DISTCLEANFILES, MAINTAINERCLEANFILES): Add directory location.
221         * README: Document how to use the testsuite.
223 2006-06-15  Eric Blake  <ebb9@byu.net>
225         * configure.ac (M4_DEFAULT_PRELOAD): Fix typo in last commit.
227         * ltdl/m4/m4-error.m4 (M4_ERROR): Use M4_ instead of m4_ to avoid
228         clashes with m4sugar.
229         * ltdl/m4/m4-getopt.m4 (M4_GETOPT): Likewise.
230         * ltdl/m4/m4-gettext.m4 (M4_GNU_GETTEXT): Likewise.
231         * ltdl/m4/m4-obstack.m4 (M4_OBSTACK): Likewise.
232         * ltdl/m4/m4-regex.m4 (M4_REGEX): Likewise.
233         * ltdl/m4/gmp.m4 (_M4_LIB_GMP): Likewise.
234         * ltdl/m4/stackovf.m4 (M4_SYS_STACKOVF): Likewise.
235         * ltdl/m4/debug.m4 (M4_CHECK_DEBUGGING): Likewise.
236         * configure.ac: Likewise.
237         (M4_DEFAULT_PRELOAD): Use as a macro, not shell variable.
238         * Makefile.am (src_m4_CPPFLAGS): Use STACKOVF as a makefile
239         conditional.
240         * ltdl/m4/m4-gnulib.m4: Delete, no longer needed.
242         Reduce compiler warnings.  Inside GMP, mpq_t is an array type, so
243         const mpq_t is not assignable from plain mpq_t.  Avoid
244         type-punning warnings caused trying to mix these types.
245         * modules/mpeval.c (numb_ior, numb_eor, numb_and, numb_lshift),
246         (numb_rshift, numb_divide, numb_modulo): Remove const qualifier.
247         * modules/evalparse.c (or_term, xor_term, and_term, shift_term),
248         (mult_term, exp_term): Remove type-punning casts.
249         (numb_pow): Remove const qualifier.
250         * src/freeze.c (reload_frozen_state): Fix typo in messages.
251         Fix variables that can be used uninitialized, which fixes
252         security hole where malicious frozen file can execute arbitrary
253         code.
255 2006-06-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
257         * Makefile.am (modules_mpeval_la_LIBADD): Readd $(LIBADD_GMP).
259 2006-06-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
260             Eric Blake  <ebb9@byu.net>
262         Allow `make dist' to work again.
263         * Makefile.am (EXTRA_DIST): doc/helptoman.pl is gone.
264         (MAINTAINERCLEANFILES): Avoid redundant mention of dist_man_MANS.
265         (cvs-dist): Fix typo.
266         * NEWS: Match current version number.
268 2006-06-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
270         * Makefile.am (AM_CPPFLAGS):  Add $(LTDLINCL), so the right
271         ltdl.h is used.
273         * bootstrap: Do not run libtoolize manually, this is done
274         correctly by autoreconf.  Invoke autoreconf with --no-recursive
275         to avoid unnecessary rerunning of autotools for libltdl.
277 2006-06-13  Eric Blake  <ebb9@byu.net>
279         * THANKS: Update.
281 2006-06-12  Eric Blake  <ebb9@byu.net>
283         * m4/output.c [HAVE_MKTEMP]: Gnulib provides mkstemp, so don't
284         bother with mktemp.
285         * src/m4.h: Don't declare mktemp.
286         * m4/input.c (m4__next_token): Avoid bzero.
287         * configure.ac (AC_CHECK_FUNCS): Remove obsolete checks.
288         * Makefile.am (doc/m4.1): Depend on installed help2man, rather
289         than distributing outdated helptoman.pl.
290         * doc/helptoman.pl: Delete.
292 2006-06-10  Eric Blake  <ebb9@byu.net>
294         * README (Patches): Document the current dependence on CVS
295         builds of autotools.
296         * ltdl/m4/gnulib-cache.m4: Update, and use --macro-prefix=M4.
297         * configure.ac: Use consistent quoting throughout.
298         (AC_PREREQ): Bump to 2.59d.
299         (AC_INIT): Package name begins with uppercase.
300         (AC_ARG_WITH): Use AS_HELP_STRING.
301         (AM_INIT_AUTOMAKE): Enable gnits mode.
302         (AC_ISC_POSIX, AM_PROG_CC_STDC, AC_PROG_INSTALL, AC_PROG_MAKE_SET),
303         (AC_PROG_AWK, AM_C_PROTOTYPES, AC_C_CONST, AC_HEADER_STDC),
304         (AC_CHECK_HEADERS, AC_FUNC_ALLOCA, AC_FUNC_VPRINTF): Remove checks
305         done by gnulib or automake, or which autoconf has declared
306         obsolete.
307         * m4/m4private.h (Includes): Assume C89 or better, and use errno
308         unconditionally.
309         * m4/output.c (Includes): Likewise.
310         * modules/gnu.c (Includes): Likewise.
311         * modules/m4.c (Includes): Likewise.
312         * src/m4.h (Includes): Likewise.
314         * README-alpha: Update web address.
315         * README: Likewise. Change encoding to ASCII.  Remove old advice
316         about cygwin.  Document bootstrapping dependency.
317         * AUTHORS: Update from branch-1_4.
318         * THANKS: Likewise.  Change encoding to UTF-8.
319         * BACKLOG: Delete.  This file is too old and unmaintained to be
320         worthwhile.
321         * ChangeLog: Change encoding to UTF-8.
323         Avoid compiler warnings.
324         * m4/macro.c (trace_format): Don't mark this as a printf format,
325         since we don't accept the same set of modifiers as printf.  It
326         would be nice if gcc let us specify a custom format archetype.
327         * src/main.c (main): Cast away const.
329 2006-06-10  Andreas Schwab  <schwab@suse.de>  (tiny change)
330             Eric Blake  <ebb9@byu.net>
332         * modules/time.c (ctime): Pass correctly typed variable to
333         m4_numeric_arg.
334         (gmtime): Likewise.
335         (localtime): Likewise.
336         (strftime): Likewise.
337         * m4/utility.c (m4_numeric_arg): For now, document arbitrary
338         limit inherent in this interface.
340 2006-05-08  Bruno Haible  <bruno@clisp.org>  (tiny change)
342         * modules/m4.c (WEXITSTATUS): Provide fallback definition.
343         (sysval): Use WEXITSTATUS.
344         * modules/gnu.c (esyscmd): Set sysval to 0xffff, to accomodate both
345         big-endian and little-endian wait status definitions.
347 2006-05-06  Eric Blake  <ebb9@byu.net>
349         * configure.ac (LT_CONFIG_LTDL_DIR): Inform libtool which
350         subdirectory to use.
351         (support for -pipe): Move after LT_INIT, since it relies on
352         libtool internals.
354 2006-05-05  Eric Blake  <ebb9@byu.net>
356         * Makefile.am (doc/m4.1): Use $@, not $(srcdir)/doc/$@.
358         * THANKS: Update.
360 2006-05-05  Bruno Haible  <bruno@clisp.org>
361             Eric Blake  <ebb9@byu.net>
363         * configure.ac (gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES): Move to...
364         * ltdl/m4/gnulib-cache.m4: ...this new file, per new gnulib-tool
365         usage pattern.
366         * bootstrap: Update usage of gnulib-tool.
368 2006-05-04  Eric Blake  <ebb9@byu.net>
370         * Makefile.am (doc/m4.1): Use EXEEXT on built binary.
371         Cleanup whitespace.
373 2005-12-05  Gary V. Vaughan  <gary@gnu.org>
375         * bootstrap (func_update_po): Synch with CVS GNU tar.  wget 1.9.x
376         and 1.10.x support --cache=off, so $WGETFLAGS are not necessary.
377         Reported by Eric Blake <ebb9@byu.net>
379 2005-12-04  Gary V. Vaughan  <gary@gnu.org>
381         * bootstrap (func_update_po): Test and set $WGETFLAGS to disable
382         http caching as -C is no longer supported by wget 1.10.x.
383         Reported by Eric Blake <ebb9@byu.net>
385 2005-10-20  Gary V. Vaughan  <gary@gnu.org>
387         * m4/module.c (caller_id): To match libtool-2.0 interface, changed
388         to ...
389         (iface_id): ...an lt_dlinterface_id type.
390         (m4__module_find): New abstraction for lt_dlhandle_fetch.  Use
391         throughout, instead of calling obsolete lt_dlhandle_find directly.
392         (m4__module_next): Use multiloader-safe lt_dlhandle_iterate.  Use
393         throughout, instead of calling obsolete lt_dlhandle_next.
394         * m4/m4private.h (m4__module_find): Declare it.
395         * m4/builtin.c (m4_builtin_find_by_name, m4_builtin_find_by_func):
396         Use m4__module_next instead of obsolete lt_dlhandle_next.
398 2005-10-20  Gary V. Vaughan  <gary@gnu.org>
400         * bootstrap (func_update_po): Update pofiles directly from the
401         translation project.
402         * po/LINGUAS, po/cs.po, po/de.po, po/el.po, po/fr.po, po/it.po,
403         po/ja.po, po/nl.po, po/pl.po, po/ru.po, po/sv.po: No need to store
404         these files under source control anymore.
405         Suggested by Eric Blake <ebb9@byu.net>
407 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
409         * ltdl/m4/m4-gnulib.m4: Update FSF contact address.  Somehow this
410         file escaped the address updates on 2005-05-01.
412 2005-07-07  Gary V. Vaughan  <gary@gnu.org>
414         * bootstrap: Allow user overriding of gnulib-tool location, and
415         correctly determine module source directories whether gnulib-tool
416         is given as a relative or absolute path, or is found by searching
417         PATH.
418         Reported by Eric Blake <ebb9@byu.net>
420 2005-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
422         * ltdl/m4/debug.m4 (m4_CHECK_DEBUGGING): Make sure that both $rm
423         and $RM are defined for various versions of
424         AC_LIBTOOL_COMPILER_OPTION.
426         * bootstrap (AUTORECONF): New variable to allow user overriding of
427         autoreconf path.
429 2005-07-07  Gary V. Vaughan  <gary@gnu.org>
431         * doc/m4.texinfo (History): Add better notes on the ancestory of
432         GNU m4, and other historical interest.
434 2005-05-08  Gary V. Vaughan  <gary@gnu.org>
436         * m4/symtab.c (m4_symbol_rename): New function that performs a low
437         level symbol rename.
438         * m4/m4module.h (m4_symbol_rename): Declare it as part of the API.
439         * modules/gnu.c (regsub): Factored out of m4_epatsubst_do...
440         (m4_patsubst_do, m4_renamesyms_do): ...wrappers that use
441         regsub...
442         (erenamesyms, renamesyms): ...builtins that use these to implement
443         macro renaming by regular expression.
444         * doc/m4.texinfo (Erenamesyms and Renamesyms): Document them.
445         * tests/generate.awk: Allow some forbidden `m4_' prefixed symbols
446         to stop the new generated tests from choking.
448 2005-05-07  Gary V. Vaughan  <gary@gnu.org>
450         Since most of the build is handled from a single Makefile.am now,
451         we can teach make about the dependencies between the m4 binary and
452         the preopened modules it is built against:
454         * configure.ac (PREOPEN_DEPENDENCIES): Substitute for a list of
455         preopened modules.
456         * Makefile.am (src_m4_DEPENDENCIES): Rebuild the m4 program if any
457         of the preopened modules have changed.
459 2005-05-07  Gary V. Vaughan  <gary@gnu.org>
461         * configure.ac (gl_MODULES): Add mkstemp for machines that don't
462         have a native implementation.
464 2005-05-06  Gary V. Vaughan  <gary@gnu.org>
466         * src/m4.h (EXIT_SUCCESS, EXIT_FAILURE): Removed.  These are
467         handled already by gnu/exit.h.
469         * configure.ac (gl_MODULES): Add assert to support a
470         --disable-assert configure time option for NDEBUG setting.
472         * Makefile.am (src_m4_SOURCES): Add version-etc-fsf.c.
473         * bootstrap (src_modules): Add version-etc-fsf.
474         * src/main.c (version_etc_copyright): Removed.
476         * ltdl/m4/m4-getopt.m4 (m4_GETOPT): Synch with gnulib/getopt.m4.
478 2005-05-04  Gary V. Vaughan  <gary@gnu.org>
480         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
481         recognition macros.
482         * src/freeze.c (produce_frozen_state): Use \n line-endings even
483         on Windows, so that the frozen file reader will work.
484         Reported by Josef T. Burger <bolo@bolo.com>
486 2005-05-04  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
488         Forward port of a patch that allowed m4-1.4.2 to compile on
489         QNX 6.3:
491         * configure.ac (AC_CHECK_HEADERS):  Add signal.h,
492         sys/signal.h.
493         * src/m4.h: And include them as appropriate.
494         * src/main.c, src/stackovf.h: Don't include signal.h literally;
495         m4.h will include the correct file.
497 2005-05-04  Gary V. Vaughan  <gary@gnu.org>
499         * m4/m4private.h: Make errno visible for the sources patched
500         below.
502 2005-05-04  Paul Eggert  <eggert@twinsun.com>
504         * src/main.c (print_program_name_CB): Preserve errno, since
505         M4ERROR relies on this.
506         * modules/gnu.c (m4_esyscmd): Clear errno before calling popen.
507         * modules/m4.c (m4_maketemp): Clear errno before calling mkstemp.
508         * m4/path.c (m4_path_search): Don't let "free" trash errno when
509         returning NULL.
511         * m4/output.c (m4_insert_file): Don't assume errno has a valid
512         value simply because fread returns zero.  This fixes a
513         portability bug reported by Marion Hakanson in
514         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
516 2005-05-04  Santiago Vila  <sanvila@debian.org>
518         * tests/stackovf.test: Use tempfile if available.
520 2005-05-04  Robert Bihlmeyer  <robbe@orcus.priv.at>  (tiny change)
522         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
523         * m4/output.c (m4_insert_file): Do not mix buffered and
524         unbuffered I/O, as this breaks on the Hurd.
526 2005-05-04  Gary V. Vaughan  <gary@gnu.org>
528         Gnulib has changed again.  Reimport.  Adjust.  Rinse.  Repeat.
529         Automake and Libtool now agree on subdir-objects and LTLIBOBJS,
530         and libtoolize does a better job of ltdl importing now too, so
531         take advantage of that while updating the tree:
533         * acm4, config: Moved from here...
534         * ltdl/m4, ltdl/config: ...to here.
535         * doc/Makefile.am, m4/Makefile.am, modules/Makefile.am,
536         src/Makefile.am, tests/Makefile.am: Removed...
537         * Makefile.am: ...and migrated to here, with adjustments to
538         compensate for relative path differences.
539         * commit: Adjust relative paths.
540         * configure.ac: Adjust relative paths.
541         (AC_PREREQ): 2.59 isn't strictly new enough, we also need a
542         patch.
543         (LT_PREREQ): 2.0 isn't released yet, but will work when it is!  In
544         the meanwhile, CVS HEAD libtool is needed.
545         (AM_INIT_AUTOMAKE): Added subdir-objects declaration. 1.9.5 isn't
546         stricly new enough, we also need a patch.
547         (AM_PROG_CC_C_O): Required for subdir-objects in Automake.
548         (AC_WITH_LTDL): Replaced with LT_WITH_LTDL.
549         (gl_MODULES): Don't list getopt and version-etc, as they don't
550         belong in libm4.
551         * bootstrap: After running gnulib-tool to import the listed
552         modules, fetch getopt and version-etc into src manually.
553         (ltdldir): Change to ltdl.
554         * src/main.c: Adjust for changes in version-etc API.
555         * ltdl/m4/m4-getopt.m4: New macro to mirror gnulib's getopt.m4,
556         but works when the getopt module isn't to be included in the lib.
557         * README: Add note about patching autoconf and automake to
558         bootstrap CVS m4.
560 2005-05-02  Matt Kraai  <kraai@debian.org>  (tiny change)
562         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
563         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
564         empty file rather than to a nonexistent file.  This closes a
565         common security hole.
566         * modules/m4.c (m4_maketemp): Implement the above, by using
567         mkstemp rather than mktemp.
569 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
571         The FSF are moving offices today.  Changed their contact address
572         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
573         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
575 2005-03-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
577         * tests/Makefile (clean-local): Ignore testsuite cleanup
578         failures.
580 2005-03-11  Per Bothner  <per@bothner.com>  (tiny change)
582         * tests/Makefile (clean-local): Only run the testsuite cleanup
583         if the testsuite has been generated.
585 2005-02-11  Stepan Kasal  <kasal@ucw.cz>
587         * TODO: slight clarification of the example of qindir usage.
589 2005-02-08  Gary V. Vaughan  <gary@gnu.org>
591         * TODO: Add qindir requirement, and defn bug.
592         From Stepan Kasal  <kasal@ucw.cz>
594 2005-02-08  Stepan Kasal  <kasal@ucw.cz>
596         * TODO: Add ``execution stack'', fix a typo.
597         * doc/m4.texinfo: Typos.
599 2004-12-24  Eric Blake  <ebb9@byu.net>
601         * configure.ac (INCLUDE_STDBOOL_H): Account for gnulib's move
602         to the gnu subdirectory.
603         * acm4/m4-error.m4 (INCLUDE_ERROR_H): Likewise.
604         * acm4/m4-obstack.m4 (INCLUDE_OBSTACK_H): Likewise.
605         * acm4/m4-regex.m4 (INCLUDE_REGEX_H): Likewise.
606         * m4/system_.h: Likewise, in non-configured includes.
608 2004-10-14  Noah Misch  <noah@cs.caltech.edu>,
609             Gary V. Vaughan  <gary@gnu.org>
611         * m4/m4.c (m4_context_field_table, m4_context_opt_bit_table):
612         Protect definitions from macro expansion under -DNDEBUG by
613         parenthesising the expanded function names.
614         * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
615         (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
616         (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
617         (m4_is_syntax_macro_escaped): Similarly protect function
618         definitions from macro expansion under -DNDEBUG by #undefing the
619         matching macro names before each definition.  Also, move all the
620         function definitions to the end of the file so that any
621         invocations in the rest of the file pick up the fast macro
622         versions.
623         * m4/m4private.h (m4_set_symbol_table, m4_set_syntax_table)
624         (m4_set_debug_file, m4_set_trace_messages)
625         (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
626         (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
627         (m4_set_max_debug_arg_length_opt): New fast macro versions of the
628         option setter functions.
630 2004-09-23  Gary V. Vaughan  <gary@gnu.org>
632         * src/main.c: Include gnulib files from the correct directory.
634         * gnulib/*: Don't store any of the gnulib files in arch, as they
635         generate spurious changes.
636         * Makefile.am (ACLOCAL_AMFLAGS): Remove gnulib/acm4 since the
637         gnulib macros now share our macro directory.
638         (SUBDIRS): Descend into `gnu' rather than `gnulib'.
639         * bootstrap: Call gnulib-tool to import from the gnulib tree.
640         (gl_AC_HEADER_INT_TYPES_H, gl_AC_HEADER_STDINT_H,
641         gl_AC_TYPE_UINTMAX_T): Patch gnulib.m4 to define these in terms of
642         the gettext macros from autopoint that overwrite the gnulib-tool
643         imported versions.  Import sources and Makefile.am into the `gnu'
644         directory.  Changed all callers.
645         * configure.ac (gl_EARLY, gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES,
646         gl_INIT): Call these gnulib-tool macros instead of the hardcoded
647         for imported modules.
648         * acm4/m4-error.m4, acm4/m4-gettext.m4, acm4/m4-obstack.m4,
649         acm4/m4-regex.m4: Use AC_BEFORE to enforce ordering rather than
650         hardcoding the gnulib macros they wrap.
652 2004-07-15  Gary V. Vaughan  <gary@gnu.org>
654         Latest CVS libtool can preload modules in libraries, including
655         its own module loaders!  Tweak m4 so that it doesn't try to treat
656         libltdl's module loaders as m4 modules when freezing and on exit:
658         * gnulib/acm4/*.m4: Don't store these files in arch since they
659         generate spurious changes.
660         * bootstrap: Simplify initial libtoolize call, since CVS
661         libtoolize is smarter these days.
662         * doc/Makefile.am (%.1): Make the helptoman call work with a VPATH
663         build.
664         * m4/module.h (m4__module_exit): Missing declaration.
665         * m4/m4private.h (m4__module_next): New function declaration.
666         * m4/module.c (m4__module_next): lt_dlhandle_{firs,nex}t
667         encapsulation.  Changed all callers.
668         (m4__module_interface): New function to verify m4 loadable module
669         interfaces.
670         (m4__module_init): Register the interface validator.
671         (m4__module_exit): Only close my own modules.
672         * modules/m4.c (unistd.h): Provide missing declaration.
673         (m4_set_sysval, m4_sysval_flush, m4_dump_symbols)
674         (m4_expand_ranges): More missing declarations.
675         * modules/modtest.c (export_test): Ditto.
676         * src/Makefile.am (AM_CPPFLAGS): Add libltdl directory.
677         * src/main.c (main): Bump copyright year.
678         * tests/modules.at: Fix sed syntax error.
681 2004-06-17  Gary V. Vaughan  <gary@gnu.org>
683         Tweaking to enable compilation with latest CVS libtool and
684         libltdl.  We can't just dump the library files directly into the
685         m4 directory anymore now that libltdl is built from pieces itself:
687         * bootstrap: Rewritten to use latest libtoolize sanely, and to
688         set up libltdl subdirectory.
689         * configure.ac (AC_CONFIG_AUX_DIR): Point to our own, not the
690         gnulib subdirectory's config.
691         (TIMESTAMP): Use $ac_aux_dir for VPATH builds.
692         (m4_pattern_forbid): Remove the cruft to deal with renamed jm_
693         macros from gnulib.
694         (AC_LIB_LTDL): Latest libltdl is a sub-project with its own
695         configure.ac, so use AC_WITH_LTDL instead.
696         * Makefile.am (SUBDIRS): Add libltdl.
697         * acm4/m4-regex.m4 (jm_INCLUDED_REGEX): Updated.  gnulib now uses
698         gl_INCLUDED_REGEX.
699         * m4/Makefile.am (AM_CPPFLAGS): Add INCLTDL.
700         (libm4_la_SOURCES): Remove ltdl.c and ltdl.h.
701         (libm4_la_LIBADD): Add LIBLTDL.
702         * m4/ltdl.c, m4/ltdl.h: Removed.
703         * m4/m4module.h: Include canonical ltdl.h.
704         * po/*.po: Updated.
706 2004-06-14  Gary V. Vaughan  <gary@gnu.org>
708         * gnulib/import: Now updates makefile fragments, and configure.ac.
709         * gnulib/m4/gnulib.am: New file.  Generated makefile fragments.
710         * gnulib/m4/Makefile.am: include it.
711         * gnulib/acm4/intmax.m4, gnulib/acm4/longdouble.m4,
712         gnulib/acm4/longlong.m4, gnulib/acm4/printf-posix.m4,
713         gnulib/acm4/signed.m4, gnulib/acm4/size_max.m4,
714         gnulib/acm4/wchar_t.m4, gnulib/acm4/wint_t.m4,
715         gnulib/acm4/xsize.m4: New macro files from latest gnulib import.
716         * gnulib/acm4/alloca.m4, gnulib/acm4/inttypes_h.m4,
717         gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-prefix.m4,
718         gnulib/acm4/error.m4, gnulib/acm4/po.m4, gnulib/acm4/regex.m4,
719         gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
720         gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
721         gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
722         gnulib/acm4/free.m4, gnulib/acm4/gettext.m4,
723         gnulib/acm4/glibc21.m4: Updated macro files from latest gnulib
724         import.
725         * gnulib/m4/getopt_int.h: New source file from latest gnulib
726         import.
727         * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/getopt1.c,
728         gnulib/m4/obstack.c, gnulib/m4/obstack.h, gnulib/m4/regex.c,
729         gnulib/m4/unlocked-io.h, gnulib/m4/version-etc.c,
730         gnulib/m4/xmalloc.c, gnulib/m4/getopt.c, gnulib/m4/getopt.h:
731         Updated source files from latest gnulib.
733 2004-02-29  Gary V. Vaughan  <gary@gnu.org>
735         * config/mailnotify: New file for mailing commit notifications,
736         imported from cvs-utils.
737         * commit: Updated from cvs-utils and tweaked for m4.
739 2003-12-01  Gary V. Vaughan  <gary@gnu.org>
741         * config/mkstamp: Updated from CVS libtool.
742         * configure.ac: Generate a gnu coding standards compliant version
743         number, and use it for the banner.
744         * Makefile.am (stamp-vcl): New rules to force m4 to be regenerated
745         mhen the TIMESTAMP changes in ChangeLog, but the file modification
746         time doesn't (e.g. in cvs commit).  Otherwise dist tarballs will
747         contain the previous version number.
748         * src/main.c: Make --version output conform to the GNU standard.
750         * configure.ac (AM_INIT_AUTOMAKE): Require 1.7g...
751         * modules/Makefile.am (gnu_la_SOURCES, load_la_SOURCES,
752         m4_la_SOURCES, traditional_la_SOURCES, modtest_la_SOURCES,
753         shadow_la_SOURCES, import_la_SOURCES, stdlib_la_SOURCES,
754         time_la_SOURCES): ...so that these are defaulted correctly, and
755         can be removed from this file.
756         (AM_LDFLAGS): Add -module...
757         (gnu_la_LDFLAGS, load_la_LDFLAGS, m4_la_LDFLAGS,
758         traditional_la_LDFLAGS, modtest_la_LDFLAGS, shadow_la_LDFLAGS,
759         import_la_LDFLAGS, stdlib_la_LDFLAGS, time_la_LDFLAGS): ...so that
760         the individual settings can be removed.
761         * m4/Makefile.am (libm4_la_LIBADD): Add $(LTLIBINTL) here once...
762         * module/Makefile.am (gnu_la_LIBADD, load_la_LIBADD,
763         m4_la_LIBADD, traditional_la_LIBADD, modtest_la_LIBADD,
764         shadow_la_LIBADD, import_la_LIBADD, stdlib_la_LIBADD,
765         time_la_LIBADD): ...so that these are picked up as a deplib of
766         libm4 and don't need to be set explicitly.
768 2003-11-18  Gary V. Vaughan  <gary@gnu.org>
770         * modules/Makefile.am (pkglibexec_LTLIBRARIES): Remove perl.la
771         from the standard build.  It is too fragile.
773         * gnulib/acm4/libtool.m4, m4/ltdl.c, m4/ltdl.h: Reimported from
774         CVS libtool after merging m4 changes across to libtool.
776         * m4/symtab.c (m4_symtab_create): Fix a careless use of sizeof.
777         * m4/path.c (search_path_add): Ditto.
779 2003-11-13  Gary V. Vaughan  <gary@gnu.org>
781         * configure.ac (AC_LIBTOOL_TAGS): Don't include shell code for
782         libtool tags we don't use in configure.  This reduces the size
783         of the script from over 1Mb to under 700Kb.
785 2003-11-13  Gary V. Vaughan  <gary@gnu.org>
787         The import script was not written properly, and the last gnulib
788         import was incomplete.  Fixed that problem, and reimport our
789         gnulib dependencies, which picks up the address calculation
790         overflow checks described by Paul below.  Also tweak the clients
791         of the gnulib xalloc module not to use deprecated macros:
793         * gnulib/import: Recurse through module dependencies rather than
794         naively descending only one level.
795         * configure.ac: Add calls to gnulib's strnlen and extension module
796         macros.
797         * gnulib/m4/Makefile.am: Add snippets from gnulib's strnlen and
798         extension modules.
799         * gnulib/acm4/extensions.m4, gnulib/acm4/xalloc.m4,
800         gnulib/m4/alloca.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
801         gnulib/m4/stdbool_.h, gnulib/m4/unlocked-io.h, gnulib/m4/xalloc.h,
802         gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Updated from CVS
803         gnulib.
804         * gnulib/acm4/libtool.m4: Updated from CVS libtool.
805         * m4/hash.c (m4_get_hash_iterator_next): Use `xzalloc (S)' in
806         place of `xcalloc (1, S)'.
807         * m4/m4.c (m4_create): Likewise.
808         * m4/m4private.h (m4_symbol_value_create): Likewise.
809         * m4/symtab.c (symtab_fetch): Likewise.
810         * m4/syntax.c (m4_syntax_create): Likewise.
811         * src/freeze.c (reload_frozen_state): Likewise.
812         * m4/path.c (search_path_add): Eliminate use of deprecated NEW
813         macro.
814         * m4/symtab.c (m4_symtab_create): Likewise.
816 2003-11-13  Gary V. Vaughan  <gary@gnu.org>
818         * tests/module.at: Comment typo.
820 2003-10-10  Gary V. Vaughan  <gary@gnu.org>
822         * tests/modules.at (modules: importing): Apply some lateral
823         thinking, and use AT_CHECK to compare the output of a sed pass
824         over stderr against the canonical strerror string.
826         * tests/modules.at (modules: importing): Edit the generated stderr
827         output to canonicalize strerror output, before a comparison.
829 2003-10-10  Gary V. Vaughan  <gary@gnu.org>
831         Tru64UNIX perl is sloppy with namespace pollution.  This patch is
832         careful not to trip over the mess:
834         * modules/perl.c: Some builds of perl install headers that contain
835         `#define try __builtin_try'.  Be sure to undefine that macro
836         before `m4/hash.h' gets included, which uses the `try' symbol.
837         * m4/system_.h: Similarly for `bool'.  Undefine `bool', `true' and
838         `false' before including `stdbool.h'.
839         (DELETE):  This symbol is not in m4's namespace, and is in any
840         case only used internally...
841         * m4/m4private.h (DELETE): ...so move it to here.
842         Reported by Martin MOKREJS <mmokrejs@natur.cuni.cz>
844 2003-10-08  Paul Eggert  <eggert@twinsun.com>
846         Don't use XMALLOC and XCALLOC.  Once we install the
847         corresponding patch into gnulib, this will fix some
848         address-calculation overflow bugs on hosts where calloc (A, B)
849         returns garbage when A*B overflows.
851         * m4/hash.c (m4_hash_new, node_new, m4_hash_resize,
852         maybe_grow, m4_get_hash_iterator_next): Replace XMALLOC with
853         xmalloc, XCALLOC with xcalloc.
854         * m4/m4.c (m4_create): Likewise.
855         * m4/m4private.h (m4_symbol_value_create): Likewise.
856         * m4/output.c (m4_output_init): Likewise.
857         * m4/symtab.c (symtab_fetch, m4_set_symbol_traced): Likewise.
858         * m4/syntax.c (remove_syntax_attribute): Likewise.
859         * src/freeze.c (reload_frozen_state): Likewise.
860         * src/main.c (main): Likewise.
862 2003-10-07  Gary V. Vaughan  <gary@gnu.org>
864         * Makefile.am (ACLOCAL_AMFLAGS): Search in the new acm4 and
865         gnulib/acm4 directories for aclocal m4 macros.
866         * gnulib/Makefile.am (EXTRA_DIST): Removed.
867         (MAINTAINERCLEANFILES): Add Makefile.in.
868         * configure.ac (m4_GNULIB_MODULES): Use it to declare which gnulib
869         modules we use.
870         * acm4/m4-gnulib.m4 (m4_GNULIB_MODULES): New macro.
871         * gnulib/import: New file.  Temporary script for updating gnulib
872         imported files, until gnulib-tool is working.
873         * gnulib/config/codeset.m4, gnulib/config/error.m4,
874         gnulib/config/exitfail.m4, gnulib/config/extensions.m4,
875         gnulib/config/getopt.m4, gnulib/config/gettext.m4,
876         gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
877         gnulib/config/intdiv0.m4, gnulib/config/inttypes-pri.m4,
878         gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
879         gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
880         gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
881         gnulib/config/lib-prefix.m4, gnulib/config/malloc.m4,
882         gnulib/config/nls.m4, gnulib/config/obstack.m4,
883         gnulib/config/onceonly_2_57.m4, gnulib/config/po.m4,
884         gnulib/config/progtest.m4, gnulib/config/realloc.m4,
885         gnulib/config/regex.m4, gnulib/config/restrict.m4.
886         gnulib/config/stdbool.m4, gnulib/config/stdint_h.m4,
887         gnulib/config/strerror_r.m4, gnulib/config/strndup.m4,
888         gnulib/config/strnlen.m4, gnulib/config/strtol.m4,
889         gnulib/config/uintmax_t.m4, gnulib/config/ulonglong.m4,
890         gnulib/config/unlocked-io.m4, gnulib/config/xalloc.m4,
891         gnulib/config/xstrndup.m4: Removed.
892         * gnulib/acm4/alloca.m4, gnulib/acm4/codeset.m4,
893         gnulib/acm4/error.m4, gnulib/acm4/exitfail.m4,
894         gnulib/acm4/extensions.m4, gnulib/acm4/free.m4,
895         gnulib/acm4/getopt.m4, gnulib/acm4/gettext.m4,
896         gnulib/acm4/glibc21.m4, gnulib/acm4/iconv.m4,
897         gnulib/acm4/intdiv0.m4, gnulib/acm4/inttypes-pri.m4,
898         gnulib/acm4/inttypes.m4, gnulib/acm4/inttypes_h.m4,
899         gnulib/acm4/isc-posix.m4, gnulib/acm4/lcmessage.m4,
900         gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-link.m4,
901         gnulib/acm4/lib-prefix.m4, gnulib/acm4/malloc.m4,
902         gnulib/acm4/nls.m4, gnulib/acm4/obstack.m4,
903         gnulib/acm4/onceonly_2_57.m4, gnulib/acm4/po.m4,
904         gnulib/acm4/progtest.m4, gnulib/acm4/realloc.m4,
905         gnulib/acm4/regex.m4, gnulib/acm4/restrict.m4.
906         gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
907         gnulib/acm4/strerror_r.m4, gnulib/acm4/strndup.m4,
908         gnulib/acm4/strnlen.m4, gnulib/acm4/strtol.m4,
909         gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
910         gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
911         gnulib/acm4/xstrndup.m4: Reimported from CVS gnulib with
912         gnulib/import script.
913         * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/error.c,
914         gnulib/m4/error.h, gnulib/m4/exitfail.c, gnulib/m4/free.c,
915         gnulib/m4/malloc.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
916         gnulib/m4/realloc.c, gnulib/m4/regex.c, gnulib/m4/strtol.c,
917         gnulib/m4/version-etc.c, gnulib/m4/version-etc.h,
918         gnulib/m4/xalloc.h, gnulib/m4/xmalloc.c: Updated from CVS
919         gnulib with gnulib/import script.
920         * configure.ac, gnulib/m4/Makefile.am: Manually insert anticipated
921         guards ready for gnulib-tool to autoupdate on import.
922         * config/debug.m4, config/gmp.m4, config/m4-error.m4,
923         config/m4-gettext.m4, config/m4-obstack.m4, config/m4-regex.m4,
924         config/stackovf.m4: Moved from here...
925         * acm4/debug.m4, acm4/gmp.m4, acm4/m4-error.m4,
926         acm4/m4-gettext.m4, acm4/m4-obstack.m4, acm4/m4-regex.m4,
927         acm4/stackovf.m4: ...to here, to separate aclocal macros from
928         configure time helper scripts.
929         * config/error.m4: Removed; superceded by gnulib/acm4/error.m4.
930         * m4/hash.c, m4/m4.c, m4/macro.c, m4/module.c, m4/output.c,
931         m4/path.c, m4/symtab.c, m4/syntax, m4/system_.h, modules/m4.c,
932         src/main.c, src/stackovf.c: s/xfree/free/g to comply with new
933         gnulib xalloc.h.
934         * src/main.c (version_etc_copyright): Only output the current
935         year.
936         (version_etc): Call with new variadic API.
938 2003-09-16  Gary V. Vaughan  <gary@gnu.org>
940         * gnulib/m4/version-etc.c, gnulib/m4/version-etc.h: Import
941         version-etc module from CVS gnulib.
942         * po/POTFILES.in: Add gnulib/m4/version-etc.c.
943         * src/Makefile.am: Build it.
944         * src/main.c: Use it.
946         * gnulib/m4/exit.h: Import exit module from CVS gnulib.
947         * gnulib/m4/Makefile.am (pkginclude_HEADERS): Add exit.h.
948         * m4/system_.h: Don't define EXIT_SUCCESS and FAILURE, include
949         exit.h instead.
951 2003-09-15  Charles Wilson  <cygwin@cwilson.fastmail.fm>,
952             Gary V. Vaughan  <gary@gnu.org>
954         * bootstrap: Separate options.
955         * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
956         * gnulib/m4/Makefile.am (stdbool.h): Use srcdir, gnulib_srcdir is
957         not set.
958         * modules/Makefile.am (gnu_la_LIBADD, load_la_LIBADD)
959         (m4_la_LIBADD, mpeval_la_LIBADD, traditianal_la_LIBADD)
960         (modtest_la_LIBADD, import_la_LIBADD, perl_la_LIBADD)
961         (shadow_la_LIBADD, stdlib_la_LIBADD, time_la_LIBADD): Add
962         $(LTLIBINTL) for gettext support on cygwin.
963         * src/Makefile.am (m4_LDADD): Remove $(INTLLIBS), since we now
964         have $(LTLIBINTL) from the preloaded module la files.
965         * README: Remove the warning about using --disable-nls on Windows
966         machines.
968 2003-09-15  Gary V. Vaughan  <gary@gnu.org>
970         * gnulib/m4/regex.c:  s/<regex.h>/"regex.h"/ or else the compiler
971         picks up the system regex.h if gl_REGEX decides gnulib/m4/regex.c
972         is required.
974 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
976         * doc/STYLE: Document the gnulib header naming conventions, and
977         #include policy.
978         * gnulib/m4/error_.h, gnulib/m4/gettext_.h, gnulib/m4/obstack_.h,
979         gnulib/m4/regex_.h: Renamed to gnulib/m4/error.h,
980         gnulib/m4/gettext.h, gnulib/m4/obstack.h, gnulib/m4/regex.h
981         respectively.
982         * gnulib/m4/Makefile.am: Remove the rules to build these headers.
984         * gnulib/m4/strtol.c, gnulib/config/strtol.m4: Import strtol
985         module from CVS gnulib.
986         * configure.ac (AC_REPLACE_FUNCS): Remove strtol.
987         (gl_FUNC_STRTOL): In favour of the module macro.
989 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
991         Replace the getopt code with CVS gnulib getopt.  The source files
992         detect whether they are in a glibc environment and preprocess away
993         all of the code if there is a system getopt, so we can compile
994         them into the m4 executable unconditionally:
996         * gnulib/m4/getopt.c, gnulib/m4/getopt1.c, gnulib/m4/getopt.h,
997         gnulib/config/getopt.m4: Import getopt module from CVS gnulib.
998         * configure.ac (gl_GETOPT): Use this instead of homebrew inline
999         macros.
1000         * src/getopt.c, src/getopt1.c, src/gnu-getopt.h: Removed old
1001         version.
1002         * src/Makefile.am: Adjust.
1003         * src/main.c: Always include our shipped getopt.h.
1004         * po/POTFILES.in: Use new location of getopt.c.
1006 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
1008         * configure.ac (AC_CONFIG_FILES): Remove config/Makefile.
1009         * config/Makefile.am: Removed.  Automake 1.8 distributes the files
1010         in this directory automatically.
1011         * Makefile.am (EXTRA_DIST): Except config/mkstamp.
1013         * configure.ac (pkglibexecdir): Don't try and set it here, PACKAGE
1014         isn't set yet.
1015         * m4/Makefile.am (MODULE_PATH): Removed. Calculate pkglibexecdir
1016         inline.
1017         * modules/Makefile.am (pkglibexecdir): Set it here.
1018         (pkgmodincdir): Renamed to pkgmodincludedir).  Changed all clients.
1020         * gnulib/m4/regex.c, gnulib/m4/regex_.h, gnulib/config/regex.m4:
1021         Import regex module from CVS gnulib.
1022         * gnulib/config/restrict.m4: Ditto for dependee module restrict.
1023         * config/m4-regex.m4 (m4_REGEX): Wrap gnulib/config/regex.m4, but
1024         do extra substitutions for Makefile.
1025         * configure.ac: Use it.
1026         * gnulib/m4/Makefile.am: Maybe install regex.h after linking it
1027         from regex_.h if necessary.
1028         * m4/system_.h: Include the correct version of regex.h.
1029         * m4/regex.c, m4/regex.h, config/regex.m4: Removed legacy
1030         version.
1031         * po/POTFILES.in: Use new location of regex.c.
1033         * gnulib/m4/Makefile.am (EXTRA_DIST): Removed malloc.c and
1034         realloc.c: automake distributes these files already.
1036 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
1038         Replace the xstrzdup code by importing the xstrndup module from
1039         CVS gnulib, along with its dependencies: strndup and strnlen:
1041         * gnulib/m4/xstrndup.c, gnulib/m4/xstrndup.h,
1042         gnulib/config/xstrndup.m4: Import xstrndup module from CVS
1043         gnulib.
1044         * gnulib/m4/strndup.c, gnulib/m4/strndup.h,
1045         gnulib/config/strndup.m4: Ditto wrt strndup.
1046         * gnulib/m4/strnlen.c, gnulib/config/strnlen.m4: Ditto wrt
1047         strnlen.
1048         * gnulib/m4/Makefile.am: Add rules from newly imported modules.
1049         However, contrary to gnulib, we install xstrndup.h.
1050         * configure.ac (AC_REPLACE_FUNCS): Remove xstrzdup.
1051         * gnulib/lib/xstrzdup.c: Delete.  This was never a gnulib file, it
1052         is an artifact of the old m4 portability layer.
1053         * configure.ac (gl_XSTRNDUP): This is the gnulib equivalent.
1054         * m4/system_.h: Include xstrndup.h.
1055         * m4/macro.c (process_macro): Call xstrndup, not xstrzdup.
1057 2003-09-11  Gary V. Vaughan  <gary@gnu.org>
1059         Reimport the latest xalloc module from CVS gnulib, and adjust the
1060         m4 sources to take advantage of xalloc xfree.  Also create a new
1061         macro DELETE with the same semantics as the old m4 XFREE macro,
1062         and carefully tweak callers:
1064         * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h: Updated from CVS
1065         gnulib.
1066         * m4/utility.c (xfree): Removed.  This function is now supplied by
1067         gnulib xalloc.
1068         * m4/m4private.h (WITH_DMALLOC): Removed XFREE redefine.
1069         * m4/path.c (search_path_add): Use NEW macro from xalloc.h.
1070         * m4/symtab.c (m4_symtab_create): Ditto.
1071         * m4/system_.h: Removed XFREE redefine.
1072         (DELETE): New macro with same functionality as the original m4
1073         XFREE macro, but based on xalloc.h now.  Changed all callers.
1074         * src/main.c (main): Use XMALLOC macro.
1075         * m4/hash.c, m4/macro.c, m4/symtab.c, m4/syntax.c: Use xfree
1076         instead of XFREE.
1077         * m4/output.c (m4_output_exit): Use DELETE instead of XFREE.
1079 2003-09-10  Gary V. Vaughan  <gary@gnu.org>
1081         Import the xalloc module from CVS gnulib, along with its
1082         dependencies: exitfail, malloc and realloc. We had different
1083         semantics for our XFREE and a function xfree() not supplied by
1084         gnulib, so also a bit of work to keep everything running
1085         smoothly:
1087         * configure.ac (AC_REPLACE_FUNCS): Removed xmalloc and xstrdup.
1088         (gl_XALLOC): Use gnulib equivalents.
1089         * gnulib/config/exitfail.m4, gnulib/m4/exitfail.h,
1090         gnulib/m4/exitfail.c: Import exitfail module from CVS gnulib.
1091         * gnulib/config/malloc.m4, gnulib/m4/malloc.c: Ditto wrt malloc.
1092         * gnulib/config/realloc.m4, gnulib/m4/realloc.c: Ditto wrt
1093         realloc.
1094         * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h,
1095         gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Ditto wrt xalloc.
1096         * gnulib/m4/Makefile.am: Add fragment from gnulib for newly
1097         imported modules.
1098         (pkgincdir): Removed.  Use pkgincludedir instead.
1099         * m4/m4private.h (XFREE): xfree already checks for NULL.
1100         * m4/system_.h: Use xalloc module, and remove macros already
1101         supplied by xalloc.h.
1102         * m4/utility.c (xfree): xalloc does not yet implement xfree, so
1103         moved the old definition from m4/xmalloc.c to here for now.
1105 2003-09-09  Gary V. Vaughan  <gary@gnu.org>
1107         Import the error and progname modules from CVS gnulib.  Our old
1108         error.c subsumed the functionality of both, so a little adjustment
1109         was required to accomodate the split in sources.  Also added more
1110         wrapper macros to choose between a system installed error.h or our
1111         shipped gnulib error module:
1113         * m4/error.c, m4/error.h: Removed.
1114         * m4/Makefile.am: Adjust.
1115         (pkgincdir): Removed.  Use pkgincludedir instead.
1116         * m4/module.h, src/main.c: Don't include `m4/error.h'.
1117         * m4/system_.h (INCLUDE_ERROR_H): Add a substitution for suitable
1118         error.h.
1119         * gnulib/m4/progname.c: Imported from CVS gnulib.
1120         * gnulib/m4/progname.h: Ditto.
1121         * src/main.c: Adjust to use progname module.
1122         * gnulib/m4/error.c: Imported from CVS gnulib.
1123         * gnulib/m4/error_.h: Ditto.
1124         * gnulib/m4/Makefile.am: Build the error module into our libgnu.la
1125         if appropriate, and link a local error.h if the system version is
1126         missing.
1127         (libgnu_la_SOURCES) Add progname module sources.
1128         * gnulib/config/error.m4: Imported from CVS gnulib.
1129         * gnulib/config/strerror_r.m4: Ditto.
1130         * config/m4-error.c: New file.  Wrap gnulib error.m4 but arrange
1131         to have ERROR_H for Makefile substitutions and tell system.h
1132         whether the system error.h should be used, or a locally installed
1133         version.
1134         * configure.ac (jm_PREREQ_ERROR): Replaced by a call to m4_ERROR.
1136 2003-09-09  Gary V. Vaughan  <gary@gnu.org>
1138         * gnulib/m4/Makefile.am (MOSTLYCLEANFILES): Typo
1139         s/gettext_.h/gettext.h/.
1141         * bootstrap: Revert 2003-09-04 patch now that CVS autoconf and
1142         automake have been fixed.
1144         * config/m4-obstack.m4 (m4_FUNC_OBSTACK): D'oh! Now that we wrap
1145         gl_OBSTACK, which in turn calls AC_FUNC_OBSTACK, don't rerun bits
1146         of code originally snarfed from AC_FUNC_OBSTACK!!! While I'm here
1147         rename to m4_OBSTACK in light of wrapping gl_OBSTACK.
1149 2003-09-09  Gary V. Vaughan  <gary@gnu.org>
1151         The gnulib obstack module requires the gnulib gettext module for
1152         systems that do not have GNU gettext installed.  Because we use
1153         -Ignulib/m4 in our Makefiles it is not safe to drop gettext.h in
1154         that directory incase it clashes with the system gettext.h.  This
1155         delta uses gettext_.h and extra rules in the Makefile to make a
1156         link to gettext.h when needed:
1158         * Makefile.am (auxdir): Removed.  No longer used.
1159         * configure.ac (ac_aux_dir): Removed AC_SUBST.  No longer used.
1160         (TIMESTAMP): List path to `mkstamp' literally, as ac_aux_dir has
1161         moved.
1162         (AC_CONFIG_LIBOBJ_DIR): Declare this for possible future single
1163         Makefile based build.
1164         (AC_CONFIG_AUX_DIR): Now we use gnulib/config where the majority
1165         of the macros are kept.
1166         * Makefile.am (ACLOCAL_MFLAGS): Search gnulib/config first.
1167         * configure.ac (AM_INIT_AUTOMAKE): Require 1.7a.
1168         * config/Makefile (ACLOCAL_MACROS): Removed.  Automake 1.7a
1169         distributes these automatically.
1170         * config/regex.m4 (jm_WITH_REGEX): Fixed underquoting to prevent
1171         warning from automake-1.7a.
1172         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Renamed to
1173         m4_CHECK_DEBUGGING for consistency with gnulib prefixes.  Changed
1174         all callers.
1175         * config/m4-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto
1176         wrt. m4_FUNC_OBSTACK.
1177         * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto
1178         wrt. m4_sys_STACKOVF.
1179         * config/gmp.m4 (_M4_AC_LIB_GMP, M4_AC_LIB_GMP): Ditto
1180         wrt. _m4_LIB_GMP, m4_LIB_GMP.
1181         (ac_gmp_save_LIBS, ac_cv_using_lib_gmp): Don't use autoconf's
1182         namespace.  Renamed to m4_gmp_save_LIBS and m4_cv_using_lib_gmp
1183         respectively.
1184         * config/m4-gettext.m4: New file to set GETTEXT_H appropriately.
1185         * gnulib/m4/Makefile.am: Added a new block to make an appropriate
1186         gettext.h link on deficient systems.
1187         (pkginc_HEADERS): Mention $(GETTEXT_H).
1188         (EXTRA_HEADERS): Mention gettext.h.
1189         * gnulib/config/gettext_.h: New file from gnulib's gettext.h.
1190         * gnulib/config/codeset.m4, gnulib/config/gettext.m4,
1191         gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
1192         gnulib/config/intdiv.m4, gnulib/config/inttypes-pri.m4,
1193         gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
1194         gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
1195         gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
1196         gnulib/config/lib-prefix.m4, gnulib/config/nls.m4,
1197         gnulib/config/po.m4, gnulib/config/progtest.m4,
1198         gnulib/config/stdint_h.m4, gnulib/config/uintmax_t.m4,
1199         gnulib/config/ulonglong.m4: Imported from CVS gnulib.
1201 2003-09-05  Gary V. Vaughan  <gary@gnu.org>
1203         We can't mirror the gnulib directory structure here, since we need
1204         to be able to eg. `#include <m4/obstack.h>' from our source files,
1205         which is much easier if the local obstack.h is created in a
1206         directory named m4.  Rather than trying to symlink everything into
1207         the m4 directory, now we build a libtool convenience library from
1208         the sources we get from gnulib and link that with libm4.la:
1210         * gnulib/config/extensions.m4: Imported from CVS gnulib.
1211         * gnulib/config/unlocked-io.m4: Ditto.
1212         * gnulib/m4/unlocked-io.h: Ditto.
1213         * gnulib/m4/obstack.m4, gnulib/m4/onceonly_2_57.m4,
1214         gnulib/m4/stdbool.m4: All moved to gnulib/config directory.
1215         * gnulib/lib/obstack.c, gnulib/lib/obstack_.h,
1216         gnulib/lib/stdbool_.h: All moved to gnulib/m4 directory.
1217         * m4/strtol.c, m4/xmalloc.c, m4/xstrdup.c, m4/xstrzdup.c: Ditto.
1218         * m4/Makefile.am: Adjust.
1219         * gnulib/Makefile.am (EXTRA_DIST): Name just the additional gnulib
1220         macros we redistribute.
1221         * gnulib/m4/Makefile.am: New file.  Build libgnu.la convenience
1222         library among others.
1223         (GNULIB_SRCS, GNULIB_MACROS): Removed.
1224         * Makefile.am (ACLOCAL_AMFLAGS): Adjust.
1225         * config/m4-obstack.m4: Adjust.
1226         * po/POTFILES.in: Adjust.
1227         * configure.ac: Reformatting.  Call newly imported gnulib macros.
1228         * m4/builtin.c, m4/macro.c, m4/module.c, m4/utility.c: Removed
1229         bogus calls of `#include "m4.h"'.
1230         * Makefile.am: INCLUDES has been deprecated in favour of
1231         AM_CPPFLAGS.
1232         * m4/Makefile.am: Ditto.
1233         * modules/Makefile.am: Ditto.
1234         * src/Makefile.am: Ditto.
1236 2003-09-05  Gary V. Vaughan  <gary@gnu.org>
1238         * config/Makefile.am: Reverting yesterdays patch for VPATH builds.
1240 2003-09-04  Gary V. Vaughan  <gary@gnu.org>
1242         Migrate the obstack support into the gnulib directories for easy
1243         synchronisation with upstream files in gnulib:
1245         * config/gnu-obstack.m4: Moved from here...
1246         * config/m4-obstack.m4: ...to here.
1247         * config/Makefile.am (SPECIFIC_MACROS): Adjust.
1248         * m4/obstack.c, m4/obstack_.h: Moved from here...
1249         * gnulib/obstack.c, gnulib/obstack.h: ...to here.
1250         * po/POTFILES.in: Adjust.
1251         * gnulib/Makefile.am (GNULIB_SRCS, GNULIB_MACROS): Adjust.
1252         * m4/Makefile.am: Add a whole new section to link the obstack
1253         sources from the gnulib tree if necessary.
1254         * gnulib/m4/onceonly_2_57.m4, gnulib/m4/obstack.m4: New macros
1255         from gnulib.
1256         * config/m4-obstack.m4: Rewrite as a wrapper for
1257         gnulib/m4/obstack.m4.
1259 2003-09-04  Gary V. Vaughan  <gary@gnu.org>
1261         GNU M4 currently builds with a number of files adapted from
1262         upstream sources.  Recently the gnulib project on savannah.gnu.org
1263         has pulled together a great many of these externally maintained
1264         files.  This delta is the beginnings of isolating those files
1265         maintained in gnulib to make it easy to synchronise M4 with the
1266         upstream files prior to releases.
1268         * Makefile.am (ACLOCAL_AMFLAGS): Mention gnulib/m4 macro
1269         directory.
1270         (SUBDIRS): Added new gnulib subdirectory.
1271         * configure.ac (AC_CONFIG_FILES): Add new gnulib tree Makefiles.
1272         * config/stdbool.m4: Moved from here...
1273         * gnulib/m4/stdbool.m4: ...to here.
1274         * m4/stdbool_.h: Moved from here...
1275         * gnulib/lib/stdbool_.h: ...to here.
1276         * gnulib/Makefile.am: New file.  Make sure the gnulib tree is
1277         distributed.
1278         * m4/Makefile.am: Adjust gnulib/modules/stdbool:Makefile.am based
1279         code to work with new stdbool_.h location.
1280         (gnulib_srcdir): New.
1282 2003-09-04  Gary V. Vaughan  <gary@gnu.org>
1284         * config/Makefile.am (MAINTAINERCLEANFILES, ACLOCAL_MACROS)
1285         (STANDARD_TOOLS, SPECIFIC_MACROS): Needed `$(srcdir)/' for VPATH
1286         builds to work.
1287         (SPECIFIC_TOOLS): New variable.  Moved mkstamp to here.
1288         (EXTRA_DIST): Use it.
1290         * bootstrap: CVS autoreconf leaves file droppings.  Remove
1291         aclocal.m4t incase autoreconf doesn't.
1293 2003-08-29  Gary V. Vaughan  <gary@gnu.org>
1295         * m4/gnu-obstack.h: Updated from CVS gnulib.  For consistency with
1296         the other gnulib imports, renamed to m4/obstack_.h.
1297         * m4/obstack.c: Updated from CVS gnulib.
1298         * m4/Makefile.am (EXTRA_HEADERS): Adjust.
1299         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Merge in additional
1300         header tests from gnulib obstack module.  AC_CONFIG_LINKS knows
1301         about vpath already, and $top_srcdir upsets CVS Automake, so the
1302         $top_srcdir reference was removed.
1304         * m4/system-h.in: For consistency with the gnulib imports, renamed
1305         to m4/system_.h.
1306         * m4/Makefile (EXTRA_HEADERS): Adjust.
1307         * configure.ac (AC_CONFIG_FILES): Adjust.
1309         * m4/stdbool_.h: New file from gnulib for systems without their
1310         own.
1311         * m4/Makefile.am: Add snippets from gnulib for C99 bool support.
1312         * config/stdbool.m4: New file.  Macros from gnulib for same.
1313         * configure.ac: Use it.
1315 2003-08-27  Gary V. Vaughan  <gary@gnu.org>
1317         * config/debug.m4: `perl -pi.bak -e 's/(Copyright) (\d)/$1 (C) $2/g'`
1318         * config/gmp.m4: Ditto.
1319         * config/gnu-obstack.m4: Ditto.
1320         * config/stackovf.m4: Ditto.
1321         * m4/builtin.c: Ditto.
1322         * m4/debug.c: Ditto.
1323         * m4/error.c: Ditto.
1324         * m4/error.h: Ditto.
1325         * m4/gnu-obstack.h: Ditto.
1326         * m4/hash.c: Ditto.
1327         * m4/hash.h: Ditto.
1328         * m4/input.c: Ditto.
1329         * m4/m4.c: Ditto.
1330         * m4/m4module.h: Ditto.
1331         * m4/m4private.h: Ditto.
1332         * m4/macro.c: Ditto.
1333         * m4/module.c: Ditto.
1334         * m4/obstack.c: Ditto.
1335         * m4/output.c: Ditto.
1336         * m4/path.c: Ditto.
1337         * m4/regex.c: Ditto.
1338         * m4/regex.h: Ditto.
1339         * m4/strtol.c: Ditto.
1340         * m4/symtab.c: Ditto.
1341         * m4/syntax.c: Ditto.
1342         * m4/utility.c: Ditto.
1343         * m4/xmalloc.c: Ditto.
1344         * m4/xstrdup.c: Ditto.
1345         * m4/xstrzdup.c: Ditto.
1346         * modules/evalparse.c: Ditto.
1347         * modules/format.c: Ditto.
1348         * modules/gnu.c: Ditto.
1349         * modules/import.c: Ditto.
1350         * modules/load.c: Ditto.
1351         * modules/m4.c: Ditto.
1352         * modules/m4.h: Ditto.
1353         * modules/modtest.c: Ditto.
1354         * modules/mpeval.c: Ditto.
1355         * modules/perl.c: Ditto.
1356         * modules/shadow.c: Ditto.
1357         * modules/stdlib.c: Ditto.
1358         * modules/time.c: Ditto.
1359         * modules/traditional.c: Ditto.
1360         * src/freeze.c: Ditto.
1361         * src/getopt.c: Ditto.
1362         * src/getopt1.c: Ditto.
1363         * src/m4.h: Ditto.
1364         * src/main.c: Ditto.
1365         * src/stackovf.c: Ditto.
1367         * config/gmp.m4 (M4_AC_LIB_GMP): Use AC_INCLUDES_DEFAULT:
1368         ac_default_headers is an autoconf internal variable.
1369         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
1370         * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
1372         * configure.ac (AC_CONFIG_FILES): Add tests/atlocal.
1373         * tests/Makefile.am (TESTS_ENVIRONMENT): Revert the 2003-08-14
1374         delta.
1376 2003-08-15  Gary V. Vaughan  <gary@gnu.org>
1378         * configure.ac (AC_HEADER_STDBOOL, INCLUDE_STDBOOL_H): Check for
1379         C99 bool.
1380         * system-h.in (m4_boolean): Removed in favour of using C99 bool if
1381         possible or faking one with a typedef.  Changed all callers.
1383 2003-08-15  Gary V. Vaughan  <gary@gnu.org>
1385         Still cleaning up the users' module API, by taking out the stuff
1386         that isn't used by any existing modules, and moving specialised
1387         functions out of libm4 and into the module they are used by.
1389         * m4/m4module.h (m4_skip_space): No need to export this.  Moved...
1390         * m4/utility.c (m4_skip_space): ...to here the home of its only
1391         use, made static and renamed to `skip_space'.  Changed all
1392         callers.
1393         * m4/m4module.h (m4_expand_ranges): Removed prototype.
1394         * m4/utility.c (m4_expand_ranges): Moved definition from here...
1395         * modules/m4.c (m4_expand_ranges): ...to here, and exported using
1396         ltdl.
1397         * modules/m4.h (m4_expand_ranges_func): For lt_dlsym import
1398         casting .
1399         * modules/gnu.c (builtin_syntax): Import and use in this
1400         builtin implementation.
1401         * m4/m4module.h (M4_DEBUG_PRINT1, M4_DEBUG_PRINT2, M4_DEBUG_PRINT3):
1402         Not used.  Deleted.
1403         * m4/macro.c (trace_flush): Except here where the macro is now
1404         manually inlined.
1405         * m4/m4module.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
1406         (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): Only used internally, so
1407         moved...
1408         * m4/m4private.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
1409         (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): ...to here.
1411 2003-08-14  Gary V. Vaughan  <gary@gnu.org>
1413         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use the interrim new
1414         compiler based AC_CHECK_HEADER that was introduced in
1415         autoconf-2.56.
1416         * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
1417         * config/gmp.m4 (AC_LIB_GMP): Ditto. And renamed to M4_AC_LIB_GMP.
1418         * configure.ac: Use renamed M4_AC_LIB_GMP.
1420         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Don't AC_REQUIRE a
1421         macro that requires arguments! This stops the shell's bad
1422         substitution error at configure time.
1424         * tests/Makefile.am (TESTS_ENVIRONMENT): Now we can pass make
1425         variables to the testsuite shell.  Set the value of USE_GMP so
1426         that the gmp test will run!
1427         (check-local, clean-local): Use the TESTS_ENVIRONMENT variable.
1429 2003-08-11  Gary V. Vaughan  <gary@gnu.org>
1431         Libltdl already has an excellent mechanism for accessing C symbols
1432         in modules.  Lets use that!  Remove all the exporting cruft and
1433         just use lt_dlsym in conjunction with a few conventions to
1434         simplify module writers' jobs.  Also removed the table address
1435         caching code and otherwise simplified the module loader quite a
1436         bit.  To access exported symbols in other modules, first the
1437         exporting module must name the symbols <modname>_LTX_<symname>,
1438         and the importing module must define a function type called
1439         <symname>_func.  The importer then adds
1440         M4_MODULE_IMPORT(<modname>, <symname>) at the top of any function
1441         that wishes to call out to the exported functions.  Care must be
1442         taken that <symname> is non-NULL in the importing module incase
1443         M4_MODULE_IMPORT fails, but otherwise it can be called as if the
1444         definition was in the importers source.  Study
1445         `modules/{gnu.c,m4.{c,h}' for a model example.  At the moment,
1446         m4_module_import will attempt to automatically load a module
1447         required for symbol access if it is not loaded already.
1449         * TODO: Removed the items fixed in this delta.
1450         * m4/ltdl.c (lt_dlhandle_find): New function to find a handle by
1451         module name.
1452         * m4/ltdl.h (lt_dlhandle_find): Declare it.
1453         * m4/module.c (m4_module_unload): Use it.
1454         * src/freeze.c (reload_frozen_state): Ditto.
1455         * m4/m4module.h (m4_export): Deleted.  Removed all references.
1456         (M4_MODULE_IMPORT): New user convenience macro for importing
1457         arbitrary symbols from other modules.
1458         * m4/module.c (m4_module_import): New function to service
1459         M4_MODULE_IMPORT macro.
1460         (module_data): Removed.  Looking up the tables on demand with
1461         lt_dlsym, rather than caching their addresses here simplifies the
1462         code substantially.
1463         (m4_get_module_builtin_table, m4_get_module_macro_table):
1464         Removed.  Changed all callers.
1465         (set_module_macro_table, set_module_builtin_table): Renamed to
1466         install_macro_table and install_builtin_table respectively, and
1467         simplified now that the cache is no more.
1468         * modules/gnu.c (builtin_symbols): Use this new mechanism to
1469         import m4_dump_symbols from the m4 module.
1470         (builtin_esyscmd): Likewise for m4_set_sysval and
1471         m4_sysval_flush.
1472         * modules/m4.c (m4_export_table): Removed.  Functions are
1473         addressed with the new mechanism which doesn't need this.
1474         (m4_set_sysval): New exported accessor function to prevent
1475         problems with variable access on inferior architectures.
1476         * modules/m4.h (m4_sysval_flush_func, m4_set_sysval_func)
1477         (m4_dump_symbols_func): Typedefs required by M4_MODULE_IMPORT so
1478         that we can have some type safety.
1479         * modules/modtest.c (export_test): C level exported function for
1480         testing the new import mechanism.
1481         * modules/import.c: New file for the import end of the test.
1482         * modules/Makefile.am (pkglibexec_LTLIBRARIES): Added import.la.
1483         * tests/modules.at: New test cases for intermodule symbol
1484         importing.
1486 2003-08-07  Gary V. Vaughan  <gary@gnu.org>
1488         * m4/m4module.c (m4_string): Moved from here...
1489         * m4/m4private.c (m4_string): ...to here.
1491         * m4/utility.c (dumpdef_cmp): Removed stale declaration.
1493 2003-07-29  Gary V. Vaughan  <gary@gnu.org>
1495         * m4/m4module.h (M4_DEFAULT_NESTING_LIMIT): This value is
1496         already available to module writers through
1497         m4_{get,set}_nesting_limit_opt(), so moved from here...
1498         * m4/m4.c (DEFAULT_NESTING_LIMIT): ...to here and renamed.
1499         (m4_create): Use it.
1501 2003-07-28  Gary V. Vaughan  <gary@gnu.org>
1503         Aside from auditing path.c for m4module.h api obfuscation, this
1504         delta introduces the concept of private struct members in opaque
1505         data types to GNU m4: See the STYLE file for details.
1507         * TODO: Remind ourselves that a rewrite of path.c is needed.
1508         * m4/m4module.h (m4_search_path, struct m4_search_path_info):
1509         Moved from here...
1510         * m4/m4private.h (m4__search_path, m4__search_path_info): ...to
1511         here and renamed.  These type definitions are for internal api use
1512         only.  Changed all callers.
1513         * m4/m4module.h (m4_search_path_env_init, m4_search_path_add):
1514         Moved from here...
1515         * m4/path.c (search_path_env_init, search_path_add): ...to here
1516         and renamed.  These calls were never used outside this file.
1517         Changed all callers.
1518         (dirpath): Moved functionality of this static declaration...
1519         * m4/m4private.h (struct m4): ...to this new internal only
1520         search_path field.  Changed all callers.
1521         (m4__get_search_path): Added new internal api accessor.
1522         * m4/path.c (m4_search_path_info_new):  Removed.  Not used.
1523         (m4_include_init): Removed...
1524         * m4/m4.c (m4_create): ...because the new m4 field is now
1525         initialised here.
1526         (m4_delete): Recycle search_path memory.
1527         * src/main.c (main): Don't call m4_include_init now that it's
1528         gone!
1529         * doc/STYLE: Document convention for private fields in opaque
1530         ADTs.
1532 2003-07-24  Gary V. Vaughan  <gary@gnu.org>
1534         Sometimes exporting the address of a symbol from a module isn't
1535         enough for other modules to call that symbol correctly.  If
1536         custom data types are used for function parameters, they need to
1537         be known to the caller.  This change introduces the concept of
1538         $(prefix)/include/modules/$(modulename).h to declare those
1539         structures.  Also we move m4_dump_symbols from libm4 to the m4
1540         module to show this concept in action.
1542         * m4/m4module.h (m4_dump_symbol_data): Moved from here...
1543         * modules/m4.h (m4_dump_symbol_data): ...to this new file for
1544         exporting data structures from modules/m4.c.
1545         * modules/m4.c, modules/gnu.c: Include it.
1546         * modules/Makefile.am (pkgmodinc_HEADERS): Install it.
1547         * m4/m4module.h (m4_dump_symbol_CB, m4_dump_symbols): Removed
1548         prototypes.
1549         * m4/utility.c (dumpdef_cmp, m4_dump_symbol_CB, m4_dump_symbols):
1550         Moved from here...
1551         * modules/m4.c (dumpdef_cmp_CB, dump_symbol_CB, m4_dump_symbols):
1552         ...to here, with slight renaming.
1553         (m4_export_table): Prototype and add m4_dump_symbols.
1554         * m4/symtab.c (m4_is_symbol_value_void): Needed for an external
1555         definition of m4_dump_symbols.
1556         * m4/m4module.h (m4_is_symbol_value_void): Prototype it.
1557         * m4/m4private.h (m4_is_symbol_value_void): Fast macro version.
1559 2003-07-24  Gary V. Vaughan  <gary@gnu.org>
1561         Create an export table in modules/m4.c in readiness for beefing up
1562         the module loader to track module exports and imports.
1564         * m4/m4module.h (m4_debug_flush_files): Removed prototype.
1565         * m4/debug.c (m4_debug_flush_files): Moved...
1566         * modules/m4.c (m4_sysval_flush): ...to here and renamed.
1567         * modules/gnu.c (builtin_esysval): Use it.
1568         * m4/m4module.h (m4_export): New type for declaring module symbols
1569         for export.
1570         * modules/m4.c (m4_export_table): List symbols exported from this
1571         module for use by other modules.
1573 2003-07-24  Gary V. Vaughan  <gary@gnu.org>
1575         An experiment: There is loads of code in libm4 which should be in
1576         the m4 module, but is also used by another module. Just because
1577         some linkers won't cope with calls across dynamic runtime loaded
1578         objects I initially left the code in libm4.  It will tidy the
1579         module api immensely if this code moves to the right place, I just
1580         need to remember to invent a suitable calling mechanism at some
1581         point.  For now, only modules that are statically linked and
1582         preloaded will get this treatment, so the only platforms that will
1583         break are those that require all symbols to be resolved at link
1584         time.
1586         * TODO: Reminder that what I am doing could reduce portability
1587         unless I do something more robust later.
1588         * m4/m4module.h (m4_sysval): No longer exported from libm4.
1589         * m4/utility.c (m4_sysval): No longer declared in libm4.
1590         * modules/Makefile.am: Reformatting.
1591         * modules/m4.c (m4_sysval): Declare it at place of use.
1592         * modules/gnu.c (m4_sysval): Import it for use in esyscmd.
1594 2003-07-23  Gary V. Vaughan  <gary@gnu.org>
1596         * m4/m4module.h: Reformatting and rearranging lines a bit.
1597         (m4_obstack): Save typing by typedefing `struct obstack'.  Changed
1598         all users.
1599         (m4_call_macro, m4_expand_input): Renamed...
1600         (m4_macro_call, m4_macro_expand_input): ...to these.  Changed all
1601         callers.
1602         (m4_expansion_level, m4_process_macro): Moved...
1603         * m4/macro.c (expansion_level, process_macro): ...to here, and
1604         made static.
1606         * m4/m4module.h (program_name): Not used by modules at all, so
1607         moved...
1608         * src/main.c (program_name): ...to here.
1609         (print_program_name): Renamed...
1610         (print_program_name_CB): ...to conform to the STYLE guide.
1612 2003-07-23  Gary V. Vaughan  <gary@gnu.org>
1614         More refactoring of the m4module.h API.  Replace #defines with an
1615         enum, and move non-public functions out of the public API.
1617         * m4/debug.c (stdarg.h, varargs.h): Remove variadic header
1618         inclusion.
1619         * m4/macro.c (stdarg.h): Add ANSI C variadic header.
1620         * m4/debug.c (m4_debug, trace): Moved...
1621         * m4/m4private.h (struct m4): ...to fields of this struct.
1622         (m4_get_debug_file, m4_get_trace_messages): New fast access macros
1623         for the new fields.
1624         * m4/debug.c (m4_debug_init, m4_debug_exit): Removed functions...
1625         * src/main.c (m4_debug_init, m4_debug_exit): ...invocations...
1626         * m4/m4.c (m4_create, m4_delete): ...and handled here instead.
1627         * m4/m4module.h (m4_context_field_table): Add entries for new
1628         debug_file and trace_messages fields.
1629         (M4_DEBUG_TRACE_ARGS, M4_DEBUG_TRACE_EXPANSION)
1630         (M4_DEBUG_TRACE_QUOTE, M4_DEBUG_TRACE_ALL, M4_DEBUG_TRACE_LINE)
1631         (M4_DEBUG_TRACE_FILE, M4_DEBUG_TRACE_PATH, M4_DEBUG_TRACE_CALL)
1632         (M4_DEBUG_TRACE_INPUT, M4_DEBUG_TRACE_CALLID)
1633         (M4_DEBUG_TRACE_VERBOSE): Replaced #defines with an enum.
1634         (m4_is_debug_bit): New macro to simplfy checks against the debug
1635         bits above.
1636         (m4_trace_format, m4_trace_header, m4_trace_flush)
1637         (m4_trace_prepre, m4_trace_pre, m4_trace_post): Removed
1638         prototypes.
1639         * m4/debug.c (m4_trace_format, m4_trace_header, m4_trace_flush)
1640         (m4_trace_prepre, m4_trace_pre, m4_trace_post): Moved...
1641         * m4/macro.c (trace_format, trace_header, trace_flush)
1642         (trace_prepre, trace_pre, trace_post): ...to these newly static
1643         functions, since they are only ever used from this file.  Changed
1644         all callers.
1646 2003-07-17  Gary V. Vaughan  <gary@gnu.org>
1648         Change the macros for checking syntax so that matching against
1649         multiple possible syntax classes can be done with a single
1650         comparison some of the time.  The various classes are now bits of
1651         an int that can be checked with bitwise logic operators.
1653         * m4/m4module.h (M4_SYNTAX_IGNORE, M4_SYNTAX_OTHER)
1654         (M4_SYNTAX_SPACE, M4_SYNTAX_OPEN, M4_SYNTAX_CLOSE, M4_SYNTAX_COMMA)
1655         (M4_SYNTAX_DOLLAR, M4_SYNTAX_ACTIVE, M4_SYNTAX_ESCAPE)
1656         (M4_SYNTAX_ASSIGN, M4_SYNTAX_ALPHA, M4_SYNTAX_NUM)
1657         (M4_SYNTAX_LQUOTE, M4_SYNTAX_RQUOTE, M4_SYNTAX_BCOMM)
1658         (M4_SYNTAX_ECOMM): Replaced #defines with an enum.
1659         (M4_SYNTAX_ALNUM): Removed.  Changed all callers.
1660         (M4_IS_IGNORE, M4_IS_OTHER, M4_IS_SPACE, M4_IS_OPEN, M4_IS_CLOSE)
1661         (M4_IS_COMMA, M4_IS_DOLLAR, M4_IS_ACTIVE, M4_IS_ESCAPE)
1662         (M4_IS_ASSIGN, M4_IS_ALPHA, M4_IS_NUM, M4_IS_LQUOTE, M4_IS_RQUOTE)
1663         (M4_IS_BCOMM, M4_IS_ECOMM, M4__IS_STRING, M4_IS_IDENT): Removed.
1664         Replace all calls with invocations of these...
1665         (m4_is_syntax, m4_has_syntax): ...New macros.
1666         * src/freeze.c (produce_syntax_dump): Remove mask argument, which
1667         is no longer required with new macros.  Changed all callers.
1669 2003-07-15  Gary V. Vaughan  <gary@gnu.org>
1671         * m4/input.c (CHAR_EOF, CHAR_BUILTIN, CHAR_RETRY): These token
1672         values are returned as part of the internal interface, so they
1673         need to be moved...
1674         * m4/private.h: ...to here.
1675         * m4/macro.c (expand_token): Check for out of range
1676         m4_peek_input() results before looking up in the syntax table.
1677         (collect_arguments): Ditto.
1679         * NEWS: Note `$' syntax class.
1681 2003-07-08  Paul Eggert  <eggert@twinsun.com> and
1682             Gary V. Vaughan  <gary@gnu.org>
1684         Conform to POSIX if the POSIXLY_CORRECT environment is set.
1685         --traditional `define' now smashes all the definitions.
1687         * NEWS: Explain this.
1688         * doc/m4.texinfo (Defn): `defn' takes any number of arguments.
1689         (Extensions): Explain that extensions that are incompatible with
1690         POSIX are disabled if POSIXLY_CORRECT is set.
1691         (Incompatibilities): Remove.
1692         (Define, Other Incompat): Explain difference
1693         between GNU and POSIX behavior of define, pushdef, popdef.
1694         * m4/m4.c (m4_get_posixly_correct_opt): New undef.
1695         * m4/m4module.h (m4_context_opt_bit_table): Add POSIXLY_CORRECT entry.
1696         * m4/m4private.h (M4_OPT_POSIXLY_CORRECT_BIT): New macro.
1697         (m4_get_posixly_correct_opt): New macro.
1698         * m4/m4macro.c (m4_process_macro): Disable $10, $abc etc. if
1699         POSIXLY_CORRECT.
1700         * modules/m4.c (builtin_functions): defn now takes any number of args.
1701         (builtin_define): Smash all the definitions if
1702         POSIXLY_CORRECT.
1703         (builtin_defn)): Allow any number of arguments.
1704         (builtin_undivert): Do not allow nonnumeric arguments
1705         if POSIXLY_CORRECT.
1706         * src/main.c (main): Set posixly-correct behavior if either
1707         POSIXLY_CORRECT is set, or if -G is given.
1708         * tests/builtins.at: New test for smashed definitions.
1710 2003-06-27  Gary V. Vaughan  <gary@gnu.org>
1712         * doc/m4.texinfo (Changesyntax): Document Dollar syntax class.
1713         * m4/m4module.h (M4__SYNTAX_STRING): New syntax class. Be careful
1714         not to slow the parser down.
1715         (M4__IS_STRING): New macro to test string syntax class membership.
1716         * m4/syntax.c: Adjust docucomment.
1717         (m4_syntax_create): Add a default M4_SYNTAX_DOLLAR element.
1718         (m4_syntax_code): Translate `$' -> M4_SYNTAX_DOLLAR.
1719         * m4/input.c (init_builtin_token): Comment typo.
1720         (m4__next_token): Comment typo.
1721         Accept M4_SYNTAX_DOLLAR items into M4_TOKEN_STRING type tokens
1722         by using the new M4__IS_STRING macro.
1723         * m4/macro.c (m4_process_macro): Use M4_IS_DOLLAR to test for
1724         variable references in macro expansions.
1726         * doc/m4.texinfo (Eregexp and Regexp): Typo.
1727         (Epatsubst and Patsubst): Typo.
1728         (Eval): Typo.
1730 2003-06-26  Gary V. Vaughan  <gary@gnu.org>
1732         Move the global variables that pertain to syntax to a new `struct
1733         m4_syntax_table', and then add one of these to `struct m4'.  The
1734         ripple effect through the code to both change formerly global
1735         references, and make sure a suitable context is available in
1736         lexical scope is disproportionately large compared to the size of
1737         the change proper.  This change is a large part of decoupling
1738         syntax.c from the rest of the code that uses it.
1740         * m4/m4private.h (struct m4): Add a syntax field.
1741         * m4/m4.c (m4_create): Initialise it,
1742         (m4_delete): Recycle it.
1743         (m4_get_symtab): Remove hand coded version...
1744         (m4_get_symbol_table): ...and generate this with cpp.  Changed all
1745         callers.
1746         * m4/m4module.h (m4_context_field_table): Add an extra field so we
1747         can generate m4_get_symbol_table.  Add a new row for
1748         m4_get_syntax_table.
1749         (M4SYNTAX): Syntactic sugar for module writers.
1750         (m4_symtab): Renamed to m4_symbol_table.  Changed all callers.
1751         (m4_syntax_table): New home for syntax related formerly global
1752         variables.
1753         * m4/m4private.h (struct m4_syntax_table): Define it.
1754         * m4/input.c (m4_input_init): Initialisation of these formerly
1755         global variables moved...
1756         * m4/syntax.c (m4_syntax_create): ...to here.
1757         * m4/input.c (m4_input_exit): And similarly, recycling of the
1758         memory used by those values moved...
1759         * m4/syntax.c (m4_syntax_delete): ...to here.
1760         * m4/m4module.h (DEF_LQUOTE, DEF_RQUOTE, DEF_BCOMM, DEF_ECOMM):
1761         Moved to m4/m4private.h.
1762         * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
1763         (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
1764         (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
1765         (m4_is_syntax_macro_escaped): New accessors for m4_syntax_table
1766         objects.  Changed all callers that used to directly access the
1767         global equivalents.
1768         (m4__single_quotes, m4__single_comments, m4__use_macro_escape):
1769         Removed and incorporated into m4_syntax_table structure.
1770         * m4/utility.c (lquote, rquote, bcomm, ecomm): Ditto.
1771         * m4/syntax.c (m4_set_syntax): Now returns an error status,
1772         instead of requiring a `struct m4' to generate its own errors.
1773         Changed all callers.
1774         * src/main.c (main): Now that the syntax table is initialised as
1775         part of m4_create, we have to manually wipe the syntax entries if
1776         we are about to read a frozen file.
1778 2003-06-26  Gary V. Vaughan  <gary@gnu.org>
1780         * doc/STYLE: Added notes on callback naming schemes.
1782         * m4/module.c (m4_set_module_macro_table)
1783         (m4_set_module_builtin_table): Declarations weren't changed when
1784         definitions were renamed on 2003-06-19.
1786         * m4/hash.c (m4_hash_resize): ifdefed out.  This function is
1787         neither used nor particularly appropriate since it exposes the
1788         internal workings of the hash module.  I haven't yet decided
1789         whether to remove it entirely.
1791 2003-06-20  Gary V. Vaughan  <gary@gnu.org>
1793         Two related changes, and a huge knockon effect throughout the
1794         source: Moved the option variables out of global space and into
1795         `struct m4'; made `m4_symtab' a real datatype, so that its api
1796         is not marred passing `struct m4' around just so it can decide
1797         whether to keep traced symbol names or not.  Added setters and
1798         getters for the formerly global option variables, and obviously
1799         changed a vast number of functions to take a `struct m4' and use
1800         the getter funcs to find option values.
1802         * m4/utility.c (interactive, sync_output, debug_level)
1803         (no_gnu_extensions, prefix_all_builtins, suppress_warnings)
1804         (max_debug_argument_length, warning_status, nesting_limit)
1805         (discard_comments): Removed.
1806         * m4/m4module (warning_status, no_gnu_extensions, nesting_limit)
1807         (debug_level, max_debug_argument_length, prefix_all_builtins)
1808         (suppress_warnings, discard_comments, interactive, sync_output):
1809         Removed from here...
1810         * m4/m4private.h (struct m4): ...and equivalent fields added to
1811         this structure.
1812         (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1813         (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1814         (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1815         (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1816         (m4_get_interactive_opt, m4_get_sync_output_opt): Fast access
1817         macros for the new fields.
1818         * m4/m4module.h (m4_context_field_table)
1819         (m4_context_opt_bit_table): Helper macros used to generate
1820         prototypes, setters and getters for new option fields
1821         consistently.
1822         * m4/m4.c (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1823         (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1824         (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1825         (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1826         (m4_get_interactive_opt, m4_get_sync_output_opt)
1827         (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
1828         (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
1829         (m4_set_max_debug_arg_length_opt, m4_set_prefix_builtins_opt)
1830         (m4_set_suppress_warnings_opt, m4_set_discard_comments_opt)
1831         (m4_set_interactive_opt, m4_set_sync_output_opt): Addressable
1832         setter and getter functions generated by cpp from
1833         m4_context_field_table and m4_context_opt_bit_table, exported as
1834         part of the module api.  Changed all callers.
1835         * m4/symtab (struct m4_symtab): Used as the concrete type for
1836         m4_symtab now.
1837         (m4_symtab_create): Allocate and initialise a new struct.
1838         (m4_symtab_apply): New function that works like m4_hash_apply, but
1839         with different callbacks specific to symbol tables.  Changed all
1840         callers.
1841         (symbol_destroy, arg_destroy, arg_copy): Renamed
1842         symbol_destroy_CB, arg_destroy_CB, arg_copy_CB to remind me that
1843         they have unused parameters for a reason!
1844         (dump_symbol_CB): New callback to dump the contents of a single
1845         symbol.
1846         (symtob_dump): Rewritten in terms of dump_symbol_CB.
1847         * m4/utility.c (m4_dump_symbol): Renamed to m4_dump_symbol_CB.
1848         Changed all callers.
1849         * m4/m4.c (m4_create): By default point the `nuke_trace_bit' field
1850         of the contained `m4_symtab' at the `no_gnu_extensions' field.
1851         Although I'm not convinced these semantics are correct, they are
1852         at least consistent with how things were before this delta.  Also
1853         set the default nesting limit to M4_DEFAULT_NESTING_LIMIT.
1855 2003-06-19  Gary V. Vaughan  <gary@gnu.org>
1857         Tie down the interface to libm4 some more.  Make more structures
1858         opaque to modules by moving them to m4private.h, and writing
1859         setters and getters.  To win back the speed penalty for doing this
1860         also wrote macroized versions that do know about structure layout
1861         in m4private.h and #include that file into modules when NDEBUG is
1862         defined at compile time.  There are still some accessor macros in
1863         m4private.h that need to go, but that is not necessary to clean
1864         the module api up.
1866         * m4/m4module.h (m4_symbol_type): Moved...
1867         * m4/m4private.h (m4__symbol_type): ...to here.
1868         * m4/symtab.c (m4_get_symbol_value, m4_get_symbol_traced)
1869         (m4_set_symbol_traced, m4_set_symbol_name_traced)
1870         (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1871         (m4_get_symbol_func, m4_symbol_value_create)
1872         (m4_symbol_value_delete, m4_set_symbol_value_text)
1873         (m4_set_symbol_value_func): New exported api to symbols.
1874         (m4_get_symbol_value_type): Replaced by m4_is_symbol_value_text
1875         and m4_is_symbol_value_func.
1876         * m4/m4module.h: Prototype these guys.
1877         * m4/module.c (m4_set_module_macro_table)
1878         (m4_set_module_builtin_table): Make these static, there is no
1879         reason to pollute the api with them.
1880         * m4/m4private.h: Reformatting.
1881         (m4_get_symtab): Only define when NDEBUG is defined.
1882         (m4_get_symbol_value, m4_get_symbol_traced)
1883         (m4_set_symbol_traced, m4_set_symbol_name_traced)
1884         (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1885         (m4_get_symbol_func, m4_symbol_value_create)
1886         (m4_symbol_value_delete, m4_set_symbol_value_text)
1887         (m4_set_symbol_value_func): Macro implementations of the new
1888         functions when NDEBUG is defined.
1889         (SYMBOL_TRACED, SYMBOL_VALUE, SYMBOL_TYPE, SYMBOL_TEXT)
1890         (SYMBOL_FUNC, VALUE_TYPE, VALUE_TEXT, VALUE_FUNC): Removed.
1891         Superceded by the above.  All callers changed.
1892         (M4ARG): Removed.  This is no longer different to the
1893         m4/m4module.h definition.
1894         * modules/gnu.c, modules/m4.c: Only include m4private.h when
1895         NDEBUG is defined.  That way we exercise the same (albeit slower)
1896         api that external modules must use.
1898 2003-06-18  Gary V. Vaughan  <gary@gnu.org>
1900         Renamed some of the types and their accessors to make more sense.
1901         Now we have a SYMTAB in which we store SYMBOLs, and each SYMBOL
1902         has a stack of SYMBOL_VALUEs.
1904         * m4/m4module.h (m4_token, m4_get_token_type, m4_get_token_text)
1905         (m4_get_token_func, m4_token_copy): Renamed to m4_symbol_value,
1906         m4_get_symbol_value_type,  m4_get_symbol_value_text,
1907         m4_get_symbol_value_func and m4_symbol_value_copy respectively.
1908         Changed all callers.
1909         (m4_symbol_type): s/M4_TOKEN_/M4_SYMBOL_/
1910         (m4_get_token_type): Renamed
1911         * m4/input.c (m4_next_token): Renamed to m4__next_token, and moved
1912         to the internal api.
1913         * m4/m4private.h: s/TOKEN_ARG_/SYMBOL_ARG_/
1914         s/TOKEN_/VALUE_/
1915         (m4__symtab_init, m4__symtab_exit): Removed prototypes.
1916         (m4_token_arg): Renamed to m4_symbol_arg. Changed all callers.
1917         (m4__token_type): Moved here from m4module.h.
1918         (m4__next_token): Renamed from m4_next_token.
1919         * m4/symtab.c: Removed some of the parameterised macro support
1920         functions for modularisation later.
1921         (m4_token_copy): Renamed to m4_symbol_value_copy, and use new
1922         m4_hash_dup to perform a true deep copy of the SRC.
1923         (arg_copy): Callback for m4_symbol_value_copy.
1924         * utility.c (m4_token_get_type, m4_token_text, m4_token_func):
1925         Renamed to m4_get_symbol_value_type, m4_get_symbol_value_text and
1926         m4_get_symbol_value_func.  Changed all callers.
1928 2003-06-18  Gary V. Vaughan  <gary@gnu.org>
1930         Tidy up style of hash.[ch] in accordance with doc/STYLE.
1932         * m4/hash.c: Internal symbol renaming and formatting.
1933         (m4_hash_dup): New function to facilitate deep copies of hash
1934         tables.
1935         (m4_hash_apply_func): Returns a void* now, which is a richer type
1936         for returning exceptions (NULL means keep going).
1937         (m4_hash_apply): Ditto.
1938         * m4/hash.h: Declare exported symbols with an explicit extern.
1939         Reformated.
1941 2003-06-17  Gary V. Vaughan  <gary@gnu.org>
1943         Still refactoring furiously.  This delta represents a change in
1944         semantics to symtab.c.  Instead of building temporary m4_tokens
1945         in the caller, and copying fields in the methods, we now create
1946         the actual m4_token for hashing in the caller so the methods just
1947         slot them in directly.  Also, this means that we don't lookup a
1948         symbol and get back an allocated but VOID token to copy fields
1949         into, we create the token we want to push and pass that to
1950         m4_symbol_define or m4_symbol_pushdef.  And that's it.  There are
1951         a few other small changes to stop knowledge of the implementation
1952         of symtab.c leaking out into other files.
1954         * m4/macro.c (expand_argument): Comment typo corrected.
1955         * m4/symtab.c (symtab_fetch): New function to fetch the address of
1956         an interned symbol.
1957         (m4_symbol_pushdef): Take an extra value parameter and use this
1958         directly as the new top of the value stack.  All callers changed
1959         to build a token and pass responsibility for memory in, rather
1960         than copying as we used to.
1961         (m4_symbol_define): Also use the new value parameter directly as a
1962         replacement for the top of the value stack.  All callers changed
1963         to build a token as above.
1964         (m4_set_symbol_traced): New function to set the traced bit on the
1965         named symbol, creating it if necessary.
1966         (symbol_popval): The guts of the old m4_symbol_popdef.
1967         (m4_symbol_popdef): Use it.
1968         * m4/builtin.c (m4_symbol_set_token): Removed,
1969         (m4__symbol_set_builtin, m4__symbol_set_macro): Removed and
1970         replaced...
1971         * m4/module.c (m4_set_module_builtin_table)
1972         (m4_set_module_macro_table): ...with these more orthogonal
1973         functions.
1974         * m4/m4module.h (m4_macro_pushdef, m4_macro_define)
1975         (m4_builtin_pushdef, m4_builtin_define): Removed.  No longer
1976         required.
1977         * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE)
1978         (m4_arg_signature_parse): Moved...
1979         * m4/symtab.c: ...to here.
1980         * m4/input.c (m4_token_copy): Arghh... I'm amazed this didn't
1981         screw something up. Moved...
1982         * m4/symtab.c (m4_token_copy): ...to here, and fixed so that it
1983         actually does a proper deep copy of source to dest.
1985 2003-06-16  Gary V. Vaughan  <gary@gnu.org>
1987         Further refactoring to stabilise the module API.  Renaming some
1988         functions for orthogonality, and judicious definition migration to
1989         move things out of the set of exported symbols.
1991         * doc/STYLE: New file.  Notes on coding style.
1992         * m4/m4module.c: Updated bitrotted docucomment at the top of the
1993         file.
1994         (m4_module_name, m4_module_builtins, m4_module_macros): Renamed to
1995         m4_get_module_name, m4_get_module_builtin_table,
1996         m4_get_module_macro_table which are verb phrases.  Changed all
1997         callers.
1998         * m4/builtin.c (m4_builtin_table_install, m4_macro_table_install):
1999         Moved to...
2000         * m4/module.c (m4_set_module_builtin_table)
2001         (m4_set_module_macro_table): ...here, and renamed. Changed all
2002         callers.
2003         * m4/m4module.c (m4_module_data): This...
2004         * m4/m4private.c (struct m4_module_data): ...and this...
2005         * m4/module.c (module_data) ...consolidated here and no longer
2006         exported.  Changed all callers.
2008 2003-06-16  Gary V. Vaughan  <gary@gnu.org>
2010         Begin work on lifting the curse of the global variables.  To start
2011         with create a `struct m4' context container, and replace
2012         `m4__symtab' with `context->symtab' throughout.  This means
2013         initialising a context container in main, and adjusting many
2014         functions between main and the module entry points so that the
2015         container gets passed through.  It would have been nice to
2016         defer this until after 1.5, but it has a major effect on the
2017         user's module writing ABI, so it needs to be addressed now - at
2018         least in the areas that impact the ABI.  An interrelated change
2019         in the symtab API removes the dependency on a global symbol table,
2020         and instead focuses on a passed table (from the context
2021         container).
2023         * TODO: Reminders for finishing context functionality.
2024         * m4/Makefile.am (libm4_la_SOURCES): Add m4.c.
2025         * m4/m4.c: New file. Manage new struct m4 objects to eliminate
2026         global variables and eventually allow m4 to be reentrant.
2027         * m4/m4private.h (m4): Define the new structure here...
2028         (M4_SYMTAB, m4_get_symtab): ...so we can have fast accessors that
2029         don't carry the overhead of a function call.
2030         * m4/m4module.h: Prototype extern functions from m4/m4.c.
2031         (m4): Declare type for new struct m4 objects.
2032         (M4SYMTAB): User macro to ease finding the symbol table for the
2033         current context for module developers.
2034         (m4_symbol_token): Renamed to m4_symbol_set_token which contains a
2035         verb.
2036         (M4_BUILTIN, m4_builtin_func, M4_BUILTIN_HANDLER)
2037         (m4_builtin_define, m4_builtin_pushdef, m4_builtin_table_install)
2038         (m4_call_macro, m4_dump_symbols, m4_expand_input)
2039         (M4_FINISH_HANDLER, M4_INIT_HANDLE, m4_macro_define)
2040         (m4_macro_pushdef, m4_macro_table_install, m4_module_load)
2041         (m4_module_unload, m4_process_macro, m4_symbol_set_token): Add an
2042         m4* context parameter. Changed definitions and all callers.
2043         (m4_symtab): Alias for m4_hash to decouple the
2044         m4_symtab api from m4_hash.
2045         (m4_symtab_apply, m4_symtab_apply_func): Use m4_symtab instead of
2046         m4_hash.
2047         (m4_symtab_create): New function to return an initialised
2048         m4_symtab.
2049         (m4_symtab_delete): New function to delete an m4_symtab's memory.
2050         (m4_symbol_define, m4_symbol_delete, m4_symbol_lookup)
2051         (m4_symbol_popdef, m4_symbol_pushdef): Add an m4_symtab parameter
2052         instead of simply using the global m4__symtab.  Changed
2053         definitions and all callers.
2054         * m4/m4private.h (m4__symtab_remove_module_references): Ditto.
2055         * m4/symtab.c (m4__symtab_init, m4__symtab_exit): Removed.
2056         * src/main.c (main): Create a context and use that instead of the
2057         former global m4__symtab.
2059 2003-06-13  Gary V. Vaughan  <gary@gnu.org>
2061         * m4/hash.c (m4_hash_apply): Pass an initial hash table parameter
2062         to the callback.  Callbacks should not need to hardcode the
2063         hashtable they are working from, nor should we have to waste the
2064         userdata parameter to pass the table in.
2065         * m4/hash.h (m4_hash_apply_func): Require the initial table
2066         parameter.
2067         * m4/symtab.c (symtab_destroy): Use the passed table instead
2068         of hardcoding m4__symtab.
2069         (m4_symbol_popdef): Don't use the userdata parameter to pass the
2070         table to arg_destroy.
2071         (arg_destroy): Use the hash parameter, ignore userdata.
2072         * modules/m4.c (set_trace): Make it fit the m4_hash_apply_func
2073         prototype.
2074         (traceon, traceoff): Call set_trace with the extra initial
2075         parameter.
2077 2003-06-13  Gary V. Vaughan  <gary@gnu.org>
2079         More refactoring to stabilise the module api, this time for
2080         symtab.c.  Additionally, start to pay attention to function names
2081         that don't contain a verb like they should.
2083         * m4/m4module.h (m4_symtab_apply): Reintroduced this function as a
2084         wrapper for m4_hash_apply to decouple the symtab module from the
2085         hash module.
2086         (m4_symbol_builtin, m4_symbol_macro): Renamed to
2087         m4__symbol_set_builtin and m4__symbol_set_macro.  Changed all
2088         callers.
2089         (m4_symbol_delete): Create a macro version to save a function
2090         call.
2091         (m4_token_t, m4_data_t): These violate the POSIX reserved
2092         namespace.  Renamed to m4_token_type and m4_symbol_type. Changed
2093         all callers.
2094         (m4_token_type): Renamed to m4_token_get_type.
2095         (m4_symtab, m4_symtab_init, m4_symtab_remove_module_references)
2096         (m4_symtab_exit): Removed from the exported module
2097         api...
2098         * m4/m4private.h (m4__symtab, m4__symtab_init)
2099         (m4__symtab_remove_module_references, m4__symtab_exit): ...and
2100         renamed and added to the internal api. Changed all callers.
2101         (m4_symtab_apply): A faster macro version of the function for
2102         users of the internal api.
2103         * m4/symtab.c (m4_symbol_destroy, m4_arg_destroy): Renamed to
2104         symbol_destroy and arg_destroy.
2105         (symtab_debug): Added a prototype.
2106         (m4_symtab_apply, m4_symbol_delete): Moved to the end of the file
2107         so that callers in this file get the faster macro versions from
2108         m4/m4private.h.
2110 2003-06-12  Gary V. Vaughan  <gary@gnu.org>
2112         Refactoring modules to rationalise the API into an external
2113         documented (eventually!) API for use by modules in the `m4_'
2114         namespace declared in m4/m4module.h, an internal API between the
2115         source files we ship (including our shipped modules) in the `m4__'
2116         namespace declared in m4/m4private.h and making the rest as
2117         cohesive as possible with liberal use of the `static' keyword.
2118         This change represents an audit to m4/module.c along these
2119         guidelines.
2121         * m4/m4module.h (m4_module_close_all, m4_module_find_by_builtin):
2122         Removed.  No longer used.
2123         (m4_module_close): Removed prototypes.
2124         (m4_module_init, m4_module_open, m4_module_unload_all): Removed
2125         from the exported module api...
2126         * m4/m4private.h (m4__module_init, m4__module_open)
2127         (m4__module_exit): ...and renamed and added to the internal api.
2128         Changed all callers.
2129         (BUILTIN_SYMBOL, MACRO_SYMBOL, INIT_SYMBOL, FINISH_SYMBOL):
2130         Centralised definitions after renaming...
2131         * m4/module.c (M4_BUILTIN_SYMBOL, M4_MACRO_SYMBOL, M4_INIT_SYMBOL)
2132         (M4_FINISH_SYMBOL): ...and removing from here.
2133         (m4_module_dlerror, m4_module_remove, m4_module_close)
2134         (m4_caller_id): Not exported at all, so renamed to module_dlerror,
2135         module_remove, module_close and caller_id.
2136         (MODULE_SELF_NAME): New macro to make reporting self errors
2137         easier.
2138         (m4_module_load, module_close, module_remove): Use it.
2139         * m4/m4private.h (USER_MODULE_PATH_ENV): Macro to hold "M4MODPATH"
2140         name.
2141         * src/main.c (main): Use it.
2143 2003-06-12  Gary V. Vaughan  <gary@gnu.org>
2145         * README: Remove references to --enable-changeword, which has been
2146         removed from the code.
2148 2003-06-11  Gary V. Vaughan  <gary@gnu.org>
2150         Getting rid of the annoying bug with configure --enable-debug,
2151         which spewed -e: command not found errors.  This was an interaction
2152         between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4.
2153         You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or
2154         branch-1-5) to get the full fix.
2156         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version
2157         of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED),
2158         and then use the probed value of $SED.
2159         (AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define
2160         this, it messes up the AC_REQUIRE stack.
2162 2003-06-10  Gary V. Vaughan  <gary@gnu.org>
2164         * m4/symtab.c (m4_symbol_popdef): Need to pass the hash address to
2165         the destroy callback.
2166         (m4_arg_destroy): Use the hash address to free the hash node key
2167         field.
2169 2003-06-06  Gary V. Vaughan  <gary@gnu.org>
2171         First cut at formal parameters in macros.
2173         * configure.ac (AC_REPLACE_FUNCS): Add xstrzdup.
2174         * m4/xstrzdup.c: New file.
2175         * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE): Start size for
2176         associative array of parameter names to details.
2177         (m4_symbol_token): Capture macro names with parameter lists.
2178         (m4_arg_signature_parse): And build an associative array to hang
2179         from the symbol structure to map names to details.
2180         * m4/hash.c (m4_hash_new): Break the m4_hash_new followed by
2181         m4_hash_resize idiom.  Now that we potentially add a little hash
2182         table to many of the entries in the symbol table, added an extra
2183         arg to set the initial size.  Changed all callers.
2184         (m4_hash_apply): New function that is basically a generalised
2185         version of...
2186         * m4/symtab.c (m4_symbol_apply): ...this.  Now deleted.  Adjusted
2187         all callers to call m4_hash_apply instead.
2188         (m4_arg_destroy): Recycle memory used by an m4_token_arg.
2189         (m4_symbol_popdef): Use m4_arg_destroy to help recycle the
2190         m4_arg_signature association that might be attached to the symbol,
2191         * m4/hash.h (m4_hash_apply_func): Replacement type for...
2192         * m4/m4module.h (m4_symtab_apply_func): ...this.  Now deleted.
2193         (M4_SYNTAX_ASSIGN): Placeholder for assigning default values in
2194         parameter lists.
2195         (M4_IS_ASSIGN): Detect characters with M4_SYNTAX_ASSIGN syntax.
2196         (M4_IS_IDENT): Detect characters that can be safely used in
2197         parameter names.
2198         * m4/syntax.c (m4_syntax_init): Add an M4_SYNTAX_ASSIGN character.
2199         * m4/macro.c: Corrected grammar in some comments.  Use `token'
2200         rather than `td' for m4_token variables.
2201         (m4_process_macro): If we find a dollar followed by some
2202         M4_IS_IDENT characters, replace that with the contents of the argv
2203         entry with offset stored in the m4_token_arg associated with the
2204         collected identifier.
2206 2003-06-05  Gary V. Vaughan  <gary@gnu.org>
2208         Begin preparations for supporting formal parameters in m4 macros.
2210         * m4/m4private.h (struct m4_token_arg): Placeholder for holding
2211         the details of a formal parameter.
2212         (m4_token): Add an arg_signature member to hold a hash table for
2213         looking up formal parameters.
2214         * m4/input.c: Update more bitrotted comments.
2215         (m4_push_builtin): Initialise arg_signature member.
2216         (init_builtin_token): Copy arg_signature member.
2217         * m4/m4module.h (m4_builtin_pushdef, m4_builtin_define)
2218         (m4_macro_pushdef, m4_macro_define): Rewritten as macros to
2219         replace...
2220         * m4/builtin.c (m4_builtin_pushdef, m4_builtin_define)
2221         (m4_macro_pushdef, m4_macro_define): ...these, And...
2222         (m4_symbol_token): ...wrapped around this new function, which
2223         vastly simplifies the arguments required by the functions it
2224         replaces.
2225         Changed all callers.
2227 2003-06-05  Gary V. Vaughan  <gary@gnu.org>
2229         * m4/macro.c: Format changes.
2231 2003-06-04  Gary V. Vaughan  <gary@gnu.org>
2233         * m4/input.c: Updated various bitrotted comments.
2234         (m4_push_builtin): Just pass the whole m4_token, rather than
2235         extracting all the fields in the caller.  This also allows us to
2236         check the token type for consistency.
2237         (macro_funcs, macro_peek, macro_read, m4_push_macro, CHAR_MACRO):
2238         Renamed to builtin_funcs, builtin_peek, builtin_read,
2239         m4_push_builtin and CHAR_BUILTIN for consistency with the rest of
2240         the code.  Changed all callers.
2241         (struct input_block): Similarly renamed u_m member to u_b, and
2242         changed all callers.
2243         (m4_next_token): Use bzero to initialise the data fields.
2244         * m4/m4module (m4_push_macro): Renamed to m4_push_builtin.
2246 2003-05-29  Gary V. Vaughan  <gary@gnu.org>
2248         These changes were necessary to get m4 to build on my iBook
2249         running "powerpc-apple-darwin6.6" using Apples build of gcc "gcc
2250         (GCC) 3.1 20020420 (prerelease)":
2252         * src/main.c: Don't include dlfcn.h, ltdl.h handles correct
2253         inclusion of module loader headers.
2254         * modules/Makefile.am: Use AM_LDFLAGS, not LDFLAGS.
2255         * m4/Makefile.am: Ditto.
2256         (libm4_la_LIBADD): Added $(LTLIBINTL).
2257         * m4/utility.c (program_name): Removed declaration in favour of
2258         the one already in error.c!
2259         * m4/m4module.h (program_name): Define to program_invocation_name
2260         when using GNU C library. Use an explicit extern declaration.
2261         (interactive, sync_output, debug_level, hash_table_size)
2262         (no_gnu_extensions, prefix_all_builtins, max_debug_argument_length)
2263         (suppress_warnings, warning_status, nesting_limit, discard_comments)
2264         (lquote, rquote, bcomm, ecomm, m4_bad_argc, m4_skip_space)
2265         (m4_numeric_arg, m4_shipout_int, m4_shipout_string, m4_dump_args)
2266         (m4_debug, m4_debug_init, m4_debug_exit, m4_debug_decode)
2267         (m4_debug_flush_files, m4_debug_set_output, m4_debug_message_prefix)
2268         (m4_trace_prepre, m4_trace_pre, m4_trace_post, m4_sysval)
2269         (m4_expansion_level, m4_expand_ranges, m4_expand_input)
2270         (m4_call_macro, m4_process_macro, m4_syntax_table, m4_current_file)
2271         (m4_current_line, m4_current_diversion, m4_output_current_line):
2272         Don't rely on default, use an explicit extern.
2273         * m4/error.h (error, error_at_line, error_print_progname)
2274         (error_message_count, error_one_per_line): Ditto.
2275         * m4/ltdl.c: Update from CVS libtool.
2276         * m4/ltdl.h: Ditto.
2277         * commit: Update from CVS cvs-utils.
2279 2002-11-04  Akim Demaille  <akim@epita.fr>
2281         * doc/m4.texinfo (Esyscmd): Don't grep, use something easier:
2282         running m4 itself.
2283         * tests/others.at (iso8859): Use abs_srcdir, not srcdir.
2285 2002-11-04  Akim Demaille  <akim@epita.fr>
2287         * config/Makefile.am (ACLOCAL_MACROS): Ship the Gettext macros.
2289 2002-11-04  Akim Demaille  <akim@epita.fr>
2291         * configure.ac: Automake 1.7.1, Autoconf 2.54, Gettext 0.11.5,
2292         used as `external', and Libtool 1.4.3.
2293         (LINGUAS): Remove.
2294         (LTLIBOBJS): Don't play with it.
2295         * intl/: Remove.
2296         * Makefile.am (SUBDIRS): Remove intl.
2297         (ACLOCAL_AMFLAGS): Add -I config.
2298         (EXTRA_DIST): Add config/config.rpath.
2299         * po/LINGUAS: New.
2300         * po/Makevars: New.
2301         * modules/perl.c (M4INIT_HANDLER): Don't prototype xs_init.
2303 2002-05-29  Gary V. Vaughan  <gary@gnu.org>
2305         Preparations for refactoring syntax tables to allow reverse
2306         lookups [fetch me a M4_SYNTAX_OPEN], without compromising the
2307         speed of normal lookups in an array of unsigned short.
2309         * m4/input.c (single_quotes, single_comments, use_macro_escape):
2310         Moved from here...
2311         * m4/m4private.h (m4__single_quotes, m4__single_comments,
2312         m4__use_macro_escape): ...to here, and renamed.  The `m4__' prefix
2313         is for internal symbols which unavoidably pollute the global
2314         namespace, but are not published APIs.
2315         Adjusted all callers.
2316         * m4/input.c (m4_syntax_init, m4_syntax_code, m4_set_quotes,
2317         m4_set_comment, m4_set_syntax, set_syntax_internal,
2318         unset_syntax_attribute): Moved from this file...
2319         * m4/syntax.c: New. ...to this file.
2320         Also added an m4_syntax_exit stub for orthogonality.
2321         * src/main.c (main): Use it.
2322         * m4/Makefile.am (libm4_la_SOURCES): Add syntax.c.
2323         * m4/m4module.h: Reformatting.  New prototypes.
2325 2002-05-29  Gary V. Vaughan  <gary@gnu.org>
2327         * bootstrap (aclocal_apiversion): The aclocal apiversion is
2328         distinct from the automake release number (in that the apiversion
2329         apparently has no micro-version-component).
2330         (aclocal_apilibdir): Use it.
2332 2002-05-28  Gary V. Vaughan  <gary@gnu.org>
2334         * m4/hash.c (m4_hash_resize): New function.
2335         * m4/hash.h: Add prototype.
2336         * m4/symtab.c (m4_symtab_init):  Use it.  This could do with some
2337         benchmarking to find a good value for, say, autoconf.  This is
2338         already a little quicker than before for me.
2340         * m4/symtab.c (m4_symtab_hash, m4_symtab_cmp): Moved from here...
2341         * m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): .. to here,
2342         and reenamed.
2343         * m4/hash.h: Adjust prototypes.
2345 2002-01-22  Akim Demaille  <akim@epita.fr>
2347         * bootstrap (aclocal_apilibdir): New, to cope with Automake's new
2348         APIVERSION scheme.
2349         * tests/Makefile.am (package.m4): New.
2350         * tests/atlocal.in: Adjust to CVS Autotest.
2351         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use AC_LIBOBJ.
2352         * configure.ac: LIBOBJ is a forbidden string.
2353         Simplify AM_INIT_AUTOMAKE invocation.
2354         * config/Makefile.am (ACLOCAL_MACROS): Add amversion.m4 and
2355         options.m4.
2357 2001-10-19  Akim Demaille  <akim@epita.fr>
2359         * m4/module.c, m4/output.c, src/main.c: Normalize error messages.
2361 2001-10-19  Akim Demaille  <akim@epita.fr>
2363         * m4/input.c (m4_next_token): Display where was opened what is
2364         not closed.
2366 2001-10-19  Akim Demaille  <akim@epita.fr>
2368         * m4/macro.c (expand_argument): Display where was opened what is
2369         not closed.
2371 2001-10-18  Akim Demaille  <akim@epita.fr>
2373         * m4/input.c, modules/m4.c: Formatting changes.
2375 2001-10-17  Gary V. Vaughan  <gary@gnu.org>
2377         * bootstrap: s/configure.in/configure.ac/
2379 2001-10-16  Gary V. Vaughan  <gary@gnu.org>
2381         * m4/symtab.c (m4_symbol_destroy): This function calls
2382         m4_symbol_popdef, which recycles a symbols memory when the last
2383         definition is popped.  Since we were passing the address of the
2384         symbol name found in the symbol table, and it was being removed
2385         partway through m4_symbol_destroy() we were referencing freed
2386         memory for the balance of the function.  Now we take a copy of the
2387         symbol name tring and use that as a key into the symbol
2388         table... that way if the original symbol name is freed, the copy
2389         is still valid.
2391 2001-10-13  Akim Demaille  <akim@epita.fr>
2393         * m4/ltdl.c: Update.
2395 2001-10-13  Akim Demaille  <akim@epita.fr>
2397         * src/main.c, src/freeze.c, m4/debug.c, m4/input.c, m4/macro.c:
2398         Don't gettextize internal error messages.
2400 2001-10-13  Akim Demaille  <akim@epita.fr>
2402         * tests/macros.at (Arity and defn): New failing test.
2403         (Arity, defn, and freeze): New.
2405         Fix `Arity and defn'.
2407         * m4/input.c (m4_push_macro): Don't forget the arity.
2408         * modules/m4.c (defn): Likewise.
2410 2001-10-13  Akim Demaille  <akim@epita.fr>
2412         * tests/builtins.at (pushdef/popdef, trace, trace2, trace3): Move
2413         to...
2414         * tests/macros.at (pushdef/popdef, Tracing Hanoi Towers)
2415         (Propagation of traceon, Propagation of --trace): this new file.
2417 2001-10-13  Akim Demaille  <akim@epita.fr>
2419         * m4/utility.c (m4_numeric_arg): Use the usual (argc, argv, ...)
2420         interface instead of (name, argc...).
2421         Upon failure, specify which argument was guilty.
2422         Adjust callers.
2424 2001-10-13  Akim Demaille  <akim@epita.fr>
2426         * modules/evalparse.c: Save translators' time: don't translate
2427         internal error messages.
2428         (m4_evaluate): Simplify/normalize error messages.
2429         * doc/m4.texinfo (Eval): Adjust.
2431 2001-10-13  Akim Demaille  <akim@epita.fr>
2433         * m4/macro.c (expand_macro): Let m4_bad_argc handle the cases
2434         where no checking is needed.
2435         * m4/utility.c (m4_bad_argc): Use the usual (argc, argv, ...)
2436         interface instead of (name, argc...).
2437         Adjust callers.
2438         * modules/gnu.c (m4_patsubst_do): Don't check argc, done
2439         elsewhere.
2441 2001-10-13  Akim Demaille  <akim@epita.fr>
2443         * m4/utility.c (m4_bad_argc): Display user argument counts, i.e.,
2444         exclude the builtin name from the count.
2445         * modules/m4.c (ifelse): Do not use the regular argc mechanism, as
2446         calling ifelse with a single argument is valid.
2447         * doc/m4.texinfo (Ifelse): Add an example where ifelse is invoked
2448         with 1 and 2 args, mostly to strengthen the test suite.
2450 2001-10-13  Akim Demaille  <akim@epita.fr>
2452         * m4/output.c (m4_make_diversion, m4_insert_file)
2453         (m4_insert_diversion, +m4_freeze_diversions): Ansify.
2455 2001-10-12  Gary V. Vaughan  <gary@gnu.org>
2457         * m4/input.c (init_builtin_token):  Renamed from init_macro_token,
2458         since we call these things builtins in the rest of the code!
2460         * modules/gnu.c (m4_regexp_compile): s/%0/%s/
2462 2001-10-12  Gary V. Vaughan  <gary@gnu.org>
2464         Rather than forcing each builtin definition to manage its own
2465         argument range checking, tabulate the maxima and minima for all
2466         builtins in each module.  This forces us to consider what the
2467         valid ranges for each builtin should be, and moves the checking
2468         code out of each builtin implementation and into the builtin
2469         caller infrastructure.
2471         * m4/m4module.h (struct m4_builtin): Add argument minima and
2472         maxima.
2473         * m4/m4private.h (struct m4_token): Reflect them here too.
2474         * m4/input.c (struct input_block): ...and here.
2475         (m4_token_copy): New function for token copying.
2476         (init_macro_token): Copy them from a token to the input stack.
2477         (m4_next_token): Don't forget to initialise them for text
2478         macros.
2479         * m4/macro.c (expand_argument): Use m4_token_copy, and also
2480         check argument counts before calling the builtin handler.
2481         * m4/symtab.c (m4_symbol_builtin): Take minima and maxima params.
2482         (m4_symbol_macro): Likewise.
2483         * m4/builtin.c (m4_builtin_pushdef): Add min_args and max_args
2484         parameters.  Updated all callers.
2485         (m4_builtin_define): Ditto.
2486         (m4_macro_pushdef, m4_macro_define): Ditto.
2487         * m4/symtab.c (m4_symbol_builtin, m4_symbol_define): Ditto.
2488         * modules/evalparse.c:  Declare argument counts for defined
2489         builtins and remove explicit calls to m4_bad_argc().
2490         * modules/gnu.c: Ditto.
2491         * modules/load.c: Ditto.
2492         * modules/m4.c: Ditto.
2493         * modules/modtest.c: Ditto.
2494         * modules/mpeval.c: Ditto.
2495         * modules/perl.c: Ditto.
2496         * modules/shadow.c: Ditto.
2497         * modules/stdlib.c: Ditto.
2498         * modules/time.c: Ditto.
2499         * TODO: Updated.
2501 2001-10-10  Gary V. Vaughan  <gary@gnu.org>
2503         The trace semantics now attach the trace bit to a symbol name.
2504         For as long as a traceon(`foo') is active, calls to foo will be
2505         traced regardless of intervening undefines or module unloads.
2506         Fixed the flag propogation issues differently to the fixes
2507         reverted with the last attempt at nailing down trace:
2509         * m4/m4private.h:  This file is not visible outside of the m4
2510         source tree, so I removed all the `M4_' and `m4_' prefixes to save
2511         on typing.  Updated all clients.
2512         (m4_token): New typedef contains the fields that need to be passed
2513         around with the low level tokeniser.
2514         (m4_token_data):  Removed.
2515         (m4_symbol): Now contains the traced flag again.
2516         * m4/symtab.c:  Rewritten again.  Now we don't remove symbols with
2517         the trace bit set.  This change is contained entirely within this
2518         module and doesn't leak out into the callers.  Updated all
2519         clients.
2520         (m4_symbol_builtin, m4_symbol_macro):  Adjusted to make use of the
2521         new fields in m4_token.  Updated all clients.
2522         * m4/builtin.c (m4_builtin_pushdef):  Needs a flags argument so
2523         that `groks_macro_args' and `blind_if_no_args' flags are retained
2524         when defn() results are passed around in m4 code.  Updated all
2525         callers.
2526         (m4_builtin_define): Ditto.
2527         (m4_macro_pushdef, m4_macro_define): Ditto.
2528         * m4/input.c (struct input_block): Add a flags field to facilitate
2529         the above.
2530         (m4_push_macro):  ...use it.
2531         (init_macro_token):  Retrieve it.
2532         (m4_next_token): Initialise it.
2533         * m4/macro.c (expand_argument):  Copy it.
2534         * m4/m4module.h: Adjust.
2535         * tests/builtins.at:  Adjust the expected output of the trace
2536         tests to reflect the change in semantics.
2537         * tests/modules.at (modules: trace):  Check that unloading a
2538         module which supplies a traced symbol definition doesn't lose te
2539         trace bit.
2541 2001-10-07  Gary V. Vaughan  <gary@gnu.org>
2543         * modules/gnu.c (m4_macro_table): Display the timetamp when
2544         expanding __m4_version__.
2546         * configure.ac (--with-modules): Forgot a comma in the
2547         AC_HELP_STRING parameter list.
2549 2001-10-05  Gary V. Vaughan  <gary@gnu.org>
2551         * bootstrap: Remove aclocal.m4t when it is no longer required.
2553 2001-10-05  Akim Demaille  <akim@epita.fr>
2555         * tests/Makefile.am: Adjust for gnuprog2.
2556         * tests/m4.in: There can be a leading path.
2557         * tests/modules.at (AT_CHECK_M4_MODTEST): No need for $4 and $5.
2558         * tests/testsuite.at: Adjust to the most recent Autotest.
2559         (AT_CHECK_M4_FILTER): Fix and rename as...
2560         (AT_TEST_M4): this.
2561         * tests/others.at: Use it.
2563         * config/gmp.m4 (_AC_LIB_GMP): In order to read the content of a
2564         variable in shell scripts, one uses `$'...
2566 2001-10-04  Gary V. Vaughan  <gary@gnu.org>
2568         * configure.ac: `rm -f $m4_getopt_h' was lost.
2570 2001-10-04  Gary V. Vaughan  <gary@gnu.org>
2572         * configure.ac (TIMESTAMP): Display with AS_BOX at configure
2573         time.  Define it for config.h in order to...
2574         * src/main.c (main): ...display the timestamp for --version.
2576 2001-10-04  Akim Demaille  <akim@epita.fr>
2578         * modules/gnu.c (m4_regexp_do, m4_patsubst_do): Extracted from
2579         previous builtins `regexp' and `patsubst'.
2580         (regexp, patsubst): Use them.
2581         (eregexp, epatsubst): New builtins.
2582         * doc/m4.texinfo (Patsubst, Regexp): Rename and complete as...
2583         (Epatsubst and Patsubst, Eregexp and Regexp): these.
2584         (Extensions): More info on REs.
2586 2001-10-04  Akim Demaille  <akim@epita.fr>
2588         * modules/modtest.c (init_handler): Consistently output to stderr.
2589         (finish_handler): New.
2590         (test): The `if' is an `assert'.
2591         * tests/modules.at: Adjust.
2593 2001-10-04  Akim Demaille  <akim@epita.fr>
2595         * m4/utility.c (m4_bad_argc): Detail the mismatches.
2597 2001-10-01  Akim Demaille  <akim@epita.fr>
2599         * tests/generate.awk: Tag the tests with `documentation'.
2600         * tests/modules.at (AT_CHECK_M4_MODTEST): New.
2601         Use the make the existing modtest tests more uniform, and complete
2602         the set of possibilities.
2604 2001-10-01  Akim Demaille  <akim@epita.fr>
2606         * config/gmp.m4: Consult the user before using GMP: use
2607         --without-gmp.
2608         * configure.ac: Adjust.
2609         * modules/gmp.c: No protection needed as the module is not built
2610         if GMP is not used.
2612 2001-10-01  Akim Demaille  <akim@epita.fr>
2614         * tests/generate.awk: Remove debugging code.
2615         (fatal): Specify the current location.
2617         * m4/debug.c, m4/macro.c, m4/utility.c, modules/format.c,
2618         * modules/gnu.c, modules/m4.c: Use M4ARG.
2620 2001-10-01  Akim Demaille  <akim@epita.fr>
2622         * modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE): New.
2623         (m4_regexp_compile): New.
2624         (regexp, patsubst): Use it.
2626 2001-09-30  Gary V. Vaughan  <gary@gnu.org>
2628         Reinstate the memory handling improvements from the patch I just
2629         reverted.  Relevant ChangeLog entries repeated here:
2631         * m4/module.c (m4_module_remove): New function that holds the core
2632         of the old m4_module_unload.
2633         (m4_module_unload): Use it.
2634         (m4_module_unload_all): When we know the modules will never be
2635         used again (i.e. on exit), free up as much module memory as
2636         possible.  There are still some artifacts from resident modules
2637         living inside ltdl.c, but everything else is freed.
2638         * m4/debug.c (m4_debug_exit): Free memory allocated in
2639         m4_debug_init().
2640         * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2641         * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2642         * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2643         * m4/m4module.h: Updated prototypes.
2644         * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2645         * m4/hash.h: Updated prototypes.
2646         * src/main.c (main): Use all these new functions to clean up as
2647         much memory as possible before exit.
2649 2001-09-30  Gary V. Vaughan  <gary@gnu.org>
2651         Reverted my large patch for removing the old m4_symbol
2652         structure on 2001-09-20.  We are still not happy about the way
2653         trace works in conjunction with defn and undefine, and leaving
2654         the reverted patch active prevents us from moving the traced
2655         bit from the definition back to the symbol.
2657 2001-09-30  Gary V. Vaughan  <gary@gnu.org>
2659         * configure.in: Moved to...
2660         * configure.ac: ...here.  Added a libtool like timestamped
2661         banner, and tidied up the libltdl cruft.
2662         * config/mkstamp: Script to extract a timestamp from ChangeLog.
2663         * modules/Makefile.am (INCLTDL):  Removed.  This is required
2664         only when libltdl is configured in a subdirectory.
2665         * src/Makefile.am: Ditto.
2666         (LIBADD_DL):  No need to add this again, libtool already knows
2667         that libm4.la depends on it.
2668         * m4/Makefile.am: Automake sets variables from AC_SUBST.  Use
2669         them.
2671         * TODO: stackovf.c is basically broken.
2672         Reported by Marc Espie <espie@schutzenberger.liafa.jussieu.fr>
2674 2001-09-28  Akim Demaille  <akim@epita.fr>
2676         * tests/Makefile.am (EXTRA_DIST): `m4' is not to be shipped.
2678 2001-09-27  Akim Demaille  <akim@epita.fr>
2680         * tests/m4.in: Don't use short options.
2681         Simplify the stderr signature normalization.
2683 2001-09-27  Akim Demaille  <akim@epita.fr>
2685         tests/m4 shall be position independent.
2687         * tests/m4.in: New.
2688         * tests/m4: Remove.
2689         * tests/testsuite.at: No args to AT_INIT.
2690         * configure.in, tests/Makefile.am: Adjust.
2692 2001-09-22  Akim Demaille  <akim@epita.fr>
2694         Autotest has changed again.
2696         * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2697         (package.m4): Remove.
2698         * configure.in: Adjust to LIBADD_GMP.
2700 2001-09-21  Gary V. Vaughan  <gary@gnu.org>
2702         * config/gmp.m4 (AC_ARG_WITH): Removed.
2703         (GMP_LIB): Renamed to LIBADD_GMP for consistency.
2704         (AC_LIB_GMP): When performing a test compile against libgmp,
2705         include the header gmp.h if possible, and link against -lgmp.  If
2706         they both work define USE_GMP.
2707         * modules/Makefile.am (mpeval_la_LIBADD): Add LIBADD_GMP.
2708         (mpeval_LTX_init_func): Complain on load that there was no libgmp
2709         at compile time.
2711 2001-09-20  Gary V. Vaughan  <gary@gnu.org>
2713         * m4/evalparse.c: Moved to...
2714         * modules/evalparse.c:  ...here.  This code is shared between
2715         modules/mpeval.c and modules/m4.c, so there is no need to pollute
2716         the libm4 API with its details.  Moderately rewritten to interface
2717         into its clients more simply.
2718         * m4/eval.c: Deleted.  Migrated functionality to...
2719         * modules/m4.c: ...here.
2720         (builtin_eval):  Implemented in terms of the new interface style.
2721         * modules/mpeval.c (builtin_mpeval): Ditto.
2722         * m4/m4module.h: Removed references to the former m4/eval.c.
2723         * m4/Makefile.am (libm4_la_SOURCES):  Removed eval.c.
2724         (EXTRA_libm4_la_SOURCES): Deleted.
2725         * modules/Makefile.am (EXTRA_m4_la_SOURCES): Reference evalparse.c.
2726         (EXTRA_mpeval_la_SOURCES): Reference evalparse.c.
2728 2001-09-20  Akim Demaille  <akim@epita.fr>
2730         * config/gmp.m4 (AM_WITH_GMP): Rename as...
2731         (AC_LIB_GMP): this.
2732         By default, use gmp.
2733         Massive revamping.
2734         * configure.in: Adjust.
2735         Use Automake conditionals for USE_GMP.
2736         Always compute sizeof (long long int).
2737         This was a bug BTW, as `eval' (not `mpeval') depends on it:
2738         before, it was used _only_ if mpeval was not activated.
2739         * modules/Makefile.am (pkglibexec2dir, +pkglibexec2_LTLIBRARIES)
2740         (mpeval_la_LIBADD): New macros.
2741         * modules/mpeval.c: No longer be conditioned by WITH_GMP.
2742         Indent.
2743         * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Create package.m4.
2744         * tests/atlocal.in, tests/builtins.at: Depend upon USE_GMP, not
2745         WITH_GMP.
2747 2001-09-20  Akim Demaille  <akim@epita.fr>
2749         * tests/Makefile.am (package.m4): New.
2750         * tests/testsuite.at: Adjust AT_INIT and AT_VICTIMS.
2752 2001-09-20  Gary V. Vaughan  <gary@gnu.org>
2754         More cleanup.  After the last patch, m4_symbol holds nothing but
2755         the head of a chain of m4_token_data.  So I have removed the old
2756         m4_symbol, so that m4_token_data chains are stored directly in the
2757         value cell of a hash table node.  But there's more... m4_symbol
2758         was a more natural name for the symbol value cell, and now that it
2759         is gone I have renamed the former m4_token_data structure to
2760         m4_symbol.  This change turned out to be a pig to get right, since
2761         the original code didn't need to modify the value cell itself,
2762         since changing the chain happened inside the m4_symbol that used
2763         to be returned -- I had to pass the address of the value cell
2764         across various function calls, incase the head value changed.  I
2765         also tightened up the memory management to help me find a nasty
2766         memory corruption bug that took me all night to track down...
2768         * m4/m4private.h (struct m4_symbol): Removed.
2769         (struct m4_token_data): Renamed to `struct m4_symbol'.  Updated
2770         all references.
2771         * m4/hash.c (m4_hash_iterator_value): Return the address of the
2772         value cell.  Updated all callers.
2773         * m4/symtab.c: Took advantage of the simplification in the data
2774         structures to rewrite a lot of this file more simply.  There is
2775         still some room for optimisation here, but we should tackle that
2776         systematically closer to the release.
2778         * m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
2779         revealed.  This version is ahead of CVS libtool until I get chance
2780         to flush my changes.
2781         * m4/module.c (m4_module_remove): New function that holds the core
2782         of the old m4_module_unload.
2783         (m4_module_unload): Use it.
2784         (m4_module_unload_all): When we know the modules will never be
2785         used again (i.e. on exit), free up as much module memory as
2786         possible.  There are still some artifacts from resident modules
2787         living inside ltdl.c, but everything else is freed.
2788         * m4/debug.c (m4_debug_exit): Free memory allocated in
2789         m4_debug_init().
2790         * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2791         * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2792         * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2793         * m4/m4module.h: Updated prototypes.
2794         * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2795         * m4/hash.h: Updated prototypes.
2796         * src/main.c (main): Use all these new functions to clean up as
2797         much memory as possible before exit.
2799 2001-09-18  Gary V. Vaughan  <gary@gnu.org>
2801         The `traced' flag needs to be attached to the definition of a
2802         symbol rather than the current symbol containing the definition.
2803         Implementing this showed up some long standing post 1.4 bugs in
2804         flag propogation which I also fixed.
2806         * m4/m4private.h (struct m4_symbol): Remove the traced flag.
2807         (struct m4_token_data): And add it back in here.
2808         * m4/input.c (init_macro_token): Propogate the traced flag
2809         correctly.
2810         * m4/macro.c (expand_argument): Ditto.
2811         * tests/builtins.at (trace2, trace3): New tests based on Akim's
2812         sadistic email ;-)
2814 2001-09-08  Gary V. Vaughan  <gary@gnu.org>
2816         * m4/m4private.h (struct m4_token_data): Simplified by removing
2817         the redundant `traced' flag, and one level of structure nesting.
2818         (M4_TOKEN_DATA_FUNC_TRACED): Removed.
2819         * m4/input.c (init_macro_token): No need to initialise removed
2820         `traced' field.
2821         * m4/macro.c (expand_argument): No need to copy it either.
2822         * m4/utility.c (m4_token_data_func_traced): Or provide an access
2823         function.
2825         * m4/hash.c (m4_hash_bucket_insert): Symbol shadowing is no longer
2826         dependant on multiple symbols with the same key, so preserving
2827         relative symbol order in each bucket during resizing is no longer
2828         required.  The resize function is considerably faster as a result.
2830         * m4/m4module.h, m4/builtin.c, m4/symtab.c:
2831         s/m4_symbol_insert/m4_symbol_define/g;
2832         s/m4_builtin_insert/m4_builtin_define/g;
2833         s/m4_macro_insert/m4_macro_define/g.  Updated all callers.
2835 2001-09-08  Gary V. Vaughan  <gary@gnu.org>
2837         Get rid of m4_symbol_lookup_t entirely.  With Akim's earlier
2838         commits, the m4_lookup_symbol dispatch function is split into
2839         specialised functions that must be called directly.
2841         * m4/m4module.h (m4_symbol_lookup_t): Removed.
2842         * m4/symtab.c (m4_lookup_symbol): Removed.
2843         (m4_symbol_builtin, m4_symbol_macro): New functions.
2844         * m4/builtin.c (m4_builtin_define): Split into...
2845         (m4_builtin_pushdef, m4_builtin_insert): ...these.
2846         (m4_macro_define): Split into...
2847         (m4_macro_pushdef, m4_macro_insert): ...these.
2848         * src/main.c (main): Set command line macros from `-D' parameters
2849         using `m4_macro_define'.
2851 2001-09-08  Gary V. Vaughan  <gary@gnu.org>
2853         * m4/symtab.c (m4_symtab_remove_module_references):  Renamed as
2854         this from m4_remove_table_reference_symbols().
2855         * m4/m4module.h, m4/module.c: Updated all references.
2857 2001-09-07  Akim Demaille  <akim@epita.fr>
2859         * modules/stdlib.c, modules/times.c: Misc cleanups.
2861 2001-09-07  Akim Demaille  <akim@epita.fr>
2863         * configure.in: We now need Autoconf 2.52e.
2864         * m4/m4module.h (m4_symbol_lookup_t): Remove `M4_SYMBOL_POPDEF'
2865         and `M4_SYMBOL_DELETE'.
2866         * m4/symtab.c (m4_lookup_symbol, symtab_debug): Adjust.
2867         * src/main.c (main): Adjust.
2869 2001-09-06  Gary V. Vaughan  <gary@gnu.org>
2871         Fix the obstack.h problem once and for all!  At configure time we
2872         can test for a system supplied obstack.h:  depending on the
2873         result, we now generate system.h with an #include of the correct
2874         header.  As a bonus, I've also added a --with-included-obstack,
2875         incase the user doesn't like the system obstack for some
2876         reason... and also we can test the shipped obstack on a system
2877         that has oe of its own.  We also now need to be careful to add
2878         build directories to the include search path, since the generated
2879         system.h will be in the build tree.
2881         * configure.in (AC_CONFIG_FILES): Generate system.h from
2882         system-h.in.
2883         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Determine whether to
2884         include the system obstack header or the copy shipped with M4.
2885         Allow the user to override configure and force the build to use
2886         the shipped version.
2887         * m4/system-h.in: New file, template for...
2888         * m4/system.h: ...this.  Now deleted.
2889         * m4/m4module.h: Include system.h before everything else.
2890         * src/freeze.c: Ditto.
2891         * m4/Makefile.am (dist-hook): Remove generated system.h.
2892         (INCLUDES): Check builddir for generated headers before checking
2893         srcdir.
2894         * modules/Makefile.am (INCLUDES): Ditto.
2895         * src/Makefile.am (INCLUDES): Ditto.
2897 2001-09-05  Gary V. Vaughan  <gary@gnu.org>
2899         * TODO: Remove the items that have been addressed already.
2901 2001-09-05  Akim Demaille  <akim@epita.fr>
2903         * src/main.c (main): Standardize --version.
2905 2001-09-05  Akim Demaille  <akim@epita.fr>
2907         * modules/format.c (format): Have a bigger `str'.
2909 2001-09-05  Akim Demaille  <akim@epita.fr>
2911         Rationalize warnings, reporting the macro name as if it were a
2912         program name, and assertions.
2914         * m4/m4module.h (m4_lookup_symbol): Prototype, it is still used.
2915         (M4WARN): New.
2916         * m4/symtab.c (m4_lookup_symbol, m4_symbol_popdef)
2917         (m4_symbol_delete):
2918         Use assert for internal errors.
2919         * m4/utility.c (m4_bad_argc, m4_numeric_arg, m4_dump_symbols): Use
2920         M4WARN.
2921         * modules/m4.c (undefine, defn, traceon, traceoff, dumpdef): use
2922         M4WARN and assert.
2923         * tests/builtins.at (pushpop): Adjust.
2925 2001-09-05  Akim Demaille  <akim@epita.fr>
2927         * m4/symtab.c (m4_symbol_insert): Don't use `foo () || bar ()'
2928         with pointers.
2930 2001-09-05  Akim Demaille  <akim@epita.fr>
2932         * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_LOOKUP.
2933         * m4/macro.c, m4/symtab.c: Adjust.
2935 2001-09-05  Akim Demaille  <akim@epita.fr>
2937         * m4/symtab.c (m4_symbol_popdef, m4_symbol_delete): Rename as...
2938         (m4_symbol_pop, m4_symbol_del): this.
2939         (m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_insert)
2940         (m4_symbol_popdef, m4_symbol_delete): New.
2941         (m4_lookup_symbol): Adjust.
2942         * m4/m4module.h, src/main.c, modules/gnu.c, modules/m4.c: Adjust.
2944 2001-09-05  Akim Demaille  <akim@epita.fr>
2946         * m4/m4module.h (m4_symbol_lookup): Rename as...
2947         (m4_symbol_lookup_t): this.
2949 2001-09-05  Akim Demaille  <akim@epita.fr>
2951         * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_IGNORE,
2952         unused.
2953         * m4/symtab.c (m4_lookup_symbol): Adjust.
2955 2001-09-03  Gary V. Vaughan  <gary@gnu.org>
2957         Bootstrap will now work with Libtool 1.4.1 or higher:
2958         * bootstrap: Remove stale autom4te.cache files when
2959         rebootstrapping.
2960         * config/Makefile.am (ACLOCAL_MACROS):  Add ltdl.m4 and
2961         libtool.m4.
2962         * bootstrap: Ignore acinclude.m4 now the we include ltdl.m4 and
2963         libtool.m4 directly.
2964         Run libtoolize to refresh ltmain.sh.
2965         * config/ltmain.sh:  Deleted.
2966         * acinclude.m4: Deleted.
2967         * m4/ltdl.c, m4/ltdl.h: Updated from libtool-1.4.1.
2969         * config/debug.m4 (AC_LIBTOOL_COMPILER_OPTION): Provide a fallback
2970         implementation for the cvs impaired libtool user.
2972 2001-09-03  Akim Demaille  <akim@epita.fr>
2974         * m4/symtab.c (m4_lookup_symbol): Give more details when reporting
2975         internal errors.
2976         Avoid using `default' in switch, as it hides useful compiler
2977         warnings when a case is forgotten.
2979 2001-09-03  Akim Demaille  <akim@epita.fr>
2981         * src/main.c (MODULE_SHORTOPT, MODULEPATH_SHORTOPT): Remove, there
2982         is no such thing as `WITH_MODULES'.
2984 2001-09-03  Akim Demaille  <akim@epita.fr>
2986         Improve the test suite's selfcontainedness.
2988         * doc/m4.texinfo: Let `input.m4' be the input file, not `in'.
2989         (Include, Undivert): Tag the other input files.
2990         * tests/generate.awk: Catch `@comment file:'.
2991         `-I $src' is no longer needed.
2992         `next' is really like `return': the rest is skipped.
2993         Adjust to `input.m4'.
2994         (fatal): New function.
2995         * tests/foo, tests/incl.m4: Remove.
2997 2001-09-01  Gary V. Vaughan  <gary@gnu.org>
2999         The shadowing mechanism and, infact, the whole symbol table
3000         implementation was creaking under the weight of the features piled
3001         on top of it.  We now have a separate hash table module which will
3002         dynamically resize to keep symbol density withing good performace
3003         limits, and a new symtab module layered above it.  Symbol lookups
3004         are now marginally more efficient (since the shadowed flag is no
3005         longer required) and symbol removal, such as on module unload, is
3006         considerably faster due to a reorganisation of the data structures
3007         used in symtab.c.
3009         * src/main.c (main):  Don't mention `-H'.
3010         * doc/m4.texinfo (Invoking m4): Document that -H no longer has any
3011         effect.
3012         * NEWS: Updated.
3013         * m4/hash.c: New generalised dynamic hash table data structure
3014         management module.
3015         * m4/hash.h: Public interface.
3016         * m4/Makefile.am (pkginc_HEADERS): Add hash.h.
3017         (libm4_la_SOURCES): Add hash.c.
3018         * m4/symtab.c: More or less rewritten from scratch, within the
3019         bounds of the previous API.
3020         (m4_symtab_apply): A cleaner version of the old hack_all_symbols
3021         call.  Updated all callers.
3022         * m4/m4module.c: #include <m4/hash.h>, and changed all affected
3023         declarations to reflect API changes.
3024         (M4INIT): Generate a declaration too, to avoid the warning with
3025         --enable-debug builds.
3026         (M4FINISH): Ditto.
3027         (HASHMAX): Removed.
3028         * m4/utility.c (hash_table_size):  Removed.
3029         (m4_dump_symbols): Rewritten to build and qsort an array of symbol
3030         names, which are then looked up by builtin_dumpdef() as necessary.
3031         This implies a small speedup in builtin_symbols(), which discarded
3032         all of the symbol info under the old call.
3033         * m4/m4private.h (m4_symbol): Removed shadowed flag -- symbol
3034         shadowing is implicit in respect to the new data structures.
3035         symbol names are no longer duplicated here, they are stored in the
3036         key field of the hash table.
3037         Moved macro_args and blind_no_args...
3038         (m4_token_data): ...to here.
3039         m4/macro.c (expand_macro):  Added a name argument since the symbol
3040         name is no longer copied into each struct m4_symbol.  Modified all
3041         callers.
3042         (collect_arguments):  Ditto.
3043         * modules/m4.c (set_trace): Ditto.
3044         * modules/gnu.c (builtin_symbols): Updated.
3045         * src/freeze.c (produce_symbol_dump): Much improved in light of
3046         the improved symbol table layout.
3048 2001-09-01  Gary V. Vaughan  <gary@gnu.org>
3050         * m4/m4private.h (SYMBOL_NEXT): Move into m4's name space; renamed
3051         to M4_SYMBOL_NEXT.
3052         (SYMBOL_TRACED): Similarly renamed by prefixing with `M4_'.
3053         (SYMBOL_SHADOWED, SYMBOL_MACRO_ARGS, SYMBOL_BLIND_NO_ARGS,
3054         SYMBOL_NAME, SYMBOL_TYPE, SYMBOL_TEXT, SYMBOL_FUNC,
3055         SYMBOL_HANDLE): Ditto.
3056         * m4/builtin.c, m4/macro.c, m4/symtab.c, m4/utility.c,
3057         modules/gnu.c, modules/m4.c, src/freeze.c,
3058         src/main.c:  Updated all references.
3060         * src/Makefile.am (m4_SOURCES): Don't list $(M4OBJS) here, since
3061         Automake 1.5 chokes on dynamic source file lists,  Besides, it is
3062         already listed in m4_LDADD... how did that ever used to work?
3063         * configure.in (getopt.h): Use AC_CONFIG_LINKS instead of a manual
3064         link.
3065         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
3066         Suggested by Tim Van Holder <tim.van.holder@pandora.be>
3068         * tests/m4: Don't call the m4 wrapper script with libtool, it
3069         works fine all by itself.
3071 2001-08-30  Gary V. Vaughan  <gary@gnu.org>
3073         The experimental `changeword' feature never took off, and has
3074         no obvious advantages over `changesyntax' to compensate the
3075         enormous speed penalty it carries:
3076         * configure.in (ENABLE_CHANGEWORD): Removed.
3077         * m4/m4module.h (m4_set_word_regexp): Removed.
3078         * m4/m4private.h (m4_token_data): Removed original_text field.
3079         * m4/utility.c (m4_token_data_orig_text): Removed.
3080         * m4/input,c: Removed all conditional ENABLE_CHANGEWORD code.
3081         * m4/macro.c: Ditto.
3082         * src/main.c: Ditto.
3083         * modules/Makefile.am (changeword.la): Removed.
3084         * modules/changeword.c: File removed.
3085         * doc/m4.texinfo: References to changeword and --word-regexp
3086         removed.
3087         * po/POTFILES.in: modules/changeword.c removed.
3088         * tests/atlocal.in (ENABLE_CHANGEWORD): Removed.
3089         * tests/builtins.at (changeword): Test removed.
3091 2001-08-30  Akim Demaille  <akim@epita.fr>
3093         * bootstrap.sh: Create aclocal.m4 instead of modifying it.
3094         This also help having a single list of m4 files: in
3095         config/Makefile.am.
3096         * config/Makefile.am (STANDARD_MACROS): Rename as...
3097         (ACLOCAL_MACROS): this.
3098         (list-standard-macros): Remove.
3099         (spy): New.
3101 2001-08-29  Gary V. Vaughan  <gary@gnu.org>
3103         In an attempt to moderate my egomania...
3104         * tests/modules.at: Remove attributions.
3106         * tests/generate.awk: When making substitutions to "@&t@", either
3107         "&" or "\&" in the substitution string argument to gsub refer back
3108         to the matched text.  "@\\&t@" seems to work though, Tests 43 and
3109         67 now pass for me.
3111 2001-08-29  Akim Demaille  <akim@epita.fr>
3113         * tests/others.at (changeword, ddivert, debug, esyscmd, exp, gmp)
3114         (include, indir, multiquotes, patsubst, pushdef/popdef, regexp)
3115         (sync-lines, trace, translit, undivert, wrap): Move to...
3116         * tests/builtins.at: this new file.
3117         * tests/others.at (Discard comments, import-environment): Move to...
3118         * tests/options.at: this new file.
3120 2001-08-29  Akim Demaille  <akim@epita.fr>
3122         * tests/others.at (Freezing modules)
3123         (--module-directory: absolute path, modpath2, modpath3)
3124         (M4MODPATH: absolute path, modtest, shadow, unload): Move to...
3125         * tests/modules.at: here, new file.
3126         * tests/others.at, tests/generate.awk: Add a banner.
3127         * tests/testsuite.at: Adjust.
3128         (AT_CHECK_M4_FILTER): New, but unused.
3130 2001-08-29  Akim Demaille  <akim@epita.fr>
3132         * tests/testsuite.at (AT_CHECK_M4): Don't pass -I, let the tests
3133         handle that.
3134         * tests/others.at (wrap): Inline wrap.m4.
3135         (shadow): Inline shadow.m4.
3136         (iso8859): Don't specify the path from top_srcdir, but from srcdir.
3137         * tests/m4: Simplify.
3139 2001-08-29  Akim Demaille  <akim@epita.fr>
3141         * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Use autom4te's
3142         --language.
3144 2001-08-29  Akim Demaille  <akim@epita.fr>
3146         * tests/generate.awk (normalize): s/@__@/@&t@/.
3148 2001-08-28  Akim Demaille  <akim@epita.fr>
3150         * examples/indir.m4, tests/others.at (indir): s/nonsens/nonsense/.
3152 2001-08-28  Gary V. Vaughan  <gary@gnu.org>
3154         * bootstrap (generate.awk): Generate test cases with new script.
3156 2001-08-27  Akim Demaille  <akim@epita.fr>
3158         * tests/Makefile.am (installcheck-local): Don't use
3159         `dc_install_base' which is not visible here, but `exec_prefix'
3160         which is clearly the RT anyway.
3161         * tests/testsuite.at (AT_CHECK_M4): Don't pass -M here since it is
3162         related to testing a now installed m4.
3163         * tests/m4: Do it here.
3165 2001-08-27  Akim Demaille  <akim@epita.fr>
3167         * tests/others.at (indir): Formatting change.
3169 2001-08-27  Akim Demaille  <akim@epita.fr>
3171         * tests/Makefile.am (installcheck-local): New.
3172         * tests/testsuite.at (AT_CHECK_M4): Pass `-b' so that C-c works on
3173         the test suite.
3174         Prefer options over envvars.
3175         * src/main.c (main): First bug caught by the test suite (yeah!):
3176         --batch lacked a `break' which resulted in an accidental
3177         invocation of --discard-comments.
3179 2001-08-27  Akim Demaille  <akim@epita.fr>
3181         * tests/others.at (capitalize, changeword, comments, ddivert)
3182         (debug, esyscmd, exp, foreach, forloop, fstab, hanoi, include)
3183         (misc, multiquotes, patsubst, pushdef/popdef, regexp, reverse)
3184         (sysv-args, trace, translit, undivert): Don't rely on files in
3185         examples/: AT_DATA them.
3187 2001-08-27  Akim Demaille  <akim@epita.fr>
3189         Let the test suite use a wrapper around the not installed m4 to
3190         pretend it is (installed).
3192         * bootstrap (aclocal.m4): Output AC_SUBST's and AM_CONDITIONAL's in
3193         such a way that m4 does not process them.
3194         * configure.in: The package name seems to be `m4', not `M4'.
3195         * tests/m4: New.
3196         * tests/atlocal.in (at_package, M4): Remove.
3197         * tests/testsuite.at, tests/others.at: Use m4, not $M4.
3199 2001-08-27  Akim Demaille  <akim@epita.fr>
3201         * tests/Makefile.am (CLEANFILES): Remove.
3202         (DISTCLEANFILES, clean-local): New.
3203         * examples/mktests.sh: Remove.
3205 2001-08-27  Akim Demaille  <akim@epita.fr>
3207         * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3208         Don't use aclocal: it's written by hand.
3209         * aclocal.m4: m4_include all the files instead of being built by
3210         aclocal.
3211         * bootstrap: Help automake find the AC_SUBSTs and AM_CONDITIONALs
3212         until it reads the traces by itself.
3213         * configure.in: Require Autoconf 2.42c as we are now using
3214         AC_CONFIG_TESTDIR instead of AT_CONFIG.
3215         Catch unexpanded `jm_' macros.
3216         * config/atconfig.m4: Remove.
3217         * config/error.m4: new.
3218         * config/Makefile.am: Ship the files included by aclocal.m4.
3219         * tests/Makefile.am (TESTSUITE_SOURCES): Rename as...
3220         (TESTSUITE_AT): this, to please Automake.
3221         (TESTSUITE): This target uses autotest/autotest.m4, not
3222         autotest/general.m4.
3223         * tests/testsuite.at: Prereq Autotest 2.52c.
3224         * examples/Makefile.am (pkgdata_DATA): Rename as...
3225         (dist_pkgdata_DATA): this.
3226         * doc/Makefile.am (man_MANS): Rename as...
3227         (dist_man_mans): this.
3229 2001-08-20  Gary V. Vaughan  <gary@gnu.org>
3231         * m4/system.h [cygwin*]:  Thanks to Paul Sokolovsky and
3232         Robert Collins, building on Cygwin no longer requires Windows
3233         import and export symbol decorations.
3234         * m4/m4module.h (M4_SCOPE) [cygwin*]:  Deleted all occurences.
3235         * m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
3236         * m4/debug.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3237         * m4/error.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3238         * m4/input.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3239         * m4/macro.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3240         * m4/output.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3241         * m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3242         * m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
3243         * configure.in (LIBM4_DLL_IMPORT) [cygwin*]:  Don't set this
3244         anymore.
3245         * src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
3246         * modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.
3248 2001-08-20  Gary V. Vaughan  <gary@gnu.org>
3250         Ansify the source.  Previously we had a mix, where my code was
3251         in a K&R compatible style, and the preexisting code was in ANSI
3252         style.  Nothing is lost wrt release 1.4 by reverting to ANSI,
3253         and now the code base is much cleaner.
3255         * m4/system.h:  Remove M4_PARAMS macro and all users.  Remove
3256         VOID macro and all users.
3257         * m4/m4module.h:  Ansify function prototypes and headers.
3258         * m4/builtin.c:  Ditto.
3259         * m4/evalparse.c:  Ditto.
3260         * m4/input.c:  Ditto.
3261         * m4/macro.c:  Ditto.
3262         * m4/module.c:  Ditto.
3263         * m4/output.c:  Ditto.
3264         * m4/path.c:  Ditto.
3265         * m4/symtab.c:  Ditto.
3266         * m4/utility.c:  Ditto.
3267         * modules/format.c:  Ditto.
3268         * modules/gnu.c:  Ditto.
3269         * modules/m4.c:  Ditto.
3270         * modules/mpeval.c:  Ditto.
3271         * src/freeze.c:  Ditto.
3272         * src/m4.h:  Ditto.
3273         * src/main.c:  Ditto.
3275 2001-08-20  Akim Demaille  <akim@epita.fr>
3277         * config/atconfig.m4: s/EOF/ATEOF/, so that configure can be
3278         generated with stock 2.52.
3280 2001-08-20  Akim Demaille  <akim@epita.fr>
3282         * config/atconfig.m4: New, until part of Autoconf per se.
3283         * configure.in (AT_CONFIG): Use it.
3284         Adjust.
3285         * tests/mkconfig.sh, tests/atconfig.in, tests/defs: Remove.
3286         * tests/atlocal.in: New.
3287         * tests/generate.awk: For the time being, the empty quadrigraph is
3288         `@__@'.
3289         * tests/others.at (changeword, gmp): Check the configuration
3290         variable against `yes'.
3291         * tests/testsuite.at (dnl): Allow it, as it's used all over the
3292         place.
3294 2001-08-20  Akim Demaille  <akim@epita.fr>
3296         * m4/utility.c (m4_numeric_arg): Spell out the culprit.
3297         * modules/m4.c (undivert): Disable the possibility of undiverting
3298         several files at once: it is not documented, it is inconsistent
3299         with the other macros, it can be straightforwardly mocked by
3300         several invocations, and most importantly, it prevents the
3301         possibility of other kinds of extension.
3302         Use `m4_numeric_arg'.
3304 2001-08-20  Akim Demaille  <akim@epita.fr>
3306         * examples/include.m4: Typo.
3307         * tests/generate.awk: Really add it.
3308         * tests/Makefile.am: Adjust.
3309         * tests/others.at (Discard comments): It sure fails without `-c'.
3310         (include, undivert): Add -I examples/.
3312 2001-08-20  Akim Demaille  <akim@epita.fr>
3314         Use sprintf, not ecft and friends since it is standard, portable,
3315         simplifies the code, and since the latter is even deprecated
3316         according to the GNU libc documentation.
3318         * modules/format.c: Drop evct support.
3320 2001-08-19  Gary V. Vaughan  <gary@gnu.org>
3322         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Cleaned up.  Don't test
3323         for `-pipe' here...
3324         * configure.in: ...do it here instead.
3326         * c-boxes.el: Deleted.
3327         * m4/builtin.c: Reformat box comments to be closer to GNU
3328         standards.
3329         * m4/debug.c:  Ditto.
3330         * m4/eval.c:  Ditto.
3331         * m4/evalparse.c:  Ditto.
3332         * m4/input.c:  Ditto.
3333         * m4/m4module.h:  Ditto.
3334         * m4/macro.c:  Ditto.
3335         * m4/output.c:  Ditto.
3336         * m4/symtab.c:  Ditto.
3337         * m4/utility.c:  Ditto.
3338         * modules/changeword.c:  Ditto.
3339         * modules/format.c:  Ditto.
3340         * modules/gnu.c:  Ditto.
3341         * modules/load.c:  Ditto.
3342         * modules/m4.c:  Ditto.
3343         * modules/modtest.c:  Ditto.
3344         * modules/mpeval.c:  Ditto.
3345         * modules/perl.c:  Ditto.
3346         * modules/shadow.c:  Ditto.
3347         * modules/stdlib.c:  Ditto.
3348         * modules/time.c:  Ditto.
3349         * src/freeze.c:  Ditto.
3350         * src/main.c:  Ditto.
3352 2001-08-17  Gary V. Vaughan  <gary@gnu.org>
3354         * m4/module.c: Fixup some errors in the description comment.
3356 2001-08-17  Akim Demaille  <akim@epita.fr>
3358         * tests/others.at (iso8859): Specify the path to the M4 test file.
3359         * tests/testsuite.at (AT_CHECK_M4): Normalize the path of input
3360         files in error messages.
3362 2001-08-17  Akim Demaille  <akim@epita.fr>
3364         * tests/testsuite.at (AT_CHECK_M4): Anchor M4PATH in $top_srcdir.
3365         * tests/others.at: Adjust input files paths.
3366         * tests/atconfig.in: Set top_builddir.
3367         * tests/Makefile.am: Adjust.
3368         `testsuite' is in src, not build.
3370 2001-08-17  Akim Demaille  <akim@epita.fr>
3372         * tests/Makefile.am (EXTRA_DIST): Ship generate.awk.
3373         (generate.at): Install a temporary hack until the actual
3374         generate.awk is added to the repository.
3375         * tests/atconfig.in: New.
3377 2001-08-17  Akim Demaille  <akim@epita.fr>
3379         Really apply the patch ``Drop Autoconf 2.13 compatibility.''
3381 2001-08-17  Akim Demaille  <akim@epita.fr>
3383         * doc/m4.texinfo: Promote proper quotation.
3385 2001-08-17  Akim Demaille  <akim@epita.fr>
3387         Remove the non Autotest tests.
3389         * tests/other-tests/capitalize.test,
3390         * tests/other-tests/changeword.test,
3391         * tests/other-tests/comments.test, tests/other-tests/ddivert.test,
3392         * tests/other-tests/debug.test,
3393         * tests/other-tests/discard-comments.m4,
3394         * tests/other-tests/discard-comments.test,
3395         * tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
3396         * tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3397         * tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3398         * tests/other-tests/gmp.m4, tests/other-tests/gmp.test,
3399         * tests/other-tests/hanoi.test,
3400         * tests/other-tests/import-environment.m4,
3401         * tests/other-tests/import-environment.test,
3402         * tests/other-tests/include.test, tests/other-tests/indir.test,
3403         * tests/other-tests/iso8859.m4, tests/other-tests/iso8859.test,
3404         * tests/other-tests/misc.test, tests/other-tests/modfreeze.test,
3405         * tests/other-tests/modpath1.test, tests/other-tests/modpath2.test,
3406         * tests/other-tests/modpath3.test, tests/other-tests/modpath4.test,
3407         * tests/other-tests/modtest.test,
3408         * tests/other-tests/multiquotes.test,
3409         * tests/other-tests/patsubst.test, tests/other-tests/pushpop.test,
3410         * tests/other-tests/regexp.test, tests/other-tests/reverse.test,
3411         * tests/other-tests/shadow.test, tests/other-tests/stackovf.test,
3412         * tests/other-tests/sync-lines.m4,
3413         * tests/other-tests/sync-lines.test,
3414         * tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3415         * tests/other-tests/translit.test, tests/other-tests/undivert.test,
3416         * tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3417         * tests/other-tests/wrap.test: Remove.
3419         * tests/run-test, tests/get-them: Remove.
3420         * tests/Makefile.am: Adjust.
3422 2001-08-17  Akim Demaille  <akim@epita.fr>
3424         others.at no longer depends on other-tests/.
3426         * tests/others.at (stackovf): You're actually...
3427         (sync-lines): this.
3428         (modfreeze, modpath1, modpath2, modpath3, modpath4, modtest, shadow)
3429         (unload.test): Keep their authorship.
3430         (discard-comments, gmp, import-environment, modfreeze)
3431         (sync-lines): Embed the input files.
3432         * tests/stackovf.test: Copy from other-tests/stackovf.test.
3433         * tests/iso8850.m4: Copy from other-tests/iso8859.m4.
3435 2001-08-17  Akim Demaille  <akim@epita.fr>
3437         * doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
3438         (M4exit): Tag the exit status of the example.
3439         * tests/get-them: Adjust.
3440         * tests/generate.awk: New, based on get-them.
3441         * tests/Makefile.am: Adjust to generate `generated.at'.
3442         * tests/testsuite.at: Adjust.
3443         (AT_CHECK_M4): Don't overquote.  Blush...
3445 2001-08-17  Akim Demaille  <akim@epita.fr>
3447         Start using Autotest.  atconfig creation is still lacking.
3449         * examples/patsubst.m4, modules/modtest.m4, modules/shadow.m4,
3450         * examples/reverse.m4, tests/other-tests/import-environment.m4,
3451         * tests/other-tests/iso8859.m4: Don't produce trailing blanks.
3452         * tests/other-tests/import-environment.test: Don't check LANGUAGE
3453         as it might be `unset', or set to `C'.
3454         * tests/other-tests/iso8859.test, tests/other-tests/modpath1.test,
3455         * tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3456         * tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3457         * tests/other-tests/patsubst.test, tests/other-tests/reverse.test,
3458         * tests/other-tests/shadow.test: Adjust.
3459         * tests/testsuite.at, tests/others.at: New.
3460         * tests/Makefile.am: Adjust.
3462 2001-08-17  Akim Demaille  <akim@epita.fr>
3464         Drop Autoconf 2.13 compatibility.
3466         * configure.in (changeword): No need to undefine it, as anyway if
3467         it's defined, M4sugar moved it as m4_changeword.
3468         And anyway, proper quotation is enough.
3469         (m4_pattern_allow): As it exists in 2.50, just use it.
3470         (AC_OUTPUT): Split in AC_CONFIG_FILES and AC_CONFIG_COMMANDS.
3471         Don't handle Gettext's duties, let it handle them.
3472         * config/gnu-obstack.m4: Use m4_pattern_allow directly.
3474 2001-08-17  Akim Demaille  <akim@epita.fr>
3476         * modules/m4.c (m4_dumpdef): Output to stderr, not m4_debug.
3477         (m4_errprint): Use fputs.
3478         * doc/m4.texinfo (Invoking m4) <--error-output>: errprint and
3479         dumpdef are not concerned.
3480         (Dumpdef, Errprint): Emphasize their insensitivity to
3481         --error-output.
3482         * doc/Makefile.am: Add `TAGS' support.
3483         (MAINTAINERCLEANFILES): Remove texinfo.tex and mdate-sh which are
3484         in `config/' now.
3485         * config/Makefile.am (MAINTAINERCLEANFILES): New.
3487 2001-08-17  Akim Demaille  <akim@epita.fr>
3489         * modules/Makefile.am (ETAGS_ARGS): New.
3491 2001-08-17  Akim Demaille  <akim@epita.fr>
3493         * m4/symtab.c (m4_hack_all_symbols, m4_lookup_symbol): Formatting
3494         changes.
3496 2001-08-17  Akim Demaille  <akim@epita.fr>
3498         * m4/builtin.c (m4_macro_define): Do not reset SYMBOL_TRACED.
3500 2001-08-17  Akim Demaille  <akim@epita.fr>
3502         * m4/m4module.h (m4/list.h): Don't include it.
3504 2001-08-16  Gary V. Vaughan  <gary@gnu.org>
3506         m4_modules are no more, we use lt_dlhandles directly and let
3507         latest libltdl features manage the list of loaded modules.
3508         * acinclude.m4: Regenerated.
3509         * m4/ltdl.c: Updated from master copy.
3510         * m4/module.c: Reimplemented to take advantage of advances in
3511         libltdl.
3512         * m4/builtin.c (m4_builtin_find_by_name): Traverse loaded module
3513         list with lt_dlhandle_next.
3514         (m4_builtin_find_by_func): Ditto.
3515         (m4_builtin_table_install): Use lt_dlhandle.
3516         (m4_macro_define): Ditto.
3517         (m4_macro_table_install): Ditto.
3518         m4/module.h: Prototype new module management API.
3519         (m4_modules): No longer required.
3520         (m4_module_init_t, m4_module_finish_t): POSIX namespace
3521         violations, renamed to...
3522         (m4_module_init_func, m4_module_finish_func): ...these,
3523         respectively.
3524         (M4INIT_HANDLER): Clean way to declare init functions in modules.
3525         (M4FINISH_HANDLER):  And similarly for finish functions.
3526         * m4/system.h (_CONC): Used by M4INIT_HANDLER and M4FINISH_HANDLER
3527         -- Add indirection to the CONC macro so that arguments are
3528         correctly expanded.
3529         * modules/modtest.c (m4_init_module):  Replaced with M4INIT_HANDLER.
3530         * modules/shadow.c (m4_init_module):  Ditto.
3531         Due to new init function semantics, be careful to perform the
3532         initialisation only on first load.
3533         * modules/perl.c (m4_init_module):  Ditto. And Ditto.
3534         (m4_finish_module): Replaced with M4FINISH_HANDLER.
3535         Due to new finish function semantics, be careful to perform the
3536         finalisation only on first load.
3537         * m4/m4private.h (m4_module): Removed in favour of...
3538         (m4_module_data): ...structure without all the wrapper fields.
3539         Instances of this new structure are stored associated lt_dlhandles
3540         with lt_dlcaller_data_set().
3541         * m4/builtin.c (m4_builtin_define): Takes a handle argument
3542         instead of the old module argument.
3543         (m4_builtin_table_install): Ditto.
3544         * modules/load.c (m4_resident_module):  Removed.  This is no
3545         longer implemented as a magic symbol...
3546         * modules/m4.c (m4_resident_module): Ditto.
3547         * modules/load.c (M4INIT_HANDLER): ...the module init function now
3548         uses the ltdl api to make the module resident.
3549         * modules/m4.c (M4INIT_HANDLER): Ditto.
3550         * modules/load.c (builtin_modules): Traverse the loaded module
3551         list with lt_dlhandle_next.
3552         (builtin_load): Much simplified in light of the reimplemented
3553         module loader.
3554         * src/freeze.c (produce_module_dump):  Cleaned up and optimised in
3555         light of the m4/module.c rewrite.
3556         (produce_symbol_dump): Ditto.
3557         (reload_frozen_state): Ditto.
3558         * m4/list.c, m4/list.h: Files deleted.  No longer required.
3559         * m4/Makefile.am (pkginc_HEADERS): Delete list.h reference.
3560         (libm4_la_SOURCES): Delete list.c reference.
3561         * m4/m4private.h (m4_token_data):  Add a handle field.  This
3562         eliminates many of the searches to find the handle associated with
3563         various tokens that are passed between functions.
3564         (struct m4_symbol):  Removed the module field.  The
3565         module association does not belong with the symbol...
3566         * m4/input.c (struct m4_builtin): ...it belongs with the builtin
3567         that the module implementation code is from.  Added a handle
3568         field.
3569         (m4_push_macro): Add a `handle' argument.  Changed all callers.
3570         (init_macro_token):  Set the `handle' field for the
3571         m4_token_data.
3572         * m4/macro.c (expand_argument): Copy the new handle field during
3573         reassignment.
3574         * modules/m4.c (macro_install): Use the new handle field to
3575         optimise the search for the correct builtin structure, and pass
3576         the handle details to m4_builtin_define.
3578 2001-08-15  Akim Demaille  <akim@epita.fr>
3580         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Be sure `m4/' exists
3581         when creating `m4/obstack.h'.
3582         * tests/Makefile.am (TESTS_ENVIRONMENT): Pass top_srcdir and
3583         top_builddir.
3584         * tests/defs: Make them absolute.
3585         (CDPATH) Neutralize.
3586         * tests/gethem: Use them.
3588 2001-08-14  Gary V. Vaughan  <gary@gnu.org>
3590         * config/ltmain.sh: Doh!  Import again for a quoting fix that
3591         prevented any regression test from passing.
3593         * m4/m4module.h (obstack.h): Choose between installed version
3594         and shipped version based on configure tests.
3595         * src/freeze.c (obstack.h): Ditto.
3597         * acconfig.h: Removed.  No longer required.
3599         * bootstrap: Rewritten to play nicely with Autoconf 2.5x.
3600         * configure.in (MY_NAME, MY_VERSION): Define these once, and feed
3601         them to AC_INIT and AM_INIT_AUTOMAKE.
3602         * Makefile.am (AUTOMAKE_OPTIONS): Remove `gnits' which would
3603         disallow MY_NAME and MY_VERSION arguments to AM_INIT_AUTOMAKE.
3604         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Don't choke on
3605         shell variable m4_cv_func_obstack_h.
3606         * tests/defs (M4): Be more careful about relative path to libtool
3607         script and m4 binary by using $srcdir.
3609         * src/main.c (main): Use lt_dlinsertsearchdir to prepend -M
3610         optargs to the existing libltdl search path.
3611         * acinclude.m4: Regenerate from latest libtool,m4 and ltdl.m4.
3612         * m4/ltdl.c: Updated.
3613         * m4/ltdl.h: Ditto.
3614         * config/ltmain.sh: Ditto.
3616 2001-08-11  Gary V. Vaughan  <gary@gnu.org>
3618         * src/main.c (main): Add `-b' (for `batch') mode switch to force
3619         interactive mode off.
3621 2001-08-10  Akim Demaille  <akim@epita.fr>
3623         * configure.in: Require Autoconf 2.52.
3624         (AC_ARG_PROGRAM): Remove, handled by Automake.
3625         (m4_getopt): Rename as...
3626         (m4_getopt_h): this.
3627         Allow the tokens `m4_cv_*', `m4_top_srcdir', and `m4_getopt_h'.
3628         Undefine `changeword' only if defined.
3629         * config/gnu-obstack.m4: Require Autoconf 2.52.
3630         (M4_AC_FUNC_OBSTACK): Rename `m4_obstack' and `m4_obstack_h'.
3631         Allow this token.
3633 2001-08-09  Yuji Minejima  <ggb01164@nifty.ne.jp>
3635         * doc/m4.texinfo: Fix some typos, and apply some small
3636         clarifications.
3638 2001-08-09  Andreas Schwab  <schwab@suse.de>
3640         * src/main.c (main): Fix improper uses of error (missing format
3641         string).
3643 2001-08-07  Akim Demaille  <akim@epita.fr>
3645         Improve `make distcheck'.
3647         * configure.in: Be sure to be able to run `mkconfig.sh' when src
3648         != build.
3649         * Makefile.am (dist-hook): Remove, as it is no longer needed.
3650         * doc/m4.texinfo (Include): Add missing blank.
3651         * m4/Makefile.am (EXTRA_DIST): Distribute gnu-obstack.h and
3652         obstack.c.
3654 2001-08-07  Akim Demaille  <akim@epita.fr>
3656         * m4/evalparse.c: A better introductory comment.
3657         * m4/m4module.h (M4_DEBUG_PRINT2): s/M4_debug/m4_debug/.
3658         * m4/macro.c: Adjust old comments.
3659         * modules/README: Typo.
3661 2001-08-07  Akim Demaille  <akim@epita.fr>
3663         * config/gnu-obstack.m4: New.
3665 2001-08-07  Akim Demaille  <akim@epita.fr>
3667         * config/Makefile.am, config/stackovf.m4: New.
3668         * configure.in, Makefile.am: Adjust.
3670 2001-04-08  Roderick Koehle <Roderick.Koehle@infineon.com>
3672         * modules/format.c (format):  Formatting for %f was not
3673         interpreting the position of the decimal point correctly for
3674         whole numbers.
3676 2000-12-01  Gary V. Vaughan  <gary@gnu.org>
3678         * TODO:  Removed m4exit bug.
3679         * modules/load.c (m4_resident_module): Make this module resident.
3680         * module/m4.c (m4_resident_module): Ditto.
3681         * m4/modules.c (m4_module_load):  Use new ltdl resident modules
3682         feature to mark modules as resident if they export
3683         `m4_resident_module' as TRUE.
3684         (m4_module_unload): Do not remove resident modules, and take care
3685         with symbol insertion and deletion with resident modules.
3686         * m4/ltdl.c, m4/ltdl.h: Update to latest unreleased versions to
3687         use resident modules feature.
3689 2000-11-30  Gary V. Vaughan  <gary@gnu.org>
3691         * TODO: Updated.  Removed some cruft that has since been fixed
3692         or implemented.  Added some more entries.
3693         * NEWS: Updated.
3694         * README: Updated.
3695         * modules/README: Updated.
3696         * doc/m4.texinfo: Updated.
3698         * modules/gnu.c (builtin_functions): Make indir orthogonal to
3699         builtin, in that each is recognised as a macro only with parameters
3700         (builtin_indir): Passing 0 arguments is now an error, as with
3701         builtin.
3703         * src/main.c (usage): Added missing description of `-c' option.
3705 2000-11-29  Gary V. Vaughan  <gary@gnu.org>
3707         Consolidate the myriad of dispersed test scripts into the
3708         tests subdirectory.  I think I now have all the file where I
3709         want them, so there shouldn't be anymore upheaval =)O|
3710         Honest!
3711         * tests/Makefile.am: Updated to run the new tests added below.
3712         * tests/other-tests/capitalize.test, tests/other-tests/comments.test,
3713         tests/other-tests/ddivert.test, tests/other-tests/debug.test,
3714         tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
3715         tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3716         tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3717         tests/other-tests/hanoi.test, tests/other-tests/include.test,
3718         tests/other-tests/indir.test, tests/other-tests/misc.test,
3719         tests/other-tests/modfreeze.test, tests/other-tests/modpath1.test,
3720         tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3721         tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3722         tests/other-tests/multiquotes.test, tests/other-tests/patsubst.test,
3723         tests/other-tests/pushpop.test, tests/other-tests/regexp.test,
3724         tests/other-tests/reverse.test, tests/other-tests/shadow.test,
3725         tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3726         tests/other-tests/translit.test, tests/other-tests/undivert.test,
3727         tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3728         tests/other-tests/wrap.test:  New tests based on the contents
3729         of the tests removed below.
3730         * examples/Makefile.am, modules/Makefile.am:  Updated to
3731         reflect removed tests.
3732         * examples/defs,modules/defs: Removed.
3733         * examples/capitalize.test, examples/comments.test,
3734         examples/ddivert.test, examples/debug.test,
3735         examples/esyscmd.test, examples/exp.test,
3736         examples/foreach.test, examples/forloop.test,
3737         examples/fstab.test, examples/hanoi.test,
3738         examples/include.test, examples/indir.test,
3739         examples/misc.test, examples/multiquotes.test,
3740         examples/patsubst.test, examples/pushpop.test,
3741         examples/regexp.test, examples/reverse.test,
3742         examples/sysv-args.test, examples/trace.test,
3743         examples/translit.test, examples/undivert.test,
3744         examples/wrap.test, modules/frozen.m4, modules/modfreeze.test,
3745         modules/modpath1.test, modules/modpath2.test,
3746         modules/modpath3.test, modules/modpath4.test,
3747         modules/modtest.test, modules/shadow.test,
3748         modules/unfrozen.m4, modules/unload.test: Removed.
3750         Move the implementation of GMP support for the mpeval() builtin
3751         into a loadable module that depends on libgmp.  mpeval() and
3752         eval() share a common parser, now in m4/evalparser.c; the code
3753         in m4/numb.c and m4/numb.h is now physically split between
3754         m4/eval.c (the eval() backend) and modules/mpeval.c (the
3755         mpeval() backend), rather than being differentiated by cpp
3756         macros and multiple inclusion.  The mpeval module is always
3757         built but will generate an diagnostic if it is used from an
3758         installation that didn't link in the gmp library.
3759         * modules/Makefile.am: build and install the new mpeval module.
3760         * modules/mpeval.c: Now contains the former parts of m4/numb.c
3761         and m4/numb.h that are required for gmp support in mpeval().
3762         * m4/Makefile.am (libm4_la_SOURCES): Removed evalmp.c.
3763         * m4/evalmp.c:  Removed.
3764         * m4/m4module.h: Removed conditional prototype for
3765         m4_mp_evaluate().
3766         * m4/eval.c: Rewritten.  Contains the former parts of m4/numb.c
3767         and m4/numb.h that do not rely on gmp.
3768         * m4/evalparse.c:  New file, contains the shared parts of the
3769         eval() and evalmp() parser implementations, and is no longer
3770         unencumbered by cpp magic to uncover the right parts.
3771         * m4/numb.h:  Removed.  It's former contents are split between
3772         m4/eval.c and modules/mpeval.c.
3773         * m4/numb.c: ditto.
3775         * tests/other-tests/changeword.test: New test.  Rudimentary
3776         testing of changeword builtin runs only if --wnable-changeword
3777         was used at configure time.
3778         * tests/mkconfig.sh: Solaris sed (at least) does not parse nested
3779         alternation correctly.  Split into two expressions to compensate.
3780         * m4/input.c (m4_input_init): Use m4_ prefix on m4_set_word_regexp.
3781         * modules/Makefile.am: Build changeword module.
3782         * modules/changeword.c (m4_macro_table): Define __m4_changeword__
3783         only when --enable-changeword was passed to configure.
3784         (builtin_changeword): If --enable-changeword was not used, then
3785         report that changeword() builtin has no support in m4 binary.
3787 2000-11-28  Gary V. Vaughan  <gary@gnu.org>
3789         * src/main.c (main): Fixed a particularly nasty bug is
3790         user_search_path setting -- the -M flag processing must be
3791         extremely careful with search path ordering, or else the default
3792         installed module directory (possibly containing modules from a
3793         previous release) is placed earlier in the search path than any -M
3794         arguments (which are relied upon to load uninstalled modules with
3795         most of the tests in the regresion suite).
3797         * modules/load.c (builtin_load):  Nasty hack to prevent adding
3798         symbols to symtab again if a module is loaded more than once.
3799         * modules/m4.c (builtin_ifelse): removed unused variable argv0.
3801         * m4/symtab.c (m4_remove_table_reference_symbols):  Fixed a
3802         possible NULL pointer dereference.
3804         * m4/module.c (m4_module_find_by_modname): Renamed from
3805         m4_module_modname_find.   Fixed all references.
3806         (m4_module_find_by_builtin):  New function.
3808         * modules/modfreeze.test: load the `load' module with each
3809         invocation.
3810         * src/freeze.c (produce_frozen_state): Simplified in light of
3811         module field in m4_symbol.  Allow a third argument for text macros
3812         to name the originating module.
3813         (reload_frozen_state): ditto.
3814         * m4/m4module.h:  Fixup prototypes.
3815         * m4/builtin.h (m4_builtin_define): Add a module argument so
3816         that symbols can be registered against the defining module.
3817         (m4_macro_define): ditto.
3818         * m4/m4private.h (m4_symbol): Make the module field const to save
3819         on casting in the rest of the code.
3820         (SYMBOL_MODULE): New macro.
3822         * m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
3823         symbol reference maintenance bugs when removing a symbol from the
3824         symtab.
3826         * src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.
3828 2000-11-27  Gary V. Vaughan  <gary@gnu.org>
3830         * configure.in (m4_cv_func_obstack): A better check for whether
3831         libc has an obstack implementation.
3832         * m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.
3834         * configure.in (--with-modules): Changed semantics.  This
3835         option is now used to list modules to be preopened.
3836         * src/m4.h: #include "ltdl.h" unconditionally.
3837         * src/main.c: Removed all dependencies on WITH_MODULES.
3838         * src/freeze.c: ditto.
3839         * modules/Makefile.am: ditto.
3840         * m4/m4.c (builtin_m4exit): ditto.
3841         * modules/modpath1.test: ditto.
3842         * modules/modpath2.test: ditto.
3843         * modules/modpath3.test: ditto.
3844         * modules/modpath4.test: ditto.
3845         * modules/modtest.test: ditto.
3846         * modules/shadow.test: ditto.
3847         * modules/unload.test: ditto.
3849         * m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
3850         comes up on demand in LTLIBOBJS now.
3851         * configure.in (getopt_long):  Creating and relying on a link for
3852         getopt.h on hosts with no getopt_long() of thier own works
3853         correctly now.  This is necessary so that callers of getopt_long()
3854         can simply `#include <getopt.h>': the naive way of doing this
3855         would end up using our own getopt.h and the installed
3856         getopt_long(), which is asking for trouble!
3857         (obstack_init): A similar argument applies to obstack.h and
3858         obstack_init().
3860         * m4/ltdl.c: Upgraded to latest bleeding edge version again.
3861         On Solaris-2.5 (at least) the native dlopen implementation
3862         gets confused about m4.o when looking for module "m4".  This
3863         version always looks for .la an .$lib_ext suffixed names first
3864         to work around the problem.  Sigh.
3866         * po/POTFILES.in: Take account of these file movements.
3867         * src/Makefile.am (m4_SOURCES): removed eval.c.
3868         (EXTRA_m4_SOURCES): removed numb.c and numb.h.
3869         * m4/Makefile.am (libm4_la_SOURCES): added eval.c.
3870         (EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
3871         * modules/m4.c (builtin_eval): Use m4_evaluate().
3872         * m4/eval.c: Moved here from src/eval.c to facilitate
3873         implementation of eval() builtin as part of the `m4' loadable
3874         module.
3875         (m4_evaluate): renamed from evaluate for namespace cleanliness.
3876         * m4/numb.c: Moved here from src/numb.c, since it is #included
3877         into eval.c at compile time.
3878         * m4/m4module.h (m4_evaluate): Added prototype.
3879         * src/m4.h (evaluate): Removed prototype.
3881 2000-11-25  Gary V. Vaughan  <gary@gnu.org>
3883         * modules/perl.c (builtin_perleval):  Use PL_na for
3884         compatibility with perl-5.6.
3886         * src/main.c (main):  It is now safe to
3887         ``m4_module_install("m4")'', without tripping over the m4
3888         binary itself!
3889         * m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
3890         versions having fixed the insidious module search order bug.
3892         * m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
3893         supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.
3895         * configure.in: Figure out whether to use the installed
3896         getopt.h or the supplied one.
3897         * src/Makefile.am: ditto.
3899         * po/POTFILES.in: List files in their new positions.
3901         * config/ltmain.sh:  This needs to be checked in to match the
3902         libtool macros copied to acinclude.m4 (until a released
3903         libtool copes with m4's needs).
3904         * bootstrap:  Run gettextize.
3906 2000-11-24  Gary V. Vaughan  <gary@gnu.org>
3908         * AUTHORS:  Added my details.
3909         * TODO: updated.
3910         * NEWS: updated.
3911         * bootstrap: temporary update until released libtool catches up.
3913         * All files:  Use new GNU GPL copyright blurb with current contact
3914         address.
3916         * configure.in (LTLIBOBJS): Use canonical code for calculation of
3917         this variable.
3919         * config: renamed acm4 directory to config to be more like
3920         other autoconfiscated packages.
3922         * configure.in (M4_AC_CHECK_DEBUGGING): Use it.
3923         * config/debug.m4:  New file implementing configure macros to add
3924         suitable debug flags to the compiler invocation.
3926         * modules/load.c:  New file implementing the ``load'' and
3927         ``unload'' builtins.
3928         * tests/get-them:  Set the module search directory to the modules
3929         build directory in generated tests.
3930         * modules/shadow.test: ditto.
3931         * modules/modtest.test: ditto.
3932         * modules/modpath1.test: ditto.
3933         * modules/modpath2.test: ditto.
3934         * modules/modpath3.test: ditto.
3935         * modules/modpath4.test: ditto.
3936         * modules/modtest.test: ditto.
3937         * modules/modfreeze.test: ditto.
3938         * modules/unload.test: ditto.
3940         * modules/changeword.c:  New file implementing the ``changeword''
3941         builtin as a loadable module.
3942         * modules/mpeval.c:  New file implementing the ``mpeval'' builtin
3943         as a loadable module.
3945         * src/main.c (main):  Load the gnu module if m4 was started
3946         normally -- i.e. without the -G option.
3947         * modules/gnu.c:  New file implementing a new loadable module wuth
3948         definitions for all the gnu extension builtins.
3949         * modules/format.c:  Moved here from src/format.c.  Now included
3950         directly by gnu.c.
3952         * src/main.c (main):  Load the traditional module if m4 was
3953         started in `no_gnu_extensions' mode.
3954         * modules/traditional.c:  New file implementing the ``unix'' macro,
3955         required when m4 is executed in traditional mode, as a loadable
3956         module.
3958         * src/main.c:  Renamed from m4.c to avoid confusion with
3959         modules/m4.c.
3960         (main):  Always load the m4 module.
3961         * modules/m4.c:  New file implementing a new loadable module with
3962         definitions for all m4 builtins that are not gnu extensions.
3964         * m4/Makefile.am:  Adjusted to take new files below into account.
3965         * m4/m4module.h: Prototypes for exported functions and types moved
3966         to this directory from the src directory.
3967         * m4/m4private.h: Moved here from src/m4private.h to facilitate
3968         the migration of all builtin implementations to loadable modules.
3969         * m4/macro.c: Moved this file here from the src directory,
3970         renaming all exported symbols to use the prefix ``m4_''.
3971         * m4/builtin.c: ditto.
3972         * m4/module.c: ditto.
3973         * m4/symtab.c: ditto.
3974         * m4/debug.c: ditto.
3975         * m4/input.c: ditto.
3976         * m4/output.c: ditto.
3977         * m4/path.c: ditto.
3978         * m4/ltdl.h, m4/ltdl.c: ditto.
3979         * m4/utility.c: Odd functions moved here from files in the src
3980         directory to facilitate builtin migration.
3982 2000-08-12  Gary V. Vaughan  <gary@gnu.org>
3984         * src/builtin.c (dump_symbols): Use "Undefined name `%s'" for
3985         error message, to make translators' jobs a little easier.
3986         (builtin_builtin): ditto.
3987         (builtin_traceon): ditto.
3988         (builtin_traceoff): ditto.
3989         Reported by Akim Demaille <akim@epita.fr>
3991         * m4/Makefile.am (pkgincdir):  Deleted.  Use automake's built in
3992         pkgincludedir instead.
3994         * m4/m4module.h (rquote): Renamed with a prefix of `m4_' since
3995         it is exported globally.  Fixed all references.
3996         (lquote): ditto.
3997         (bcomm): ditto.
3998         (ecomm): ditto.
3999         (DEF_RQUOTE): Renamed with a prefix of `M4_' since it is exported
4000         globally.  Fixed all references.
4001         (DEF_LQUOTE): ditto.
4002         (DEF_BCOMM): ditto.
4003         (DEF_ECOMM): ditto.
4005 2000-07-28  Gary V. Vaughan  <gary@gnu.org>
4007         * NEWS: updated.
4008         * TODO: updated.
4010         * configure.in (AC_CHECK_FUNCS): added bzero and calloc.
4011         (AC_OUTPUT): touch stamp-h.in, not stamp-h.
4013         * doc/m4.texinfo: Fixed to work with --html option of makeinfo.
4014         Removed `Prev', `Next' and `Up' fields of all @nodes now that
4015         makeinfo calculates them for us, and to make any future
4016         reorganisation easier.
4017         (Frozen files): Document format version 2.
4018         `V' now takes argument `2'.
4019         `F' can take a single argument if symbol and builtin names
4020         are the same, or 3 arguments if the builtin is from a module.
4021         New `S' specification for saving syntax table contents.
4022         New `M' specification for saving loaded module names.
4023         * src/freeze.c: Implement them.
4024         * src/input.c (syntax_code): For interpreting frozen syntax
4025         state.
4027         * examples/Makefile.am:  Add the contents of the WWW directory to
4028         the distribution.
4029         * examples/WWW/Makefile:  ditto,
4030         (%.htm): Compares file contents (not just sizes) to determine
4031         whether a change has occured.
4032         * examples/WWW/_header.htm: Bumped version number.
4033         * examples/WWW: Regenerated content.
4035         * m4/Makefile.am (AUTOMAKE_OPTIONS): Support for non-ANSI
4036         compilers comes much easier without ansi2knr.
4037         * src/Makefile.am (AUTOMAKE_OPTIONS): ditto.
4039         * m4/list.c: New generic list container type.
4040         * m4/list.h: Interface to new container type.
4041         * m4/Makefile.am (pkginc_HEADERS): Install list.h.
4042         (libm4_la_SOURCES): compile and link list.c.
4043         * src/builtin.c (builtin_tables): Use list container.
4044         * src/module.c (symtab): ditto.
4045         * src/symtab.c (symtab): ditto.
4047         * m4/system.h: New file for common preprocessor definitions.
4048         * m4/Makefile.am (pkginc_HEADERS): install system.h.
4049         * m4/error.c: Use system.h in place of inline preprocessor.
4050         * m4/error.h: ditto.
4051         * m4/module.c: ditto.
4052         * m4/module.h: ditto.
4053         * m4/xmalloc.c: ditto.
4055         * m4/error.h (error_one_per_line): Make M4_GLOBAL_DATA for WIN32
4056         compatibility.
4057         * m4/xmalloc.c (xmalloc_exit_failure): ditto.
4059         * m4module.h (syntax_table): Renamed with a prefix of `m4_' since
4060         it is exported globally.  Fixed all references.
4061         (builtin): ditto.
4062         (module_init_t): ditto.
4063         (module_finish_t): ditto.
4064         (token_data): ditto.
4065         (SYNTAX_OTHER): Renamed with a prefix of `M4_' since
4066         it is exported globally.  Fixed all references.
4067         (SYNTAX_IGNORE): ditto.
4068         (SYNTAX_SPACE): ditto.
4069         (SYNTAX_OPEN): ditto.
4070         (SYNTAX_CLOSE): ditto.
4071         (SYNTAX_COMMA): ditto.
4072         (SYNTAX_DOLLAR): ditto.
4073         (SYNTAX_ACTIVE): ditto.
4074         (SYNTAX_ESCAPE): ditto.
4075         (SYNTAX_ALPHA): ditto.
4076         (SYNTAX_NUM): ditto.
4077         (SYNTAX_ALNUM): ditto.
4078         (SYNTAX_LQUOTE): ditto.
4079         (SYNTAX_RQUOTE): ditto.
4080         (SYNTAX_BCOMM): ditto.
4081         (SYNTAX_ECOMM): ditto.
4082         (SYNTAX_VALUE): ditto.
4083         (SYNTAX_MASKS): ditto.
4084         (IS_OTHER): ditto.
4085         (IS_IGNORE): ditto.
4086         (IS_SPACE): ditto.
4087         (IS_OPEN): ditto.
4088         (IS_CLOSE): ditto.
4089         (IS_COMMA): ditto.
4090         (IS_DOLLAR): ditto.
4091         (IS_ACTIVE): ditto.
4092         (IS_ESCAPE): ditto.
4093         (IS_ALPHA): ditto.
4094         (IS_NUM): ditto.
4095         (IS_ALNUM): ditto.
4096         (IS_LQUOTE): ditto.
4097         (IS_RQUOTE): ditto.
4098         (IS_BCOMM): ditto.
4099         (IS_ECOMM): ditto.
4100         (TOKEN_EOF): ditto.
4101         (TOKEN_NONE): ditto.
4102         (TOKEN_STRING): ditto.
4103         (TOKEN_SPACE): ditto.
4104         (TOKEN_WORD): ditto.
4105         (TOKEN_SIMPLE): ditto.
4106         (TOKEN_MACDEF): ditto.
4108         * m4/m4module.h (voidstar): Removed in favour of `VOID' for
4109         consistency.  Fixed all references.
4110         (STRING): Renamed to `m4_string' for consistency, and because if
4111         is exported globally.  Fixed all references.
4112         (token_type): Renamed to `m4_token_t' for the same reasons.
4113         (token_data_type): Renamed to `m4_token_data_t' for the same
4114         reasons.
4116         * m4/m4module.h (XCALLOC): Wrapper macro which handles type
4117         sizes.
4118         (XMALLOC): ditto.
4119         (XREALLOC): ditto.
4120         (XFREE): Wrapper macro which avoids freeing NULL pointers.
4122         * m4/m4module.h (m4_macro):  New type for module defined user
4123         macros.
4124         * modules/modtest.c (m4_macro_table):  Define module user macros.
4125         * modules/shadow.c (m4_macro_table):  ditto.
4127         * m4/m4module.h (M4BUILTIN_HANDLER):  For defining handlers
4128         declared with M4BUILTIN.
4130         * m4/xmalloc.c: Use memset if bzero is not available when
4131         emulating calloc with malloc.
4132         (xcalloc): Fallback to malloc/bzero if calloc is not available.
4133         (xfree): Added for consistency.  Will not try to free NULL
4134         pointers.
4135         * src/m4.c (xfree):  Deleted in favour of the above.
4136         * m4/xmalloc.c (WITH_DMALLOC): preprocess away the entire file if
4137         linking with libdmalloc.
4138         * m4/xstrdup.c (WITH_DMALLOC): ditto.
4140         * modules/frozen.m4:  New test case.
4141         * modules/unfrozen.m4:  ditto.
4142         * modules/modfreeze.test:  New test.
4143         * modules/unload.test:  ditto.
4144         * modules/Makefile.am (EXTRA_DIST):  Distribute them.
4145         (TESTS): Use them.
4146         * modules/modpath1.test:  Don't try this test if module support is
4147         not compiled in.
4148         * modules/modpath2.test: ditto.
4149         * modules/modpath3.test: ditto.
4150         * modules/modpath4.test: ditto.
4151         * modules/modtest.test: ditto.
4152         * modules/shadow.test: ditto.
4154         * modules/perl.c: New module.
4155         * modules/perl.m4: Example of using it.
4156         * modules/Makefile.am (perl_la_SOURCES):  Build new perl module.
4158         * src/m4.c (main): Assume interactive mode if STDIN is connected
4159         to a tty.
4160         Changed startup sequence slightly so that syntax is not
4161         initialised from here when loading a frozen file.
4163         * src/builtin.c:  Much improved macro definition style.
4164         * src/m4private.h:  Internal structures for m4_builtin and
4165         m4_macro instances.  These are not exposed to module writers.
4166         * src/module.c (module_modname_find):  Find a module structure
4167         from the its name.
4168         (make_macro_table):  Build an internal macro table from a external
4169         definition.
4170         (make_builtin_table):  Build an internal builtin table from an
4171         external definition.
4173         * src/module.c (module_unload): Be extremely careful to remove
4174         builtins and macros that match the module being unloaded -- no
4175         longer assume that the top element can be removed incase another
4176         odule defines an identical name.
4177         * src/symtab.c (remove_table_reference_symbols): remove all symbol
4178         table entries which refer to a given builtin table.
4179         * src/builtin.c (remove_tables): Use it!
4181 2000-07-13  Thomas Tanner  <tanner@ffii.org>
4183         * Makefile.am (SUBDIRS): we need modules/ for "make dist"
4184         * acm4/modules.m4: deleted
4185         * bootstrap: don't libtoolize libltdl!
4186         * configure.in: AC_SUBST INCLTDL and LIBLTDL, -with-modules flag:
4187         if set, enable WITH_MODULES and add modules to DLPREOPEN
4188         * examples/misc.test: redirect standard output
4189         * lib/Makefile.am: don't use DLLDFLAGS
4190         * lib/m4module.c: include necessary headers to silence GCC -Wall
4191         * lib/m4regex.c: fixes to silence GCC -Wall
4192         * modules/Makefile.am: don't use DLLDFLAGS, add INCLTDL to INCLUDES,
4193           build modules conditionally
4194         * modules/shadow.c: define symbol aliases before using them
4195         * modules/test.c: define symbol aliases before using them
4196         * po/de.po: update translation
4197         * src/Makefile.am: delete pathconf.h, set MODULE_PATH to
4198         pkglibexecdir, don't use DLLDFLAGS, add INCLTDL to INCLUDES and
4199         LIBLTDL to LIBS.
4200         * src/m4.c: initialize libltdl's preloaded symbols via
4201         LTDL_SET_PRELOADED_SYMBOLS
4202         * src/module.c: libltdl's memory management must be initialized
4203         before calling lt_dlinit!, fix warnings
4205 2000-01-18  Gary V. Vaughan  <gary@gnu.org>
4207         * README:  Caveat about nls not supported by dll architecture on
4208         Windows.
4210         * TODO (MODULE SPECIFIC ISSUES): more ideas for the future.
4212         * tests/Makefile.am (stamp-TESTS):  now works with VPATH.
4213         * src/Makefile.am (m4_LDADD):  use $(builddir) for VPATH.
4214         * modules/Makefile.am (LIBS): ditto.
4215         (INCLUDES): search $(top_srcdir) (for eg. <m4/error.h>) and then
4216         $(top_srcdir)/m4 (for only <m4module.h>).
4217         * modules/shadow.test: fixed for VPATH.
4218         * modules/modtest.test: ditto.
4219         * modules/modpath4.test: ditto.
4220         * modules/modpath3.test: ditto.
4221         * modules/modpath2.test: ditto.
4222         * modules/modpath1.test: ditto.
4224         * modules/time.test: Removed due to timezone dependence,
4225         * modules/Makefile.am (TESTS): Removed time.test.
4227         * configure.in: Use $3 of AC_DEFINE so that we can,,,
4228         * acconfig.h: Remove everything except the gettext parameters.
4229         * acm4/gmp.m4: Add a serial number, and take advantage of $3 of
4230         AC_DEFINE.
4231         * acm4/ltdl.m4:  Updated to latest from libtool cvs.
4232         * acm4/modules.m4:  Remove code which duplicates ltdl.m4 and
4233         increment serial number.
4235         * Makefile.am (SUBDIRS): Moved @MODULES_DIR@ to compile before
4236         src dir and immediately after libm4 is built for confidence that
4237         it doesn't rely on the src directory.
4238         (SUBDIRS): Moved doc dir to the end since helptoman.pl and
4239         makeinfo stop the build on cygwin (because they don't work).
4241         * src/m4.h: use GNU standard #if HAVE_CONFIG_H ideom.
4243         * m4/m4private.h: ...is not a public header, so moved to src.
4244         Add `#include <config.h>', `#define _COMPILING_M4' and
4245         `#include "m4.h".
4246         * m4/Makefile.am (noinst_HEADERS): remove m4private.h.
4247         * src/Makefile.am (noinst_HEADERS): add m4private.h.
4248         * src/builtin.c: `#include "m4private.h"' now takes care of the
4249         above.  Duplicates removed.
4250         * src/debug.c: ditto.
4251         * src/eval.c: ditto.
4252         * src/evalmp.c: ditto.
4253         * src/format.c: ditto.
4254         * src/freeze.c: ditto.
4255         * src/input.c: ditto.
4256         * src/m4.c: ditto.
4257         * src/macro.c: ditto.
4258         * src/module.c: ditto.
4259         * src/numb.h: ditto.
4260         * src/output.c: ditto.
4261         * src/path.c: ditto.
4262         * stackovf.c: ditto.
4263         * symtab.c: ditto.
4265         * po/POTFILES.in: compensate for renaming of lib/*.
4266         * m4/Makefile.am (CLEANFILES): @EXEEXT@ left libtool wrapper behind.
4267         (INCLUDES): Look first in $(top_srcdir) (for eg. <m4/error.h>),
4268         and then in $(top_srcdir)/lib (for eg. "m4private.h").
4269         * src/Makefile.am (m4_LDADD): replace libi/libm4.la with
4270         m4/libm4.la.
4271         * m4/m4error.h:  Renamed error.h, for installation to
4272         $prefix/include/m4..
4273         * m4/m4obstack.h:  Renamed obstack.h, for same reason.
4274         * m4/m4regex.h: Renamed regex.h, for same reason.
4275         * m4/m4error.c:  Renamed error.c, and use #include "error.h".
4276         * m4/m4obstack.c: Renamed obstack.c, and fix #includes.
4277         * m4/m4regex.c: Renamed regex.c, and fix #includes.
4279         * lib: moved to m4 to easily support header installation to
4280         $prefix/include/m4.
4281         * Makefile.am (SUBDIRS): renamed lib dir to m4.
4282         * configure.in (AC_OUTPUT): reference m4/Makefile.in.
4283         * acm4/regex.m4: Point to m4/regex.c.
4285         * examples/foreach.m4:  Sanitise quoting.
4286         * examples/foreach.test:  New torture test.
4287         From Akim Demaille <akim@epita.fr>
4289 2000-01-17  Gary V. Vaughan  <gary@gnu.org>
4291         * src/ltdl.c: Use access() to abort doomed module load attempts
4292         if module file does not exist.
4294         * src/Makefile.am (m4_SOURCES, EXTRA_SOURCES): getopt.o and
4295         getopt1.o will already be used if appropriate, so I moved getopt.c
4296         and getopt1.c from m4_SOURCES to EXTRA_SOURCES.
4298         * modules/modpath1.test: Use correct filename in header line.
4299         * modules/modpath2.test: ditto.
4300         * modules/modpath3.test: ditto.
4301         * modules/modpath4.test: ditto.
4303         Without these changes lt_dlopen("test") attempts to
4304         LoadLibrary("/bin/test") on Windows, which although harmless
4305         generates a spurious error message which spoils most of the tests:
4306         * modules/Makefile.am (EXTRA_DIST): s/test.m4 /modtest.m4 /
4307         (TESTS): s/test.test /modtest.test /
4308         (pkglibexec_LTLIBRARIES): s/test.la /modtest.la /
4309         (test_la_SOURCES, test_la_LDFLAGS): renamed to use modtest.
4310         * modules/modpath1.test: s/test.m4 /modtest.m4 /
4311         * modules/modpath2.test: ditto.
4312         * modules/modpath4.test: ditto.
4313         * modules/modpath3.test: s/-m test /-m modtest /
4314         * modules/shadow.m4: use {un,}loadmodule(`modtest').
4316 2000-01-16  Gary V. Vaughan  <gary@gnu.org>
4318         * src/ltdl.c (find_file): Updated to new version with fixed memory
4319         allocation bug in `next'.
4320         * src/ltdl.h: updated to match.
4322         * modules/Makefile.am:  Cleaned up and reordered.
4324 2000-01-16  René Seindal  <rene@seindal.dk>
4326         * modules/Makefile.am (TESTS): New tests for the module system.
4328         * modules/*.test: New files.
4330         * src/m4.c (main): Added call to module_init().
4331         Treats -M and -m as the arguments -D -U and -t, ie deferred.
4333         * src/m4.h: Added declaration of module_init().
4335         * src/module.c (module_init): No longer static
4337         * modules/Makefile.am ({test,shadow,time,stdlib}_la_LDFLAGS):
4338         Added to shut up automake about non standard libtool library
4339         names.
4341         * src/module.c: Disabled DEBUG by default.
4343         * modules/README: Changed example from unload.m4 to shadow.m4
4345         * modules/shadow.m4: Renamed from unload.m4
4347         * modules/Makefile.am (EXTRA_DIST): Removed unload.m4.
4349         * src/m4.c (main): Functionality for -m and -M were reversed.
4350         Fixed.
4352 2000-01-12  Gary V. Vaughan  <gary@gnu.org>
4354         * doc/help2man.pl: updated to version 1.020.
4356         * lib/COPYING.LIB:  updated to version 2.1.
4358         * lib/m4module.h: restructure the M4_SCOPE code to work when
4359         creating a dll which links with libm4.la and both DLL_EXPORT
4360         (for the new dll) and LIBM4_DLL_IMPORT (for m4module.h) are
4361         both defined.
4363 2000-01-11  Gary V. Vaughan  <gary@gnu.org>
4365         Merged the following changes from my tree:
4367         1999-06-15  Gary V. Vaughan  <gary@gnu.org>
4369         * configure.in (AC_LIBTOOL_WIN32_DLL): Declare that m4 has been
4370         ported to compile shared libs.
4372         * configure.in (LIBM4_DLL_IMPORT): Discover whether we need to
4373         use `__declspec(dllimport)' when linking libm4.la on win32.
4374         * src/Makefile.am (m4_LDFLAGS): Use dllimport if necessary.
4376         * configure.in (M4OBJS): Discover whether we need the shipped
4377         implementation of getopt_long.
4378         * src/Makefile.am (m4_LDADD): Link the getopt objects into the
4379         main binary here, as opposed to the module library in lib/libm4.la.
4381         1999-06-14  Gary V. Vaughan  <gary@gnu.org>
4383         * modules/README: Updated to describe the improved libltdl based
4384         module scheme.
4385         * README (cygwin): Added some compilation notes for building m4
4386         correctly under cygwin.
4387         * TODO: Cleaned out the entries for the module system since they
4388         are now implemented.
4390         * *.[ch]: __P is in the compiler's reserved namespace, so replaced
4391         all instances of __P with M4_PARAMS.
4393         * lib/getdate.h: removed unreferenced file.
4395         * lib/m4private.h: New file to define the private interface to the
4396         token_data struct, which must be shared between m4module.c, and
4397         builtin.c but not exported to modules built from the installed
4398         m4module.h since it's size changes depending on compile time
4399         options.
4401         * src/m4.h: Lots of stuff moved to lib/m4module.h.
4403         * lib/m4module.h: New file to define the interface available when
4404         compiling m4 modules.
4405         * lib/m4module.c: Moved parts of builtin.c, and m4.c which are
4406         necessary for module compilation into this new file.
4408         * lib/Makefile.am (include_HEADERS): install headers (renamed to
4409         avoid nameclash with other system headers) necessary for compiling
4410         modules.
4411         (libm4_la_SOURCES): always include error.c, obstack.c and regex.c
4412         so that modules can include the (renamed) installed headers and
4413         be guaranteed a matching implementation.
4414         * lib/m4error.h: renamed from error.h.
4415         * lib/m4obstack.h: renamed from obstack.h.
4416         * lib/m4regex.h: renamed from regex.h.
4417         * configure.in (AC_REPLACE_FUNCS):  Don't look for a system
4418         implementation, simply include the shipped version
4419         unconditionally, otherwise it is hard for a module to know
4420         whether the m4obstack.h header it is using matches the
4421         implementation it ends up linking against.
4422         (jm_WITH_REGEX):  Include regex into libm4 unconditionally for
4423         the same reason.
4425         1999-05-18  Gary V. Vaughan  <gary@gnu.org>
4427         * examples/misc.test: Don't run this test on machines which don't
4428         have a root user in /etc/passwd (e.g. cygwin).
4430         * tests/get-them (/^@example$/): Error messages might have a
4431         ``.exe'' suffix to the program name, or else use the libtool
4432         ``.libs/lt-m4'' binary, or generally have an unexpected path.  All
4433         of these cases are now catered for when comparing error messages
4434         in generated tests.
4435         * tests/other-tests/*.test: ditto.
4436         * examples/*.test: ditto.
4438         * tests/defs (M4): use libtool execute mode.
4439         * examples/defs (M4): ditto.
4441         * tests/get-them (END): explicitly close any open file.
4442         (printthem): In a regular expression, '{' is the start of a repeat
4443         count!  Use `[{]' for a literal open brace.
4444         (/^@node /): Don't use substr on a string shorter than the trim
4445         length.
4447         1999-05-17  Gary V. Vaughan  <gary@gnu.org>
4449         * configure.in (LTLIBOBJS): calculated from LIBOBJS, and
4450         substituted.
4451         (AC_LIBTOOL_DLOPEN): declare that this package will use dlopen.
4453 2000-01-10  Andreas Schwab  <schwab@suse.de>
4455         * tests/other-tests/gmp.test: Find config.sh in build directory.
4457         * configure.in: Find tests/mkconfig.sh in $srcdir.
4459         * configure.in: Define HAVE_SIGINFO_T if siginfo_t is defined in
4460         <signal.h> (for SUS2 compliant systems).
4462         * src/stackovf.c: Check for HAVE_SIGINFO_T in addition to
4463         HAVE_SIGINFO_H.
4465 2000-01-10  René Seindal  <rene@seindal.dk>
4467         * Prerelease 1.4o.
4469         * TODO, NEWS: Cleaned up and updated.
4471         * src/m4.c (main): New variable exit_status for exit status in
4472         case of unreadable files.  Now m4 will exit with EXIT_FAILURE if a
4473         file cannot be read instead of EXIT_SUCCESS.
4475         * src/builtin.c (m4_indir): Changed error message to help
4476         translators (from Akim Demaille <demaille@inf.enst.fr>).
4478         * lib/obstack.[hc], getopt*.[ch]: Updated to newest version from
4479         Cygnus.
4481         * lib/error.[hc], lib/regex.[hc], lib/strtol.c: Updated to version
4482         from glic 2.1.2.
4484         * src/input.c (match_input): Reordering of code, to avoid multiple
4485         calls to push_string_init() from obstack_grow(), which can happen
4486         with some compilers (found and fixed by James Bonfield
4487         <jkb@mrc-lmb.cam.ac.uk>).
4489         * src/stackovf.c: Added prototypes for ultrix.
4490         (setup_stackovf_trap): Added __P to cast.
4491         (Both reported by John David Anglin <dave@hiauly1.hia.nrc.ca>)
4493 2000-01-09  René Seindal  <rene@seindal.dk>
4495         * doc/m4.texinfo (Changequote): Added comment about changing
4496         quotes when the old quote is a part of the new.
4498         * src/builtin.c (expand_ranges): Added break after trailing dash.
4499         This caused misbehavious on some systems (found and fixed by Akim
4500         Demaille <demaille@inf.enst.fr>).
4502         * AUTHORS: Thomas Tanner included
4504         * acconfig.h: Added entry for ss_sp (see below).
4506         * configure.in (use_stackovf): Added check for stack_t with member
4507         ss_base instead of ss_sp (BSDI notably).  (Reported by Paul Eggert
4508         <eggert@twinsun.com>).
4510         * doc/m4.texinfo (Frozen files): Added a simpler example for
4511         generating frozen files from several input files.
4513 1999-11-14  Paul Eggert  <eggert@twinsun.com>
4515         * po/POTFILES.in: Add lib/getopt.c, lib/obstack.c,
4516         lib/regex.c, lib/xmalloc.c.
4518 1999-11-10  René Seindal  <rene@seindal.dk>
4520         * Makefile.am (ACLOCAL_AMFLAGS): Passes -I acm4 to aclocal.
4522         * src/module.c: reindented.
4523         (module_load): return if this is a repeated load of same module.
4524         (module_init): slight change of logic to avoid repeated
4525         initialisation debug messages.
4527         * Makefile.am (DIST_SUBDIRS): Added to ensure modules/ is included
4528         in the distribution.
4530         * modules/Makefile.am (test_la_LDFLAGS): set to -module to silence
4531         automake warnings about missing lib prefix.
4532         (time_la_LDFLAGS): ditto
4533         (stdlib_la_LDFLAGS): ditto
4535 1999-11-10  Paul Eggert  <eggert@twinsun.com>
4537         * src/m4.h: Include error.h, since our macros use error.
4538         * src/m4.c: Don't need to include error.h.
4540 1999-11-09  Paul Eggert  <eggert@twinsun.com>
4542         * src/m4.h (voidstar): Define to void * if __STDC__ is defined
4543         and zero, as Solaris 7 cc does.
4544         (bcopy): Remove macro; no longer needed with new obstack.h.
4546         * src/output.c (freeze_diversions): Don't assume that a
4547         diversion size can fit in `int'.  Check for diversion file
4548         size too large to be printed with `unsigned long'.
4550         * src/Makefile.am (CFLAGS): Omit -Wall.
4552         * src/stackovf.c (setup_stackovf_trap): Remove cast to unsigned.
4554         * src/debug.c (trace_format):
4555         Use ANSI C if (defined __STDC__ && __STDC__) || defined PROTOTYPES.
4557         * src/freeze.c (produce_frozen_state):
4558         Don't assume string lengths fit in int.
4560 1999-10-13  René Seindal  <rene@seindal.dk>
4562         * configure.in (ALL_LINGUAS): Added Greek translation (el).
4563         (ALL_LINGUAS): Added Czech translation (cs).
4565 1999-03-30  Gary V. Vaughan  <gary@gnu.org>
4567         * src/builtin.c: moved module loading functions into...
4568         * src/module.c: entirely new implementation using libltdl.
4569         * po/POTFILES.in: added src/module.c.
4570         * modules/Makefile.am (LTLIBRARIES): Removed lib prefix as these
4571         are modules, not linktime libraries.
4572         (LDFLAGS): added -no-undefined -module and -avoid-version flags.
4573         * modules/stdlib.c (m4_macro_table): use <name>_LTX collision
4574         avoidance on exported symbols.
4575         * modules/test.c (m4_macro_table, m4_init_module,
4576         m4_finish_module): ditto.
4577         * modules/time.c (m4_macro_table): ditto.
4579         * modules/time2.m4: new file which requires command line loading
4580         of modules.
4581         * src/m4.c (--load-module): dynamically load named runtime module
4582         into running executable before reading the source.
4583         (--module-directory): prepend a directory to the module search
4584         path.
4585         (module_init()): Do this the first time we load a module instead;
4586         if the module subsystem is broken normal m4 scripts can still run.
4587         * src/m4.h (install_builtin_table): is now exported.
4589 1999-03-26  Gary V. Vaughan  <gary@gnu.org>
4591         * src/module.c: removed.  No longer required.
4592         * po/POTFILES.in: removed src/module.c.
4594         * Makefile.am (MAINTAINERCLEANFILES): Remove all the files that
4595         the bootstrap script can recreate.
4596         * acm4/Makefile.am (MAINTAINERCLEANFILES): ditto.
4597         * doc/Makefile.am (MAINTAINERCLEANFILES): ditto.
4598         * examples/Makefile.am (MAINTAINERCLEANFILES): ditto.
4599         * lib/Makefile.am (MAINTAINERCLEANFILES): ditto.
4600         (AUTOMAKE_OPTIONS): reduced strictness to allow COPYING.LIB.
4601         * modules/Makefile.am (MAINTAINERCLEANFILES): ditto.
4602         * src/Makefile.am (MAINTAINERCLEANFILES): ditto.
4603         * tests/Makefile.am (MAINTAINERCLEANFILES): ditto.
4605         * acinclude.m4: removed.  `aclocal -I acm4' handles this much
4606         better.
4607         * acm4/Makefile.am (ACINCLUDE_M4): ditto.
4608         * acm4/gettext.m4: removed.  It causes a multiple definition vs.
4609         the installed gettext.m4 file when running aclocal.
4611 1999-03-25  Gary V. Vaughan  <gary@gnu.org>
4613         * configure.in (AM_INIT_AUTOMAKE): bumped version number to
4614         distinguish this from the last prerelease.
4615         (AC_LIBLTDL_CONVENIENCE):  build libltdl as a convenience library
4616         in its own subdirectory.
4618         * modules/Makefile.am (*_SOURCES): renamed to use libtool's "no
4619         lib prefix on a module" feature.
4620         (LDFLAGS): Added `-module -avoid-version' flags to build
4621         versionless module libraries.
4622         * src/builtin.c (m4_load_module): use libltdl.
4623         (module_unload_all): use libltdl.
4624         * src/m4.c (module_init): initialise module loading on demand for
4625         better diagnostics, and so that m4 will still work even if
4626         the module code is broken.
4627         * src/m4.h (module_init): removed.  No longer relevant.
4628         * modules/stdlib.c (m4_macro_table): use stdlib_LTX_ prefix on
4629         exported symbols for compatibility with dlpreopening.
4630         * modules/test.c (m4_macro_table, m4_init_module,
4631         m4_finish_module): ditto.
4632         * modules/time.c (m4_macro_table): ditto.
4634         * bootstrap: New file.  Runs all the autoutils in the right order
4635         after a fresh checkout, or a make maintainer-clean.
4637 1999-02-18  Akim Demaille  <demaille@inf.enst.fr>
4639         * src/builtin.c (dump_symbols): New function, factoring common
4640         content of m4_dumpdef and m4_symbols.
4641         (m4_dumpdef): Use it.
4642         (m4_symbols): New function, implementing `symbols'.  Use it.
4643         * doc/m4.texinfo: Fixed missing commas after @xref, so that the
4644         file compile with modern makeinfo.
4645         (Symbols): New node, documenting symbols.
4646         (direntry): Modernize.
4648 1998-12-11  René Seindal  <rene@seindal.dk>
4650         * src/builtin.c (predefined_tab): New predefined macros
4651         __m4_changeword__, __m4_gmp__ and __m4_modules__ for testing for
4652         configure time options.
4654 1998-12-01  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4656         * src/module.c (module_try_load): Don't try to be clever and
4657         overwrite argument string.  Instead allocate all constructed
4658         strings locally, since they can have arbitrary lengths.  Make
4659         arguments pointers to const.
4660         (module_search): Simplify due to above change.
4662 1998-11-29  René Seindal  <rene@seindal.dk>
4664         * Prerelease 1.4n.
4666         * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): New tests.
4668         * tests/other-tests/import-environment.{m4,test}: New test.
4670         * tests/other-tests/discard-comments.{m4,test}: New test.
4672         * doc/m4.texinfo (Invoking m4): Updated for --discard-comments.
4674         * src/m4.c (main): New option -c --discard-comments.
4675         New global variable discard_comments.
4677         * src/m4.h (token_type): New TOKEN_NONE for tokens to be
4678         discarded, ie never returned from next_token().
4679         Added declaration of discard_comments.
4681         * src/input.c (next_token): Now loops until token type is not
4682         TOKEN_NONE.  Comments are now given this type when comments should
4683         be discarded.
4685         * doc/m4.texinfo (Invoking m4): Updated for --import-environment
4686         and mpeval.
4688 1998-11-28  René Seindal  <rene@seindal.dk>
4690         * src/m4.c (main): New option --import-environment (no single
4691         letter option).
4693         * When configured with --with-gmp both the normal (fast) eval()
4694         and the gmp aware mpeval() are defined.  To restore previous
4695         bahaviour use "define(`eval', defn(`mpeval'))".
4697         * tests/other-tests/gmp.m4: Changed to use mpeval().
4699         * src/evalmp.c: New file for compiling eval.c as gmp aware.
4700         Just defines USE_GMP if WITH_GMP is defined and includes eval.c.
4702         * src/eval.c: Now includes "numb.c" directly.  Everything in this
4703         file must by static, except evaluate(), which is changed to
4704         mp_evaluate() if USE_GMP in force.
4706         * src/numb.c: Changed to be included by eval.c instead of being
4707         compiled separately.  Everything is declared static.
4709         * src/numb.h: Removed declarations of functions, as numb.c is now
4710         included by eval.c.
4712         * src/builtin.c: Declaration of m4_mpeval() added.
4713         Inserted `mpeval' in builtin table.
4714         (do_eval): New function with common code for m4_eval and m4_mpeval.
4715         (m4_mpeval): New function for gmp version of eval.
4717         * src/m4.h: Declaration of mp_evaluate().
4719         * src/Makefile.am (m4_SOUCES): Includes mpeval.c.
4720         (EXTRA_m4_SOURCES): Now has numb.c and numb.h
4722         * src/m4.c (main): m4 --version also shows which options were used
4723         for compilation, such as: "GNU m4 1.4n (options: modules gmp)"
4725 1998-11-27  René Seindal  <rene@seindal.dk>
4727         * Error messages now always print program name before input file
4728         name as specified by GNU coding standards.  Reported by Akim
4729         Demaille <demaille@inf.enst.fr>.
4731         * doc/m4.texinfo (Include): Change due to changed error message
4732         format.
4733         (Eval): Do.
4735         * tests/get-them: Minor change to sed script due to changed error
4736         message format.
4738         * src/m4.c (print_program_name): New func used to print program
4739         name, input file and line number in error ().  Used as an
4740         error_print_progname handler.
4741         (reference_error): Removed.
4742         (main): Assigns error_print_progname.
4744         * src/m4.h (M4ERROR): Removed reference_error ().
4746 1998-11-25  René Seindal  <rene@seindal.dk>
4748         * Updated to libtool 1.2b.
4750         * src/builtin.c (install_builtin_table): Added braces to avoid
4751         warning of ambiguous 'else'.
4753         * src/module.c: Inserted search path code from path.c modified to
4754         use new interface.
4755         (module_init): Configured default path used only if M4MODPATH is
4756         not set.
4757         (module_try_load): Now reads libMODULE.la as generated by libtool
4758         for actual module name.
4759         (module_load): Gives better error messages on failure.
4761         * src/m4.h: Added declarations of structures and functions for
4762         generic search path handling.
4764         * src/path.c: Removed all module specific code and introduced new
4765         functions of more generic search path handling.
4767 1998-11-24  René Seindal  <rene@seindal.dk>
4769         * configure.in: Defines INTLINCL to -I$(top_srcdir)/intl if using
4770         included gettext, as <libintl.h> might not be found
4771         otherwise. Reported by Andrew Bettison <andrewb@zip.com.au>.
4773 1998-11-22  René Seindal  <rene@seindal.dk>
4775         * src/output.c (insert_diversion): Fixed bug that might cause m4
4776         to read from standard output!  Triggered by input
4777         'divert(1)undivert(0)'.  Test for divnum>0 changed to divnum>=0,
4778         so now 'undivert(0)' does nothing.
4780 1998-11-18  René Seindal  <rene@seindal.dk>
4782         * Prerelease 1.4m.
4784         * src/input.c (set_word_regexp): Fixed a bug, where word_regexp
4785         could be changed when compiling a illegal regexp, causing later
4786         use of the regexp to dump core.
4788         * src/module.c (module_load): Changed error message to conform to
4789         standards.
4791         * src/m4.c (usage): Added message about reporting bugs.
4793         * doc/m4.texinfo (Changeword): Corrected a wrong example.
4794         (Changeword): Added note about the type of regexps used.
4796         * ltconfig, ltmain.sh: New files from Libtool 1.2.
4798         * configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
4799         and AM_PROG_LIBTOOL.
4801         * acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
4802         with libtool.
4804         * modules/Makefile.am: Changed completely to compile modules using
4805         libtool.  The modules are compiled as shared libraries, and are
4806         renamed when installed.
4808         * src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
4809         USE_SHL_LOAD to HAVE_SHL_LOAD
4811         * src/builtin.c (shipout_string): Now tests for a NULL string.
4813         * src/module.c: New level of indirection around non-portable
4814         functions to load shared objects.  Intended to encapsulate the non
4815         portable parts better and to reduce the number of #ifdefs in the
4816         code.
4818         * Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
4819         directory modules/ to the distribution.
4821 1998-11-15  René Seindal  <rene@seindal.dk>
4823         * Prerelease 1.4l.
4825         * modules/stdlib.c: New module `stdlib' defining some standard
4826         functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
4827         getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.
4829         * src/builtin.c (shipout_string): New convenience function for
4830         builtins and modules.
4832         * src/module.c (module_load): Tentative support for
4833         shl_load/shl_findsym, but I cannot test it.  Copied from MetaHTML.
4835         * Makefile.am (SUBDIRS): Directory modules added if configured.
4837         * modules/Makefile.am: Now correctly compiles and installs
4838         modules in pkglibexecdir.
4840         * src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
4841         These two are now initialised by autoconf macros.
4843         * src/path.c (module_env_init): MODULE_PATH is always on the
4844         search path.
4846         * src/Makefile.am: Now generated pathconf.h which defined the
4847         default MODULE_PATH.
4849         * configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
4850         where modules are installed.
4852         * acm4/modules.m4: Enhanced with code from MetaHTML, contributed
4853         by Brian J. Fox <bfox@datawave.net>.  This change allow modules to
4854         build and install automatically, and it is prepared for other
4855         interfacec than dlopen().
4857         * src/builtin.c (predefined_tab): Added __m4_version__ for the
4858         current version of GNU m4.  It is a GNU extension.
4860 1998-11-14  René Seindal  <rene@seindal.dk>
4862         * tests/Makefile.am (GENERATED_TESTS): Added new
4863         generated-tests/changesy.8.test
4865         * doc/m4.texinfo (Changesyntax): Documentation for escape
4866         syntax class.
4868         * src/macro.c (expand_token): Check for escaped macro call before
4869         symbol table lookup.
4871         * src/builtin.c (m4_changesyntax): Added `@' flag to define escape
4872         characters
4874         * src/input.c: New static variable use_macro_escape, which is TRUE
4875         iff some character has code SYNTAX_ESCAPE
4876         (input_init): Added initialisation of use_macro_escape.
4877         (check_use_macro_escape): New function to synchronise
4878         use_macro_escape with the syntax table.
4879         (set_quotes): Added call to check_use_macro_escape()
4880         (set_comment): Do.
4881         (set_syntax): Do.
4882         (next_token): Added new case for IS_ESCAPE.
4884         * src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.
4886 1998-10-13  René Seindal  <rene@seindal.dk>
4888         * Prerelease 1.4k.
4890         * tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
4891         generated-tests.
4893         * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
4894         maintained tests in tests/other-tests.  These currently tests for
4895         8-bit transparency, multiple precision arithmetic and sync-line
4896         output.  Test for stackoverflow detection does not work.
4898         * examples/Makefile.am (TESTS): Added tests for all example files.
4900         * examples/mktests.sh: New file.  Help program for creating test
4901         files.
4903         * tests/mkconfig.sh: New file to generate tests/config.m4 and
4904         tests/config.sh.  This is for tests of configure selectable
4905         features.  Picks up all set WITH_ and ENABLE_ veriables from
4906         config.h
4908         * src/path.c (path_search): Added argument 'char **expanded_name'
4909         to return the expanded name.
4911         * src/m4.h: Added 2nd argument to declaration of path_search().
4913         * src/m4.c (main): Added 2nd argument to path_search().
4915         * src/freeze.c (reload_frozen_state): Do.
4917         * src/builtin.c (m4_undivert): Do.
4918         (include): Do.
4920 1998-10-11  René Seindal  <rene@seindal.dk>
4922         * acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4
4924         * acm4/modules.m4: New file.  Defines AM_WITH_MODULES.
4926         * acm4/gmp.m4: New file.  Defines AM_WITH_GMP.
4928         * configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.
4930         * AUTHORS, ChangeLog: Changed all dates to ISO 8601.
4932         * intl/: Updated to GNU gettext 0.10.35.
4934         * doc/m4.texinfo (Format): Documented that format is blind.
4936         * src/builtin.c (builtin_tab): Builtin format marked as blind.
4938 1998-10-07  René Seindal  <rene@seindal.dk>
4940         * Prerelease 1.4j.
4942         * tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
4943         .test, as the files are no longer just m4 input.
4945         * tests/get-them (FILE): Changed .m4 extension to .test.
4947         * src/m4.h (token_type): New token type TOKEN_SPACE introduced.
4948         Otherwise quoted strings with leading whitespace first in a macro
4949         argument would be eliminated.
4951         * src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
4952         (expand_argument): Do.
4954         * src/input.c (next_token): SPACE and NUM/OTHER characters are only
4955         grouped together iff both quote and comment strings are single
4956         character.  Otherwise they might include a comment/quote leader.
4957         (next_token): Returns new token type TOKEN_SPACE.
4959         * src/builtin.c (push_builtin_table): New function to push a
4960         builtin_table on the stack without installing its contents.
4961         (find_builtin_by_name): Added call to push_builtin_table() if
4962         reading frozen files.  Otherwise the builtins named in the frozen
4963         files could not be found.
4964         (install_builtin_table): Changed to use push_builtin_table()
4966 1998-10-04  René Seindal  <rene@seindal.dk>
4968         * Prerelease 1.4i.
4970         * configure.in (ALL_LINGUAS): Added Polish pl.po
4972 1998-10-03  René Seindal  <rene@seindal.dk>
4974         * Many files: Incorporated changes to implement dynamic modules.
4975         Detailed comments in src/modules.c and modules/README
4977         * src/module.c: New file, implements the OS dependant parts of
4978         dynamic module loading.
4980         * src/Makefile.am (m4_SOURCES): Added module.c
4982         * src/builtin.h: New file, declares some functions from builtin.c
4983         that are of use for other modules (shipout_int, numeric_arg,
4984         skip_space, bad_argc), and the macros ARG() and DECLARE().
4986         * src/builtin.c (install_builtin_table): New function.  Each
4987         module brings in a builtin_table, which is pushed on a stack.
4988         (struct builtin_table): New struct for list of builtin_tables.
4989         (m4_loadmodule): New function to implement builtin "loadmodule".
4990         (shipout_int): No longer static, to be used by modules.
4991         (numeric_arg): do.
4992         (skip_space): do.
4993         (bad_argc): do.
4994         (builtin_init): changed to call install_builtin_table()
4995         (find_builtin_by_name): Now searches all builtin_tables
4996         (find_builtin_by_addr): do.
4998         * src/path.c: Reorganised to allow for two search paths, one for
4999         include files and one for modules.
5001         * src/m4.h: Added declarations for new functions in module.c and
5002         in path.c.
5004         * src/m4.c (main): Added call to module_init().
5006         * modules: New directory with a few demo modules.
5008         * Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
5009         in SUBDIRS.
5011         * configure.in: Added modules/Makefile to AC_OUTPUT.
5013         * configure.in: Added code to implement --with-modules.  Tests for
5014         <dlfcn.h> and -ldl.
5016         * acconfig.h: Added WITH_MODULES
5018 1998-10-02  René Seindal  <rene@seindal.dk>
5020         * examples/Makefile.am (pkgdata_DATA): Removed special target for
5021         check and variables TESTS.  These tests are now run from the
5022         tests/ directory.
5024         * tests/Makefile.am (OTHER_TESTS): Added tests from the example/
5025         directory.  The files stay there but the tests are run from the
5026         tests/ directory.
5028         * tests/Makefile.am (EXTRA_DIST): Added run-test.
5030         * tests/run-test: New file.  Run a test manually
5032         * tests/Makefile.am, tests/get_them: Moved automatically generated
5033         tests (from the manual) to sub directory tests/gentest/.  The
5034         tests/ directory had gotten a bit messy.
5036 1998-09-06  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
5038         * examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
5039         wrap}.test: Added a few testcases.
5041 1998-08-21  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
5043         * Prerelease 1.4h.
5045         * lib/Makefile.am (noinst_HEADERS): regex.h added
5047         * configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
5048         acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
5050         * acm4/Makefile.am: created providing rules to create
5051         $(top_srcdir)/acinclude.m4 to be used by aclocal.
5053         * tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
5054         `C'. Reported by Ulrich Drepper.
5056         * Makefile.am (SUBDIRS): Removed checks directory
5057         * configure.in (AC_OUTPUT): Removed checks/Makefile
5059         * doc/m4.texinfo (Patsubst,example): @comment added to preserve
5060         the space when m4.texinfo is edited and whitespace.el is active.
5061         (Defn,example): idem.
5063 1998-08-20  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
5065         * doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
5066         ../COPYING. ../Makefile is a file which is certainly present when
5067         test is executed in testSubDir. One can't be sure that the COPYING
5068         file is in .. or ../.. in all situations, the ../Makefile is
5069         always there.
5071         * doc/m4.texinfo (Include): adjusted expected test output
5072         according to new tests, i.e. the input will always come from the
5073         file `in' created by the test.
5075         * tests/Makefile.am: Added three lines at the top to get
5076         esyscmd.1.test working.
5078         * tests/get-them: modified to generate clearer tests who will need
5079         less maintenance when new test examples are created in
5080         `doc/m4.texinfo'. All tests are small (nearly stand-alone, they
5081         need the generic file `defs') shell scripts creating `in', `ok',
5082         `out' and when apropriate `okerr' and `err' in the directory
5083         `testSubDir' when executed. The compare of `ok' and `out'
5084         (and of `okerr' and `err') will be the exit status of the test.
5085         `out' must match `ok' (and `okerr' must match `err') for the test
5086         to be succesful.
5088         * tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
5089         the tests generated by tests/get-them getting it input normally
5090         from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
5091         (dot) before the numeric part) is reserved for all other (hand
5092         written) tests. The `+' means one or more times.
5094 1998-08-12  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
5096         * doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
5097         supported short man page to refer to info documentation
5098         * helptoman.pl: added
5099         * configure.in: AC_PATH_PROG(PERL,perl)
5100         * Makefile.am (SUBDIRS): doc after src
5102         * libitized with libit 0.5 from
5103         ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
5105         * configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
5106         * lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
5107          replacement functions, (libm4_a_LIBADD): @LIBOBJS@
5108         * configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
5109           lib/rx.{c,h}: added
5110         * configure.in (AC_CHECK_FUNC): getopt_long
5112         * src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
5114         * TODO: added entry about dependencies
5116 1998-08-10  René Seindal  <rene@seindal.dk>
5118         * Prerelease 1.4f
5120         * doc/m4.texinfo (Changesyntax): Added documentation for the macro
5121         "changesyntax".
5123         * src/builtin.c (m4_changesyntax): Added builtin macro
5124         "changesyntax" to modify the syntax table.
5126         * src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
5127         table.  All categories are assigned a syntax code and tokens are
5128         read according to this table.
5130 1998-08-09  René Seindal  <rene@seindal.dk>
5132         * src/numb.{c,h}: New files, implements multiple precision eval
5133         using GNU gmp.  Originally submitted by John Gerard Makecki
5134         (johnm@vlibs.com), later modified.  Tested with GNU gmp 2.0.2.
5136         * doc/m4.texinfo (Eval): Added documentation for multiple
5137         precision arithmetic library support.
5139         * src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
5140         to accommodate multiple precision eval.
5142 1998-08-07  René Seindal  <rene@seindal.dk>
5144         * src/input.c (MATCH, match_input), src/m4.h: changed definition
5145         of comment and quote strings to `unsigned int' to allow eight bit
5146         chars (reported by andrewb@zip.com.au (Andrew Bettison)).
5148         * src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
5149         patch from Mike Howard <mike@clove.com>
5151 1998-08-06  René Seindal  <rene@seindal.dk>
5153         * gettext.m4: corrected AM_WITH_NLS to handle use of installed
5154         -lintl.
5156 1998-08-03  René Seindal  <rene@seindal.dk>
5158         * Prerelease 1.4e
5160         * src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
5161         and _ macro.  M4 now builds with --disable-nls.
5163         * src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
5164         to look for right message catalogs.  Call indef'ed by ENABLE_NLS.
5166         * configure.in (ALL_LINGUAS): Added complete list of translations:
5167         de fr it ja nl ru sv.
5169 1998-05-22  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
5171         * Prerelease 1.4d.
5173         * src/m4.c: #include <signal.h> not <sys/signal.h>.
5175         * src/Makefile.am: CFLAGS = -Wall @CFLAGS@.
5177         * checks/Makefile.am: explicit list tests in CHECKS.
5179         * configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
5180         src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
5181         mkinstalldirs, install-sh: Added automake (1.3) support.
5183         * lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
5184         obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
5185         Used libitize (0.4) to update.
5187         * configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
5188         (0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
5189         README accordingly.
5191         * src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
5192         stack overflow functionality.
5194 1994-12-03  François Pinard  <pinard@iro.umontreal.ca>
5196         * Prerelease 1.4.1.
5198         * Makefile.in (realclean-local): Delete stamp-h.in.
5200         * configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
5201         Localize, adapting from how it is done in sharutils.
5203         * fr.tt: New file, for French.
5205         * configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
5206         src/freeze.c: Rename PRODUCT to PACKAGE.
5208 1994-11-26  François Pinard  <pinard@iro.umontreal.ca>
5210         * configure.in: Check for <libintl.h> and <locale.h>.
5211         * src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
5212         src/stackovf.c: Rename _ to __P.
5213         * src/m4.h: Declare _ as a macro returning its argument, or else,
5214         include <libintl.h> and declare _ as gettext.
5215         * src/m4.c: Possibly include <locale.h> and call setlocale.
5216         * src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
5217         src/input.c, src/macro.c, src/output.c, src/path.c,
5218         src/stackovf.c, src/symtab.c: Use _ macro over all localizable
5219         strings.
5221 1994-11-07  François Pinard  <pinard@iro.umontreal.ca>
5223         * doc/Makefile.in (stamp-vti): Use new -r option to date.
5225         * configure.in: Put --with-gmp in place, in prevision for John
5226         Gerard's work.
5227         * acconfig.h: Document WITH_GMP.
5229 1994-11-05  François Pinard  <pinard@iro.umontreal.ca>
5231         * Release 1.4.
5233         * doc/Makefile.in (realclean): Also remove stamp-vti.
5234         Reported by Eric Backus.
5236 1994-11-02  François Pinard  <pinard@iro.umontreal.ca>
5238         * src/freeze.c (produce_frozen_state): If the frozen file cannot
5239         be opened, return immediately after producing the error message.
5240         Reported by Andreas Schwab.
5242         * configure.in: Check for const only after having found possible
5243         ANSIfying compiler flags, this is of no use to check it before.
5244         Reported by Alexander Lehmann.
5246 1994-11-01  François Pinard  <pinard@iro.umontreal.ca>
5248         * src/macro.c (collect_arguments): Cast obstack arguments to
5249         (voidstar), so avoiding compiler warnings.
5250         Reported by Joseph E. Sacco.
5252         * src/freeze.c (produce_frozen_state): Cast printed lengths to
5253         (int) so they correspond to %d format items.
5254         Reported by Joseph E. Sacco.
5256         * src/m4.c (main): Cast the argument to xfree to (voidstar).
5257         * src/symtab.c (free_symbol): Idem.
5258         Reported by Karl Vogel.
5260 1994-10-31  François Pinard  <pinard@iro.umontreal.ca>
5262         * Makefile.in (DISTFILES): Distribute BACKLOG.
5264         * configure.in: Define PRODUCT and VERSION.
5265         * acconfig.h: Document PRODUCT and VERSION.
5266         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
5267         constant string m4 and variable or parameter named version.
5269 1994-10-30  François Pinard  <pinard@iro.umontreal.ca>
5271         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
5272         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
5273         defines __STDC__ to 0, for indicating it is *not* ANSI!
5274         Reported by Kaveh R. Ghazi.
5276         * configure.in: Added obsolescent tests for AIX and Minix.
5278         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
5279         which texclean does not exist anymore.
5280         Reported by Eric Backus, Jim Meyering, John David Anglin and
5281         Joseph E. Sacco.
5283 1994-10-29  François Pinard  <pinard@iro.umontreal.ca>
5285         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
5286         Reported by John David Anglin.
5288         * src/ansi2knr.c: New version, sent by Peter Deutsch.
5289         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
5290         ANSI2KNR, depending on the fact the compiler is ANSI or not.
5291         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
5292         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
5293         of $U, put underline in extensions rather than in basenames.  Use
5294         implicit rules, now that regularity makes this possible.
5295         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
5296         of ansi2knr whenever it is needed.
5297         * configure.in: Adjusted for correct STACKOVF substitution.
5298         * src/debug.c (trace_format): When not __STDC__, use (...) as a
5299         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
5300         Reported by David MacKenzie.
5302         * Makefile.in: Remove binprefix.  Use transform_name instead.
5303         Reported by David MacKenzie.
5305         * doc/Makefile.in: Create version.texi, use it, clean it.
5306         Reported by Jim Meyering.
5308 1994-10-28  François Pinard  <pinard@iro.umontreal.ca>
5310         * Makefile.in (all, install, uninstall): Depend on Makefile.
5312         * Makefile.in: For actions invoking $(MAKE) from within compound
5313         sh statements, exit non-zero if the sub-make fails.  Otherwise,
5314         the top-level make may exit successfully when it should fail.
5315         Reported by Jim Kingdon.
5317         * {,/*}Makefile.in: Use && after all cd, in case they fail.
5319         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
5320         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
5321         * configure.in: Substitute PRODUCT and VERSION.
5323         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
5325 1994-10-27  François Pinard  <pinard@iro.umontreal.ca>
5327         * Makefile.in (mostlyclean-local): Do not remove *~.
5328         * */Makefile.in (mostlyclean): Idem.
5329         Reported by Robert E. Brown and Richard Stallman.
5331 1994-10-09  François Pinard  <pinard@iro.umontreal.ca>
5333         * src/m4.h: Get rid of CONFIG_BROKETS.
5335 1994-10-02  François Pinard  <pinard@iro.umontreal.ca>
5337         * configure.in: Use AC_ARG_PROGRAM.
5338         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
5339         Reported by David MacKenzie.
5341 1994-10-01  François Pinard  <pinard@iro.umontreal.ca>
5343         * configure.in: Do not add -O to CFLAGS for GNU C, now that
5344         configure does it automatically.
5345         Reported by Jim Meyering.
5347 1994-09-23  François Pinard  <pinard@iro.umontreal.ca>
5349         * src/stackovf.c: Declare the handler_t typedef earlier in the
5350         code, use it for stackovf_handler.
5351         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
5352         casting sigsegv_handler.
5353         Reported by Robert Bernstein.
5355         * src/m4.c (main): Initialize program_name to argv[0] without
5356         basename'ing it.
5357         Reported by Karl Berry.
5359 1994-09-18  François Pinard  <pinard@iro.umontreal.ca>
5361         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
5362         Reported by Karl Berry.
5364 1994-09-14  François Pinard  <pinard@iro.umontreal.ca>
5366         * lib/Makefile.in (mostlyclean): Added.
5367         (TAGS): Make in $(srcdir).
5369         * configure.in: Use `choke me' in test, like everywhere!
5371         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
5372         unreacheable and useless.
5374         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
5376         * lib/Makefile.in (DISTFILES): Distribute TAGS.
5377         (distclean): Do not remove TAGS.
5378         (realclean): Remove it.
5379         * Makefile.in: Make TAGS in lib also, not just in src.
5380         Reported by Karl Berry.
5382         * Makefile.in (distclean, realclean): Instead of recursively
5383         calling $(MAKE) for the -local part, allow parallel execution of
5384         -recursive and -local, only delay the removal of config.status,
5385         which is repeated in both goals.
5387 1994-09-13  François Pinard  <pinard@iro.umontreal.ca>
5389         * Release 1.3.
5391         * Makefile.in: Group all *clean-recursive goals in one, using sed
5392         to remove `-recursive' while calling make recursively.  Also, use
5393         a subshell for each recursive $(MAKE).
5394         Reported by Jim Meyering.
5396         * src/m4.h (memcpy): Define with bcopy for BSD systems.
5397         Reported by Kaveh R. Ghazi.
5399         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
5400         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
5401         specify it.
5403         * configure.in: Use date instead of touch for stamp-h.
5404         * Makefile.in (stamp-h.in): Idem.
5406         * Makefile.in (distclean, realclean): Force serial execution of
5407         both goals, in case parallel makes are being used.
5408         Reported by Jim Meyering.
5410         * src/Makefile.in (DISTFILES): Distribute TAGS.
5411         (distclean): Do not remove TAGS.
5412         (realclean): Remove it.
5413         Reported by Karl Berry.
5415 1994-09-10  François Pinard  <pinard@iro.umontreal.ca>
5417         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
5418         to old names, for following Autoconf.
5420 1994-09-08  François Pinard  <pinard@iro.umontreal.ca>
5422         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
5423         ./install.sh will not be correctly referred to in sub-Makefiles.
5424         Reported by John David Anglin.
5426         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
5427         Reported by Eric Backus.
5429         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
5430         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
5431         config.status into remaking this directory's Makefile only.
5432         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
5433         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
5434         Reported by Jim Meyering.
5436 1994-09-06  François Pinard  <pinard@iro.umontreal.ca>
5438         * configure.in: Correct stack overflow detection logic, taking
5439         care of systems having only incomplete implementations (like for
5440         Pyramid 9820 OSx 5.0d).
5441         Reported by Kaveh R. Ghazi.
5443         * src/Makefile.in (TAGS): Remote -t from etags call.
5445 1994-09-02  François Pinard  <pinard@iro.umontreal.ca>
5447         * lib/Makefile.in (install): Depend on all.
5449 1994-08-31  François Pinard  <pinard@iro.umontreal.ca>
5451         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
5452         Reported by Jim Meyering and John David Anglin.
5454         * Makefile.in (distclean-local): Delete config.log.
5455         Reported by Jim Meyering.
5457         Solidify frozen files with respect to -P:
5458         * src/m4.c: Have -P set prefix_all_buitins variable instead of
5459         calling a function by that name.  Declare the variable.
5460         * src/m4.h: Adjust declaration for prefix_all_buitins.
5461         * src/builtin.c (builtin_init): Merge in functionality from
5462         previous prefix_all_buitins function, while making entries in the
5463         symbol table, but not modifying the builtin description itself.
5465         * src/freeze.c (reload_frozen_state): Add a useless `break;',
5466         because *many* compilers do not accept an empty `default:'.
5467         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
5468         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
5470         * configure.in: Use AC_TYPE_SIGNAL.
5471         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
5472         Reported by Robert Bernstein.
5474         * checks/Makefile.in (check): Modify PATH so check-them will find
5475         m4 in the src directory.
5476         * Makefile.in (check): Don't.
5477         Reported by Akiko Matsushita and Jim Meyering.
5479         * src/output.c (make_room_for, output_character_helper): New
5480         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
5481         a per buffer MAXIMUM_BUFFER_SIZE.
5483         * src/output.c (output_text): New function, for optimizing the
5484         output of strings of characters.  Use it.
5486 1994-08-30  François Pinard  <pinard@iro.umontreal.ca>
5488         * doc, src: New directories reorganizing the distribution.
5489         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
5490         files.
5491         * Makefile.in: Adjusted.
5492         * configure.in: Configure new Makefiles.
5494         * m4.h: Declare STRING typedef.  Use it for comment and quote
5495         strings, adjusting all references.  (This is the rudiments of a
5496         beginning for the eventual withdrawal of NUL terminated strings.)
5497         * output.c (shipout_text): Accept a length parameter, and use it.
5498         All callers adjusted.
5500 1994-08-29  François Pinard  <pinard@iro.umontreal.ca>
5502         * m4.h: Include <unistd.h> if it exists.
5503         * stackovf.c: Don't.
5505         Clean up for current_diversion variable:
5506         * output.c: Move current_diversion from builtin.c.
5507         * m4.h: Declare current_diversion so builtin.c can access it.
5508         * output.c (output_init, make_diversion): Initialize or update
5509         current_diversion.
5510         * builtin.c (builtin_init, m4_divert): Leave current_diversion
5511         alone.
5513         Remove limit on number of diversions:
5514         * output.c: Replace ndiversion by diversions, declare it.
5515         (output_init): Allocate only diversion 0.
5516         (make_diversion): Allocate new diversions as needed.
5517         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
5518         * m4.c: Still accept -N, but do nothing with it.
5519         Reported by David MacKenzie.
5521         Freeze diversions:
5522         * output.c (freeze_diversions): New function.
5523         * m4.h: Declare freeze_diversions.
5524         * freeze.c: Document frozen file format, revise it, call
5525         freeze_diversions to add diversions to frozen format, and code to
5526         reload them properly.
5527         * m4.c: Do not undivert automatically at end when status being
5528         frozen.  Do not call builtin_init when reloading frozen state.
5530         Speed up diversion processing:
5531         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
5532         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
5533         structure and variables, cached variables out of output_diversion,
5534         reallocate_diversion_for and OUTPUT_CHARACTER.
5535         (shipout_text, make_diversion, insert_diversion): Adapted to new
5536         structures.
5537         (insert_file): Use better buffering.
5538         Reported by David MacKenzie.
5540 1994-08-28  François Pinard  <pinard@iro.umontreal.ca>
5542         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
5543         dist works from another build directory.
5545 1994-08-27  François Pinard  <pinard@iro.umontreal.ca>
5547         * symtab.c (hack_all_symbols): Use hash_table_size instead of
5548         constant HASHMAX, for -H option to work better.
5550         * builtin.c (DECLARE): Simplify by using _ ().
5552         * freeze.c: New file.
5553         * Makefile.in: Compile it, distribute it.
5554         * m4.c: Recognize, document and process --freeze-state (-F) and
5555         --reload-state (-R) options.  Pass a true flag to builtin_init
5556         only if no reloading some state.
5557         * builtin.c (define_builtin): Remove static specifier.
5558         (find_builtin_by_name): Remove static specifier.
5559         (builtin_init): Accept and obey a flag argument.
5560         * m4.h: Add declarations for freeze.c, changes for builtin.c.
5562 1994-08-24  François Pinard  <pinard@iro.umontreal.ca>
5564         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
5565         specifier.
5567         * configure.in: Implement --with-dmalloc.
5568         * acconfig.h: Document WITH_DMALLOC.
5569         * m4.h: Add code for when WITH_DMALLOC.
5571 1994-08-15  François Pinard  <pinard@iro.umontreal.ca>
5573         * m4.c (long_options): Use "error-output", the dash was missing.
5574         Reported by Akiko Matsushita.
5576 1994-08-12  François Pinard  <pinard@iro.umontreal.ca>
5578         * m4.h: Include <sys/types.h>.
5579         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
5580         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
5581         int.
5582         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
5583         as size_t, not int.
5584         * builtin.c (dump_args): Declare len as size_t, not int.
5586         * debug.c: Prototype the forward declaration of debug_set_file.
5588         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
5589         shadowing of this variable.
5590         * output.c (insert_diversion): Idem.
5592         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
5593         (input_init): Duplicate default quote and comment strings.
5594         (set_quotes): Free previous quote strings in all cases.  Duplicate
5595         even default quote strings.
5596         (set_comment): Free previous comment strings in all cases.
5597         Duplicate even default comment strings.
5599         * configure.in: Updated for Autoconf 2.0.
5600         * Makefile.in (distclean-local): Also delete config.cache.
5602         * m4.c (usage): Reorganize the --help output by topic.  Include a
5603         description for debugging flags.
5605 1994-07-29  François Pinard  <pinard@iro.umontreal.ca>
5607         * configure.in: If sigaction is available and SA_ONSTACK defined,
5608         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
5609         defined, use sigvec.  Else don't compile stackovf.c.
5610         * stackovf.c (setup_stackovf_trap): Idem.
5611         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
5612         and Simon Leinen.
5614 1994-07-21  François Pinard  <pinard@iro.umontreal.ca>
5616         * m4.c (usage): Replace printf par fputs.
5618 1994-07-18  François Pinard  <pinard@iro.umontreal.ca>
5620         * Release 1.2
5622 1994-07-17  François Pinard  <pinard@iro.umontreal.ca>
5624         * configure.in: Check for sigaction and sigvec.  Add a new delayed
5625         check for RLIMIT_STACK, combine in the checking for getrlimit.
5626         All those things are not universally available.
5627         * stackovf.c: Split setting up the trap handler and catching
5628         signals, for better taking care of various configure outcomes.
5629         * examples/stackovf.sh: Correct a typo.
5630         Reported by Eric Backus, Jim Avera and Jim Meyering.
5632 1994-07-16  François Pinard  <pinard@iro.umontreal.ca>
5634         * ansi2knr.c: New version sent by its author, Peter Deutsch.
5636 1994-07-15  François Pinard  <pinard@iro.umontreal.ca>
5638         * Makefile.in: Modify so parallel make will not try making
5639         lib/libm4.a twice simultaneously.
5640         Reported by Jim Meyering.
5642 1994-07-14  François Pinard  <pinard@iro.umontreal.ca>
5644         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
5645         error message, for when no code possibility exists.  Even if this
5646         line is completely #ifdef'ed out, it brings a syntax error.
5647         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
5649         * Makefile.in (install): Have install depend on all too, for lib
5650         to be remade as needed.
5652         * examples/stackovf.sh: Try ksh, bsh and bash for shells
5653         providing ulimit, instead of using only ksh.
5654         Reported by Jim Avera and Joseph E. Sacco.
5656 1994-07-12  François Pinard  <pinard@iro.umontreal.ca>
5658         * Makefile.in (check): Have it depend on all instead of m4.  In
5659         this way, a change in lib will be detected and processed.
5661         * builtin.c (numeric_arg): Use strtol and verify the conversion,
5662         instead of using sscanf which stops as soon as there is a
5663         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
5664         and divert(1xyzzy) were all accepted without any warning or error
5665         messages.
5666         * m4.h: Declare strtol as long if not including stdlib.h.
5667         * configure.in: Check for limits.h, and replace strtol if missing.
5668         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
5669         * lib/strtol.c: New file, from elsewhere.
5670         Reported by Andreas Schwab.
5672 1994-07-07  François Pinard  <pinard@iro.umontreal.ca>
5674         * macro.c (expand_macro): Cast value to (boolean) prior to
5675         assigning it to traced.
5676         Reported by Tom McConnell.
5678         * Makefile.in (m4): Always make all in lib first.
5679         Reported by Jim Meyering.
5681 1994-07-06  Jim Avera <jima@netcom.com>
5683         * stackovf.c: Isolated OS-dependent sections; Improved portability,
5684         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
5685         handlers), and a default error message if the fault address is not
5686         available (when neither siginfo.h nor BSD sigcontext are supported).
5687         * configure.in: Changes for stackovf.h: Check for sigcontext,
5688         sigaction, sigstack, and define rlim_t as int if necessary.
5689         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
5690         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
5691         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
5693 1994-07-05  François Pinard  <pinard@iro.umontreal.ca>
5695         * configure.in: Use AC_SET_MAKE.
5696         * Makefile.in: Use @SET_MAKE@.
5697         Reported by Jim Meyering.
5699         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
5700         Reported by Ian Taylor.
5702 1994-07-02  François Pinard  <pinard@iro.umontreal.ca>
5704         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
5705         because siginfo.h is unrelated to standard headers, and siginfo.h
5706         is already checked for.
5707         Reported by Joseph E. Sacco.
5709         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
5710         PROTOTYPES.
5711         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
5712         AC_PROTOTYPES.
5714 1994-06-29  François Pinard  <pinard@iro.umontreal.ca>
5716         * builtin.c (substitute): Use \& to represent this part of the
5717         string which was matched by the whole regexp, instead of
5718         representing the whole string.  Any usage of \0 issues a warning
5719         and acts like \&, it will disappear in some subsequent release.
5721 1994-06-27  François Pinard  <pinard@iro.umontreal.ca>
5723         * m4.c: Complete prototype for forwarded declaration of usage.
5725         * input.c (init_macro_token): Correct own reference in error
5726         message.  Previous name get_macro_func was referred to instead.
5727         (next_char):  Correct own reference in error message.  Previous
5728         name advance_input was referred to instead.
5730         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
5731         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
5732         and_term, not_term, logical_not_term, cmp_term, shift_term,
5733         add_term, mult_term, exp_term, unary_term, simple_term): Add
5734         prototype to forwarded declarations.  Declare parameter v1 as
5735         eval_t * instead of int *.  Same for local variable v2 in dyadic
5736         functions.  Same for result in exp_term.
5737         * builtin.c (m4_eval): Declare value as eval_t instead of int.
5738         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
5739         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
5740         (shipout_int): Cast first argument of ntoa to eval_t.
5741         Reported by Thorsten Ohl.
5743         * macro.c: Complete the prototypes of forwarded expand_macro and
5744         expand_token.
5745         Reported by Thorsten Ohl.
5747         * m4.h: Define voidstar as void * or char * depending on __STDC__.
5748         The Ultrix 3.1 compiler cannot do much with void pointers.
5750         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
5751         * m4.c (xfree):  Replace void * by voidstar.
5752         Reported by Tom McConnell.
5754         * ansi2knr.1: New, from elsewhere.
5755         * Makefile.in (DISTFILES): Distribute ansi2knr.1
5757         * Makefile.in (stamp-h.in): Avoid running ./config.status if
5758         stamp-h does not exist yet.  This avoids running it a second time
5759         just after the initial ./configure.
5760         Reported by David MacKenzie and Tom McConnell.
5762         * m4.h: Replace the enum debug_info declaration with a series of
5763         #define's.  The Ultrix 3.1 compiler would otherwise need casting
5764         (int) to most references, when used in expressions.
5765         Reported by Tom McConnell.
5767 1994-06-25  François Pinard  <pinard@iro.umontreal.ca>
5769         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
5770         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
5771         calls the compiler.  Previously, FP_PROTOTYPES was only calling
5772         the preprocessor; by not being subject to CFLAGS, this was
5773         discouraging those flags asking for ANSI compilation.
5774         * acconfig.h: Document HAVE_PROTOTYPES.
5775         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
5776         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
5777         Reported by Eric Backus.
5779         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
5780         from the environment.  Default CFLAGS to -g if not set.
5781         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
5782         * lib/Makefile.in: Have CFLAGS substituted from configure.
5783         Reported by Eric Backus and Tom McConnell.
5785         * configure.in: m4_undefine changeword before using AC_ENABLE.
5787         * m4.h: Declare prototypes for error (for ANSI compilers only),
5788         prefix_all_builtins and reference_error.
5789         Reported by Tom McConnell.
5791         * input.c (set_word_regexp): Do not try to initialize the array
5792         test from a string, this does not work with non-ANSI compilers.
5793         Reported by Eric Backus.
5795         * Makefile.in (dist): Clean examples/ before saving it.
5796         (distclean-local): Also remove stamp-h.
5797         Reported by Eric Backus.
5799         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
5800         non ANSI compilers.
5801         Reported by Tom McConnell.
5803         * checks/Makefile.in (clean): Depends on mostlyclean.
5804         (mostlyclean): New goal.
5806 1994-06-24  François Pinard  <pinard@iro.umontreal.ca>
5808         * Makefile.in (DISTFILES): Distribute install.sh.
5809         * install.sh: New file, copied from elsewhere.
5810         Reported by Assar Westerlund and Kaveh R. Ghazi.
5812 1994-06-23  François Pinard  <pinard@iro.umontreal.ca>
5814         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
5815         * acconfig.h: Explain ENABLE_CHANGEWORD.
5817         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
5818         from code provided by Pete Chown]
5819         * m4.h: Add original_text field to u_t variant of union u.
5820         Declare TOKEN_DATA_FUNC macro.
5821         * builtin.c: Declare changeword.
5822         (m4_changeword): New function.
5823         * input.c: Include "regex.h", define variables with word regexps.
5824         (input_init): Initialize the word regexp.
5825         (set_word_regexp): New.
5826         (next_token): Declare local variables, use the previous code if
5827         default_word_regexp is true.  Else, match using a new code.  Save
5828         the original text.
5829         * macro.c (expand_token): Ship out original text if not a macro
5830         name.
5831         Reported by Krste Asanovic and Pete Chown.
5833         [These modifs all depend upon ENABLE_CHANGEWORD]
5834         * m4.h: Declare external user_word_regexp.
5835         * m4.c: Declare user_word_regexp, and initialize it from
5836         --word-regexp or -W, or NULL if not specified.
5837         * input.c: Use user_word_regexp if specified, instead of
5838         DEFAULT_WORD_REGEXP.
5840         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
5841         agree with it.
5843         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
5844         * checks/Makefile.in: Empty the suffix list.
5845         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
5847         * m4.c: Declare nesting_limit and initialize it to 250.
5848         Implement -LNUMBER or --nesting-limit=NUMBER to change its
5849         value.
5850         * m4.h: Declare nesting_limit as external.
5851         * macro.c (expand_macro): Stop execution whenever nesting limit
5852         is exceeded.
5853         Reported by Bengt Mertensson.
5855         * eval.c (evaluate): Diagnose excess characters in eval input.
5856         Things like `eval(08)' used to return 0 with no diagnostic.
5858         * m4.h: Capitalize first letter of all macro arguments in
5859         definitions.
5861         * m4.c: Declare warning_status, initialize it to 0.  Add new
5862         option -E, or --fatal-warnings, which sets warning_status to
5863         EXIT_FAILURE instead.
5864         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
5865         EXIT_FAILURE if not otherwise done by header files.
5866         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
5867         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
5868         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
5869         argument of all M4ERROR calls.
5870         Reported by Noah Friedman.
5872         * examples/incl-test.m4: Renamed from incl_test.m4.
5873         * examples/include.m4: Include incl-test.m4 instead of
5874         incl_test.m4.
5875         * examples/multiquotes.m4: Renamed from multi-quotes.m.
5877 1994-06-22  François Pinard  <pinard@iro.umontreal.ca>
5879         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
5880         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
5881         also tested it on a Sun Sparc workstation running SunOS 4.x.
5883         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
5884         49.format check, abusing a `union values' argument with sprintf
5885         without selecting the proper field.  Now, save the formatting type
5886         first, delaying the fetch of the corresponding argument.
5887         Reported by Joseph E. Sacco and Tom Quinn.
5889         * format.c (format): Remove const from char *fmt declaration when
5890         not HAVE_EFGCVT, because a NUL may be forced into it.
5892         * m4.h: Declare atof() when not STDC_HEADERS.
5893         Reported by Joseph E. Sacco.
5895         * Regenerate configure using Autoconf 1.11, this corrects a
5896         problem about an incorrect cpp seting on NeXT 3.1.
5897         Reported by Alexander Lehmann.
5899 1994-06-05  François Pinard  <pinard@iro.umontreal.ca>
5901         * m4.h (_): Change argument from `x' to `Args'.
5903 1994-04-22  François Pinard  <pinard@iro.umontreal.ca>
5905         * m4.h: Rename Args() to _().
5906         * m4.h: Remove extern specifier from all function declarations.
5908 1994-04-22  Jim Avera <jima@netcom.com>
5910         * stackovf.c: New file implementing stack-overflow detection.
5911         * configure.in: Check for getrlimit, sigaction.  If all of
5912         standard headers, getrlimit and sigaction, define USE_STACKOVF and
5913         substitute ${U}stackovf.o for STACKOVF.
5914         * acconfig.h: Declare USE_STACKOVF.
5915         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
5916         * m4.h: Declare setup_stackovf_trap().
5917         * m4.c: Call setup_stackovf_trap().
5918         * tests/stackovf_test.sh: New file.
5920 1994-04-13  François Pinard  <pinard@iro.umontreal.ca>
5922         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
5924         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
5926 1994-01-30    <pinard@iro.umontreal.ca>
5928         * m4.h: Remove definition of volatile, not used anymore.
5929         Reported by Jim Meyering and Joseph E. Sacco.
5931         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
5932         of `if ... else /* nothing */' for if macros.
5933         Reported by Jim Meyering.
5935         * builtin.c (m4_regexp): Reorganize the code for avoiding a
5936         warning from gcc about `repl' possibly used before defined.
5937         Reported by Jim Meyering.
5939         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
5940         Reported by Jim Meyering.
5942 1994-01-25  François Pinard  <pinard@iro.umontreal.ca>
5944         * m4.h: Move the conditional definition of volatile after the
5945         inclusion of system files, because they may define it first.
5947 1994-01-04  François Pinard  <pinard@iro.umontreal.ca>
5949         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
5950         get around a problem with Alpha make seeing a syntax error, there.
5951         Reported by Vern Paxson.
5953 1994-01-03  François Pinard  <pinard@iro.umontreal.ca>
5955         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
5956         Reported by Richard Stallman.
5958 1993-12-25  François Pinard  <pinard@iro.umontreal.ca>
5960         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
5961         instead of AC_HAVE_FUNCS.
5962         Reported by Noah Friedman.
5964 1993-12-01  François Pinard  <pinard@iro.umontreal.ca>
5966         * m4.c: Initialize show_help and show_version to zero.
5968         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
5969         Use them in exit() and usage() calls.
5971 1993-11-27  François Pinard  <pinard@iro.umontreal.ca>
5973         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
5974         syserr() macro.  Delete errref, add reference_error and M4ERROR.
5975         * m4.c: Replace errref, which was returning an input reference
5976         string, with reference_error, which prints it on standard error.
5977         * builtin.c, output.c: Use errno as second parameter to error,
5978         instead of using syserr() with %s.
5979         * *.c: Use M4ERROR instead of error: no more errref() with %s.
5980         Doing so, the program name appears after the input reference
5981         instead of before, which eases M-x next-error processing.
5983 1993-11-24  François Pinard  <pinard@iro.umontreal.ca>
5985         * checks/get-them: Escape braces with backslashes in patterns,
5986         because HPUX-9.01 awk needs this.
5987         Reported by Jim Meyering.
5989 1993-11-22  François Pinard  <pinard@iro.umontreal.ca>
5991         * builtin.c: Declare "FILE *popen ();".
5993         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
5994         macros, replace error_message_prefix() declaration by errref()'s.
5995         Declare xrealloc, for use in errref().
5996         * m4.c: Delete error_message_prefix() function, add errref().
5997         * *.c: Use error() systematically in place of all error macros,
5998         now that error() flushes stdout first.  Make needed adjustments.
6000         * m4.h: Remove const in sys_errlist[] declaration, it creates
6001         conflicts on SGI and Alpha.
6002         Reported by Kaveh R. Ghazi.
6004 1993-11-20  François Pinard  <pinard@iro.umontreal.ca>
6006         * m4.c: Include <getopt.h> instead of "getopt.h".
6008         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
6009         * acconfig.h: New, for documenting HAVE_EFGCVT.
6010         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
6011         use them wherever appropriate.  Also use -I. for compilations.
6012         * lib/Makefile.in: Use -I.. for compilations.
6013         * *.c: Include <config.h> or "config.h".
6015         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
6016         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
6018 1993-11-17  François Pinard  <pinard@iro.umontreal.ca>
6020         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
6022         * input.c (input_init): Initialize quote and comment strings
6023         explicitely instead of calling set_quotes and set_comment: by
6024         doing so, we ensure we do not free uninitialized variables.
6026         * checks/check-them: Reverse arguments to both diff, so the
6027         expected is on the left and the obtained on the right.
6029         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
6030         macros. Delete declarations for m4error, warning, fatal and
6031         internal_error, add declaration for error_message_prefix.
6032         * m4.c:  Delete m4error, warning, fatal and internal_error
6033         routines, add error_message_prefix routine.
6034         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
6035         warning with WARNING*, fatal with FATAL* and internal_error with
6036         INTERNAL_ERROR*.
6037         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
6038         this is not needed anymore.
6040         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
6041         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
6042         and debug_message, add declaration for debug_message_prefix.
6043         * debug.c: Remove static specifier for FILE *debug declaration.
6044         Delete debug_print and debug_message routines, add
6045         debug_message_prefix routine.
6046         * builtin.c, debug.c: Replace debug_print routine calls with
6047         DEBUG_PRINT* macro calls.
6048         * input.c, path.c: Replace debug_message routine calls with
6049         DEBUG_MESSAGE* macro calls.
6051         * m4.h: Remove inclusion of <varargs.h>.
6052         * debug.c: Include <stdarg.h> or <varargs.h>.
6053         (trace_format): Use stdarg instead of varargs if __STDC__.
6055         * configure.in: Remove checks for vfprintf and _doprnt.  These
6056         implementations use varargs tricks which are not portable enough.
6057         * lib/vfprintf.c: Deleted.
6058         * lib/_doprnt.c: Deleted.
6059         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
6060         Reported by Joel Sherrill.
6062         * path.c (add_include_directory): Use xstrdup.
6064         * builtin.c (find_builtin_by_name): Declare static.
6066         * *.[ch]: Add const to a few "char *" declarations.
6068         * configure.in: Remove commented tests for fileno() and fstat().
6069         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
6071         * debug.c (debug_flush_files): New.
6072         * m4.h: Declares it.
6073         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
6074         Reported by Nicolas Pioch.
6076 1993-11-12  François Pinard  <pinard@iro.umontreal.ca>
6078         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
6079         Reported by Joel Sherrill.
6081         * builtin.c (prefix_all_builtins): Instead of the table size, use
6082         the null entry at end for stopping the loop.  It was overwritten.
6083         Reported by Andreas Schwab and Jim Meyering.
6085         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
6086         Reported by Kaveh R. Ghazi.
6088         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
6089         Reported by Karl Vogel.
6091 1993-11-09  François Pinard  <pinard@iro.umontreal.ca>
6093         * m4.h: Do not define volatile if already defined.
6094         Reported by René Seindal.
6096         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
6098         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
6099         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
6101 1993-11-08  François Pinard  <pinard@iro.umontreal.ca>
6103         * m4.h: Define strchr and strrchr in terms of index and rindex,
6104         instead of the other way around.
6105         * builtin.c, m4.c, path.c: Use strchr instead of index.
6107         * input.c (next_char): Remove a "break;" after a "return ...;".
6108         Reported by Tom McConnell.
6110 1993-11-08  François Pinard  <pinard@iro.umontreal.ca>
6112         * Release 1.1
6114         * configure.in: Do not copy check files in the build hierarchy.
6115         * checks/check-them: Identify the m4 version being checked.  For
6116         finding m4, look in $PATH instead of in the parent directory.
6117         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
6118         * checks/Makefile.in (.all-stamp): Always create check files in
6119         the source hierarchy, not anymore in the build hierarchy.
6120         (check): cd to the source hierarchy before performing checks.
6121         Do not copy nor clean COPYING anymore, take it from `..'.
6122         Reported by Tom McConnell.
6124         * Makefile.in (Makefile): Use $(SHELL).
6125         (config.status): Use $(SHELL).  Use "config.status --recheck"
6126         instead of "configure --no-create", which is obsolete.
6127         Reported by Tom McConnell.
6129 1993-11-05  François Pinard  <pinard@iro.umontreal.ca>
6131         * m4.c (usage): Use "%s" instead of "m4" in format string.
6132         Reported by Jim Meyering.
6134         * Makefile.in: Distribute mkinstalldirs.
6135         Reported by Pierre Gaumond.
6136         Reported by Jim Meyering.
6137         Reported by Tom McConnell.
6138         Reported by Andreas Gustafsson.
6140         * checks/check-them: Renamed from checks/check_them.
6141         * checks/get-them: Renamed from checks/get_them.
6142         * checks/.all-stamp: Renamed from checks/.all_stamp.
6143         * checks/Makefile.in: Changed accordingly.
6144         Reported by Jim Meyering.
6146 1993-11-04  François Pinard  <pinard@iro.umontreal.ca>
6148         * lib/Makefile.in (dist): Correct permissions on files.
6150         * output.c: Declare tmpfile, some systems don't.
6152 1993-11-03  François Pinard  <pinard@iro.umontreal.ca>
6154         * checks/Makefile.in (dist): Correct permissions on files.
6156         * Makefile.in (dist): Ensure recursive linking for subdirectory
6157         `examples', also set read/write permissions on all its files.
6159         * mkinstalldirs: New, from elsewhere.
6160         * Makefile.in: Use it.
6162         * debug.c: Synchronize debug messages and regular output when
6163         the debug file and stdout are redirected to the same file.
6164         * configure.in: Add (commented) checks for fileno and fstat.
6165         Reported by Jim Avera.
6167         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
6168         etc., arguments, then ignore the superfluous one.  m4 used to
6169         diagnose missing arguments and return the empty string.
6170         Reported by Nick S. Kanakakorn.
6172 1993-11-02  François Pinard  <pinard@iro.umontreal.ca>
6174         * m4.c (main): At end of all input, ensure all undiverted text
6175         goes to the main output stream.
6176         Reported by Andreas Gustafsson.
6178         * m4.c (main): exit (0), instead of return 0.
6180         * m4.c: Implement -P and --prefix-builtins.
6181         * builtin.c: Delete const specifier on builtin_tab.
6182         (prefix_all_builtins): New.
6183         Reported by Noah Friedman.
6184         Reported by Scott Bartram.
6186         * c-boxes.el: New, from elsewhere.
6187         * Makefile.in: Distribute it.
6189         * m4.h: Do not define bcopy if <string.h> defines it.
6190         Reported by Stephen Perkins.
6192         * builtin.c (define_macro): Allow a missing second argument, in
6193         which case it is implied empty.  Affects define and pushdef.
6194         Reported by Eric Allman.
6196 1993-11-01  François Pinard  <pinard@iro.umontreal.ca>
6198         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
6199         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
6200         * builtin.c: Initialize all the blindness fields in builtin_tab.
6201         (define_builtin): Copy the blindness of a builtin into its symbol.
6202         * macro.c (expand_token): Avoid processing a blind builtin if the
6203         next character is not an opening parenthesis.
6204         Reported by David MacKenzie.
6205         Reported by Noah Friedman.
6207         * configure.in: Ensure an exit status of 0 on completion.
6208         Reported by Vivek P. Singhal.
6210         * eval.c (eval_lex): Admit both lower and upper case letters for
6211         bases greater than 10.  Only lower case letters were accepted.
6213         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
6214         Reported by Krste Asanovic.
6216         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
6217         * eval.c (logical_not_term): New name for not_term.
6218         * eval.c (xor_term): New, between or_term and and_term.
6219         * eval.c (not_term): New, between and_term and logical_not_term.
6220         * eval.c (shift_term): New, between cmp_term and add_term.
6221         Reported by Krste Asanovic: ~, ^, <<, >>.
6222         Reported by Ben A. Mesander: ** vs ^.
6224         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
6225         * m4.h: Delete xrealloc.c.
6226         * lib/xmalloc.c: New, from elsewhere.
6227         * lib/xstrdup.c: New, from elsewhere.
6228         * lib/Makefile.in: Distribute and compile them.
6230         * m4.c: Change progname to program_name.
6231         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
6232         * lib/error.c: New, from elsewhere.
6233         * lib/Makefile.in: Distribute and compile error.c.
6234         * configure.in: Check AC_VPRINTF and for strerror.
6235         * m4.c: Delete cmd_error.  Use error instead.
6236         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
6238         * m4.h: Delete #define const, let Autoconf takes care of this.
6240         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
6241         Merge parse_args into main.  Declare argv to be `char *const *',
6242         then remove superfluous casts.
6244         * m4.c: Rename --no-gnu-extensions to --traditional.
6245         Reported by Ben A. Mesander.
6247         * m4.c (usage): Add a status parameter.  Supply one in various
6248         calls.  Add --help processing.  Remove -V for --version.
6250         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
6252         * lib/Makefile.in: Have an AR=ar declaration.
6253         Reported by Eric Backus.
6254         Reported by Bjorn R. Bjornsson.
6255         Reported by Tom Tromey.
6256         Reported by Kristine Lund.
6257         Reported by Marion Hakanson.
6259 1993-10-30  François Pinard  <pinard@iro.umontreal.ca>
6261         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
6262         Reported by Noah Friedman.
6264 1993-10-25  François Pinard  <pinard@iro.umontreal.ca>
6266         * Makefile.in: Remove MDEFINES and cleanup.
6268 1993-06-09  François Pinard  <pinard@iro.umontreal.ca>
6270         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
6271         Create a gzip file.
6273 1993-02-06  François Pinard  <pinard@iro.umontreal.ca>
6275         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
6276         ensure 777 mode for directories, so older tar's will restore file
6277         modes properly.
6279 1993-01-17  François Pinard  <pinard@iro.umontreal.ca>
6281         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
6282         so the installer can override automatically configured choices.
6283         Reported by Karl Berry.
6285 1993-01-15  François Pinard  <pinard@iro.umontreal.ca>
6287         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
6288         previous version was not working properly on m68k-hp-bsd4.3.
6289         Reported by Roland McGrath.
6291         * lib/_doprnt.c: Stolen from Oleo distribution.
6292         * configure.in: Check for _doprnt.c if vfprintf.c selected.
6293         * lib/Makefile.in: Distribute _doprnt.c.
6294         Do not distribute regex.[ch].old anymore.
6296 1993-01-01  François Pinard  <pinard@iro.umontreal.ca>
6298         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
6299         Richard wants it there.
6301 1992-12-27  François Pinard  <pinard@iro.umontreal.ca>
6303         * Makefile.in: Add DEFS to MDEFINES.
6304         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
6305         (libm4.a): Remove the library before creating it.
6306         (distclean): Remove tags and TAGS too.
6308 1992-12-23  François Pinard  <pinard@iro.umontreal.ca>
6310         * Makefile.in (dvi, m4.dvi): New goals.
6312         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
6313         macro.c, output.c, path.c, symtab.c: Change Copyright from
6314         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
6316         * examples/divert.m4: Deleted, this bug has been corrected.
6318         * Makefile.in (texclean, mostlyclean): New goals.
6320         * Makefile.in (clean): Remove clutter from ansi2knr.
6321         Reported by Pierre Gaumond.
6323 1992-12-20  François Pinard  <pinard@iro.umontreal.ca>
6325         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
6326         might well use CFLAGS is s/he needs it.
6328         * Makefile.in: Allow installation of info files from a separate
6329         build directory.
6330         Reported by Jason Merrill.
6331         Reported by David MacKenzie.
6332         Reported by Skip Montanaro.
6333         Reported by Erez Zadok.
6334         Reported by Assar Westerlund.
6336 1992-12-19  François Pinard  <pinard@iro.umontreal.ca>
6338         * Release 1.0.3
6339         This is still a beta release for the future GNU m4 version 1.1.
6341         * lib/alloca.c: New, from elsewhere.
6342         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
6344         * m4.h: Do not define index/rindex if already defined.  If
6345         FALSE/TRUE are already defined, do not redefine them, but merely
6346         define boolean typedef to int.
6348         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
6349         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
6350         because some C compilers do not like connectives with #ifdef.
6351         * m4.h: Define `volatile' only if __GNUC__, instead of once for
6352         __GNUC__ and once for __STDC__.
6353         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
6355         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
6356         Makefile dependencies.  Without it, make keeps destroying and
6357         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
6359         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
6360         to diversion/DIVERSION, this was a spelling error.
6362         * m4.c: Declare version[], remove #include "version.h".
6363         * version.h: Deleted.
6364         * Makefile.in: Remove references to version.h.
6366         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
6367         production, by using a simpler and more robust algorithm.  This
6368         solves the problem of synclines sometimes written in the middle of
6369         an output line.  Delete sync_line() and output_lines variable.
6370         * m4.h: Remove sync_line prototype and output_lines declaration.
6371         * input.c (next_char), output.c (shipout_text): Remove references
6372         to output_lines.
6373         * input.c (push_file, pop_file): Merely put the value -1 in
6374         output_current_line instead of calling sync_line, for delaying a
6375         single `#line NUM FILE' before next output line.  Do not test
6376         for sync_output, because this is unnecessary clutter.
6377         * output.c (make_divertion, insert_divertion): Idem.
6378         * input.c: Rename must_advance_line to start_of_input_line, for
6379         consistency.
6381         * debug.c (trace_header): Select a new debug line format, which
6382         better complies with GNU standards for formatting error messages.
6383         With option `-dfl', M-x next-error might be used on the output.
6384         * m4.c (vmesg): Adjust format of error output to GNU standards.
6385         * m4.texinfo: Adjust examples for `make check' to work.
6387         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
6388         case for enum debug_info constants, which were all lower case.
6390         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
6391         re_search_2.
6392         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
6393         collected patches.  I tried a few times using newer regex.[ch], it
6394         mysteriously stopped aborting with this one.  Insecure feeling...
6395         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
6397 1992-12-18  François Pinard  <pinard@iro.umontreal.ca>
6399         * m4.c: Change `--no-warnings' to `--silent'.
6400         Reported by David MacKenzie.
6402         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
6403         leave it off for now.  See comment in m4.c for justification.
6404         Reported by David MacKenzie.
6406         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
6407         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
6409         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
6411         * Makefile.in: Ensure recursive cleaning is done before local
6412         cleaning for all clean goals.
6414         * builtin.c (ntoa): Ensure the value is always interpreted as a
6415         signed quantity, whatever the radix is.
6417 1992-11-18  Jim Meyering  <meyering@idefix>
6419         * builtin.c, format.c, input.c: Split long lines.
6420         * m4.c: Use typedef macro_definition instead of struct
6421         macro_definition.
6422         * symtab.c: Use typedef symbol instead of struct symbol.
6424 1992-11-17  François Pinard  <pinard@iro.umontreal.ca>
6426         * *.[ch]: Remove all trailing whitespace, in code and comments.
6428         * configure.in: Find some awk.
6429         * Makefile.in: Add $(AWK) to MDEFINES.
6430         * checks/Makefile.in: Transmit $(AWK) to get_them.
6431         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
6432         awk script when switching files, because without this, mawk runs
6433         out of file descriptors.
6435 1992-11-16  François Pinard  <pinard@iro.umontreal.ca>
6437         * Makefile.in (realclean): Delete m4.info*.
6438         Reported by Jim Meyering.
6440         * Makefile.in: Adjust and link with checks/Makefile.
6441         * checks/Makefile.in: New.
6442         * configure.in: Output checks/Makefile.
6444         * checks/get_them: Have the dnl header of each test more
6445         recognizable by next-error, also use a better message.
6447 1992-11-16  Jim Meyering  <meyering@idefix>
6449         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
6450         And use that only if __GNUC__ since we're using it's GCC-specific
6451         semantics that tell the compiler the associated function doesn't
6452         return.
6454         * builtin.c (substitute): Don't use character as an array index.
6455         (dumpdef_cmp): Make formal arguments `const void *' to avoid
6456         warnings with gcc -W -Wall on systems with qsort prototype.
6457         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
6458         from gcc -W -Wall.
6460         * eval.c (most functions): Add parentheses to assignments used
6461         as truth values go avoid warnings from gcc -Wall.
6463         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
6464         any functions that don't need external scope.
6466         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
6467         (many functions and arrays): Declare `const'.
6469 1992-11-15  François Pinard  <pinard@iro.umontreal.ca>
6471         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
6472         removing the declaration from m4.h.  Also rename false to FALSE
6473         and true to TRUE.
6475         * lib/Makefile.in (Makefile): New goal.
6477         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
6478         so heavily loaded.  It gets more easily overridable, calling make.
6479         Reported by Jim Meyering.
6481         * Makefile.in (dist): Get .fname from the current directory name,
6482         instead of from version.h.  I need updating many files manually,
6483         when the version changes, version.h is just one of them.
6485 1992-11-14  François Pinard  <pinard@iro.umontreal.ca>
6487         * m4.h: Remove the tag `boolean' on the enum introducing typedef
6488         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
6489         Reported by Tom McConnell.
6491 1992-11-13  François Pinard  <pinard@iro.umontreal.ca>
6493         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
6494         39.cleardiv, which were describing missing or spurious newlines.
6495         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
6496         do not depend on machine word size, `/bin/false' implementation,
6497         or `wc' output format.  `make check' is more dependable, now.
6499         * checks/check_them: Summarize the failed tests by listing their
6500         name, at end.  If none, issue `All checks successful'.  Output
6501         `Checking' instead of `Input file:'.
6503         * checks/get_them, checks/check_them: Reindented.
6505         * Makefile.in (dist): chmod a+r before making the tar file.
6507 1992-11-12  François Pinard  <pinard@iro.umontreal.ca>
6509         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
6511         * input.c (next_token): Reinitialize token_buttom just after using
6512         it as a watermark with obstack_free.  Or else, a future token, big
6513         enough for triggering reallocation of the obstack chunk, could
6514         void the initialized value of token_buttom, later causing panic in
6515         obstack_free.  Rename token_buttom to token_bottom everywhere.
6517         * m4.h: Before declaring errno, first include <errno.h> and
6518         ensure that it does not define errno.
6519         Reported by Richard Stallman.
6521 1992-11-11  François Pinard  <pinard@iro.umontreal.ca>
6523         * builtin.c: Define and use DECLARE macro for builtins.
6525         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
6526         argument, this is a common idiom for introducing long comments.
6528         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
6529         arguments.  The last argument was silently ignored.
6531         * m4.c (cmd_error): Add a missing semicolon before va_end().
6533 1992-11-10  François Pinard  <pinard@iro.umontreal.ca>
6535         * Makefile.in: Now handle protoized sources.  Define and use U.
6536         Compile and use ansi2knr with old compilers.  Update DISTFILES.
6537         Add `aclocal.m4' to `configure' dependencies.
6538         * ansi2knr.c: New, from Ghostscript distribution.
6539         * configure.in: Define U through FP_PROTOTYPES for old compilers.
6540         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
6541         * aclocal.m4: New, provide FP_PROTOTYPES.
6542         * m4.h: Conditionnaly protoized through Args, save for varags.
6543         * builtin.c: Protoized.  Then:
6544         Include <sys/types.h> if size_t is not defined, before "regex.h".
6545         (m4_ifelse): Fetch built-in name properly for diagnostic.
6546         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
6547         (m4_regexp): Add const to `msg' declaration.
6548         (m4_patsubst): Add const to `msg' declaration.
6549         * debug.c: Protoized, save for varargs.
6550         * eval.c: Protoized.
6551         * format.c: Protoized.
6552         * input.c: Protoized.
6553         * m4.c: Protoized, save for varargs.  Then:
6554         (xfree): Accept void * instead of char *.
6555         (xmalloc): Return void * instead of char *.
6556         (xrealloc): Accept and return void * instead of char *.
6557         * macro.c: Protoized.
6558         * output.c: Protoized.
6559         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
6560         * symtab.c: Protoized.
6562 1992-11-06  François Pinard  <pinard@iro.umontreal.ca>
6564         * m4.texinfo: Remove directory from diagnostics in 30.include,
6565         51.eval, 56.errprint and 57.m4exit tests.
6567         * m4.h: Remove declarations for int or void system functions, they
6568         cause more conflicting trouble than they make good.
6570         * configure.in: Avoid configuration header file.  Add some tests.
6571         * m4.h: Remove #include "config.h".
6572         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
6573         Then, rewritten for better compliance with GNU standards.
6575 1992-11-05  François Pinard  <pinard@iro.umontreal.ca>
6577         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
6578         because of a misplaced #endif.
6580         * Many *.[hc] files: Correct intra-line spacing here and there,
6581         according to GNU indent 1.6 advice.
6583         * configure.in: New, using Autoconf 1.2.
6584         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
6585         * Delete old configure.in, configure, etc/configure.in,
6586         etc/configure, lib/configure.in, lib/configure and config/*.
6587         Reported by Jason Merrill.
6589         * symtab.c (hash): Change (char) NULL to '\0'.
6590         Reported by Jason Merrill.
6592         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
6593         etc/nextvers.sh.  Release numbers will be edited `by hand'.
6594         * version.h: De-automatize, force value in.
6596         * m4.c: Changes in order to use a newer getopt.h.
6597         Reported by David MacKenzie.
6599         * checks/: New name for examples/.
6600         * checks/get_them: New location for etc/get_examples.
6601         * checks/check_them: New location for etc/check_examples.
6602         * Makefile.in, checks/get_them, checks/check_them: Adjust.
6603         * lib/vfprintf.c: New location for etc/vfprintf.c.
6604         * Delete empty etc/.
6605         * examples/: New name for test/.
6607 1992-03-10  François Pinard  <pinard@iro.umontreal.ca>
6609         * Makefile.in (check): Add m4 as dependency.
6611         * m4.c: Accept --no-warnings instead of --no_warnings, and
6612         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
6613         usage message more informative.
6614         Reported by David MacKenzie.
6616 1992-03-09  François Pinard  <pinard@iro.umontreal.ca>
6618         * etc/check_examples: New name for check_examples.sh.
6619         * etc/get_examples: New name for get_examples.sh.
6620         * Makefile.in, etc/Makefile.in: Use new names.
6622         * Makefile.in: Transmit $(CC) while making in lib.
6624         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
6625         code disposition by hand.
6627 1992-03-08  François Pinard  <pinard@iro.umontreal.ca>
6629         * m4.h: Delete definitions for abort() and exit().
6630         Reported by Richard Stallman.
6632         * config/hmake-unicos, config/s-unicos.h: New files.
6633         Reported by Hal Peterson.
6635         * eval.c (exp_term): Have N^0 return 1.
6636         Reported by Michael Fetterman.
6638         * eval.c, input.c, m4.h: Remove last comma in enums.
6639         Reported by Mike Lijewski.
6641         * Transfer of maintenance duties from René to François.
6643 1991-10-24  René Seindal <seindal@diku.dk>
6645         * Release 1.0.  Many thanks to those, who provided me with bug
6646         reports and feedback.
6648         * Uses GNU configure, taken from the gdb distribution.
6650         * Uses GNU getopt(), with long option names.
6652         * The -Q/+quiet option is added, which suppresses warnings about
6653         missing or superflous arguments to built-in macros.
6655         * Added default options via the M4OPTS environment variable.
6657         * The built-in format can now be configured to use sprintf as
6658         the formatting engine, for systems without [efg]cvt(3).
6660         * GNU library code is moved to the ./lib subdirectory; other
6661         utility files are now in ./etc.
6663         * Several minor bugs have been fixed.
6665 1991-07-26  René Seindal <seindal@diku.dk>
6667         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
6668         Francois Pinard and Roland H. Pesch for providing me with reports.
6670         * The builtins incr and decr are now implemented without use of
6671         eval.
6673         * The builtin indir is added, to allow for indirect macro calls
6674         (allows use of "illegal" macro names).
6676         * The debugging and tracing facilities has been enhanced
6677         considerably.  See the manual for details.
6679         * The -tMACRO option is added, marks MACRO for tracing as soon
6680         as it is defined.
6682         * Builtins are traced after renaming iff they were before.
6684         * Named files can now be undiverted.
6686         * The -Nnum option can be used to increase the number of
6687         divertions available.
6689         * Calling changecom without arguments now disables all comment
6690         handling.
6692         * The function m4_patsubst() is now consistently declared
6693         static.
6695         * A bug in dnl is fixed.
6697         * A bug in the multi-character quoting code is fixed.
6699         * Several typos in the manual has been corrected.  More probably
6700         persist.
6702         * The m4.info file is now installed along with the program.
6704 1990-11-15  René Seindal <seindal@diku.dk>
6706         * Updated and enhanced version.  Release 0.75, manual 0.07.
6708         * Implemented search path for include files (-I option and
6709         M4PATH envronment variable).
6711         * Implemented builtin "format" for printf-like formatting.
6713         * Implemented builtin "regexp" for searching for regular
6714         expressions.
6716         * Implemented builtin "patsubst" for substitution with regular
6717         expressions.
6719         * Implemented builtin "esyscmd", which expands to a shell
6720         commands output.
6722         * Implemented "__file__" and "__line__" for use in error
6723         messages.
6725         * Implemented character ranges in "translit".
6727         * Implemented control over debugging output.
6729         * Implemented multi-character quotes.
6731         * Implemented multi-character comment delimiters.
6733         * Changed predefined macro "gnu" to "__gnu__".
6735         * Changed predefined macro "unix" to "__unix__", when the -G
6736         option is not used.  With -G, "unix" is still defined.
6738         * Changed "shift", "$@" and "$*" to not insert spaces afters
6739         commas.
6741         * Added program name to error messages.
6743         * Fixed two missing null bytes bugs.
6745 1990-01-22  René Seindal <seindal@diku.dk>
6747         * Initial beta release.  Release 0.50, manual 0.05.
6750         $Revision$ $Date$