* bootstrap (func_update_po): Update pofiles directly from the
[m4/ericb.git] / ChangeLog
blob8943191012937ff5fb08a63f405f89f2b88ab716
1 2005-10-20  Gary V. Vaughan  <gary@gnu.org>
3         * bootstrap (func_update_po): Update pofiles directly from the
4         translation project.
5         * po/LINGUAS, po/cs.po, po/de.po, po/el.po, po/fr.po, po/it.po,
6         po/ja.po, po/nl.po, po/pl.po, po/ru.po, po/sv.po: No need to store
7         these files under source control anymore.
8         Suggested by Eric Blake <ebb9@byu.net>
10 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12         * ltdl/m4/m4-gnulib.m4: Update FSF contact address.  Somehow this
13         file escaped the address updates on 2005-05-01.
15 2005-07-07  Gary V. Vaughan  <gary@gnu.org>
17         * bootstrap: Allow user overriding of gnulib-tool location, and
18         correctly determine module source directories whether gnulib-tool
19         is given as a relative or absolute path, or is found by searching
20         PATH.
21         Reported by Eric Blake <ebb9@byu.net>
23 2005-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
25         * ltdl/m4/debug.m4 (m4_CHECK_DEBUGGING): Make sure that both $rm
26         and $RM are defined for various versions of
27         AC_LIBTOOL_COMPILER_OPTION.
29         * bootstrap (AUTORECONF): New variable to allow user overriding of
30         autoreconf path.
32 2005-07-07  Gary V. Vaughan  <gary@gnu.org>
34         * doc/m4.texinfo (History): Add better notes on the ancestory of
35         GNU m4, and other historical interest.
37 2005-05-08  Gary V. Vaughan  <gary@gnu.org>
39         * m4/symtab.c (m4_symbol_rename): New function that performs a low
40         level symbol rename.
41         * m4/m4module.h (m4_symbol_rename): Declare it as part of the API.
42         * modules/gnu.c (regsub): Factored out of m4_epatsubst_do...
43         (m4_patsubst_do, m4_renamesyms_do): ...wrappers that use
44         regsub...
45         (erenamesyms, renamesyms): ...builtins that use these to implement
46         macro renaming by regular expression.
47         * doc/m4.texinfo (Erenamesyms and Renamesyms): Document them.
48         * tests/generate.awk: Allow some forbidden `m4_' prefixed symbols
49         to stop the new generated tests from choking.
51 2005-05-07  Gary V. Vaughan  <gary@gnu.org>
53         Since most of the build is handled from a single Makefile.am now,
54         we can teach make about the dependencies between the m4 binary and
55         the preopened modules it is built against:
57         * configure.ac (PREOPEN_DEPENDENCIES): Substitute for a list of
58         preopened modules.
59         * Makefile.am (src_m4_DEPENDENCIES): Rebuild the m4 program if any
60         of the preopened modules have changed.
62 2005-05-07  Gary V. Vaughan  <gary@gnu.org>
64         * configure.ac (gl_MODULES): Add mkstemp for machines that don't
65         have a native implementation.
67 2005-05-06  Gary V. Vaughan  <gary@gnu.org>
69         * src/m4.h (EXIT_SUCCESS, EXIT_FAILURE): Removed.  These are
70         handled already by gnu/exit.h.
72         * configure.ac (gl_MODULES): Add assert to support a
73         --disable-assert configure time option for NDEBUG setting.
75         * Makefile.am (src_m4_SOURCES): Add version-etc-fsf.c.
76         * bootstrap (src_modules): Add version-etc-fsf.
77         * src/main.c (version_etc_copyright): Removed.
79         * ltdl/m4/m4-getopt.m4 (m4_GETOPT): Synch with gnulib/getopt.m4.
81 2005-05-04  Gary V. Vaughan  <gary@gnu.org>
83         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
84         recognition macros.
85         * src/freeze.c (produce_frozen_state): Use \n line-endings even
86         on Windows, so that the frozen file reader will work.
87         Reported by Josef T. Burger <bolo@bolo.com>
89 2005-05-04  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
91         Forward port of a patch that allowed m4-1.4.2 to compile on
92         QNX 6.3:
94         * configure.ac (AC_CHECK_HEADERS):  Add signal.h,
95         sys/signal.h.
96         * src/m4.h: And include them as appropriate.
97         * src/main.c, src/stackovf.h: Don't include signal.h literally;
98         m4.h will include the correct file.
100 2005-05-04  Gary V. Vaughan  <gary@gnu.org>
102         * m4/m4private.h: Make errno visible for the sources patched
103         below.
105 2005-05-04  Paul Eggert  <eggert@twinsun.com>
107         * src/main.c (print_program_name_CB): Preserve errno, since
108         M4ERROR relies on this.
109         * modules/gnu.c (m4_esyscmd): Clear errno before calling popen.
110         * modules/m4.c (m4_maketemp): Clear errno before calling mkstemp.
111         * m4/path.c (m4_path_search): Don't let "free" trash errno when
112         returning NULL.
114         * m4/output.c (m4_insert_file): Don't assume errno has a valid
115         value simply because fread returns zero.  This fixes a
116         portability bug reported by Marion Hakanson in
117         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
119 2005-05-04  Santiago Vila  <sanvila@debian.org>
121         * tests/stackovf.test: Use tempfile if available.
123 2005-05-04  Robert Bihlmeyer  <robbe@orcus.priv.at>  (tiny change)
125         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
126         * m4/output.c (m4_insert_file): Do not mix buffered and
127         unbuffered I/O, as this breaks on the Hurd.
129 2005-05-04  Gary V. Vaughan  <gary@gnu.org>
131         Gnulib has changed again.  Reimport.  Adjust.  Rinse.  Repeat.
132         Automake and Libtool now agree on subdir-objects and LTLIBOBJS,
133         and libtoolize does a better job of ltdl importing now too, so
134         take advantage of that while updating the tree:
136         * acm4, config: Moved from here...
137         * ltdl/m4, ltdl/config: ...to here.
138         * doc/Makefile.am, m4/Makefile.am, modules/Makefile.am,
139         src/Makefile.am, tests/Makefile.am: Removed...
140         * Makefile.am: ...and migrated to here, with adjustments to
141         compensate for relative path differences.
142         * commit: Adjust relative paths.
143         * configure.ac: Adjust relative paths.
144         (AC_PREREQ): 2.59 isn't strictly new enough, we also need a
145         patch.
146         (LT_PREREQ): 2.0 isn't released yet, but will work when it is!  In
147         the meanwhile, CVS HEAD libtool is needed.
148         (AM_INIT_AUTOMAKE): Added subdir-objects declaration. 1.9.5 isn't
149         stricly new enough, we also need a patch.
150         (AM_PROG_CC_C_O): Required for subdir-objects in Automake.
151         (AC_WITH_LTDL): Replaced with LT_WITH_LTDL.
152         (gl_MODULES): Don't list getopt and version-etc, as they don't
153         belong in libm4.
154         * bootstrap: After running gnulib-tool to import the listed
155         modules, fetch getopt and version-etc into src manually.
156         (ltdldir): Change to ltdl.
157         * src/main.c: Adjust for changes in version-etc API.
158         * ltdl/m4/m4-getopt.m4: New macro to mirror gnulib's getopt.m4,
159         but works when the getopt module isn't to be included in the lib.
160         * README: Add note about patching autoconf and automake to
161         bootstrap CVS m4.
163 2005-05-02  Matt Kraai  <kraai@debian.org>  (tiny change)
165         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
166         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
167         empty file rather than to a nonexistent file.  This closes a
168         common security hole.
169         * modules/m4.c (m4_maketemp): Implement the above, by using
170         mkstemp rather than mktemp.
172 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
174         The FSF are moving offices today.  Changed their contact address
175         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
176         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
178 2005-03-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
180         * tests/Makefile (clean-local): Ignore testsuite cleanup
181         failures.
183 2005-03-11  Per Bothner  <per@bothner.com>  (tiny change)
185         * tests/Makefile (clean-local): Only run the testsuite cleanup
186         if the testsuite has been generated.
188 2005-02-11  Stepan Kasal  <kasal@ucw.cz>
190         * TODO: slight clarification of the example of qindir usage.
192 2005-02-08  Gary V. Vaughan  <gary@gnu.org>
194         * TODO: Add qindir requirement, and defn bug.
195         From Stepan Kasal  <kasal@ucw.cz>
197 2005-02-08  Stepan Kasal  <kasal@ucw.cz>
199         * TODO: Add ``execution stack'', fix a typo.
200         * doc/m4.texinfo: Typos.
202 2004-12-24  Eric Blake  <ebb9@byu.net>
204         * configure.ac (INCLUDE_STDBOOL_H): Account for gnulib's move
205         to the gnu subdirectory.
206         * acm4/m4-error.m4 (INCLUDE_ERROR_H): Likewise.
207         * acm4/m4-obstack.m4 (INCLUDE_OBSTACK_H): Likewise.
208         * acm4/m4-regex.m4 (INCLUDE_REGEX_H): Likewise.
209         * m4/system_.h: Likewise, in non-configured includes.
211 2004-10-14  Noah Misch  <noah@cs.caltech.edu>,
212             Gary V. Vaughan  <gary@gnu.org>
214         * m4/m4.c (m4_context_field_table, m4_context_opt_bit_table):
215         Protect definitions from macro expansion under -DNDEBUG by
216         parenthesising the expanded function names.
217         * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
218         (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
219         (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
220         (m4_is_syntax_macro_escaped): Similarly protect function
221         definitions from macro expansion under -DNDEBUG by #undefing the
222         matching macro names before each definition.  Also, move all the
223         function definitions to the end of the file so that any
224         invocations in the rest of the file pick up the fast macro
225         versions.
226         * m4/m4private.h (m4_set_symbol_table, m4_set_syntax_table)
227         (m4_set_debug_file, m4_set_trace_messages)
228         (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
229         (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
230         (m4_set_max_debug_arg_length_opt): New fast macro versions of the
231         option setter functions.
233 2004-09-23  Gary V. Vaughan  <gary@gnu.org>
235         * src/main.c: Include gnulib files from the correct directory.
237         * gnulib/*: Don't store any of the gnulib files in arch, as they
238         generate spurious changes.
239         * Makefile.am (ACLOCAL_AMFLAGS): Remove gnulib/acm4 since the
240         gnulib macros now share our macro directory.
241         (SUBDIRS): Descend into `gnu' rather than `gnulib'.
242         * bootstrap: Call gnulib-tool to import from the gnulib tree.
243         (gl_AC_HEADER_INT_TYPES_H, gl_AC_HEADER_STDINT_H,
244         gl_AC_TYPE_UINTMAX_T): Patch gnulib.m4 to define these in terms of
245         the gettext macros from autopoint that overwrite the gnulib-tool
246         imported versions.  Import sources and Makefile.am into the `gnu'
247         directory.  Changed all callers.
248         * configure.ac (gl_EARLY, gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES,
249         gl_INIT): Call these gnulib-tool macros instead of the hardcoded
250         for imported modules.
251         * acm4/m4-error.m4, acm4/m4-gettext.m4, acm4/m4-obstack.m4,
252         acm4/m4-regex.m4: Use AC_BEFORE to enforce ordering rather than
253         hardcoding the gnulib macros they wrap.
255 2004-07-15  Gary V. Vaughan  <gary@gnu.org>
257         Latest CVS libtool can preload modules in libraries, including
258         its own module loaders!  Tweak m4 so that it doesn't try to treat
259         libltdl's module loaders as m4 modules when freezing and on exit:
261         * gnulib/acm4/*.m4: Don't store these files in arch since they
262         generate spurious changes.
263         * bootstrap: Simplify initial libtoolize call, since CVS
264         libtoolize is smarter these days.
265         * doc/Makefile.am (%.1): Make the helptoman call work with a VPATH
266         build.
267         * m4/module.h (m4__module_exit): Missing declaration.
268         * m4/m4private.h (m4__module_next): New function declaration.
269         * m4/module.c (m4__module_next): lt_dlhandle_{firs,nex}t
270         encapsulation.  Changed all callers.
271         (m4__module_interface): New function to verify m4 loadable module
272         interfaces.
273         (m4__module_init): Register the interface validator.
274         (m4__module_exit): Only close my own modules.
275         * modules/m4.c (unistd.h): Provide missing declaration.
276         (m4_set_sysval, m4_sysval_flush, m4_dump_symbols)
277         (m4_expand_ranges): More missing declarations.
278         * modules/modtest.c (export_test): Ditto.
279         * src/Makefile.am (AM_CPPFLAGS): Add libltdl directory.
280         * src/main.c (main): Bump copyright year.
281         * tests/modules.at: Fix sed syntax error.
284 2004-06-17  Gary V. Vaughan  <gary@gnu.org>
286         Tweaking to enable compilation with latest CVS libtool and
287         libltdl.  We can't just dump the library files directly into the
288         m4 directory anymore now that libltdl is built from pieces itself:
290         * bootstrap: Rewritten to use latest libtoolize sanely, and to
291         set up libltdl subdirectory.
292         * configure.ac (AC_CONFIG_AUX_DIR): Point to our own, not the
293         gnulib subdirectory's config.
294         (TIMESTAMP): Use $ac_aux_dir for VPATH builds.
295         (m4_pattern_forbid): Remove the cruft to deal with renamed jm_
296         macros from gnulib.
297         (AC_LIB_LTDL): Latest libltdl is a sub-project with its own
298         configure.ac, so use AC_WITH_LTDL instead.
299         * Makefile.am (SUBDIRS): Add libltdl.
300         * acm4/m4-regex.m4 (jm_INCLUDED_REGEX): Updated.  gnulib now uses
301         gl_INCLUDED_REGEX.
302         * m4/Makefile.am (AM_CPPFLAGS): Add INCLTDL.
303         (libm4_la_SOURCES): Remove ltdl.c and ltdl.h.
304         (libm4_la_LIBADD): Add LIBLTDL.
305         * m4/ltdl.c, m4/ltdl.h: Removed.
306         * m4/m4module.h: Include canonical ltdl.h.
307         * po/*.po: Updated.
309 2004-06-14  Gary V. Vaughan  <gary@gnu.org>
311         * gnulib/import: Now updates makefile fragments, and configure.ac.
312         * gnulib/m4/gnulib.am: New file.  Generated makefile fragments.
313         * gnulib/m4/Makefile.am: include it.
314         * gnulib/acm4/intmax.m4, gnulib/acm4/longdouble.m4,
315         gnulib/acm4/longlong.m4, gnulib/acm4/printf-posix.m4,
316         gnulib/acm4/signed.m4, gnulib/acm4/size_max.m4,
317         gnulib/acm4/wchar_t.m4, gnulib/acm4/wint_t.m4,
318         gnulib/acm4/xsize.m4: New macro files from latest gnulib import.
319         * gnulib/acm4/alloca.m4, gnulib/acm4/inttypes_h.m4,
320         gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-prefix.m4,
321         gnulib/acm4/error.m4, gnulib/acm4/po.m4, gnulib/acm4/regex.m4,
322         gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
323         gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
324         gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
325         gnulib/acm4/free.m4, gnulib/acm4/gettext.m4,
326         gnulib/acm4/glibc21.m4: Updated macro files from latest gnulib
327         import.
328         * gnulib/m4/getopt_int.h: New source file from latest gnulib
329         import.
330         * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/getopt1.c,
331         gnulib/m4/obstack.c, gnulib/m4/obstack.h, gnulib/m4/regex.c,
332         gnulib/m4/unlocked-io.h, gnulib/m4/version-etc.c,
333         gnulib/m4/xmalloc.c, gnulib/m4/getopt.c, gnulib/m4/getopt.h:
334         Updated source files from latest gnulib.
336 2004-02-29  Gary V. Vaughan  <gary@gnu.org>
338         * config/mailnotify: New file for mailing commit notifications,
339         imported from cvs-utils.
340         * commit: Updated from cvs-utils and tweaked for m4.
342 2003-12-01  Gary V. Vaughan  <gary@gnu.org>
344         * config/mkstamp: Updated from CVS libtool.
345         * configure.ac: Generate a gnu coding standards compliant version
346         number, and use it for the banner.
347         * Makefile.am (stamp-vcl): New rules to force m4 to be regenerated
348         mhen the TIMESTAMP changes in ChangeLog, but the file modification
349         time doesn't (e.g. in cvs commit).  Otherwise dist tarballs will
350         contain the previous version number.
351         * src/main.c: Make --version output conform to the GNU standard.
353         * configure.ac (AM_INIT_AUTOMAKE): Require 1.7g...
354         * modules/Makefile.am (gnu_la_SOURCES, load_la_SOURCES,
355         m4_la_SOURCES, traditional_la_SOURCES, modtest_la_SOURCES,
356         shadow_la_SOURCES, import_la_SOURCES, stdlib_la_SOURCES,
357         time_la_SOURCES): ...so that these are defaulted correctly, and
358         can be removed from this file.
359         (AM_LDFLAGS): Add -module...
360         (gnu_la_LDFLAGS, load_la_LDFLAGS, m4_la_LDFLAGS,
361         traditional_la_LDFLAGS, modtest_la_LDFLAGS, shadow_la_LDFLAGS,
362         import_la_LDFLAGS, stdlib_la_LDFLAGS, time_la_LDFLAGS): ...so that
363         the individual settings can be removed.
364         * m4/Makefile.am (libm4_la_LIBADD): Add $(LTLIBINTL) here once...
365         * module/Makefile.am (gnu_la_LIBADD, load_la_LIBADD,
366         m4_la_LIBADD, traditional_la_LIBADD, modtest_la_LIBADD,
367         shadow_la_LIBADD, import_la_LIBADD, stdlib_la_LIBADD,
368         time_la_LIBADD): ...so that these are picked up as a deplib of
369         libm4 and don't need to be set explicitly.
371 2003-11-18  Gary V. Vaughan  <gary@gnu.org>
373         * modules/Makefile.am (pkglibexec_LTLIBRARIES): Remove perl.la
374         from the standard build.  It is too fragile.
376         * gnulib/acm4/libtool.m4, m4/ltdl.c, m4/ltdl.h: Reimported from
377         CVS libtool after merging m4 changes across to libtool.
379         * m4/symtab.c (m4_symtab_create): Fix a careless use of sizeof.
380         * m4/path.c (search_path_add): Ditto.
382 2003-11-13  Gary V. Vaughan  <gary@gnu.org>
384         * configure.ac (AC_LIBTOOL_TAGS): Don't include shell code for
385         libtool tags we don't use in configure.  This reduces the size
386         of the script from over 1Mb to under 700Kb.
388 2003-11-13  Gary V. Vaughan  <gary@gnu.org>
390         The import script was not written properly, and the last gnulib
391         import was incomplete.  Fixed that problem, and reimport our
392         gnulib dependencies, which picks up the address calculation
393         overflow checks described by Paul below.  Also tweak the clients
394         of the gnulib xalloc module not to use deprecated macros:
396         * gnulib/import: Recurse through module dependencies rather than
397         naively descending only one level.
398         * configure.ac: Add calls to gnulib's strnlen and extension module
399         macros.
400         * gnulib/m4/Makefile.am: Add snippets from gnulib's strnlen and
401         extension modules.
402         * gnulib/acm4/extensions.m4, gnulib/acm4/xalloc.m4,
403         gnulib/m4/alloca.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
404         gnulib/m4/stdbool_.h, gnulib/m4/unlocked-io.h, gnulib/m4/xalloc.h,
405         gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Updated from CVS
406         gnulib.
407         * gnulib/acm4/libtool.m4: Updated from CVS libtool.
408         * m4/hash.c (m4_get_hash_iterator_next): Use `xzalloc (S)' in
409         place of `xcalloc (1, S)'.
410         * m4/m4.c (m4_create): Likewise.
411         * m4/m4private.h (m4_symbol_value_create): Likewise.
412         * m4/symtab.c (symtab_fetch): Likewise.
413         * m4/syntax.c (m4_syntax_create): Likewise.
414         * src/freeze.c (reload_frozen_state): Likewise.
415         * m4/path.c (search_path_add): Eliminate use of deprecated NEW
416         macro.
417         * m4/symtab.c (m4_symtab_create): Likewise.
419 2003-11-13  Gary V. Vaughan  <gary@gnu.org>
421         * tests/module.at: Comment typo.
423 2003-10-10  Gary V. Vaughan  <gary@gnu.org>
425         * tests/modules.at (modules: importing): Apply some lateral
426         thinking, and use AT_CHECK to compare the output of a sed pass
427         over stderr against the canonical strerror string.
429         * tests/modules.at (modules: importing): Edit the generated stderr
430         output to canonicalize strerror output, before a comparison.
432 2003-10-10  Gary V. Vaughan  <gary@gnu.org>
434         Tru64UNIX perl is sloppy with namespace pollution.  This patch is
435         careful not to trip over the mess:
437         * modules/perl.c: Some builds of perl install headers that contain
438         `#define try __builtin_try'.  Be sure to undefine that macro
439         before `m4/hash.h' gets included, which uses the `try' symbol.
440         * m4/system_.h: Similarly for `bool'.  Undefine `bool', `true' and
441         `false' before including `stdbool.h'.
442         (DELETE):  This symbol is not in m4's namespace, and is in any
443         case only used internally...
444         * m4/m4private.h (DELETE): ...so move it to here.
445         Reported by Martin MOKREJS <mmokrejs@natur.cuni.cz>
447 2003-10-08  Paul Eggert  <eggert@twinsun.com>
449         Don't use XMALLOC and XCALLOC.  Once we install the
450         corresponding patch into gnulib, this will fix some
451         address-calculation overflow bugs on hosts where calloc (A, B)
452         returns garbage when A*B overflows.
454         * m4/hash.c (m4_hash_new, node_new, m4_hash_resize,
455         maybe_grow, m4_get_hash_iterator_next): Replace XMALLOC with
456         xmalloc, XCALLOC with xcalloc.
457         * m4/m4.c (m4_create): Likewise.
458         * m4/m4private.h (m4_symbol_value_create): Likewise.
459         * m4/output.c (m4_output_init): Likewise.
460         * m4/symtab.c (symtab_fetch, m4_set_symbol_traced): Likewise.
461         * m4/syntax.c (remove_syntax_attribute): Likewise.
462         * src/freeze.c (reload_frozen_state): Likewise.
463         * src/main.c (main): Likewise.
465 2003-10-07  Gary V. Vaughan  <gary@gnu.org>
467         * Makefile.am (ACLOCAL_AMFLAGS): Search in the new acm4 and
468         gnulib/acm4 directories for aclocal m4 macros.
469         * gnulib/Makefile.am (EXTRA_DIST): Removed.
470         (MAINTAINERCLEANFILES): Add Makefile.in.
471         * configure.ac (m4_GNULIB_MODULES): Use it to declare which gnulib
472         modules we use.
473         * acm4/m4-gnulib.m4 (m4_GNULIB_MODULES): New macro.
474         * gnulib/import: New file.  Temporary script for updating gnulib
475         imported files, until gnulib-tool is working.
476         * gnulib/config/codeset.m4, gnulib/config/error.m4,
477         gnulib/config/exitfail.m4, gnulib/config/extensions.m4,
478         gnulib/config/getopt.m4, gnulib/config/gettext.m4,
479         gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
480         gnulib/config/intdiv0.m4, gnulib/config/inttypes-pri.m4,
481         gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
482         gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
483         gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
484         gnulib/config/lib-prefix.m4, gnulib/config/malloc.m4,
485         gnulib/config/nls.m4, gnulib/config/obstack.m4,
486         gnulib/config/onceonly_2_57.m4, gnulib/config/po.m4,
487         gnulib/config/progtest.m4, gnulib/config/realloc.m4,
488         gnulib/config/regex.m4, gnulib/config/restrict.m4.
489         gnulib/config/stdbool.m4, gnulib/config/stdint_h.m4,
490         gnulib/config/strerror_r.m4, gnulib/config/strndup.m4,
491         gnulib/config/strnlen.m4, gnulib/config/strtol.m4,
492         gnulib/config/uintmax_t.m4, gnulib/config/ulonglong.m4,
493         gnulib/config/unlocked-io.m4, gnulib/config/xalloc.m4,
494         gnulib/config/xstrndup.m4: Removed.
495         * gnulib/acm4/alloca.m4, gnulib/acm4/codeset.m4,
496         gnulib/acm4/error.m4, gnulib/acm4/exitfail.m4,
497         gnulib/acm4/extensions.m4, gnulib/acm4/free.m4,
498         gnulib/acm4/getopt.m4, gnulib/acm4/gettext.m4,
499         gnulib/acm4/glibc21.m4, gnulib/acm4/iconv.m4,
500         gnulib/acm4/intdiv0.m4, gnulib/acm4/inttypes-pri.m4,
501         gnulib/acm4/inttypes.m4, gnulib/acm4/inttypes_h.m4,
502         gnulib/acm4/isc-posix.m4, gnulib/acm4/lcmessage.m4,
503         gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-link.m4,
504         gnulib/acm4/lib-prefix.m4, gnulib/acm4/malloc.m4,
505         gnulib/acm4/nls.m4, gnulib/acm4/obstack.m4,
506         gnulib/acm4/onceonly_2_57.m4, gnulib/acm4/po.m4,
507         gnulib/acm4/progtest.m4, gnulib/acm4/realloc.m4,
508         gnulib/acm4/regex.m4, gnulib/acm4/restrict.m4.
509         gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
510         gnulib/acm4/strerror_r.m4, gnulib/acm4/strndup.m4,
511         gnulib/acm4/strnlen.m4, gnulib/acm4/strtol.m4,
512         gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
513         gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
514         gnulib/acm4/xstrndup.m4: Reimported from CVS gnulib with
515         gnulib/import script.
516         * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/error.c,
517         gnulib/m4/error.h, gnulib/m4/exitfail.c, gnulib/m4/free.c,
518         gnulib/m4/malloc.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
519         gnulib/m4/realloc.c, gnulib/m4/regex.c, gnulib/m4/strtol.c,
520         gnulib/m4/version-etc.c, gnulib/m4/version-etc.h,
521         gnulib/m4/xalloc.h, gnulib/m4/xmalloc.c: Updated from CVS
522         gnulib with gnulib/import script.
523         * configure.ac, gnulib/m4/Makefile.am: Manually insert anticipated
524         guards ready for gnulib-tool to autoupdate on import.
525         * config/debug.m4, config/gmp.m4, config/m4-error.m4,
526         config/m4-gettext.m4, config/m4-obstack.m4, config/m4-regex.m4,
527         config/stackovf.m4: Moved from here...
528         * acm4/debug.m4, acm4/gmp.m4, acm4/m4-error.m4,
529         acm4/m4-gettext.m4, acm4/m4-obstack.m4, acm4/m4-regex.m4,
530         acm4/stackovf.m4: ...to here, to separate aclocal macros from
531         configure time helper scripts.
532         * config/error.m4: Removed; superceded by gnulib/acm4/error.m4.
533         * m4/hash.c, m4/m4.c, m4/macro.c, m4/module.c, m4/output.c,
534         m4/path.c, m4/symtab.c, m4/syntax, m4/system_.h, modules/m4.c,
535         src/main.c, src/stackovf.c: s/xfree/free/g to comply with new
536         gnulib xalloc.h.
537         * src/main.c (version_etc_copyright): Only output the current
538         year.
539         (version_etc): Call with new variadic API.
541 2003-09-16  Gary V. Vaughan  <gary@gnu.org>
543         * gnulib/m4/version-etc.c, gnulib/m4/version-etc.h: Import
544         version-etc module from CVS gnulib.
545         * po/POTFILES.in: Add gnulib/m4/version-etc.c.
546         * src/Makefile.am: Build it.
547         * src/main.c: Use it.
549         * gnulib/m4/exit.h: Import exit module from CVS gnulib.
550         * gnulib/m4/Makefile.am (pkginclude_HEADERS): Add exit.h.
551         * m4/system_.h: Don't define EXIT_SUCCESS and FAILURE, include
552         exit.h instead.
554 2003-09-15  Charles Wilson  <cygwin@cwilson.fastmail.fm>,
555             Gary V. Vaughan  <gary@gnu.org>
557         * bootstrap: Separate options.
558         * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
559         * gnulib/m4/Makefile.am (stdbool.h): Use srcdir, gnulib_srcdir is
560         not set.
561         * modules/Makefile.am (gnu_la_LIBADD, load_la_LIBADD)
562         (m4_la_LIBADD, mpeval_la_LIBADD, traditianal_la_LIBADD)
563         (modtest_la_LIBADD, import_la_LIBADD, perl_la_LIBADD)
564         (shadow_la_LIBADD, stdlib_la_LIBADD, time_la_LIBADD): Add
565         $(LTLIBINTL) for gettext support on cygwin.
566         * src/Makefile.am (m4_LDADD): Remove $(INTLLIBS), since we now
567         have $(LTLIBINTL) from the preloaded module la files.
568         * README: Remove the warning about using --disable-nls on Windows
569         machines.
571 2003-09-15  Gary V. Vaughan  <gary@gnu.org>
573         * gnulib/m4/regex.c:  s/<regex.h>/"regex.h"/ or else the compiler
574         picks up the system regex.h if gl_REGEX decides gnulib/m4/regex.c
575         is required.
577 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
579         * doc/STYLE: Document the gnulib header naming conventions, and
580         #include policy.
581         * gnulib/m4/error_.h, gnulib/m4/gettext_.h, gnulib/m4/obstack_.h,
582         gnulib/m4/regex_.h: Renamed to gnulib/m4/error.h,
583         gnulib/m4/gettext.h, gnulib/m4/obstack.h, gnulib/m4/regex.h
584         respectively.
585         * gnulib/m4/Makefile.am: Remove the rules to build these headers.
587         * gnulib/m4/strtol.c, gnulib/config/strtol.m4: Import strtol
588         module from CVS gnulib.
589         * configure.ac (AC_REPLACE_FUNCS): Remove strtol.
590         (gl_FUNC_STRTOL): In favour of the module macro.
592 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
594         Replace the getopt code with CVS gnulib getopt.  The source files
595         detect whether they are in a glibc environment and preprocess away
596         all of the code if there is a system getopt, so we can compile
597         them into the m4 executable unconditionally:
599         * gnulib/m4/getopt.c, gnulib/m4/getopt1.c, gnulib/m4/getopt.h,
600         gnulib/config/getopt.m4: Import getopt module from CVS gnulib.
601         * configure.ac (gl_GETOPT): Use this instead of homebrew inline
602         macros.
603         * src/getopt.c, src/getopt1.c, src/gnu-getopt.h: Removed old
604         version.
605         * src/Makefile.am: Adjust.
606         * src/main.c: Always include our shipped getopt.h.
607         * po/POTFILES.in: Use new location of getopt.c.
609 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
611         * configure.ac (AC_CONFIG_FILES): Remove config/Makefile.
612         * config/Makefile.am: Removed.  Automake 1.8 distributes the files
613         in this directory automatically.
614         * Makefile.am (EXTRA_DIST): Except config/mkstamp.
616         * configure.ac (pkglibexecdir): Don't try and set it here, PACKAGE
617         isn't set yet.
618         * m4/Makefile.am (MODULE_PATH): Removed. Calculate pkglibexecdir
619         inline.
620         * modules/Makefile.am (pkglibexecdir): Set it here.
621         (pkgmodincdir): Renamed to pkgmodincludedir).  Changed all clients.
623         * gnulib/m4/regex.c, gnulib/m4/regex_.h, gnulib/config/regex.m4:
624         Import regex module from CVS gnulib.
625         * gnulib/config/restrict.m4: Ditto for dependee module restrict.
626         * config/m4-regex.m4 (m4_REGEX): Wrap gnulib/config/regex.m4, but
627         do extra substitutions for Makefile.
628         * configure.ac: Use it.
629         * gnulib/m4/Makefile.am: Maybe install regex.h after linking it
630         from regex_.h if necessary.
631         * m4/system_.h: Include the correct version of regex.h.
632         * m4/regex.c, m4/regex.h, config/regex.m4: Removed legacy
633         version.
634         * po/POTFILES.in: Use new location of regex.c.
636         * gnulib/m4/Makefile.am (EXTRA_DIST): Removed malloc.c and
637         realloc.c: automake distributes these files already.
639 2003-09-12  Gary V. Vaughan  <gary@gnu.org>
641         Replace the xstrzdup code by importing the xstrndup module from
642         CVS gnulib, along with its dependencies: strndup and strnlen:
644         * gnulib/m4/xstrndup.c, gnulib/m4/xstrndup.h,
645         gnulib/config/xstrndup.m4: Import xstrndup module from CVS
646         gnulib.
647         * gnulib/m4/strndup.c, gnulib/m4/strndup.h,
648         gnulib/config/strndup.m4: Ditto wrt strndup.
649         * gnulib/m4/strnlen.c, gnulib/config/strnlen.m4: Ditto wrt
650         strnlen.
651         * gnulib/m4/Makefile.am: Add rules from newly imported modules.
652         However, contrary to gnulib, we install xstrndup.h.
653         * configure.ac (AC_REPLACE_FUNCS): Remove xstrzdup.
654         * gnulib/lib/xstrzdup.c: Delete.  This was never a gnulib file, it
655         is an artifact of the old m4 portability layer.
656         * configure.ac (gl_XSTRNDUP): This is the gnulib equivalent.
657         * m4/system_.h: Include xstrndup.h.
658         * m4/macro.c (process_macro): Call xstrndup, not xstrzdup.
660 2003-09-11  Gary V. Vaughan  <gary@gnu.org>
662         Reimport the latest xalloc module from CVS gnulib, and adjust the
663         m4 sources to take advantage of xalloc xfree.  Also create a new
664         macro DELETE with the same semantics as the old m4 XFREE macro,
665         and carefully tweak callers:
667         * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h: Updated from CVS
668         gnulib.
669         * m4/utility.c (xfree): Removed.  This function is now supplied by
670         gnulib xalloc.
671         * m4/m4private.h (WITH_DMALLOC): Removed XFREE redefine.
672         * m4/path.c (search_path_add): Use NEW macro from xalloc.h.
673         * m4/symtab.c (m4_symtab_create): Ditto.
674         * m4/system_.h: Removed XFREE redefine.
675         (DELETE): New macro with same functionality as the original m4
676         XFREE macro, but based on xalloc.h now.  Changed all callers.
677         * src/main.c (main): Use XMALLOC macro.
678         * m4/hash.c, m4/macro.c, m4/symtab.c, m4/syntax.c: Use xfree
679         instead of XFREE.
680         * m4/output.c (m4_output_exit): Use DELETE instead of XFREE.
682 2003-09-10  Gary V. Vaughan  <gary@gnu.org>
684         Import the xalloc module from CVS gnulib, along with its
685         dependencies: exitfail, malloc and realloc. We had different
686         semantics for our XFREE and a function xfree() not supplied by
687         gnulib, so also a bit of work to keep everything running
688         smoothly:
690         * configure.ac (AC_REPLACE_FUNCS): Removed xmalloc and xstrdup.
691         (gl_XALLOC): Use gnulib equivalents.
692         * gnulib/config/exitfail.m4, gnulib/m4/exitfail.h,
693         gnulib/m4/exitfail.c: Import exitfail module from CVS gnulib.
694         * gnulib/config/malloc.m4, gnulib/m4/malloc.c: Ditto wrt malloc.
695         * gnulib/config/realloc.m4, gnulib/m4/realloc.c: Ditto wrt
696         realloc.
697         * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h,
698         gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Ditto wrt xalloc.
699         * gnulib/m4/Makefile.am: Add fragment from gnulib for newly
700         imported modules.
701         (pkgincdir): Removed.  Use pkgincludedir instead.
702         * m4/m4private.h (XFREE): xfree already checks for NULL.
703         * m4/system_.h: Use xalloc module, and remove macros already
704         supplied by xalloc.h.
705         * m4/utility.c (xfree): xalloc does not yet implement xfree, so
706         moved the old definition from m4/xmalloc.c to here for now.
708 2003-09-09  Gary V. Vaughan  <gary@gnu.org>
710         Import the error and progname modules from CVS gnulib.  Our old
711         error.c subsumed the functionality of both, so a little adjustment
712         was required to accomodate the split in sources.  Also added more
713         wrapper macros to choose between a system installed error.h or our
714         shipped gnulib error module:
716         * m4/error.c, m4/error.h: Removed.
717         * m4/Makefile.am: Adjust.
718         (pkgincdir): Removed.  Use pkgincludedir instead.
719         * m4/module.h, src/main.c: Don't include `m4/error.h'.
720         * m4/system_.h (INCLUDE_ERROR_H): Add a substitution for suitable
721         error.h.
722         * gnulib/m4/progname.c: Imported from CVS gnulib.
723         * gnulib/m4/progname.h: Ditto.
724         * src/main.c: Adjust to use progname module.
725         * gnulib/m4/error.c: Imported from CVS gnulib.
726         * gnulib/m4/error_.h: Ditto.
727         * gnulib/m4/Makefile.am: Build the error module into our libgnu.la
728         if appropriate, and link a local error.h if the system version is
729         missing.
730         (libgnu_la_SOURCES) Add progname module sources.
731         * gnulib/config/error.m4: Imported from CVS gnulib.
732         * gnulib/config/strerror_r.m4: Ditto.
733         * config/m4-error.c: New file.  Wrap gnulib error.m4 but arrange
734         to have ERROR_H for Makefile substitutions and tell system.h
735         whether the system error.h should be used, or a locally installed
736         version.
737         * configure.ac (jm_PREREQ_ERROR): Replaced by a call to m4_ERROR.
739 2003-09-09  Gary V. Vaughan  <gary@gnu.org>
741         * gnulib/m4/Makefile.am (MOSTLYCLEANFILES): Typo
742         s/gettext_.h/gettext.h/.
744         * bootstrap: Revert 2003-09-04 patch now that CVS autoconf and
745         automake have been fixed.
747         * config/m4-obstack.m4 (m4_FUNC_OBSTACK): D'oh! Now that we wrap
748         gl_OBSTACK, which in turn calls AC_FUNC_OBSTACK, don't rerun bits
749         of code originally snarfed from AC_FUNC_OBSTACK!!! While I'm here
750         rename to m4_OBSTACK in light of wrapping gl_OBSTACK.
752 2003-09-09  Gary V. Vaughan  <gary@gnu.org>
754         The gnulib obstack module requires the gnulib gettext module for
755         systems that do not have GNU gettext installed.  Because we use
756         -Ignulib/m4 in our Makefiles it is not safe to drop gettext.h in
757         that directory incase it clashes with the system gettext.h.  This
758         delta uses gettext_.h and extra rules in the Makefile to make a
759         link to gettext.h when needed:
761         * Makefile.am (auxdir): Removed.  No longer used.
762         * configure.ac (ac_aux_dir): Removed AC_SUBST.  No longer used.
763         (TIMESTAMP): List path to `mkstamp' literally, as ac_aux_dir has
764         moved.
765         (AC_CONFIG_LIBOBJ_DIR): Declare this for possible future single
766         Makefile based build.
767         (AC_CONFIG_AUX_DIR): Now we use gnulib/config where the majority
768         of the macros are kept.
769         * Makefile.am (ACLOCAL_MFLAGS): Search gnulib/config first.
770         * configure.ac (AM_INIT_AUTOMAKE): Require 1.7a.
771         * config/Makefile (ACLOCAL_MACROS): Removed.  Automake 1.7a
772         distributes these automatically.
773         * config/regex.m4 (jm_WITH_REGEX): Fixed underquoting to prevent
774         warning from automake-1.7a.
775         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Renamed to
776         m4_CHECK_DEBUGGING for consistency with gnulib prefixes.  Changed
777         all callers.
778         * config/m4-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto
779         wrt. m4_FUNC_OBSTACK.
780         * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto
781         wrt. m4_sys_STACKOVF.
782         * config/gmp.m4 (_M4_AC_LIB_GMP, M4_AC_LIB_GMP): Ditto
783         wrt. _m4_LIB_GMP, m4_LIB_GMP.
784         (ac_gmp_save_LIBS, ac_cv_using_lib_gmp): Don't use autoconf's
785         namespace.  Renamed to m4_gmp_save_LIBS and m4_cv_using_lib_gmp
786         respectively.
787         * config/m4-gettext.m4: New file to set GETTEXT_H appropriately.
788         * gnulib/m4/Makefile.am: Added a new block to make an appropriate
789         gettext.h link on deficient systems.
790         (pkginc_HEADERS): Mention $(GETTEXT_H).
791         (EXTRA_HEADERS): Mention gettext.h.
792         * gnulib/config/gettext_.h: New file from gnulib's gettext.h.
793         * gnulib/config/codeset.m4, gnulib/config/gettext.m4,
794         gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
795         gnulib/config/intdiv.m4, gnulib/config/inttypes-pri.m4,
796         gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
797         gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
798         gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
799         gnulib/config/lib-prefix.m4, gnulib/config/nls.m4,
800         gnulib/config/po.m4, gnulib/config/progtest.m4,
801         gnulib/config/stdint_h.m4, gnulib/config/uintmax_t.m4,
802         gnulib/config/ulonglong.m4: Imported from CVS gnulib.
804 2003-09-05  Gary V. Vaughan  <gary@gnu.org>
806         We can't mirror the gnulib directory structure here, since we need
807         to be able to eg. `#include <m4/obstack.h>' from our source files,
808         which is much easier if the local obstack.h is created in a
809         directory named m4.  Rather than trying to symlink everything into
810         the m4 directory, now we build a libtool convenience library from
811         the sources we get from gnulib and link that with libm4.la:
813         * gnulib/config/extensions.m4: Imported from CVS gnulib.
814         * gnulib/config/unlocked-io.m4: Ditto.
815         * gnulib/m4/unlocked-io.h: Ditto.
816         * gnulib/m4/obstack.m4, gnulib/m4/onceonly_2_57.m4,
817         gnulib/m4/stdbool.m4: All moved to gnulib/config directory.
818         * gnulib/lib/obstack.c, gnulib/lib/obstack_.h,
819         gnulib/lib/stdbool_.h: All moved to gnulib/m4 directory.
820         * m4/strtol.c, m4/xmalloc.c, m4/xstrdup.c, m4/xstrzdup.c: Ditto.
821         * m4/Makefile.am: Adjust.
822         * gnulib/Makefile.am (EXTRA_DIST): Name just the additional gnulib
823         macros we redistribute.
824         * gnulib/m4/Makefile.am: New file.  Build libgnu.la convenience
825         library among others.
826         (GNULIB_SRCS, GNULIB_MACROS): Removed.
827         * Makefile.am (ACLOCAL_AMFLAGS): Adjust.
828         * config/m4-obstack.m4: Adjust.
829         * po/POTFILES.in: Adjust.
830         * configure.ac: Reformatting.  Call newly imported gnulib macros.
831         * m4/builtin.c, m4/macro.c, m4/module.c, m4/utility.c: Removed
832         bogus calls of `#include "m4.h"'.
833         * Makefile.am: INCLUDES has been deprecated in favour of
834         AM_CPPFLAGS.
835         * m4/Makefile.am: Ditto.
836         * modules/Makefile.am: Ditto.
837         * src/Makefile.am: Ditto.
839 2003-09-05  Gary V. Vaughan  <gary@gnu.org>
841         * config/Makefile.am: Reverting yesterdays patch for VPATH builds.
843 2003-09-04  Gary V. Vaughan  <gary@gnu.org>
845         Migrate the obstack support into the gnulib directories for easy
846         synchronisation with upstream files in gnulib:
848         * config/gnu-obstack.m4: Moved from here...
849         * config/m4-obstack.m4: ...to here.
850         * config/Makefile.am (SPECIFIC_MACROS): Adjust.
851         * m4/obstack.c, m4/obstack_.h: Moved from here...
852         * gnulib/obstack.c, gnulib/obstack.h: ...to here.
853         * po/POTFILES.in: Adjust.
854         * gnulib/Makefile.am (GNULIB_SRCS, GNULIB_MACROS): Adjust.
855         * m4/Makefile.am: Add a whole new section to link the obstack
856         sources from the gnulib tree if necessary.
857         * gnulib/m4/onceonly_2_57.m4, gnulib/m4/obstack.m4: New macros
858         from gnulib.
859         * config/m4-obstack.m4: Rewrite as a wrapper for
860         gnulib/m4/obstack.m4.
862 2003-09-04  Gary V. Vaughan  <gary@gnu.org>
864         GNU M4 currently builds with a number of files adapted from
865         upstream sources.  Recently the gnulib project on savannah.gnu.org
866         has pulled together a great many of these externally maintained
867         files.  This delta is the beginnings of isolating those files
868         maintained in gnulib to make it easy to synchronise M4 with the
869         upstream files prior to releases.
871         * Makefile.am (ACLOCAL_AMFLAGS): Mention gnulib/m4 macro
872         directory.
873         (SUBDIRS): Added new gnulib subdirectory.
874         * configure.ac (AC_CONFIG_FILES): Add new gnulib tree Makefiles.
875         * config/stdbool.m4: Moved from here...
876         * gnulib/m4/stdbool.m4: ...to here.
877         * m4/stdbool_.h: Moved from here...
878         * gnulib/lib/stdbool_.h: ...to here.
879         * gnulib/Makefile.am: New file.  Make sure the gnulib tree is
880         distributed.
881         * m4/Makefile.am: Adjust gnulib/modules/stdbool:Makefile.am based
882         code to work with new stdbool_.h location.
883         (gnulib_srcdir): New.
885 2003-09-04  Gary V. Vaughan  <gary@gnu.org>
887         * config/Makefile.am (MAINTAINERCLEANFILES, ACLOCAL_MACROS)
888         (STANDARD_TOOLS, SPECIFIC_MACROS): Needed `$(srcdir)/' for VPATH
889         builds to work.
890         (SPECIFIC_TOOLS): New variable.  Moved mkstamp to here.
891         (EXTRA_DIST): Use it.
893         * bootstrap: CVS autoreconf leaves file droppings.  Remove
894         aclocal.m4t incase autoreconf doesn't.
896 2003-08-29  Gary V. Vaughan  <gary@gnu.org>
898         * m4/gnu-obstack.h: Updated from CVS gnulib.  For consistency with
899         the other gnulib imports, renamed to m4/obstack_.h.
900         * m4/obstack.c: Updated from CVS gnulib.
901         * m4/Makefile.am (EXTRA_HEADERS): Adjust.
902         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Merge in additional
903         header tests from gnulib obstack module.  AC_CONFIG_LINKS knows
904         about vpath already, and $top_srcdir upsets CVS Automake, so the
905         $top_srcdir reference was removed.
907         * m4/system-h.in: For consistency with the gnulib imports, renamed
908         to m4/system_.h.
909         * m4/Makefile (EXTRA_HEADERS): Adjust.
910         * configure.ac (AC_CONFIG_FILES): Adjust.
912         * m4/stdbool_.h: New file from gnulib for systems without their
913         own.
914         * m4/Makefile.am: Add snippets from gnulib for C99 bool support.
915         * config/stdbool.m4: New file.  Macros from gnulib for same.
916         * configure.ac: Use it.
918 2003-08-27  Gary V. Vaughan  <gary@gnu.org>
920         * config/debug.m4: `perl -pi.bak -e 's/(Copyright) (\d)/$1 (C) $2/g'`
921         * config/gmp.m4: Ditto.
922         * config/gnu-obstack.m4: Ditto.
923         * config/stackovf.m4: Ditto.
924         * m4/builtin.c: Ditto.
925         * m4/debug.c: Ditto.
926         * m4/error.c: Ditto.
927         * m4/error.h: Ditto.
928         * m4/gnu-obstack.h: Ditto.
929         * m4/hash.c: Ditto.
930         * m4/hash.h: Ditto.
931         * m4/input.c: Ditto.
932         * m4/m4.c: Ditto.
933         * m4/m4module.h: Ditto.
934         * m4/m4private.h: Ditto.
935         * m4/macro.c: Ditto.
936         * m4/module.c: Ditto.
937         * m4/obstack.c: Ditto.
938         * m4/output.c: Ditto.
939         * m4/path.c: Ditto.
940         * m4/regex.c: Ditto.
941         * m4/regex.h: Ditto.
942         * m4/strtol.c: Ditto.
943         * m4/symtab.c: Ditto.
944         * m4/syntax.c: Ditto.
945         * m4/utility.c: Ditto.
946         * m4/xmalloc.c: Ditto.
947         * m4/xstrdup.c: Ditto.
948         * m4/xstrzdup.c: Ditto.
949         * modules/evalparse.c: Ditto.
950         * modules/format.c: Ditto.
951         * modules/gnu.c: Ditto.
952         * modules/import.c: Ditto.
953         * modules/load.c: Ditto.
954         * modules/m4.c: Ditto.
955         * modules/m4.h: Ditto.
956         * modules/modtest.c: Ditto.
957         * modules/mpeval.c: Ditto.
958         * modules/perl.c: Ditto.
959         * modules/shadow.c: Ditto.
960         * modules/stdlib.c: Ditto.
961         * modules/time.c: Ditto.
962         * modules/traditional.c: Ditto.
963         * src/freeze.c: Ditto.
964         * src/getopt.c: Ditto.
965         * src/getopt1.c: Ditto.
966         * src/m4.h: Ditto.
967         * src/main.c: Ditto.
968         * src/stackovf.c: Ditto.
970         * config/gmp.m4 (M4_AC_LIB_GMP): Use AC_INCLUDES_DEFAULT:
971         ac_default_headers is an autoconf internal variable.
972         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
973         * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
975         * configure.ac (AC_CONFIG_FILES): Add tests/atlocal.
976         * tests/Makefile.am (TESTS_ENVIRONMENT): Revert the 2003-08-14
977         delta.
979 2003-08-15  Gary V. Vaughan  <gary@gnu.org>
981         * configure.ac (AC_HEADER_STDBOOL, INCLUDE_STDBOOL_H): Check for
982         C99 bool.
983         * system-h.in (m4_boolean): Removed in favour of using C99 bool if
984         possible or faking one with a typedef.  Changed all callers.
986 2003-08-15  Gary V. Vaughan  <gary@gnu.org>
988         Still cleaning up the users' module API, by taking out the stuff
989         that isn't used by any existing modules, and moving specialised
990         functions out of libm4 and into the module they are used by.
992         * m4/m4module.h (m4_skip_space): No need to export this.  Moved...
993         * m4/utility.c (m4_skip_space): ...to here the home of its only
994         use, made static and renamed to `skip_space'.  Changed all
995         callers.
996         * m4/m4module.h (m4_expand_ranges): Removed prototype.
997         * m4/utility.c (m4_expand_ranges): Moved definition from here...
998         * modules/m4.c (m4_expand_ranges): ...to here, and exported using
999         ltdl.
1000         * modules/m4.h (m4_expand_ranges_func): For lt_dlsym import
1001         casting .
1002         * modules/gnu.c (builtin_syntax): Import and use in this
1003         builtin implementation.
1004         * m4/m4module.h (M4_DEBUG_PRINT1, M4_DEBUG_PRINT2, M4_DEBUG_PRINT3):
1005         Not used.  Deleted.
1006         * m4/macro.c (trace_flush): Except here where the macro is now
1007         manually inlined.
1008         * m4/m4module.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
1009         (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): Only used internally, so
1010         moved...
1011         * m4/m4private.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
1012         (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): ...to here.
1014 2003-08-14  Gary V. Vaughan  <gary@gnu.org>
1016         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use the interrim new
1017         compiler based AC_CHECK_HEADER that was introduced in
1018         autoconf-2.56.
1019         * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
1020         * config/gmp.m4 (AC_LIB_GMP): Ditto. And renamed to M4_AC_LIB_GMP.
1021         * configure.ac: Use renamed M4_AC_LIB_GMP.
1023         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Don't AC_REQUIRE a
1024         macro that requires arguments! This stops the shell's bad
1025         substitution error at configure time.
1027         * tests/Makefile.am (TESTS_ENVIRONMENT): Now we can pass make
1028         variables to the testsuite shell.  Set the value of USE_GMP so
1029         that the gmp test will run!
1030         (check-local, clean-local): Use the TESTS_ENVIRONMENT variable.
1032 2003-08-11  Gary V. Vaughan  <gary@gnu.org>
1034         Libltdl already has an excellent mechanism for accessing C symbols
1035         in modules.  Lets use that!  Remove all the exporting cruft and
1036         just use lt_dlsym in conjunction with a few conventions to
1037         simplify module writers' jobs.  Also removed the table address
1038         caching code and otherwise simplified the module loader quite a
1039         bit.  To access exported symbols in other modules, first the
1040         exporting module must name the symbols <modname>_LTX_<symname>,
1041         and the importing module must define a function type called
1042         <symname>_func.  The importer then adds
1043         M4_MODULE_IMPORT(<modname>, <symname>) at the top of any function
1044         that wishes to call out to the exported functions.  Care must be
1045         taken that <symname> is non-NULL in the importing module incase
1046         M4_MODULE_IMPORT fails, but otherwise it can be called as if the
1047         definition was in the importers source.  Study
1048         `modules/{gnu.c,m4.{c,h}' for a model example.  At the moment,
1049         m4_module_import will attempt to automatically load a module
1050         required for symbol access if it is not loaded already.
1052         * TODO: Removed the items fixed in this delta.
1053         * m4/ltdl.c (lt_dlhandle_find): New function to find a handle by
1054         module name.
1055         * m4/ltdl.h (lt_dlhandle_find): Declare it.
1056         * m4/module.c (m4_module_unload): Use it.
1057         * src/freeze.c (reload_frozen_state): Ditto.
1058         * m4/m4module.h (m4_export): Deleted.  Removed all references.
1059         (M4_MODULE_IMPORT): New user convenience macro for importing
1060         arbitrary symbols from other modules.
1061         * m4/module.c (m4_module_import): New function to service
1062         M4_MODULE_IMPORT macro.
1063         (module_data): Removed.  Looking up the tables on demand with
1064         lt_dlsym, rather than caching their addresses here simplifies the
1065         code substantially.
1066         (m4_get_module_builtin_table, m4_get_module_macro_table):
1067         Removed.  Changed all callers.
1068         (set_module_macro_table, set_module_builtin_table): Renamed to
1069         install_macro_table and install_builtin_table respectively, and
1070         simplified now that the cache is no more.
1071         * modules/gnu.c (builtin_symbols): Use this new mechanism to
1072         import m4_dump_symbols from the m4 module.
1073         (builtin_esyscmd): Likewise for m4_set_sysval and
1074         m4_sysval_flush.
1075         * modules/m4.c (m4_export_table): Removed.  Functions are
1076         addressed with the new mechanism which doesn't need this.
1077         (m4_set_sysval): New exported accessor function to prevent
1078         problems with variable access on inferior architectures.
1079         * modules/m4.h (m4_sysval_flush_func, m4_set_sysval_func)
1080         (m4_dump_symbols_func): Typedefs required by M4_MODULE_IMPORT so
1081         that we can have some type safety.
1082         * modules/modtest.c (export_test): C level exported function for
1083         testing the new import mechanism.
1084         * modules/import.c: New file for the import end of the test.
1085         * modules/Makefile.am (pkglibexec_LTLIBRARIES): Added import.la.
1086         * tests/modules.at: New test cases for intermodule symbol
1087         importing.
1089 2003-08-07  Gary V. Vaughan  <gary@gnu.org>
1091         * m4/m4module.c (m4_string): Moved from here...
1092         * m4/m4private.c (m4_string): ...to here.
1094         * m4/utility.c (dumpdef_cmp): Removed stale declaration.
1096 2003-07-29  Gary V. Vaughan  <gary@gnu.org>
1098         * m4/m4module.h (M4_DEFAULT_NESTING_LIMIT): This value is
1099         already available to module writers through
1100         m4_{get,set}_nesting_limit_opt(), so moved from here...
1101         * m4/m4.c (DEFAULT_NESTING_LIMIT): ...to here and renamed.
1102         (m4_create): Use it.
1104 2003-07-28  Gary V. Vaughan  <gary@gnu.org>
1106         Aside from auditing path.c for m4module.h api obfuscation, this
1107         delta introduces the concept of private struct members in opaque
1108         data types to GNU m4: See the STYLE file for details.
1110         * TODO: Remind ourselves that a rewrite of path.c is needed.
1111         * m4/m4module.h (m4_search_path, struct m4_search_path_info):
1112         Moved from here...
1113         * m4/m4private.h (m4__search_path, m4__search_path_info): ...to
1114         here and renamed.  These type definitions are for internal api use
1115         only.  Changed all callers.
1116         * m4/m4module.h (m4_search_path_env_init, m4_search_path_add):
1117         Moved from here...
1118         * m4/path.c (search_path_env_init, search_path_add): ...to here
1119         and renamed.  These calls were never used outside this file.
1120         Changed all callers.
1121         (dirpath): Moved functionality of this static declaration...
1122         * m4/m4private.h (struct m4): ...to this new internal only
1123         search_path field.  Changed all callers.
1124         (m4__get_search_path): Added new internal api accessor.
1125         * m4/path.c (m4_search_path_info_new):  Removed.  Not used.
1126         (m4_include_init): Removed...
1127         * m4/m4.c (m4_create): ...because the new m4 field is now
1128         initialised here.
1129         (m4_delete): Recycle search_path memory.
1130         * src/main.c (main): Don't call m4_include_init now that it's
1131         gone!
1132         * doc/STYLE: Document convention for private fields in opaque
1133         ADTs.
1135 2003-07-24  Gary V. Vaughan  <gary@gnu.org>
1137         Sometimes exporting the address of a symbol from a module isn't
1138         enough for other modules to call that symbol correctly.  If
1139         custom data types are used for function parameters, they need to
1140         be known to the caller.  This change introduces the concept of
1141         $(prefix)/include/modules/$(modulename).h to declare those
1142         structures.  Also we move m4_dump_symbols from libm4 to the m4
1143         module to show this concept in action.
1145         * m4/m4module.h (m4_dump_symbol_data): Moved from here...
1146         * modules/m4.h (m4_dump_symbol_data): ...to this new file for
1147         exporting data structures from modules/m4.c.
1148         * modules/m4.c, modules/gnu.c: Include it.
1149         * modules/Makefile.am (pkgmodinc_HEADERS): Install it.
1150         * m4/m4module.h (m4_dump_symbol_CB, m4_dump_symbols): Removed
1151         prototypes.
1152         * m4/utility.c (dumpdef_cmp, m4_dump_symbol_CB, m4_dump_symbols):
1153         Moved from here...
1154         * modules/m4.c (dumpdef_cmp_CB, dump_symbol_CB, m4_dump_symbols):
1155         ...to here, with slight renaming.
1156         (m4_export_table): Prototype and add m4_dump_symbols.
1157         * m4/symtab.c (m4_is_symbol_value_void): Needed for an external
1158         definition of m4_dump_symbols.
1159         * m4/m4module.h (m4_is_symbol_value_void): Prototype it.
1160         * m4/m4private.h (m4_is_symbol_value_void): Fast macro version.
1162 2003-07-24  Gary V. Vaughan  <gary@gnu.org>
1164         Create an export table in modules/m4.c in readiness for beefing up
1165         the module loader to track module exports and imports.
1167         * m4/m4module.h (m4_debug_flush_files): Removed prototype.
1168         * m4/debug.c (m4_debug_flush_files): Moved...
1169         * modules/m4.c (m4_sysval_flush): ...to here and renamed.
1170         * modules/gnu.c (builtin_esysval): Use it.
1171         * m4/m4module.h (m4_export): New type for declaring module symbols
1172         for export.
1173         * modules/m4.c (m4_export_table): List symbols exported from this
1174         module for use by other modules.
1176 2003-07-24  Gary V. Vaughan  <gary@gnu.org>
1178         An experiment: There is loads of code in libm4 which should be in
1179         the m4 module, but is also used by another module. Just because
1180         some linkers won't cope with calls across dynamic runtime loaded
1181         objects I initially left the code in libm4.  It will tidy the
1182         module api immensely if this code moves to the right place, I just
1183         need to remember to invent a suitable calling mechanism at some
1184         point.  For now, only modules that are statically linked and
1185         preloaded will get this treatment, so the only platforms that will
1186         break are those that require all symbols to be resolved at link
1187         time.
1189         * TODO: Reminder that what I am doing could reduce portability
1190         unless I do something more robust later.
1191         * m4/m4module.h (m4_sysval): No longer exported from libm4.
1192         * m4/utility.c (m4_sysval): No longer declared in libm4.
1193         * modules/Makefile.am: Reformatting.
1194         * modules/m4.c (m4_sysval): Declare it at place of use.
1195         * modules/gnu.c (m4_sysval): Import it for use in esyscmd.
1197 2003-07-23  Gary V. Vaughan  <gary@gnu.org>
1199         * m4/m4module.h: Reformatting and rearranging lines a bit.
1200         (m4_obstack): Save typing by typedefing `struct obstack'.  Changed
1201         all users.
1202         (m4_call_macro, m4_expand_input): Renamed...
1203         (m4_macro_call, m4_macro_expand_input): ...to these.  Changed all
1204         callers.
1205         (m4_expansion_level, m4_process_macro): Moved...
1206         * m4/macro.c (expansion_level, process_macro): ...to here, and
1207         made static.
1209         * m4/m4module.h (program_name): Not used by modules at all, so
1210         moved...
1211         * src/main.c (program_name): ...to here.
1212         (print_program_name): Renamed...
1213         (print_program_name_CB): ...to conform to the STYLE guide.
1215 2003-07-23  Gary V. Vaughan  <gary@gnu.org>
1217         More refactoring of the m4module.h API.  Replace #defines with an
1218         enum, and move non-public functions out of the public API.
1220         * m4/debug.c (stdarg.h, varargs.h): Remove variadic header
1221         inclusion.
1222         * m4/macro.c (stdarg.h): Add ANSI C variadic header.
1223         * m4/debug.c (m4_debug, trace): Moved...
1224         * m4/m4private.h (struct m4): ...to fields of this struct.
1225         (m4_get_debug_file, m4_get_trace_messages): New fast access macros
1226         for the new fields.
1227         * m4/debug.c (m4_debug_init, m4_debug_exit): Removed functions...
1228         * src/main.c (m4_debug_init, m4_debug_exit): ...invocations...
1229         * m4/m4.c (m4_create, m4_delete): ...and handled here instead.
1230         * m4/m4module.h (m4_context_field_table): Add entries for new
1231         debug_file and trace_messages fields.
1232         (M4_DEBUG_TRACE_ARGS, M4_DEBUG_TRACE_EXPANSION)
1233         (M4_DEBUG_TRACE_QUOTE, M4_DEBUG_TRACE_ALL, M4_DEBUG_TRACE_LINE)
1234         (M4_DEBUG_TRACE_FILE, M4_DEBUG_TRACE_PATH, M4_DEBUG_TRACE_CALL)
1235         (M4_DEBUG_TRACE_INPUT, M4_DEBUG_TRACE_CALLID)
1236         (M4_DEBUG_TRACE_VERBOSE): Replaced #defines with an enum.
1237         (m4_is_debug_bit): New macro to simplfy checks against the debug
1238         bits above.
1239         (m4_trace_format, m4_trace_header, m4_trace_flush)
1240         (m4_trace_prepre, m4_trace_pre, m4_trace_post): Removed
1241         prototypes.
1242         * m4/debug.c (m4_trace_format, m4_trace_header, m4_trace_flush)
1243         (m4_trace_prepre, m4_trace_pre, m4_trace_post): Moved...
1244         * m4/macro.c (trace_format, trace_header, trace_flush)
1245         (trace_prepre, trace_pre, trace_post): ...to these newly static
1246         functions, since they are only ever used from this file.  Changed
1247         all callers.
1249 2003-07-17  Gary V. Vaughan  <gary@gnu.org>
1251         Change the macros for checking syntax so that matching against
1252         multiple possible syntax classes can be done with a single
1253         comparison some of the time.  The various classes are now bits of
1254         an int that can be checked with bitwise logic operators.
1256         * m4/m4module.h (M4_SYNTAX_IGNORE, M4_SYNTAX_OTHER)
1257         (M4_SYNTAX_SPACE, M4_SYNTAX_OPEN, M4_SYNTAX_CLOSE, M4_SYNTAX_COMMA)
1258         (M4_SYNTAX_DOLLAR, M4_SYNTAX_ACTIVE, M4_SYNTAX_ESCAPE)
1259         (M4_SYNTAX_ASSIGN, M4_SYNTAX_ALPHA, M4_SYNTAX_NUM)
1260         (M4_SYNTAX_LQUOTE, M4_SYNTAX_RQUOTE, M4_SYNTAX_BCOMM)
1261         (M4_SYNTAX_ECOMM): Replaced #defines with an enum.
1262         (M4_SYNTAX_ALNUM): Removed.  Changed all callers.
1263         (M4_IS_IGNORE, M4_IS_OTHER, M4_IS_SPACE, M4_IS_OPEN, M4_IS_CLOSE)
1264         (M4_IS_COMMA, M4_IS_DOLLAR, M4_IS_ACTIVE, M4_IS_ESCAPE)
1265         (M4_IS_ASSIGN, M4_IS_ALPHA, M4_IS_NUM, M4_IS_LQUOTE, M4_IS_RQUOTE)
1266         (M4_IS_BCOMM, M4_IS_ECOMM, M4__IS_STRING, M4_IS_IDENT): Removed.
1267         Replace all calls with invocations of these...
1268         (m4_is_syntax, m4_has_syntax): ...New macros.
1269         * src/freeze.c (produce_syntax_dump): Remove mask argument, which
1270         is no longer required with new macros.  Changed all callers.
1272 2003-07-15  Gary V. Vaughan  <gary@gnu.org>
1274         * m4/input.c (CHAR_EOF, CHAR_BUILTIN, CHAR_RETRY): These token
1275         values are returned as part of the internal interface, so they
1276         need to be moved...
1277         * m4/private.h: ...to here.
1278         * m4/macro.c (expand_token): Check for out of range
1279         m4_peek_input() results before looking up in the syntax table.
1280         (collect_arguments): Ditto.
1282         * NEWS: Note `$' syntax class.
1284 2003-07-08  Paul Eggert  <eggert@twinsun.com> and
1285             Gary V. Vaughan  <gary@gnu.org>
1287         Conform to POSIX if the POSIXLY_CORRECT environment is set.
1288         --traditional `define' now smashes all the definitions.
1290         * NEWS: Explain this.
1291         * doc/m4.texinfo (Defn): `defn' takes any number of arguments.
1292         (Extensions): Explain that extensions that are incompatible with
1293         POSIX are disabled if POSIXLY_CORRECT is set.
1294         (Incompatibilities): Remove.
1295         (Define, Other Incompat): Explain difference
1296         between GNU and POSIX behavior of define, pushdef, popdef.
1297         * m4/m4.c (m4_get_posixly_correct_opt): New undef.
1298         * m4/m4module.h (m4_context_opt_bit_table): Add POSIXLY_CORRECT entry.
1299         * m4/m4private.h (M4_OPT_POSIXLY_CORRECT_BIT): New macro.
1300         (m4_get_posixly_correct_opt): New macro.
1301         * m4/m4macro.c (m4_process_macro): Disable $10, $abc etc. if
1302         POSIXLY_CORRECT.
1303         * modules/m4.c (builtin_functions): defn now takes any number of args.
1304         (builtin_define): Smash all the definitions if
1305         POSIXLY_CORRECT.
1306         (builtin_defn)): Allow any number of arguments.
1307         (builtin_undivert): Do not allow nonnumeric arguments
1308         if POSIXLY_CORRECT.
1309         * src/main.c (main): Set posixly-correct behavior if either
1310         POSIXLY_CORRECT is set, or if -G is given.
1311         * tests/builtins.at: New test for smashed definitions.
1313 2003-06-27  Gary V. Vaughan  <gary@gnu.org>
1315         * doc/m4.texinfo (Changesyntax): Document Dollar syntax class.
1316         * m4/m4module.h (M4__SYNTAX_STRING): New syntax class. Be careful
1317         not to slow the parser down.
1318         (M4__IS_STRING): New macro to test string syntax class membership.
1319         * m4/syntax.c: Adjust docucomment.
1320         (m4_syntax_create): Add a default M4_SYNTAX_DOLLAR element.
1321         (m4_syntax_code): Translate `$' -> M4_SYNTAX_DOLLAR.
1322         * m4/input.c (init_builtin_token): Comment typo.
1323         (m4__next_token): Comment typo.
1324         Accept M4_SYNTAX_DOLLAR items into M4_TOKEN_STRING type tokens
1325         by using the new M4__IS_STRING macro.
1326         * m4/macro.c (m4_process_macro): Use M4_IS_DOLLAR to test for
1327         variable references in macro expansions.
1329         * doc/m4.texinfo (Eregexp and Regexp): Typo.
1330         (Epatsubst and Patsubst): Typo.
1331         (Eval): Typo.
1333 2003-06-26  Gary V. Vaughan  <gary@gnu.org>
1335         Move the global variables that pertain to syntax to a new `struct
1336         m4_syntax_table', and then add one of these to `struct m4'.  The
1337         ripple effect through the code to both change formerly global
1338         references, and make sure a suitable context is available in
1339         lexical scope is disproportionately large compared to the size of
1340         the change proper.  This change is a large part of decoupling
1341         syntax.c from the rest of the code that uses it.
1343         * m4/m4private.h (struct m4): Add a syntax field.
1344         * m4/m4.c (m4_create): Initialise it,
1345         (m4_delete): Recycle it.
1346         (m4_get_symtab): Remove hand coded version...
1347         (m4_get_symbol_table): ...and generate this with cpp.  Changed all
1348         callers.
1349         * m4/m4module.h (m4_context_field_table): Add an extra field so we
1350         can generate m4_get_symbol_table.  Add a new row for
1351         m4_get_syntax_table.
1352         (M4SYNTAX): Syntactic sugar for module writers.
1353         (m4_symtab): Renamed to m4_symbol_table.  Changed all callers.
1354         (m4_syntax_table): New home for syntax related formerly global
1355         variables.
1356         * m4/m4private.h (struct m4_syntax_table): Define it.
1357         * m4/input.c (m4_input_init): Initialisation of these formerly
1358         global variables moved...
1359         * m4/syntax.c (m4_syntax_create): ...to here.
1360         * m4/input.c (m4_input_exit): And similarly, recycling of the
1361         memory used by those values moved...
1362         * m4/syntax.c (m4_syntax_delete): ...to here.
1363         * m4/m4module.h (DEF_LQUOTE, DEF_RQUOTE, DEF_BCOMM, DEF_ECOMM):
1364         Moved to m4/m4private.h.
1365         * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
1366         (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
1367         (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
1368         (m4_is_syntax_macro_escaped): New accessors for m4_syntax_table
1369         objects.  Changed all callers that used to directly access the
1370         global equivalents.
1371         (m4__single_quotes, m4__single_comments, m4__use_macro_escape):
1372         Removed and incorporated into m4_syntax_table structure.
1373         * m4/utility.c (lquote, rquote, bcomm, ecomm): Ditto.
1374         * m4/syntax.c (m4_set_syntax): Now returns an error status,
1375         instead of requiring a `struct m4' to generate its own errors.
1376         Changed all callers.
1377         * src/main.c (main): Now that the syntax table is initialised as
1378         part of m4_create, we have to manually wipe the syntax entries if
1379         we are about to read a frozen file.
1381 2003-06-26  Gary V. Vaughan  <gary@gnu.org>
1383         * doc/STYLE: Added notes on callback naming schemes.
1385         * m4/module.c (m4_set_module_macro_table)
1386         (m4_set_module_builtin_table): Declarations weren't changed when
1387         definitions were renamed on 2003-06-19.
1389         * m4/hash.c (m4_hash_resize): ifdefed out.  This function is
1390         neither used nor particularly appropriate since it exposes the
1391         internal workings of the hash module.  I haven't yet decided
1392         whether to remove it entirely.
1394 2003-06-20  Gary V. Vaughan  <gary@gnu.org>
1396         Two related changes, and a huge knockon effect throughout the
1397         source: Moved the option variables out of global space and into
1398         `struct m4'; made `m4_symtab' a real datatype, so that its api
1399         is not marred passing `struct m4' around just so it can decide
1400         whether to keep traced symbol names or not.  Added setters and
1401         getters for the formerly global option variables, and obviously
1402         changed a vast number of functions to take a `struct m4' and use
1403         the getter funcs to find option values.
1405         * m4/utility.c (interactive, sync_output, debug_level)
1406         (no_gnu_extensions, prefix_all_builtins, suppress_warnings)
1407         (max_debug_argument_length, warning_status, nesting_limit)
1408         (discard_comments): Removed.
1409         * m4/m4module (warning_status, no_gnu_extensions, nesting_limit)
1410         (debug_level, max_debug_argument_length, prefix_all_builtins)
1411         (suppress_warnings, discard_comments, interactive, sync_output):
1412         Removed from here...
1413         * m4/m4private.h (struct m4): ...and equivalent fields added to
1414         this structure.
1415         (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1416         (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1417         (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1418         (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1419         (m4_get_interactive_opt, m4_get_sync_output_opt): Fast access
1420         macros for the new fields.
1421         * m4/m4module.h (m4_context_field_table)
1422         (m4_context_opt_bit_table): Helper macros used to generate
1423         prototypes, setters and getters for new option fields
1424         consistently.
1425         * m4/m4.c (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1426         (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1427         (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1428         (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1429         (m4_get_interactive_opt, m4_get_sync_output_opt)
1430         (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
1431         (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
1432         (m4_set_max_debug_arg_length_opt, m4_set_prefix_builtins_opt)
1433         (m4_set_suppress_warnings_opt, m4_set_discard_comments_opt)
1434         (m4_set_interactive_opt, m4_set_sync_output_opt): Addressable
1435         setter and getter functions generated by cpp from
1436         m4_context_field_table and m4_context_opt_bit_table, exported as
1437         part of the module api.  Changed all callers.
1438         * m4/symtab (struct m4_symtab): Used as the concrete type for
1439         m4_symtab now.
1440         (m4_symtab_create): Allocate and initialise a new struct.
1441         (m4_symtab_apply): New function that works like m4_hash_apply, but
1442         with different callbacks specific to symbol tables.  Changed all
1443         callers.
1444         (symbol_destroy, arg_destroy, arg_copy): Renamed
1445         symbol_destroy_CB, arg_destroy_CB, arg_copy_CB to remind me that
1446         they have unused parameters for a reason!
1447         (dump_symbol_CB): New callback to dump the contents of a single
1448         symbol.
1449         (symtob_dump): Rewritten in terms of dump_symbol_CB.
1450         * m4/utility.c (m4_dump_symbol): Renamed to m4_dump_symbol_CB.
1451         Changed all callers.
1452         * m4/m4.c (m4_create): By default point the `nuke_trace_bit' field
1453         of the contained `m4_symtab' at the `no_gnu_extensions' field.
1454         Although I'm not convinced these semantics are correct, they are
1455         at least consistent with how things were before this delta.  Also
1456         set the default nesting limit to M4_DEFAULT_NESTING_LIMIT.
1458 2003-06-19  Gary V. Vaughan  <gary@gnu.org>
1460         Tie down the interface to libm4 some more.  Make more structures
1461         opaque to modules by moving them to m4private.h, and writing
1462         setters and getters.  To win back the speed penalty for doing this
1463         also wrote macroized versions that do know about structure layout
1464         in m4private.h and #include that file into modules when NDEBUG is
1465         defined at compile time.  There are still some accessor macros in
1466         m4private.h that need to go, but that is not necessary to clean
1467         the module api up.
1469         * m4/m4module.h (m4_symbol_type): Moved...
1470         * m4/m4private.h (m4__symbol_type): ...to here.
1471         * m4/symtab.c (m4_get_symbol_value, m4_get_symbol_traced)
1472         (m4_set_symbol_traced, m4_set_symbol_name_traced)
1473         (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1474         (m4_get_symbol_func, m4_symbol_value_create)
1475         (m4_symbol_value_delete, m4_set_symbol_value_text)
1476         (m4_set_symbol_value_func): New exported api to symbols.
1477         (m4_get_symbol_value_type): Replaced by m4_is_symbol_value_text
1478         and m4_is_symbol_value_func.
1479         * m4/m4module.h: Prototype these guys.
1480         * m4/module.c (m4_set_module_macro_table)
1481         (m4_set_module_builtin_table): Make these static, there is no
1482         reason to pollute the api with them.
1483         * m4/m4private.h: Reformatting.
1484         (m4_get_symtab): Only define when NDEBUG is defined.
1485         (m4_get_symbol_value, m4_get_symbol_traced)
1486         (m4_set_symbol_traced, m4_set_symbol_name_traced)
1487         (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1488         (m4_get_symbol_func, m4_symbol_value_create)
1489         (m4_symbol_value_delete, m4_set_symbol_value_text)
1490         (m4_set_symbol_value_func): Macro implementations of the new
1491         functions when NDEBUG is defined.
1492         (SYMBOL_TRACED, SYMBOL_VALUE, SYMBOL_TYPE, SYMBOL_TEXT)
1493         (SYMBOL_FUNC, VALUE_TYPE, VALUE_TEXT, VALUE_FUNC): Removed.
1494         Superceded by the above.  All callers changed.
1495         (M4ARG): Removed.  This is no longer different to the
1496         m4/m4module.h definition.
1497         * modules/gnu.c, modules/m4.c: Only include m4private.h when
1498         NDEBUG is defined.  That way we exercise the same (albeit slower)
1499         api that external modules must use.
1501 2003-06-18  Gary V. Vaughan  <gary@gnu.org>
1503         Renamed some of the types and their accessors to make more sense.
1504         Now we have a SYMTAB in which we store SYMBOLs, and each SYMBOL
1505         has a stack of SYMBOL_VALUEs.
1507         * m4/m4module.h (m4_token, m4_get_token_type, m4_get_token_text)
1508         (m4_get_token_func, m4_token_copy): Renamed to m4_symbol_value,
1509         m4_get_symbol_value_type,  m4_get_symbol_value_text,
1510         m4_get_symbol_value_func and m4_symbol_value_copy respectively.
1511         Changed all callers.
1512         (m4_symbol_type): s/M4_TOKEN_/M4_SYMBOL_/
1513         (m4_get_token_type): Renamed
1514         * m4/input.c (m4_next_token): Renamed to m4__next_token, and moved
1515         to the internal api.
1516         * m4/m4private.h: s/TOKEN_ARG_/SYMBOL_ARG_/
1517         s/TOKEN_/VALUE_/
1518         (m4__symtab_init, m4__symtab_exit): Removed prototypes.
1519         (m4_token_arg): Renamed to m4_symbol_arg. Changed all callers.
1520         (m4__token_type): Moved here from m4module.h.
1521         (m4__next_token): Renamed from m4_next_token.
1522         * m4/symtab.c: Removed some of the parameterised macro support
1523         functions for modularisation later.
1524         (m4_token_copy): Renamed to m4_symbol_value_copy, and use new
1525         m4_hash_dup to perform a true deep copy of the SRC.
1526         (arg_copy): Callback for m4_symbol_value_copy.
1527         * utility.c (m4_token_get_type, m4_token_text, m4_token_func):
1528         Renamed to m4_get_symbol_value_type, m4_get_symbol_value_text and
1529         m4_get_symbol_value_func.  Changed all callers.
1531 2003-06-18  Gary V. Vaughan  <gary@gnu.org>
1533         Tidy up style of hash.[ch] in accordance with doc/STYLE.
1535         * m4/hash.c: Internal symbol renaming and formatting.
1536         (m4_hash_dup): New function to facilitate deep copies of hash
1537         tables.
1538         (m4_hash_apply_func): Returns a void* now, which is a richer type
1539         for returning exceptions (NULL means keep going).
1540         (m4_hash_apply): Ditto.
1541         * m4/hash.h: Declare exported symbols with an explicit extern.
1542         Reformated.
1544 2003-06-17  Gary V. Vaughan  <gary@gnu.org>
1546         Still refactoring furiously.  This delta represents a change in
1547         semantics to symtab.c.  Instead of building temporary m4_tokens
1548         in the caller, and copying fields in the methods, we now create
1549         the actual m4_token for hashing in the caller so the methods just
1550         slot them in directly.  Also, this means that we don't lookup a
1551         symbol and get back an allocated but VOID token to copy fields
1552         into, we create the token we want to push and pass that to
1553         m4_symbol_define or m4_symbol_pushdef.  And that's it.  There are
1554         a few other small changes to stop knowledge of the implementation
1555         of symtab.c leaking out into other files.
1557         * m4/macro.c (expand_argument): Comment typo corrected.
1558         * m4/symtab.c (symtab_fetch): New function to fetch the address of
1559         an interned symbol.
1560         (m4_symbol_pushdef): Take an extra value parameter and use this
1561         directly as the new top of the value stack.  All callers changed
1562         to build a token and pass responsibility for memory in, rather
1563         than copying as we used to.
1564         (m4_symbol_define): Also use the new value parameter directly as a
1565         replacement for the top of the value stack.  All callers changed
1566         to build a token as above.
1567         (m4_set_symbol_traced): New function to set the traced bit on the
1568         named symbol, creating it if necessary.
1569         (symbol_popval): The guts of the old m4_symbol_popdef.
1570         (m4_symbol_popdef): Use it.
1571         * m4/builtin.c (m4_symbol_set_token): Removed,
1572         (m4__symbol_set_builtin, m4__symbol_set_macro): Removed and
1573         replaced...
1574         * m4/module.c (m4_set_module_builtin_table)
1575         (m4_set_module_macro_table): ...with these more orthogonal
1576         functions.
1577         * m4/m4module.h (m4_macro_pushdef, m4_macro_define)
1578         (m4_builtin_pushdef, m4_builtin_define): Removed.  No longer
1579         required.
1580         * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE)
1581         (m4_arg_signature_parse): Moved...
1582         * m4/symtab.c: ...to here.
1583         * m4/input.c (m4_token_copy): Arghh... I'm amazed this didn't
1584         screw something up. Moved...
1585         * m4/symtab.c (m4_token_copy): ...to here, and fixed so that it
1586         actually does a proper deep copy of source to dest.
1588 2003-06-16  Gary V. Vaughan  <gary@gnu.org>
1590         Further refactoring to stabilise the module API.  Renaming some
1591         functions for orthogonality, and judicious definition migration to
1592         move things out of the set of exported symbols.
1594         * doc/STYLE: New file.  Notes on coding style.
1595         * m4/m4module.c: Updated bitrotted docucomment at the top of the
1596         file.
1597         (m4_module_name, m4_module_builtins, m4_module_macros): Renamed to
1598         m4_get_module_name, m4_get_module_builtin_table,
1599         m4_get_module_macro_table which are verb phrases.  Changed all
1600         callers.
1601         * m4/builtin.c (m4_builtin_table_install, m4_macro_table_install):
1602         Moved to...
1603         * m4/module.c (m4_set_module_builtin_table)
1604         (m4_set_module_macro_table): ...here, and renamed. Changed all
1605         callers.
1606         * m4/m4module.c (m4_module_data): This...
1607         * m4/m4private.c (struct m4_module_data): ...and this...
1608         * m4/module.c (module_data) ...consolidated here and no longer
1609         exported.  Changed all callers.
1611 2003-06-16  Gary V. Vaughan  <gary@gnu.org>
1613         Begin work on lifting the curse of the global variables.  To start
1614         with create a `struct m4' context container, and replace
1615         `m4__symtab' with `context->symtab' throughout.  This means
1616         initialising a context container in main, and adjusting many
1617         functions between main and the module entry points so that the
1618         container gets passed through.  It would have been nice to
1619         defer this until after 1.5, but it has a major effect on the
1620         user's module writing ABI, so it needs to be addressed now - at
1621         least in the areas that impact the ABI.  An interrelated change
1622         in the symtab API removes the dependency on a global symbol table,
1623         and instead focuses on a passed table (from the context
1624         container).
1626         * TODO: Reminders for finishing context functionality.
1627         * m4/Makefile.am (libm4_la_SOURCES): Add m4.c.
1628         * m4/m4.c: New file. Manage new struct m4 objects to eliminate
1629         global variables and eventually allow m4 to be reentrant.
1630         * m4/m4private.h (m4): Define the new structure here...
1631         (M4_SYMTAB, m4_get_symtab): ...so we can have fast accessors that
1632         don't carry the overhead of a function call.
1633         * m4/m4module.h: Prototype extern functions from m4/m4.c.
1634         (m4): Declare type for new struct m4 objects.
1635         (M4SYMTAB): User macro to ease finding the symbol table for the
1636         current context for module developers.
1637         (m4_symbol_token): Renamed to m4_symbol_set_token which contains a
1638         verb.
1639         (M4_BUILTIN, m4_builtin_func, M4_BUILTIN_HANDLER)
1640         (m4_builtin_define, m4_builtin_pushdef, m4_builtin_table_install)
1641         (m4_call_macro, m4_dump_symbols, m4_expand_input)
1642         (M4_FINISH_HANDLER, M4_INIT_HANDLE, m4_macro_define)
1643         (m4_macro_pushdef, m4_macro_table_install, m4_module_load)
1644         (m4_module_unload, m4_process_macro, m4_symbol_set_token): Add an
1645         m4* context parameter. Changed definitions and all callers.
1646         (m4_symtab): Alias for m4_hash to decouple the
1647         m4_symtab api from m4_hash.
1648         (m4_symtab_apply, m4_symtab_apply_func): Use m4_symtab instead of
1649         m4_hash.
1650         (m4_symtab_create): New function to return an initialised
1651         m4_symtab.
1652         (m4_symtab_delete): New function to delete an m4_symtab's memory.
1653         (m4_symbol_define, m4_symbol_delete, m4_symbol_lookup)
1654         (m4_symbol_popdef, m4_symbol_pushdef): Add an m4_symtab parameter
1655         instead of simply using the global m4__symtab.  Changed
1656         definitions and all callers.
1657         * m4/m4private.h (m4__symtab_remove_module_references): Ditto.
1658         * m4/symtab.c (m4__symtab_init, m4__symtab_exit): Removed.
1659         * src/main.c (main): Create a context and use that instead of the
1660         former global m4__symtab.
1662 2003-06-13  Gary V. Vaughan  <gary@gnu.org>
1664         * m4/hash.c (m4_hash_apply): Pass an initial hash table parameter
1665         to the callback.  Callbacks should not need to hardcode the
1666         hashtable they are working from, nor should we have to waste the
1667         userdata parameter to pass the table in.
1668         * m4/hash.h (m4_hash_apply_func): Require the initial table
1669         parameter.
1670         * m4/symtab.c (symtab_destroy): Use the passed table instead
1671         of hardcoding m4__symtab.
1672         (m4_symbol_popdef): Don't use the userdata parameter to pass the
1673         table to arg_destroy.
1674         (arg_destroy): Use the hash parameter, ignore userdata.
1675         * modules/m4.c (set_trace): Make it fit the m4_hash_apply_func
1676         prototype.
1677         (traceon, traceoff): Call set_trace with the extra initial
1678         parameter.
1680 2003-06-13  Gary V. Vaughan  <gary@gnu.org>
1682         More refactoring to stabilise the module api, this time for
1683         symtab.c.  Additionally, start to pay attention to function names
1684         that don't contain a verb like they should.
1686         * m4/m4module.h (m4_symtab_apply): Reintroduced this function as a
1687         wrapper for m4_hash_apply to decouple the symtab module from the
1688         hash module.
1689         (m4_symbol_builtin, m4_symbol_macro): Renamed to
1690         m4__symbol_set_builtin and m4__symbol_set_macro.  Changed all
1691         callers.
1692         (m4_symbol_delete): Create a macro version to save a function
1693         call.
1694         (m4_token_t, m4_data_t): These violate the POSIX reserved
1695         namespace.  Renamed to m4_token_type and m4_symbol_type. Changed
1696         all callers.
1697         (m4_token_type): Renamed to m4_token_get_type.
1698         (m4_symtab, m4_symtab_init, m4_symtab_remove_module_references)
1699         (m4_symtab_exit): Removed from the exported module
1700         api...
1701         * m4/m4private.h (m4__symtab, m4__symtab_init)
1702         (m4__symtab_remove_module_references, m4__symtab_exit): ...and
1703         renamed and added to the internal api. Changed all callers.
1704         (m4_symtab_apply): A faster macro version of the function for
1705         users of the internal api.
1706         * m4/symtab.c (m4_symbol_destroy, m4_arg_destroy): Renamed to
1707         symbol_destroy and arg_destroy.
1708         (symtab_debug): Added a prototype.
1709         (m4_symtab_apply, m4_symbol_delete): Moved to the end of the file
1710         so that callers in this file get the faster macro versions from
1711         m4/m4private.h.
1713 2003-06-12  Gary V. Vaughan  <gary@gnu.org>
1715         Refactoring modules to rationalise the API into an external
1716         documented (eventually!) API for use by modules in the `m4_'
1717         namespace declared in m4/m4module.h, an internal API between the
1718         source files we ship (including our shipped modules) in the `m4__'
1719         namespace declared in m4/m4private.h and making the rest as
1720         cohesive as possible with liberal use of the `static' keyword.
1721         This change represents an audit to m4/module.c along these
1722         guidelines.
1724         * m4/m4module.h (m4_module_close_all, m4_module_find_by_builtin):
1725         Removed.  No longer used.
1726         (m4_module_close): Removed prototypes.
1727         (m4_module_init, m4_module_open, m4_module_unload_all): Removed
1728         from the exported module api...
1729         * m4/m4private.h (m4__module_init, m4__module_open)
1730         (m4__module_exit): ...and renamed and added to the internal api.
1731         Changed all callers.
1732         (BUILTIN_SYMBOL, MACRO_SYMBOL, INIT_SYMBOL, FINISH_SYMBOL):
1733         Centralised definitions after renaming...
1734         * m4/module.c (M4_BUILTIN_SYMBOL, M4_MACRO_SYMBOL, M4_INIT_SYMBOL)
1735         (M4_FINISH_SYMBOL): ...and removing from here.
1736         (m4_module_dlerror, m4_module_remove, m4_module_close)
1737         (m4_caller_id): Not exported at all, so renamed to module_dlerror,
1738         module_remove, module_close and caller_id.
1739         (MODULE_SELF_NAME): New macro to make reporting self errors
1740         easier.
1741         (m4_module_load, module_close, module_remove): Use it.
1742         * m4/m4private.h (USER_MODULE_PATH_ENV): Macro to hold "M4MODPATH"
1743         name.
1744         * src/main.c (main): Use it.
1746 2003-06-12  Gary V. Vaughan  <gary@gnu.org>
1748         * README: Remove references to --enable-changeword, which has been
1749         removed from the code.
1751 2003-06-11  Gary V. Vaughan  <gary@gnu.org>
1753         Getting rid of the annoying bug with configure --enable-debug,
1754         which spewed -e: command not found errors.  This was an interaction
1755         between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4.
1756         You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or
1757         branch-1-5) to get the full fix.
1759         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version
1760         of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED),
1761         and then use the probed value of $SED.
1762         (AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define
1763         this, it messes up the AC_REQUIRE stack.
1765 2003-06-10  Gary V. Vaughan  <gary@gnu.org>
1767         * m4/symtab.c (m4_symbol_popdef): Need to pass the hash address to
1768         the destroy callback.
1769         (m4_arg_destroy): Use the hash address to free the hash node key
1770         field.
1772 2003-06-06  Gary V. Vaughan  <gary@gnu.org>
1774         First cut at formal parameters in macros.
1776         * configure.ac (AC_REPLACE_FUNCS): Add xstrzdup.
1777         * m4/xstrzdup.c: New file.
1778         * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE): Start size for
1779         associative array of parameter names to details.
1780         (m4_symbol_token): Capture macro names with parameter lists.
1781         (m4_arg_signature_parse): And build an associative array to hang
1782         from the symbol structure to map names to details.
1783         * m4/hash.c (m4_hash_new): Break the m4_hash_new followed by
1784         m4_hash_resize idiom.  Now that we potentially add a little hash
1785         table to many of the entries in the symbol table, added an extra
1786         arg to set the initial size.  Changed all callers.
1787         (m4_hash_apply): New function that is basically a generalised
1788         version of...
1789         * m4/symtab.c (m4_symbol_apply): ...this.  Now deleted.  Adjusted
1790         all callers to call m4_hash_apply instead.
1791         (m4_arg_destroy): Recycle memory used by an m4_token_arg.
1792         (m4_symbol_popdef): Use m4_arg_destroy to help recycle the
1793         m4_arg_signature association that might be attached to the symbol,
1794         * m4/hash.h (m4_hash_apply_func): Replacement type for...
1795         * m4/m4module.h (m4_symtab_apply_func): ...this.  Now deleted.
1796         (M4_SYNTAX_ASSIGN): Placeholder for assigning default values in
1797         parameter lists.
1798         (M4_IS_ASSIGN): Detect characters with M4_SYNTAX_ASSIGN syntax.
1799         (M4_IS_IDENT): Detect characters that can be safely used in
1800         parameter names.
1801         * m4/syntax.c (m4_syntax_init): Add an M4_SYNTAX_ASSIGN character.
1802         * m4/macro.c: Corrected grammar in some comments.  Use `token'
1803         rather than `td' for m4_token variables.
1804         (m4_process_macro): If we find a dollar followed by some
1805         M4_IS_IDENT characters, replace that with the contents of the argv
1806         entry with offset stored in the m4_token_arg associated with the
1807         collected identifier.
1809 2003-06-05  Gary V. Vaughan  <gary@gnu.org>
1811         Begin preparations for supporting formal parameters in m4 macros.
1813         * m4/m4private.h (struct m4_token_arg): Placeholder for holding
1814         the details of a formal parameter.
1815         (m4_token): Add an arg_signature member to hold a hash table for
1816         looking up formal parameters.
1817         * m4/input.c: Update more bitrotted comments.
1818         (m4_push_builtin): Initialise arg_signature member.
1819         (init_builtin_token): Copy arg_signature member.
1820         * m4/m4module.h (m4_builtin_pushdef, m4_builtin_define)
1821         (m4_macro_pushdef, m4_macro_define): Rewritten as macros to
1822         replace...
1823         * m4/builtin.c (m4_builtin_pushdef, m4_builtin_define)
1824         (m4_macro_pushdef, m4_macro_define): ...these, And...
1825         (m4_symbol_token): ...wrapped around this new function, which
1826         vastly simplifies the arguments required by the functions it
1827         replaces.
1828         Changed all callers.
1830 2003-06-05  Gary V. Vaughan  <gary@gnu.org>
1832         * m4/macro.c: Format changes.
1834 2003-06-04  Gary V. Vaughan  <gary@gnu.org>
1836         * m4/input.c: Updated various bitrotted comments.
1837         (m4_push_builtin): Just pass the whole m4_token, rather than
1838         extracting all the fields in the caller.  This also allows us to
1839         check the token type for consistency.
1840         (macro_funcs, macro_peek, macro_read, m4_push_macro, CHAR_MACRO):
1841         Renamed to builtin_funcs, builtin_peek, builtin_read,
1842         m4_push_builtin and CHAR_BUILTIN for consistency with the rest of
1843         the code.  Changed all callers.
1844         (struct input_block): Similarly renamed u_m member to u_b, and
1845         changed all callers.
1846         (m4_next_token): Use bzero to initialise the data fields.
1847         * m4/m4module (m4_push_macro): Renamed to m4_push_builtin.
1849 2003-05-29  Gary V. Vaughan  <gary@gnu.org>
1851         These changes were necessary to get m4 to build on my iBook
1852         running "powerpc-apple-darwin6.6" using Apples build of gcc "gcc
1853         (GCC) 3.1 20020420 (prerelease)":
1855         * src/main.c: Don't include dlfcn.h, ltdl.h handles correct
1856         inclusion of module loader headers.
1857         * modules/Makefile.am: Use AM_LDFLAGS, not LDFLAGS.
1858         * m4/Makefile.am: Ditto.
1859         (libm4_la_LIBADD): Added $(LTLIBINTL).
1860         * m4/utility.c (program_name): Removed declaration in favour of
1861         the one already in error.c!
1862         * m4/m4module.h (program_name): Define to program_invocation_name
1863         when using GNU C library. Use an explicit extern declaration.
1864         (interactive, sync_output, debug_level, hash_table_size)
1865         (no_gnu_extensions, prefix_all_builtins, max_debug_argument_length)
1866         (suppress_warnings, warning_status, nesting_limit, discard_comments)
1867         (lquote, rquote, bcomm, ecomm, m4_bad_argc, m4_skip_space)
1868         (m4_numeric_arg, m4_shipout_int, m4_shipout_string, m4_dump_args)
1869         (m4_debug, m4_debug_init, m4_debug_exit, m4_debug_decode)
1870         (m4_debug_flush_files, m4_debug_set_output, m4_debug_message_prefix)
1871         (m4_trace_prepre, m4_trace_pre, m4_trace_post, m4_sysval)
1872         (m4_expansion_level, m4_expand_ranges, m4_expand_input)
1873         (m4_call_macro, m4_process_macro, m4_syntax_table, m4_current_file)
1874         (m4_current_line, m4_current_diversion, m4_output_current_line):
1875         Don't rely on default, use an explicit extern.
1876         * m4/error.h (error, error_at_line, error_print_progname)
1877         (error_message_count, error_one_per_line): Ditto.
1878         * m4/ltdl.c: Update from CVS libtool.
1879         * m4/ltdl.h: Ditto.
1880         * commit: Update from CVS cvs-utils.
1882 2002-11-04  Akim Demaille  <akim@epita.fr>
1884         * doc/m4.texinfo (Esyscmd): Don't grep, use something easier:
1885         running m4 itself.
1886         * tests/others.at (iso8859): Use abs_srcdir, not srcdir.
1888 2002-11-04  Akim Demaille  <akim@epita.fr>
1890         * config/Makefile.am (ACLOCAL_MACROS): Ship the Gettext macros.
1892 2002-11-04  Akim Demaille  <akim@epita.fr>
1894         * configure.ac: Automake 1.7.1, Autoconf 2.54, Gettext 0.11.5,
1895         used as `external', and Libtool 1.4.3.
1896         (LINGUAS): Remove.
1897         (LTLIBOBJS): Don't play with it.
1898         * intl/: Remove.
1899         * Makefile.am (SUBDIRS): Remove intl.
1900         (ACLOCAL_AMFLAGS): Add -I config.
1901         (EXTRA_DIST): Add config/config.rpath.
1902         * po/LINGUAS: New.
1903         * po/Makevars: New.
1904         * modules/perl.c (M4INIT_HANDLER): Don't prototype xs_init.
1906 2002-05-29  Gary V. Vaughan  <gary@gnu.org>
1908         Preparations for refactoring syntax tables to allow reverse
1909         lookups [fetch me a M4_SYNTAX_OPEN], without compromising the
1910         speed of normal lookups in an array of unsigned short.
1912         * m4/input.c (single_quotes, single_comments, use_macro_escape):
1913         Moved from here...
1914         * m4/m4private.h (m4__single_quotes, m4__single_comments,
1915         m4__use_macro_escape): ...to here, and renamed.  The `m4__' prefix
1916         is for internal symbols which unavoidably pollute the global
1917         namespace, but are not published APIs.
1918         Adjusted all callers.
1919         * m4/input.c (m4_syntax_init, m4_syntax_code, m4_set_quotes,
1920         m4_set_comment, m4_set_syntax, set_syntax_internal,
1921         unset_syntax_attribute): Moved from this file...
1922         * m4/syntax.c: New. ...to this file.
1923         Also added an m4_syntax_exit stub for orthogonality.
1924         * src/main.c (main): Use it.
1925         * m4/Makefile.am (libm4_la_SOURCES): Add syntax.c.
1926         * m4/m4module.h: Reformatting.  New prototypes.
1928 2002-05-29  Gary V. Vaughan  <gary@gnu.org>
1930         * bootstrap (aclocal_apiversion): The aclocal apiversion is
1931         distinct from the automake release number (in that the apiversion
1932         apparently has no micro-version-component).
1933         (aclocal_apilibdir): Use it.
1935 2002-05-28  Gary V. Vaughan  <gary@gnu.org>
1937         * m4/hash.c (m4_hash_resize): New function.
1938         * m4/hash.h: Add prototype.
1939         * m4/symtab.c (m4_symtab_init):  Use it.  This could do with some
1940         benchmarking to find a good value for, say, autoconf.  This is
1941         already a little quicker than before for me.
1943         * m4/symtab.c (m4_symtab_hash, m4_symtab_cmp): Moved from here...
1944         * m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): .. to here,
1945         and reenamed.
1946         * m4/hash.h: Adjust prototypes.
1948 2002-01-22  Akim Demaille  <akim@epita.fr>
1950         * bootstrap (aclocal_apilibdir): New, to cope with Automake's new
1951         APIVERSION scheme.
1952         * tests/Makefile.am (package.m4): New.
1953         * tests/atlocal.in: Adjust to CVS Autotest.
1954         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use AC_LIBOBJ.
1955         * configure.ac: LIBOBJ is a forbidden string.
1956         Simplify AM_INIT_AUTOMAKE invocation.
1957         * config/Makefile.am (ACLOCAL_MACROS): Add amversion.m4 and
1958         options.m4.
1960 2001-10-19  Akim Demaille  <akim@epita.fr>
1962         * m4/module.c, m4/output.c, src/main.c: Normalize error messages.
1964 2001-10-19  Akim Demaille  <akim@epita.fr>
1966         * m4/input.c (m4_next_token): Display where was opened what is
1967         not closed.
1969 2001-10-19  Akim Demaille  <akim@epita.fr>
1971         * m4/macro.c (expand_argument): Display where was opened what is
1972         not closed.
1974 2001-10-18  Akim Demaille  <akim@epita.fr>
1976         * m4/input.c, modules/m4.c: Formatting changes.
1978 2001-10-17  Gary V. Vaughan  <gary@gnu.org>
1980         * bootstrap: s/configure.in/configure.ac/
1982 2001-10-16  Gary V. Vaughan  <gary@gnu.org>
1984         * m4/symtab.c (m4_symbol_destroy): This function calls
1985         m4_symbol_popdef, which recycles a symbols memory when the last
1986         definition is popped.  Since we were passing the address of the
1987         symbol name found in the symbol table, and it was being removed
1988         partway through m4_symbol_destroy() we were referencing freed
1989         memory for the balance of the function.  Now we take a copy of the
1990         symbol name tring and use that as a key into the symbol
1991         table... that way if the original symbol name is freed, the copy
1992         is still valid.
1994 2001-10-13  Akim Demaille  <akim@epita.fr>
1996         * m4/ltdl.c: Update.
1998 2001-10-13  Akim Demaille  <akim@epita.fr>
2000         * src/main.c, src/freeze.c, m4/debug.c, m4/input.c, m4/macro.c:
2001         Don't gettextize internal error messages.
2003 2001-10-13  Akim Demaille  <akim@epita.fr>
2005         * tests/macros.at (Arity and defn): New failing test.
2006         (Arity, defn, and freeze): New.
2008         Fix `Arity and defn'.
2010         * m4/input.c (m4_push_macro): Don't forget the arity.
2011         * modules/m4.c (defn): Likewise.
2013 2001-10-13  Akim Demaille  <akim@epita.fr>
2015         * tests/builtins.at (pushdef/popdef, trace, trace2, trace3): Move
2016         to...
2017         * tests/macros.at (pushdef/popdef, Tracing Hanoi Towers)
2018         (Propagation of traceon, Propagation of --trace): this new file.
2020 2001-10-13  Akim Demaille  <akim@epita.fr>
2022         * m4/utility.c (m4_numeric_arg): Use the usual (argc, argv, ...)
2023         interface instead of (name, argc...).
2024         Upon failure, specify which argument was guilty.
2025         Adjust callers.
2027 2001-10-13  Akim Demaille  <akim@epita.fr>
2029         * modules/evalparse.c: Save translators' time: don't translate
2030         internal error messages.
2031         (m4_evaluate): Simplify/normalize error messages.
2032         * doc/m4.texinfo (Eval): Adjust.
2034 2001-10-13  Akim Demaille  <akim@epita.fr>
2036         * m4/macro.c (expand_macro): Let m4_bad_argc handle the cases
2037         where no checking is needed.
2038         * m4/utility.c (m4_bad_argc): Use the usual (argc, argv, ...)
2039         interface instead of (name, argc...).
2040         Adjust callers.
2041         * modules/gnu.c (m4_patsubst_do): Don't check argc, done
2042         elsewhere.
2044 2001-10-13  Akim Demaille  <akim@epita.fr>
2046         * m4/utility.c (m4_bad_argc): Display user argument counts, i.e.,
2047         exclude the builtin name from the count.
2048         * modules/m4.c (ifelse): Do not use the regular argc mechanism, as
2049         calling ifelse with a single argument is valid.
2050         * doc/m4.texinfo (Ifelse): Add an example where ifelse is invoked
2051         with 1 and 2 args, mostly to strengthen the test suite.
2053 2001-10-13  Akim Demaille  <akim@epita.fr>
2055         * m4/output.c (m4_make_diversion, m4_insert_file)
2056         (m4_insert_diversion, +m4_freeze_diversions): Ansify.
2058 2001-10-12  Gary V. Vaughan  <gary@gnu.org>
2060         * m4/input.c (init_builtin_token):  Renamed from init_macro_token,
2061         since we call these things builtins in the rest of the code!
2063         * modules/gnu.c (m4_regexp_compile): s/%0/%s/
2065 2001-10-12  Gary V. Vaughan  <gary@gnu.org>
2067         Rather than forcing each builtin definition to manage its own
2068         argument range checking, tabulate the maxima and minima for all
2069         builtins in each module.  This forces us to consider what the
2070         valid ranges for each builtin should be, and moves the checking
2071         code out of each builtin implementation and into the builtin
2072         caller infrastructure.
2074         * m4/m4module.h (struct m4_builtin): Add argument minima and
2075         maxima.
2076         * m4/m4private.h (struct m4_token): Reflect them here too.
2077         * m4/input.c (struct input_block): ...and here.
2078         (m4_token_copy): New function for token copying.
2079         (init_macro_token): Copy them from a token to the input stack.
2080         (m4_next_token): Don't forget to initialise them for text
2081         macros.
2082         * m4/macro.c (expand_argument): Use m4_token_copy, and also
2083         check argument counts before calling the builtin handler.
2084         * m4/symtab.c (m4_symbol_builtin): Take minima and maxima params.
2085         (m4_symbol_macro): Likewise.
2086         * m4/builtin.c (m4_builtin_pushdef): Add min_args and max_args
2087         parameters.  Updated all callers.
2088         (m4_builtin_define): Ditto.
2089         (m4_macro_pushdef, m4_macro_define): Ditto.
2090         * m4/symtab.c (m4_symbol_builtin, m4_symbol_define): Ditto.
2091         * modules/evalparse.c:  Declare argument counts for defined
2092         builtins and remove explicit calls to m4_bad_argc().
2093         * modules/gnu.c: Ditto.
2094         * modules/load.c: Ditto.
2095         * modules/m4.c: Ditto.
2096         * modules/modtest.c: Ditto.
2097         * modules/mpeval.c: Ditto.
2098         * modules/perl.c: Ditto.
2099         * modules/shadow.c: Ditto.
2100         * modules/stdlib.c: Ditto.
2101         * modules/time.c: Ditto.
2102         * TODO: Updated.
2104 2001-10-10  Gary V. Vaughan  <gary@gnu.org>
2106         The trace semantics now attach the trace bit to a symbol name.
2107         For as long as a traceon(`foo') is active, calls to foo will be
2108         traced regardless of intervening undefines or module unloads.
2109         Fixed the flag propogation issues differently to the fixes
2110         reverted with the last attempt at nailing down trace:
2112         * m4/m4private.h:  This file is not visible outside of the m4
2113         source tree, so I removed all the `M4_' and `m4_' prefixes to save
2114         on typing.  Updated all clients.
2115         (m4_token): New typedef contains the fields that need to be passed
2116         around with the low level tokeniser.
2117         (m4_token_data):  Removed.
2118         (m4_symbol): Now contains the traced flag again.
2119         * m4/symtab.c:  Rewritten again.  Now we don't remove symbols with
2120         the trace bit set.  This change is contained entirely within this
2121         module and doesn't leak out into the callers.  Updated all
2122         clients.
2123         (m4_symbol_builtin, m4_symbol_macro):  Adjusted to make use of the
2124         new fields in m4_token.  Updated all clients.
2125         * m4/builtin.c (m4_builtin_pushdef):  Needs a flags argument so
2126         that `groks_macro_args' and `blind_if_no_args' flags are retained
2127         when defn() results are passed around in m4 code.  Updated all
2128         callers.
2129         (m4_builtin_define): Ditto.
2130         (m4_macro_pushdef, m4_macro_define): Ditto.
2131         * m4/input.c (struct input_block): Add a flags field to facilitate
2132         the above.
2133         (m4_push_macro):  ...use it.
2134         (init_macro_token):  Retrieve it.
2135         (m4_next_token): Initialise it.
2136         * m4/macro.c (expand_argument):  Copy it.
2137         * m4/m4module.h: Adjust.
2138         * tests/builtins.at:  Adjust the expected output of the trace
2139         tests to reflect the change in semantics.
2140         * tests/modules.at (modules: trace):  Check that unloading a
2141         module which supplies a traced symbol definition doesn't lose te
2142         trace bit.
2144 2001-10-07  Gary V. Vaughan  <gary@gnu.org>
2146         * modules/gnu.c (m4_macro_table): Display the timetamp when
2147         expanding __m4_version__.
2149         * configure.ac (--with-modules): Forgot a comma in the
2150         AC_HELP_STRING parameter list.
2152 2001-10-05  Gary V. Vaughan  <gary@gnu.org>
2154         * bootstrap: Remove aclocal.m4t when it is no longer required.
2156 2001-10-05  Akim Demaille  <akim@epita.fr>
2158         * tests/Makefile.am: Adjust for gnuprog2.
2159         * tests/m4.in: There can be a leading path.
2160         * tests/modules.at (AT_CHECK_M4_MODTEST): No need for $4 and $5.
2161         * tests/testsuite.at: Adjust to the most recent Autotest.
2162         (AT_CHECK_M4_FILTER): Fix and rename as...
2163         (AT_TEST_M4): this.
2164         * tests/others.at: Use it.
2166         * config/gmp.m4 (_AC_LIB_GMP): In order to read the content of a
2167         variable in shell scripts, one uses `$'...
2169 2001-10-04  Gary V. Vaughan  <gary@gnu.org>
2171         * configure.ac: `rm -f $m4_getopt_h' was lost.
2173 2001-10-04  Gary V. Vaughan  <gary@gnu.org>
2175         * configure.ac (TIMESTAMP): Display with AS_BOX at configure
2176         time.  Define it for config.h in order to...
2177         * src/main.c (main): ...display the timestamp for --version.
2179 2001-10-04  Akim Demaille  <akim@epita.fr>
2181         * modules/gnu.c (m4_regexp_do, m4_patsubst_do): Extracted from
2182         previous builtins `regexp' and `patsubst'.
2183         (regexp, patsubst): Use them.
2184         (eregexp, epatsubst): New builtins.
2185         * doc/m4.texinfo (Patsubst, Regexp): Rename and complete as...
2186         (Epatsubst and Patsubst, Eregexp and Regexp): these.
2187         (Extensions): More info on REs.
2189 2001-10-04  Akim Demaille  <akim@epita.fr>
2191         * modules/modtest.c (init_handler): Consistently output to stderr.
2192         (finish_handler): New.
2193         (test): The `if' is an `assert'.
2194         * tests/modules.at: Adjust.
2196 2001-10-04  Akim Demaille  <akim@epita.fr>
2198         * m4/utility.c (m4_bad_argc): Detail the mismatches.
2200 2001-10-01  Akim Demaille  <akim@epita.fr>
2202         * tests/generate.awk: Tag the tests with `documentation'.
2203         * tests/modules.at (AT_CHECK_M4_MODTEST): New.
2204         Use the make the existing modtest tests more uniform, and complete
2205         the set of possibilities.
2207 2001-10-01  Akim Demaille  <akim@epita.fr>
2209         * config/gmp.m4: Consult the user before using GMP: use
2210         --without-gmp.
2211         * configure.ac: Adjust.
2212         * modules/gmp.c: No protection needed as the module is not built
2213         if GMP is not used.
2215 2001-10-01  Akim Demaille  <akim@epita.fr>
2217         * tests/generate.awk: Remove debugging code.
2218         (fatal): Specify the current location.
2220         * m4/debug.c, m4/macro.c, m4/utility.c, modules/format.c,
2221         * modules/gnu.c, modules/m4.c: Use M4ARG.
2223 2001-10-01  Akim Demaille  <akim@epita.fr>
2225         * modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE): New.
2226         (m4_regexp_compile): New.
2227         (regexp, patsubst): Use it.
2229 2001-09-30  Gary V. Vaughan  <gary@gnu.org>
2231         Reinstate the memory handling improvements from the patch I just
2232         reverted.  Relevant ChangeLog entries repeated here:
2234         * m4/module.c (m4_module_remove): New function that holds the core
2235         of the old m4_module_unload.
2236         (m4_module_unload): Use it.
2237         (m4_module_unload_all): When we know the modules will never be
2238         used again (i.e. on exit), free up as much module memory as
2239         possible.  There are still some artifacts from resident modules
2240         living inside ltdl.c, but everything else is freed.
2241         * m4/debug.c (m4_debug_exit): Free memory allocated in
2242         m4_debug_init().
2243         * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2244         * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2245         * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2246         * m4/m4module.h: Updated prototypes.
2247         * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2248         * m4/hash.h: Updated prototypes.
2249         * src/main.c (main): Use all these new functions to clean up as
2250         much memory as possible before exit.
2252 2001-09-30  Gary V. Vaughan  <gary@gnu.org>
2254         Reverted my large patch for removing the old m4_symbol
2255         structure on 2001-09-20.  We are still not happy about the way
2256         trace works in conjunction with defn and undefine, and leaving
2257         the reverted patch active prevents us from moving the traced
2258         bit from the definition back to the symbol.
2260 2001-09-30  Gary V. Vaughan  <gary@gnu.org>
2262         * configure.in: Moved to...
2263         * configure.ac: ...here.  Added a libtool like timestamped
2264         banner, and tidied up the libltdl cruft.
2265         * config/mkstamp: Script to extract a timestamp from ChangeLog.
2266         * modules/Makefile.am (INCLTDL):  Removed.  This is required
2267         only when libltdl is configured in a subdirectory.
2268         * src/Makefile.am: Ditto.
2269         (LIBADD_DL):  No need to add this again, libtool already knows
2270         that libm4.la depends on it.
2271         * m4/Makefile.am: Automake sets variables from AC_SUBST.  Use
2272         them.
2274         * TODO: stackovf.c is basically broken.
2275         Reported by Marc Espie <espie@schutzenberger.liafa.jussieu.fr>
2277 2001-09-28  Akim Demaille  <akim@epita.fr>
2279         * tests/Makefile.am (EXTRA_DIST): `m4' is not to be shipped.
2281 2001-09-27  Akim Demaille  <akim@epita.fr>
2283         * tests/m4.in: Don't use short options.
2284         Simplify the stderr signature normalization.
2286 2001-09-27  Akim Demaille  <akim@epita.fr>
2288         tests/m4 shall be position independent.
2290         * tests/m4.in: New.
2291         * tests/m4: Remove.
2292         * tests/testsuite.at: No args to AT_INIT.
2293         * configure.in, tests/Makefile.am: Adjust.
2295 2001-09-22  Akim Demaille  <akim@epita.fr>
2297         Autotest has changed again.
2299         * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2300         (package.m4): Remove.
2301         * configure.in: Adjust to LIBADD_GMP.
2303 2001-09-21  Gary V. Vaughan  <gary@gnu.org>
2305         * config/gmp.m4 (AC_ARG_WITH): Removed.
2306         (GMP_LIB): Renamed to LIBADD_GMP for consistency.
2307         (AC_LIB_GMP): When performing a test compile against libgmp,
2308         include the header gmp.h if possible, and link against -lgmp.  If
2309         they both work define USE_GMP.
2310         * modules/Makefile.am (mpeval_la_LIBADD): Add LIBADD_GMP.
2311         (mpeval_LTX_init_func): Complain on load that there was no libgmp
2312         at compile time.
2314 2001-09-20  Gary V. Vaughan  <gary@gnu.org>
2316         * m4/evalparse.c: Moved to...
2317         * modules/evalparse.c:  ...here.  This code is shared between
2318         modules/mpeval.c and modules/m4.c, so there is no need to pollute
2319         the libm4 API with its details.  Moderately rewritten to interface
2320         into its clients more simply.
2321         * m4/eval.c: Deleted.  Migrated functionality to...
2322         * modules/m4.c: ...here.
2323         (builtin_eval):  Implemented in terms of the new interface style.
2324         * modules/mpeval.c (builtin_mpeval): Ditto.
2325         * m4/m4module.h: Removed references to the former m4/eval.c.
2326         * m4/Makefile.am (libm4_la_SOURCES):  Removed eval.c.
2327         (EXTRA_libm4_la_SOURCES): Deleted.
2328         * modules/Makefile.am (EXTRA_m4_la_SOURCES): Reference evalparse.c.
2329         (EXTRA_mpeval_la_SOURCES): Reference evalparse.c.
2331 2001-09-20  Akim Demaille  <akim@epita.fr>
2333         * config/gmp.m4 (AM_WITH_GMP): Rename as...
2334         (AC_LIB_GMP): this.
2335         By default, use gmp.
2336         Massive revamping.
2337         * configure.in: Adjust.
2338         Use Automake conditionals for USE_GMP.
2339         Always compute sizeof (long long int).
2340         This was a bug BTW, as `eval' (not `mpeval') depends on it:
2341         before, it was used _only_ if mpeval was not activated.
2342         * modules/Makefile.am (pkglibexec2dir, +pkglibexec2_LTLIBRARIES)
2343         (mpeval_la_LIBADD): New macros.
2344         * modules/mpeval.c: No longer be conditioned by WITH_GMP.
2345         Indent.
2346         * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Create package.m4.
2347         * tests/atlocal.in, tests/builtins.at: Depend upon USE_GMP, not
2348         WITH_GMP.
2350 2001-09-20  Akim Demaille  <akim@epita.fr>
2352         * tests/Makefile.am (package.m4): New.
2353         * tests/testsuite.at: Adjust AT_INIT and AT_VICTIMS.
2355 2001-09-20  Gary V. Vaughan  <gary@gnu.org>
2357         More cleanup.  After the last patch, m4_symbol holds nothing but
2358         the head of a chain of m4_token_data.  So I have removed the old
2359         m4_symbol, so that m4_token_data chains are stored directly in the
2360         value cell of a hash table node.  But there's more... m4_symbol
2361         was a more natural name for the symbol value cell, and now that it
2362         is gone I have renamed the former m4_token_data structure to
2363         m4_symbol.  This change turned out to be a pig to get right, since
2364         the original code didn't need to modify the value cell itself,
2365         since changing the chain happened inside the m4_symbol that used
2366         to be returned -- I had to pass the address of the value cell
2367         across various function calls, incase the head value changed.  I
2368         also tightened up the memory management to help me find a nasty
2369         memory corruption bug that took me all night to track down...
2371         * m4/m4private.h (struct m4_symbol): Removed.
2372         (struct m4_token_data): Renamed to `struct m4_symbol'.  Updated
2373         all references.
2374         * m4/hash.c (m4_hash_iterator_value): Return the address of the
2375         value cell.  Updated all callers.
2376         * m4/symtab.c: Took advantage of the simplification in the data
2377         structures to rewrite a lot of this file more simply.  There is
2378         still some room for optimisation here, but we should tackle that
2379         systematically closer to the release.
2381         * m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
2382         revealed.  This version is ahead of CVS libtool until I get chance
2383         to flush my changes.
2384         * m4/module.c (m4_module_remove): New function that holds the core
2385         of the old m4_module_unload.
2386         (m4_module_unload): Use it.
2387         (m4_module_unload_all): When we know the modules will never be
2388         used again (i.e. on exit), free up as much module memory as
2389         possible.  There are still some artifacts from resident modules
2390         living inside ltdl.c, but everything else is freed.
2391         * m4/debug.c (m4_debug_exit): Free memory allocated in
2392         m4_debug_init().
2393         * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2394         * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2395         * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2396         * m4/m4module.h: Updated prototypes.
2397         * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2398         * m4/hash.h: Updated prototypes.
2399         * src/main.c (main): Use all these new functions to clean up as
2400         much memory as possible before exit.
2402 2001-09-18  Gary V. Vaughan  <gary@gnu.org>
2404         The `traced' flag needs to be attached to the definition of a
2405         symbol rather than the current symbol containing the definition.
2406         Implementing this showed up some long standing post 1.4 bugs in
2407         flag propogation which I also fixed.
2409         * m4/m4private.h (struct m4_symbol): Remove the traced flag.
2410         (struct m4_token_data): And add it back in here.
2411         * m4/input.c (init_macro_token): Propogate the traced flag
2412         correctly.
2413         * m4/macro.c (expand_argument): Ditto.
2414         * tests/builtins.at (trace2, trace3): New tests based on Akim's
2415         sadistic email ;-)
2417 2001-09-08  Gary V. Vaughan  <gary@gnu.org>
2419         * m4/m4private.h (struct m4_token_data): Simplified by removing
2420         the redundant `traced' flag, and one level of structure nesting.
2421         (M4_TOKEN_DATA_FUNC_TRACED): Removed.
2422         * m4/input.c (init_macro_token): No need to initialise removed
2423         `traced' field.
2424         * m4/macro.c (expand_argument): No need to copy it either.
2425         * m4/utility.c (m4_token_data_func_traced): Or provide an access
2426         function.
2428         * m4/hash.c (m4_hash_bucket_insert): Symbol shadowing is no longer
2429         dependant on multiple symbols with the same key, so preserving
2430         relative symbol order in each bucket during resizing is no longer
2431         required.  The resize function is considerably faster as a result.
2433         * m4/m4module.h, m4/builtin.c, m4/symtab.c:
2434         s/m4_symbol_insert/m4_symbol_define/g;
2435         s/m4_builtin_insert/m4_builtin_define/g;
2436         s/m4_macro_insert/m4_macro_define/g.  Updated all callers.
2438 2001-09-08  Gary V. Vaughan  <gary@gnu.org>
2440         Get rid of m4_symbol_lookup_t entirely.  With Akim's earlier
2441         commits, the m4_lookup_symbol dispatch function is split into
2442         specialised functions that must be called directly.
2444         * m4/m4module.h (m4_symbol_lookup_t): Removed.
2445         * m4/symtab.c (m4_lookup_symbol): Removed.
2446         (m4_symbol_builtin, m4_symbol_macro): New functions.
2447         * m4/builtin.c (m4_builtin_define): Split into...
2448         (m4_builtin_pushdef, m4_builtin_insert): ...these.
2449         (m4_macro_define): Split into...
2450         (m4_macro_pushdef, m4_macro_insert): ...these.
2451         * src/main.c (main): Set command line macros from `-D' parameters
2452         using `m4_macro_define'.
2454 2001-09-08  Gary V. Vaughan  <gary@gnu.org>
2456         * m4/symtab.c (m4_symtab_remove_module_references):  Renamed as
2457         this from m4_remove_table_reference_symbols().
2458         * m4/m4module.h, m4/module.c: Updated all references.
2460 2001-09-07  Akim Demaille  <akim@epita.fr>
2462         * modules/stdlib.c, modules/times.c: Misc cleanups.
2464 2001-09-07  Akim Demaille  <akim@epita.fr>
2466         * configure.in: We now need Autoconf 2.52e.
2467         * m4/m4module.h (m4_symbol_lookup_t): Remove `M4_SYMBOL_POPDEF'
2468         and `M4_SYMBOL_DELETE'.
2469         * m4/symtab.c (m4_lookup_symbol, symtab_debug): Adjust.
2470         * src/main.c (main): Adjust.
2472 2001-09-06  Gary V. Vaughan  <gary@gnu.org>
2474         Fix the obstack.h problem once and for all!  At configure time we
2475         can test for a system supplied obstack.h:  depending on the
2476         result, we now generate system.h with an #include of the correct
2477         header.  As a bonus, I've also added a --with-included-obstack,
2478         incase the user doesn't like the system obstack for some
2479         reason... and also we can test the shipped obstack on a system
2480         that has oe of its own.  We also now need to be careful to add
2481         build directories to the include search path, since the generated
2482         system.h will be in the build tree.
2484         * configure.in (AC_CONFIG_FILES): Generate system.h from
2485         system-h.in.
2486         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Determine whether to
2487         include the system obstack header or the copy shipped with M4.
2488         Allow the user to override configure and force the build to use
2489         the shipped version.
2490         * m4/system-h.in: New file, template for...
2491         * m4/system.h: ...this.  Now deleted.
2492         * m4/m4module.h: Include system.h before everything else.
2493         * src/freeze.c: Ditto.
2494         * m4/Makefile.am (dist-hook): Remove generated system.h.
2495         (INCLUDES): Check builddir for generated headers before checking
2496         srcdir.
2497         * modules/Makefile.am (INCLUDES): Ditto.
2498         * src/Makefile.am (INCLUDES): Ditto.
2500 2001-09-05  Gary V. Vaughan  <gary@gnu.org>
2502         * TODO: Remove the items that have been addressed already.
2504 2001-09-05  Akim Demaille  <akim@epita.fr>
2506         * src/main.c (main): Standardize --version.
2508 2001-09-05  Akim Demaille  <akim@epita.fr>
2510         * modules/format.c (format): Have a bigger `str'.
2512 2001-09-05  Akim Demaille  <akim@epita.fr>
2514         Rationalize warnings, reporting the macro name as if it were a
2515         program name, and assertions.
2517         * m4/m4module.h (m4_lookup_symbol): Prototype, it is still used.
2518         (M4WARN): New.
2519         * m4/symtab.c (m4_lookup_symbol, m4_symbol_popdef)
2520         (m4_symbol_delete):
2521         Use assert for internal errors.
2522         * m4/utility.c (m4_bad_argc, m4_numeric_arg, m4_dump_symbols): Use
2523         M4WARN.
2524         * modules/m4.c (undefine, defn, traceon, traceoff, dumpdef): use
2525         M4WARN and assert.
2526         * tests/builtins.at (pushpop): Adjust.
2528 2001-09-05  Akim Demaille  <akim@epita.fr>
2530         * m4/symtab.c (m4_symbol_insert): Don't use `foo () || bar ()'
2531         with pointers.
2533 2001-09-05  Akim Demaille  <akim@epita.fr>
2535         * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_LOOKUP.
2536         * m4/macro.c, m4/symtab.c: Adjust.
2538 2001-09-05  Akim Demaille  <akim@epita.fr>
2540         * m4/symtab.c (m4_symbol_popdef, m4_symbol_delete): Rename as...
2541         (m4_symbol_pop, m4_symbol_del): this.
2542         (m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_insert)
2543         (m4_symbol_popdef, m4_symbol_delete): New.
2544         (m4_lookup_symbol): Adjust.
2545         * m4/m4module.h, src/main.c, modules/gnu.c, modules/m4.c: Adjust.
2547 2001-09-05  Akim Demaille  <akim@epita.fr>
2549         * m4/m4module.h (m4_symbol_lookup): Rename as...
2550         (m4_symbol_lookup_t): this.
2552 2001-09-05  Akim Demaille  <akim@epita.fr>
2554         * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_IGNORE,
2555         unused.
2556         * m4/symtab.c (m4_lookup_symbol): Adjust.
2558 2001-09-03  Gary V. Vaughan  <gary@gnu.org>
2560         Bootstrap will now work with Libtool 1.4.1 or higher:
2561         * bootstrap: Remove stale autom4te.cache files when
2562         rebootstrapping.
2563         * config/Makefile.am (ACLOCAL_MACROS):  Add ltdl.m4 and
2564         libtool.m4.
2565         * bootstrap: Ignore acinclude.m4 now the we include ltdl.m4 and
2566         libtool.m4 directly.
2567         Run libtoolize to refresh ltmain.sh.
2568         * config/ltmain.sh:  Deleted.
2569         * acinclude.m4: Deleted.
2570         * m4/ltdl.c, m4/ltdl.h: Updated from libtool-1.4.1.
2572         * config/debug.m4 (AC_LIBTOOL_COMPILER_OPTION): Provide a fallback
2573         implementation for the cvs impaired libtool user.
2575 2001-09-03  Akim Demaille  <akim@epita.fr>
2577         * m4/symtab.c (m4_lookup_symbol): Give more details when reporting
2578         internal errors.
2579         Avoid using `default' in switch, as it hides useful compiler
2580         warnings when a case is forgotten.
2582 2001-09-03  Akim Demaille  <akim@epita.fr>
2584         * src/main.c (MODULE_SHORTOPT, MODULEPATH_SHORTOPT): Remove, there
2585         is no such thing as `WITH_MODULES'.
2587 2001-09-03  Akim Demaille  <akim@epita.fr>
2589         Improve the test suite's selfcontainedness.
2591         * doc/m4.texinfo: Let `input.m4' be the input file, not `in'.
2592         (Include, Undivert): Tag the other input files.
2593         * tests/generate.awk: Catch `@comment file:'.
2594         `-I $src' is no longer needed.
2595         `next' is really like `return': the rest is skipped.
2596         Adjust to `input.m4'.
2597         (fatal): New function.
2598         * tests/foo, tests/incl.m4: Remove.
2600 2001-09-01  Gary V. Vaughan  <gary@gnu.org>
2602         The shadowing mechanism and, infact, the whole symbol table
2603         implementation was creaking under the weight of the features piled
2604         on top of it.  We now have a separate hash table module which will
2605         dynamically resize to keep symbol density withing good performace
2606         limits, and a new symtab module layered above it.  Symbol lookups
2607         are now marginally more efficient (since the shadowed flag is no
2608         longer required) and symbol removal, such as on module unload, is
2609         considerably faster due to a reorganisation of the data structures
2610         used in symtab.c.
2612         * src/main.c (main):  Don't mention `-H'.
2613         * doc/m4.texinfo (Invoking m4): Document that -H no longer has any
2614         effect.
2615         * NEWS: Updated.
2616         * m4/hash.c: New generalised dynamic hash table data structure
2617         management module.
2618         * m4/hash.h: Public interface.
2619         * m4/Makefile.am (pkginc_HEADERS): Add hash.h.
2620         (libm4_la_SOURCES): Add hash.c.
2621         * m4/symtab.c: More or less rewritten from scratch, within the
2622         bounds of the previous API.
2623         (m4_symtab_apply): A cleaner version of the old hack_all_symbols
2624         call.  Updated all callers.
2625         * m4/m4module.c: #include <m4/hash.h>, and changed all affected
2626         declarations to reflect API changes.
2627         (M4INIT): Generate a declaration too, to avoid the warning with
2628         --enable-debug builds.
2629         (M4FINISH): Ditto.
2630         (HASHMAX): Removed.
2631         * m4/utility.c (hash_table_size):  Removed.
2632         (m4_dump_symbols): Rewritten to build and qsort an array of symbol
2633         names, which are then looked up by builtin_dumpdef() as necessary.
2634         This implies a small speedup in builtin_symbols(), which discarded
2635         all of the symbol info under the old call.
2636         * m4/m4private.h (m4_symbol): Removed shadowed flag -- symbol
2637         shadowing is implicit in respect to the new data structures.
2638         symbol names are no longer duplicated here, they are stored in the
2639         key field of the hash table.
2640         Moved macro_args and blind_no_args...
2641         (m4_token_data): ...to here.
2642         m4/macro.c (expand_macro):  Added a name argument since the symbol
2643         name is no longer copied into each struct m4_symbol.  Modified all
2644         callers.
2645         (collect_arguments):  Ditto.
2646         * modules/m4.c (set_trace): Ditto.
2647         * modules/gnu.c (builtin_symbols): Updated.
2648         * src/freeze.c (produce_symbol_dump): Much improved in light of
2649         the improved symbol table layout.
2651 2001-09-01  Gary V. Vaughan  <gary@gnu.org>
2653         * m4/m4private.h (SYMBOL_NEXT): Move into m4's name space; renamed
2654         to M4_SYMBOL_NEXT.
2655         (SYMBOL_TRACED): Similarly renamed by prefixing with `M4_'.
2656         (SYMBOL_SHADOWED, SYMBOL_MACRO_ARGS, SYMBOL_BLIND_NO_ARGS,
2657         SYMBOL_NAME, SYMBOL_TYPE, SYMBOL_TEXT, SYMBOL_FUNC,
2658         SYMBOL_HANDLE): Ditto.
2659         * m4/builtin.c, m4/macro.c, m4/symtab.c, m4/utility.c,
2660         modules/gnu.c, modules/m4.c, src/freeze.c,
2661         src/main.c:  Updated all references.
2663         * src/Makefile.am (m4_SOURCES): Don't list $(M4OBJS) here, since
2664         Automake 1.5 chokes on dynamic source file lists,  Besides, it is
2665         already listed in m4_LDADD... how did that ever used to work?
2666         * configure.in (getopt.h): Use AC_CONFIG_LINKS instead of a manual
2667         link.
2668         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
2669         Suggested by Tim Van Holder <tim.van.holder@pandora.be>
2671         * tests/m4: Don't call the m4 wrapper script with libtool, it
2672         works fine all by itself.
2674 2001-08-30  Gary V. Vaughan  <gary@gnu.org>
2676         The experimental `changeword' feature never took off, and has
2677         no obvious advantages over `changesyntax' to compensate the
2678         enormous speed penalty it carries:
2679         * configure.in (ENABLE_CHANGEWORD): Removed.
2680         * m4/m4module.h (m4_set_word_regexp): Removed.
2681         * m4/m4private.h (m4_token_data): Removed original_text field.
2682         * m4/utility.c (m4_token_data_orig_text): Removed.
2683         * m4/input,c: Removed all conditional ENABLE_CHANGEWORD code.
2684         * m4/macro.c: Ditto.
2685         * src/main.c: Ditto.
2686         * modules/Makefile.am (changeword.la): Removed.
2687         * modules/changeword.c: File removed.
2688         * doc/m4.texinfo: References to changeword and --word-regexp
2689         removed.
2690         * po/POTFILES.in: modules/changeword.c removed.
2691         * tests/atlocal.in (ENABLE_CHANGEWORD): Removed.
2692         * tests/builtins.at (changeword): Test removed.
2694 2001-08-30  Akim Demaille  <akim@epita.fr>
2696         * bootstrap.sh: Create aclocal.m4 instead of modifying it.
2697         This also help having a single list of m4 files: in
2698         config/Makefile.am.
2699         * config/Makefile.am (STANDARD_MACROS): Rename as...
2700         (ACLOCAL_MACROS): this.
2701         (list-standard-macros): Remove.
2702         (spy): New.
2704 2001-08-29  Gary V. Vaughan  <gary@gnu.org>
2706         In an attempt to moderate my egomania...
2707         * tests/modules.at: Remove attributions.
2709         * tests/generate.awk: When making substitutions to "@&t@", either
2710         "&" or "\&" in the substitution string argument to gsub refer back
2711         to the matched text.  "@\\&t@" seems to work though, Tests 43 and
2712         67 now pass for me.
2714 2001-08-29  Akim Demaille  <akim@epita.fr>
2716         * tests/others.at (changeword, ddivert, debug, esyscmd, exp, gmp)
2717         (include, indir, multiquotes, patsubst, pushdef/popdef, regexp)
2718         (sync-lines, trace, translit, undivert, wrap): Move to...
2719         * tests/builtins.at: this new file.
2720         * tests/others.at (Discard comments, import-environment): Move to...
2721         * tests/options.at: this new file.
2723 2001-08-29  Akim Demaille  <akim@epita.fr>
2725         * tests/others.at (Freezing modules)
2726         (--module-directory: absolute path, modpath2, modpath3)
2727         (M4MODPATH: absolute path, modtest, shadow, unload): Move to...
2728         * tests/modules.at: here, new file.
2729         * tests/others.at, tests/generate.awk: Add a banner.
2730         * tests/testsuite.at: Adjust.
2731         (AT_CHECK_M4_FILTER): New, but unused.
2733 2001-08-29  Akim Demaille  <akim@epita.fr>
2735         * tests/testsuite.at (AT_CHECK_M4): Don't pass -I, let the tests
2736         handle that.
2737         * tests/others.at (wrap): Inline wrap.m4.
2738         (shadow): Inline shadow.m4.
2739         (iso8859): Don't specify the path from top_srcdir, but from srcdir.
2740         * tests/m4: Simplify.
2742 2001-08-29  Akim Demaille  <akim@epita.fr>
2744         * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Use autom4te's
2745         --language.
2747 2001-08-29  Akim Demaille  <akim@epita.fr>
2749         * tests/generate.awk (normalize): s/@__@/@&t@/.
2751 2001-08-28  Akim Demaille  <akim@epita.fr>
2753         * examples/indir.m4, tests/others.at (indir): s/nonsens/nonsense/.
2755 2001-08-28  Gary V. Vaughan  <gary@gnu.org>
2757         * bootstrap (generate.awk): Generate test cases with new script.
2759 2001-08-27  Akim Demaille  <akim@epita.fr>
2761         * tests/Makefile.am (installcheck-local): Don't use
2762         `dc_install_base' which is not visible here, but `exec_prefix'
2763         which is clearly the RT anyway.
2764         * tests/testsuite.at (AT_CHECK_M4): Don't pass -M here since it is
2765         related to testing a now installed m4.
2766         * tests/m4: Do it here.
2768 2001-08-27  Akim Demaille  <akim@epita.fr>
2770         * tests/others.at (indir): Formatting change.
2772 2001-08-27  Akim Demaille  <akim@epita.fr>
2774         * tests/Makefile.am (installcheck-local): New.
2775         * tests/testsuite.at (AT_CHECK_M4): Pass `-b' so that C-c works on
2776         the test suite.
2777         Prefer options over envvars.
2778         * src/main.c (main): First bug caught by the test suite (yeah!):
2779         --batch lacked a `break' which resulted in an accidental
2780         invocation of --discard-comments.
2782 2001-08-27  Akim Demaille  <akim@epita.fr>
2784         * tests/others.at (capitalize, changeword, comments, ddivert)
2785         (debug, esyscmd, exp, foreach, forloop, fstab, hanoi, include)
2786         (misc, multiquotes, patsubst, pushdef/popdef, regexp, reverse)
2787         (sysv-args, trace, translit, undivert): Don't rely on files in
2788         examples/: AT_DATA them.
2790 2001-08-27  Akim Demaille  <akim@epita.fr>
2792         Let the test suite use a wrapper around the not installed m4 to
2793         pretend it is (installed).
2795         * bootstrap (aclocal.m4): Output AC_SUBST's and AM_CONDITIONAL's in
2796         such a way that m4 does not process them.
2797         * configure.in: The package name seems to be `m4', not `M4'.
2798         * tests/m4: New.
2799         * tests/atlocal.in (at_package, M4): Remove.
2800         * tests/testsuite.at, tests/others.at: Use m4, not $M4.
2802 2001-08-27  Akim Demaille  <akim@epita.fr>
2804         * tests/Makefile.am (CLEANFILES): Remove.
2805         (DISTCLEANFILES, clean-local): New.
2806         * examples/mktests.sh: Remove.
2808 2001-08-27  Akim Demaille  <akim@epita.fr>
2810         * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2811         Don't use aclocal: it's written by hand.
2812         * aclocal.m4: m4_include all the files instead of being built by
2813         aclocal.
2814         * bootstrap: Help automake find the AC_SUBSTs and AM_CONDITIONALs
2815         until it reads the traces by itself.
2816         * configure.in: Require Autoconf 2.42c as we are now using
2817         AC_CONFIG_TESTDIR instead of AT_CONFIG.
2818         Catch unexpanded `jm_' macros.
2819         * config/atconfig.m4: Remove.
2820         * config/error.m4: new.
2821         * config/Makefile.am: Ship the files included by aclocal.m4.
2822         * tests/Makefile.am (TESTSUITE_SOURCES): Rename as...
2823         (TESTSUITE_AT): this, to please Automake.
2824         (TESTSUITE): This target uses autotest/autotest.m4, not
2825         autotest/general.m4.
2826         * tests/testsuite.at: Prereq Autotest 2.52c.
2827         * examples/Makefile.am (pkgdata_DATA): Rename as...
2828         (dist_pkgdata_DATA): this.
2829         * doc/Makefile.am (man_MANS): Rename as...
2830         (dist_man_mans): this.
2832 2001-08-20  Gary V. Vaughan  <gary@gnu.org>
2834         * m4/system.h [cygwin*]:  Thanks to Paul Sokolovsky and
2835         Robert Collins, building on Cygwin no longer requires Windows
2836         import and export symbol decorations.
2837         * m4/m4module.h (M4_SCOPE) [cygwin*]:  Deleted all occurences.
2838         * m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
2839         * m4/debug.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2840         * m4/error.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2841         * m4/input.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2842         * m4/macro.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2843         * m4/output.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2844         * m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2845         * m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]:  Ditto.
2846         * configure.in (LIBM4_DLL_IMPORT) [cygwin*]:  Don't set this
2847         anymore.
2848         * src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
2849         * modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.
2851 2001-08-20  Gary V. Vaughan  <gary@gnu.org>
2853         Ansify the source.  Previously we had a mix, where my code was
2854         in a K&R compatible style, and the preexisting code was in ANSI
2855         style.  Nothing is lost wrt release 1.4 by reverting to ANSI,
2856         and now the code base is much cleaner.
2858         * m4/system.h:  Remove M4_PARAMS macro and all users.  Remove
2859         VOID macro and all users.
2860         * m4/m4module.h:  Ansify function prototypes and headers.
2861         * m4/builtin.c:  Ditto.
2862         * m4/evalparse.c:  Ditto.
2863         * m4/input.c:  Ditto.
2864         * m4/macro.c:  Ditto.
2865         * m4/module.c:  Ditto.
2866         * m4/output.c:  Ditto.
2867         * m4/path.c:  Ditto.
2868         * m4/symtab.c:  Ditto.
2869         * m4/utility.c:  Ditto.
2870         * modules/format.c:  Ditto.
2871         * modules/gnu.c:  Ditto.
2872         * modules/m4.c:  Ditto.
2873         * modules/mpeval.c:  Ditto.
2874         * src/freeze.c:  Ditto.
2875         * src/m4.h:  Ditto.
2876         * src/main.c:  Ditto.
2878 2001-08-20  Akim Demaille  <akim@epita.fr>
2880         * config/atconfig.m4: s/EOF/ATEOF/, so that configure can be
2881         generated with stock 2.52.
2883 2001-08-20  Akim Demaille  <akim@epita.fr>
2885         * config/atconfig.m4: New, until part of Autoconf per se.
2886         * configure.in (AT_CONFIG): Use it.
2887         Adjust.
2888         * tests/mkconfig.sh, tests/atconfig.in, tests/defs: Remove.
2889         * tests/atlocal.in: New.
2890         * tests/generate.awk: For the time being, the empty quadrigraph is
2891         `@__@'.
2892         * tests/others.at (changeword, gmp): Check the configuration
2893         variable against `yes'.
2894         * tests/testsuite.at (dnl): Allow it, as it's used all over the
2895         place.
2897 2001-08-20  Akim Demaille  <akim@epita.fr>
2899         * m4/utility.c (m4_numeric_arg): Spell out the culprit.
2900         * modules/m4.c (undivert): Disable the possibility of undiverting
2901         several files at once: it is not documented, it is inconsistent
2902         with the other macros, it can be straightforwardly mocked by
2903         several invocations, and most importantly, it prevents the
2904         possibility of other kinds of extension.
2905         Use `m4_numeric_arg'.
2907 2001-08-20  Akim Demaille  <akim@epita.fr>
2909         * examples/include.m4: Typo.
2910         * tests/generate.awk: Really add it.
2911         * tests/Makefile.am: Adjust.
2912         * tests/others.at (Discard comments): It sure fails without `-c'.
2913         (include, undivert): Add -I examples/.
2915 2001-08-20  Akim Demaille  <akim@epita.fr>
2917         Use sprintf, not ecft and friends since it is standard, portable,
2918         simplifies the code, and since the latter is even deprecated
2919         according to the GNU libc documentation.
2921         * modules/format.c: Drop evct support.
2923 2001-08-19  Gary V. Vaughan  <gary@gnu.org>
2925         * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Cleaned up.  Don't test
2926         for `-pipe' here...
2927         * configure.in: ...do it here instead.
2929         * c-boxes.el: Deleted.
2930         * m4/builtin.c: Reformat box comments to be closer to GNU
2931         standards.
2932         * m4/debug.c:  Ditto.
2933         * m4/eval.c:  Ditto.
2934         * m4/evalparse.c:  Ditto.
2935         * m4/input.c:  Ditto.
2936         * m4/m4module.h:  Ditto.
2937         * m4/macro.c:  Ditto.
2938         * m4/output.c:  Ditto.
2939         * m4/symtab.c:  Ditto.
2940         * m4/utility.c:  Ditto.
2941         * modules/changeword.c:  Ditto.
2942         * modules/format.c:  Ditto.
2943         * modules/gnu.c:  Ditto.
2944         * modules/load.c:  Ditto.
2945         * modules/m4.c:  Ditto.
2946         * modules/modtest.c:  Ditto.
2947         * modules/mpeval.c:  Ditto.
2948         * modules/perl.c:  Ditto.
2949         * modules/shadow.c:  Ditto.
2950         * modules/stdlib.c:  Ditto.
2951         * modules/time.c:  Ditto.
2952         * src/freeze.c:  Ditto.
2953         * src/main.c:  Ditto.
2955 2001-08-17  Gary V. Vaughan  <gary@gnu.org>
2957         * m4/module.c: Fixup some errors in the description comment.
2959 2001-08-17  Akim Demaille  <akim@epita.fr>
2961         * tests/others.at (iso8859): Specify the path to the M4 test file.
2962         * tests/testsuite.at (AT_CHECK_M4): Normalize the path of input
2963         files in error messages.
2965 2001-08-17  Akim Demaille  <akim@epita.fr>
2967         * tests/testsuite.at (AT_CHECK_M4): Anchor M4PATH in $top_srcdir.
2968         * tests/others.at: Adjust input files paths.
2969         * tests/atconfig.in: Set top_builddir.
2970         * tests/Makefile.am: Adjust.
2971         `testsuite' is in src, not build.
2973 2001-08-17  Akim Demaille  <akim@epita.fr>
2975         * tests/Makefile.am (EXTRA_DIST): Ship generate.awk.
2976         (generate.at): Install a temporary hack until the actual
2977         generate.awk is added to the repository.
2978         * tests/atconfig.in: New.
2980 2001-08-17  Akim Demaille  <akim@epita.fr>
2982         Really apply the patch ``Drop Autoconf 2.13 compatibility.''
2984 2001-08-17  Akim Demaille  <akim@epita.fr>
2986         * doc/m4.texinfo: Promote proper quotation.
2988 2001-08-17  Akim Demaille  <akim@epita.fr>
2990         Remove the non Autotest tests.
2992         * tests/other-tests/capitalize.test,
2993         * tests/other-tests/changeword.test,
2994         * tests/other-tests/comments.test, tests/other-tests/ddivert.test,
2995         * tests/other-tests/debug.test,
2996         * tests/other-tests/discard-comments.m4,
2997         * tests/other-tests/discard-comments.test,
2998         * tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
2999         * tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3000         * tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3001         * tests/other-tests/gmp.m4, tests/other-tests/gmp.test,
3002         * tests/other-tests/hanoi.test,
3003         * tests/other-tests/import-environment.m4,
3004         * tests/other-tests/import-environment.test,
3005         * tests/other-tests/include.test, tests/other-tests/indir.test,
3006         * tests/other-tests/iso8859.m4, tests/other-tests/iso8859.test,
3007         * tests/other-tests/misc.test, tests/other-tests/modfreeze.test,
3008         * tests/other-tests/modpath1.test, tests/other-tests/modpath2.test,
3009         * tests/other-tests/modpath3.test, tests/other-tests/modpath4.test,
3010         * tests/other-tests/modtest.test,
3011         * tests/other-tests/multiquotes.test,
3012         * tests/other-tests/patsubst.test, tests/other-tests/pushpop.test,
3013         * tests/other-tests/regexp.test, tests/other-tests/reverse.test,
3014         * tests/other-tests/shadow.test, tests/other-tests/stackovf.test,
3015         * tests/other-tests/sync-lines.m4,
3016         * tests/other-tests/sync-lines.test,
3017         * tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3018         * tests/other-tests/translit.test, tests/other-tests/undivert.test,
3019         * tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3020         * tests/other-tests/wrap.test: Remove.
3022         * tests/run-test, tests/get-them: Remove.
3023         * tests/Makefile.am: Adjust.
3025 2001-08-17  Akim Demaille  <akim@epita.fr>
3027         others.at no longer depends on other-tests/.
3029         * tests/others.at (stackovf): You're actually...
3030         (sync-lines): this.
3031         (modfreeze, modpath1, modpath2, modpath3, modpath4, modtest, shadow)
3032         (unload.test): Keep their authorship.
3033         (discard-comments, gmp, import-environment, modfreeze)
3034         (sync-lines): Embed the input files.
3035         * tests/stackovf.test: Copy from other-tests/stackovf.test.
3036         * tests/iso8850.m4: Copy from other-tests/iso8859.m4.
3038 2001-08-17  Akim Demaille  <akim@epita.fr>
3040         * doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
3041         (M4exit): Tag the exit status of the example.
3042         * tests/get-them: Adjust.
3043         * tests/generate.awk: New, based on get-them.
3044         * tests/Makefile.am: Adjust to generate `generated.at'.
3045         * tests/testsuite.at: Adjust.
3046         (AT_CHECK_M4): Don't overquote.  Blush...
3048 2001-08-17  Akim Demaille  <akim@epita.fr>
3050         Start using Autotest.  atconfig creation is still lacking.
3052         * examples/patsubst.m4, modules/modtest.m4, modules/shadow.m4,
3053         * examples/reverse.m4, tests/other-tests/import-environment.m4,
3054         * tests/other-tests/iso8859.m4: Don't produce trailing blanks.
3055         * tests/other-tests/import-environment.test: Don't check LANGUAGE
3056         as it might be `unset', or set to `C'.
3057         * tests/other-tests/iso8859.test, tests/other-tests/modpath1.test,
3058         * tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3059         * tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3060         * tests/other-tests/patsubst.test, tests/other-tests/reverse.test,
3061         * tests/other-tests/shadow.test: Adjust.
3062         * tests/testsuite.at, tests/others.at: New.
3063         * tests/Makefile.am: Adjust.
3065 2001-08-17  Akim Demaille  <akim@epita.fr>
3067         Drop Autoconf 2.13 compatibility.
3069         * configure.in (changeword): No need to undefine it, as anyway if
3070         it's defined, M4sugar moved it as m4_changeword.
3071         And anyway, proper quotation is enough.
3072         (m4_pattern_allow): As it exists in 2.50, just use it.
3073         (AC_OUTPUT): Split in AC_CONFIG_FILES and AC_CONFIG_COMMANDS.
3074         Don't handle Gettext's duties, let it handle them.
3075         * config/gnu-obstack.m4: Use m4_pattern_allow directly.
3077 2001-08-17  Akim Demaille  <akim@epita.fr>
3079         * modules/m4.c (m4_dumpdef): Output to stderr, not m4_debug.
3080         (m4_errprint): Use fputs.
3081         * doc/m4.texinfo (Invoking m4) <--error-output>: errprint and
3082         dumpdef are not concerned.
3083         (Dumpdef, Errprint): Emphasize their insensitivity to
3084         --error-output.
3085         * doc/Makefile.am: Add `TAGS' support.
3086         (MAINTAINERCLEANFILES): Remove texinfo.tex and mdate-sh which are
3087         in `config/' now.
3088         * config/Makefile.am (MAINTAINERCLEANFILES): New.
3090 2001-08-17  Akim Demaille  <akim@epita.fr>
3092         * modules/Makefile.am (ETAGS_ARGS): New.
3094 2001-08-17  Akim Demaille  <akim@epita.fr>
3096         * m4/symtab.c (m4_hack_all_symbols, m4_lookup_symbol): Formatting
3097         changes.
3099 2001-08-17  Akim Demaille  <akim@epita.fr>
3101         * m4/builtin.c (m4_macro_define): Do not reset SYMBOL_TRACED.
3103 2001-08-17  Akim Demaille  <akim@epita.fr>
3105         * m4/m4module.h (m4/list.h): Don't include it.
3107 2001-08-16  Gary V. Vaughan  <gary@gnu.org>
3109         m4_modules are no more, we use lt_dlhandles directly and let
3110         latest libltdl features manage the list of loaded modules.
3111         * acinclude.m4: Regenerated.
3112         * m4/ltdl.c: Updated from master copy.
3113         * m4/module.c: Reimplemented to take advantage of advances in
3114         libltdl.
3115         * m4/builtin.c (m4_builtin_find_by_name): Traverse loaded module
3116         list with lt_dlhandle_next.
3117         (m4_builtin_find_by_func): Ditto.
3118         (m4_builtin_table_install): Use lt_dlhandle.
3119         (m4_macro_define): Ditto.
3120         (m4_macro_table_install): Ditto.
3121         m4/module.h: Prototype new module management API.
3122         (m4_modules): No longer required.
3123         (m4_module_init_t, m4_module_finish_t): POSIX namespace
3124         violations, renamed to...
3125         (m4_module_init_func, m4_module_finish_func): ...these,
3126         respectively.
3127         (M4INIT_HANDLER): Clean way to declare init functions in modules.
3128         (M4FINISH_HANDLER):  And similarly for finish functions.
3129         * m4/system.h (_CONC): Used by M4INIT_HANDLER and M4FINISH_HANDLER
3130         -- Add indirection to the CONC macro so that arguments are
3131         correctly expanded.
3132         * modules/modtest.c (m4_init_module):  Replaced with M4INIT_HANDLER.
3133         * modules/shadow.c (m4_init_module):  Ditto.
3134         Due to new init function semantics, be careful to perform the
3135         initialisation only on first load.
3136         * modules/perl.c (m4_init_module):  Ditto. And Ditto.
3137         (m4_finish_module): Replaced with M4FINISH_HANDLER.
3138         Due to new finish function semantics, be careful to perform the
3139         finalisation only on first load.
3140         * m4/m4private.h (m4_module): Removed in favour of...
3141         (m4_module_data): ...structure without all the wrapper fields.
3142         Instances of this new structure are stored associated lt_dlhandles
3143         with lt_dlcaller_data_set().
3144         * m4/builtin.c (m4_builtin_define): Takes a handle argument
3145         instead of the old module argument.
3146         (m4_builtin_table_install): Ditto.
3147         * modules/load.c (m4_resident_module):  Removed.  This is no
3148         longer implemented as a magic symbol...
3149         * modules/m4.c (m4_resident_module): Ditto.
3150         * modules/load.c (M4INIT_HANDLER): ...the module init function now
3151         uses the ltdl api to make the module resident.
3152         * modules/m4.c (M4INIT_HANDLER): Ditto.
3153         * modules/load.c (builtin_modules): Traverse the loaded module
3154         list with lt_dlhandle_next.
3155         (builtin_load): Much simplified in light of the reimplemented
3156         module loader.
3157         * src/freeze.c (produce_module_dump):  Cleaned up and optimised in
3158         light of the m4/module.c rewrite.
3159         (produce_symbol_dump): Ditto.
3160         (reload_frozen_state): Ditto.
3161         * m4/list.c, m4/list.h: Files deleted.  No longer required.
3162         * m4/Makefile.am (pkginc_HEADERS): Delete list.h reference.
3163         (libm4_la_SOURCES): Delete list.c reference.
3164         * m4/m4private.h (m4_token_data):  Add a handle field.  This
3165         eliminates many of the searches to find the handle associated with
3166         various tokens that are passed between functions.
3167         (struct m4_symbol):  Removed the module field.  The
3168         module association does not belong with the symbol...
3169         * m4/input.c (struct m4_builtin): ...it belongs with the builtin
3170         that the module implementation code is from.  Added a handle
3171         field.
3172         (m4_push_macro): Add a `handle' argument.  Changed all callers.
3173         (init_macro_token):  Set the `handle' field for the
3174         m4_token_data.
3175         * m4/macro.c (expand_argument): Copy the new handle field during
3176         reassignment.
3177         * modules/m4.c (macro_install): Use the new handle field to
3178         optimise the search for the correct builtin structure, and pass
3179         the handle details to m4_builtin_define.
3181 2001-08-15  Akim Demaille  <akim@epita.fr>
3183         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Be sure `m4/' exists
3184         when creating `m4/obstack.h'.
3185         * tests/Makefile.am (TESTS_ENVIRONMENT): Pass top_srcdir and
3186         top_builddir.
3187         * tests/defs: Make them absolute.
3188         (CDPATH) Neutralize.
3189         * tests/gethem: Use them.
3191 2001-08-14  Gary V. Vaughan  <gary@gnu.org>
3193         * config/ltmain.sh: Doh!  Import again for a quoting fix that
3194         prevented any regression test from passing.
3196         * m4/m4module.h (obstack.h): Choose between installed version
3197         and shipped version based on configure tests.
3198         * src/freeze.c (obstack.h): Ditto.
3200         * acconfig.h: Removed.  No longer required.
3202         * bootstrap: Rewritten to play nicely with Autoconf 2.5x.
3203         * configure.in (MY_NAME, MY_VERSION): Define these once, and feed
3204         them to AC_INIT and AM_INIT_AUTOMAKE.
3205         * Makefile.am (AUTOMAKE_OPTIONS): Remove `gnits' which would
3206         disallow MY_NAME and MY_VERSION arguments to AM_INIT_AUTOMAKE.
3207         * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Don't choke on
3208         shell variable m4_cv_func_obstack_h.
3209         * tests/defs (M4): Be more careful about relative path to libtool
3210         script and m4 binary by using $srcdir.
3212         * src/main.c (main): Use lt_dlinsertsearchdir to prepend -M
3213         optargs to the existing libltdl search path.
3214         * acinclude.m4: Regenerate from latest libtool,m4 and ltdl.m4.
3215         * m4/ltdl.c: Updated.
3216         * m4/ltdl.h: Ditto.
3217         * config/ltmain.sh: Ditto.
3219 2001-08-11  Gary V. Vaughan  <gary@gnu.org>
3221         * src/main.c (main): Add `-b' (for `batch') mode switch to force
3222         interactive mode off.
3224 2001-08-10  Akim Demaille  <akim@epita.fr>
3226         * configure.in: Require Autoconf 2.52.
3227         (AC_ARG_PROGRAM): Remove, handled by Automake.
3228         (m4_getopt): Rename as...
3229         (m4_getopt_h): this.
3230         Allow the tokens `m4_cv_*', `m4_top_srcdir', and `m4_getopt_h'.
3231         Undefine `changeword' only if defined.
3232         * config/gnu-obstack.m4: Require Autoconf 2.52.
3233         (M4_AC_FUNC_OBSTACK): Rename `m4_obstack' and `m4_obstack_h'.
3234         Allow this token.
3236 2001-08-09  Yuji Minejima  <ggb01164@nifty.ne.jp>
3238         * doc/m4.texinfo: Fix some typos, and apply some small
3239         clarifications.
3241 2001-08-09  Andreas Schwab  <schwab@suse.de>
3243         * src/main.c (main): Fix improper uses of error (missing format
3244         string).
3246 2001-08-07  Akim Demaille  <akim@epita.fr>
3248         Improve `make distcheck'.
3250         * configure.in: Be sure to be able to run `mkconfig.sh' when src
3251         != build.
3252         * Makefile.am (dist-hook): Remove, as it is no longer needed.
3253         * doc/m4.texinfo (Include): Add missing blank.
3254         * m4/Makefile.am (EXTRA_DIST): Distribute gnu-obstack.h and
3255         obstack.c.
3257 2001-08-07  Akim Demaille  <akim@epita.fr>
3259         * m4/evalparse.c: A better introductory comment.
3260         * m4/m4module.h (M4_DEBUG_PRINT2): s/M4_debug/m4_debug/.
3261         * m4/macro.c: Adjust old comments.
3262         * modules/README: Typo.
3264 2001-08-07  Akim Demaille  <akim@epita.fr>
3266         * config/gnu-obstack.m4: New.
3268 2001-08-07  Akim Demaille  <akim@epita.fr>
3270         * config/Makefile.am, config/stackovf.m4: New.
3271         * configure.in, Makefile.am: Adjust.
3273 2001-04-08  Roderick Koehle <Roderick.Koehle@infineon.com>
3275         * modules/format.c (format):  Formatting for %f was not
3276         interpreting the position of the decimal point correctly for
3277         whole numbers.
3279 2000-12-01  Gary V. Vaughan  <gary@gnu.org>
3281         * TODO:  Removed m4exit bug.
3282         * modules/load.c (m4_resident_module): Make this module resident.
3283         * module/m4.c (m4_resident_module): Ditto.
3284         * m4/modules.c (m4_module_load):  Use new ltdl resident modules
3285         feature to mark modules as resident if they export
3286         `m4_resident_module' as TRUE.
3287         (m4_module_unload): Do not remove resident modules, and take care
3288         with symbol insertion and deletion with resident modules.
3289         * m4/ltdl.c, m4/ltdl.h: Update to latest unreleased versions to
3290         use resident modules feature.
3292 2000-11-30  Gary V. Vaughan  <gary@gnu.org>
3294         * TODO: Updated.  Removed some cruft that has since been fixed
3295         or implemented.  Added some more entries.
3296         * NEWS: Updated.
3297         * README: Updated.
3298         * modules/README: Updated.
3299         * doc/m4.texinfo: Updated.
3301         * modules/gnu.c (builtin_functions): Make indir orthogonal to
3302         builtin, in that each is recognised as a macro only with parameters
3303         (builtin_indir): Passing 0 arguments is now an error, as with
3304         builtin.
3306         * src/main.c (usage): Added missing description of `-c' option.
3308 2000-11-29  Gary V. Vaughan  <gary@gnu.org>
3310         Consolidate the myriad of dispersed test scripts into the
3311         tests subdirectory.  I think I now have all the file where I
3312         want them, so there shouldn't be anymore upheaval =)O|
3313         Honest!
3314         * tests/Makefile.am: Updated to run the new tests added below.
3315         * tests/other-tests/capitalize.test, tests/other-tests/comments.test,
3316         tests/other-tests/ddivert.test, tests/other-tests/debug.test,
3317         tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
3318         tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3319         tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3320         tests/other-tests/hanoi.test, tests/other-tests/include.test,
3321         tests/other-tests/indir.test, tests/other-tests/misc.test,
3322         tests/other-tests/modfreeze.test, tests/other-tests/modpath1.test,
3323         tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3324         tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3325         tests/other-tests/multiquotes.test, tests/other-tests/patsubst.test,
3326         tests/other-tests/pushpop.test, tests/other-tests/regexp.test,
3327         tests/other-tests/reverse.test, tests/other-tests/shadow.test,
3328         tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3329         tests/other-tests/translit.test, tests/other-tests/undivert.test,
3330         tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3331         tests/other-tests/wrap.test:  New tests based on the contents
3332         of the tests removed below.
3333         * examples/Makefile.am, modules/Makefile.am:  Updated to
3334         reflect removed tests.
3335         * examples/defs,modules/defs: Removed.
3336         * examples/capitalize.test, examples/comments.test,
3337         examples/ddivert.test, examples/debug.test,
3338         examples/esyscmd.test, examples/exp.test,
3339         examples/foreach.test, examples/forloop.test,
3340         examples/fstab.test, examples/hanoi.test,
3341         examples/include.test, examples/indir.test,
3342         examples/misc.test, examples/multiquotes.test,
3343         examples/patsubst.test, examples/pushpop.test,
3344         examples/regexp.test, examples/reverse.test,
3345         examples/sysv-args.test, examples/trace.test,
3346         examples/translit.test, examples/undivert.test,
3347         examples/wrap.test, modules/frozen.m4, modules/modfreeze.test,
3348         modules/modpath1.test, modules/modpath2.test,
3349         modules/modpath3.test, modules/modpath4.test,
3350         modules/modtest.test, modules/shadow.test,
3351         modules/unfrozen.m4, modules/unload.test: Removed.
3353         Move the implementation of GMP support for the mpeval() builtin
3354         into a loadable module that depends on libgmp.  mpeval() and
3355         eval() share a common parser, now in m4/evalparser.c; the code
3356         in m4/numb.c and m4/numb.h is now physically split between
3357         m4/eval.c (the eval() backend) and modules/mpeval.c (the
3358         mpeval() backend), rather than being differentiated by cpp
3359         macros and multiple inclusion.  The mpeval module is always
3360         built but will generate an diagnostic if it is used from an
3361         installation that didn't link in the gmp library.
3362         * modules/Makefile.am: build and install the new mpeval module.
3363         * modules/mpeval.c: Now contains the former parts of m4/numb.c
3364         and m4/numb.h that are required for gmp support in mpeval().
3365         * m4/Makefile.am (libm4_la_SOURCES): Removed evalmp.c.
3366         * m4/evalmp.c:  Removed.
3367         * m4/m4module.h: Removed conditional prototype for
3368         m4_mp_evaluate().
3369         * m4/eval.c: Rewritten.  Contains the former parts of m4/numb.c
3370         and m4/numb.h that do not rely on gmp.
3371         * m4/evalparse.c:  New file, contains the shared parts of the
3372         eval() and evalmp() parser implementations, and is no longer
3373         unencumbered by cpp magic to uncover the right parts.
3374         * m4/numb.h:  Removed.  It's former contents are split between
3375         m4/eval.c and modules/mpeval.c.
3376         * m4/numb.c: ditto.
3378         * tests/other-tests/changeword.test: New test.  Rudimentary
3379         testing of changeword builtin runs only if --wnable-changeword
3380         was used at configure time.
3381         * tests/mkconfig.sh: Solaris sed (at least) does not parse nested
3382         alternation correctly.  Split into two expressions to compensate.
3383         * m4/input.c (m4_input_init): Use m4_ prefix on m4_set_word_regexp.
3384         * modules/Makefile.am: Build changeword module.
3385         * modules/changeword.c (m4_macro_table): Define __m4_changeword__
3386         only when --enable-changeword was passed to configure.
3387         (builtin_changeword): If --enable-changeword was not used, then
3388         report that changeword() builtin has no support in m4 binary.
3390 2000-11-28  Gary V. Vaughan  <gary@gnu.org>
3392         * src/main.c (main): Fixed a particularly nasty bug is
3393         user_search_path setting -- the -M flag processing must be
3394         extremely careful with search path ordering, or else the default
3395         installed module directory (possibly containing modules from a
3396         previous release) is placed earlier in the search path than any -M
3397         arguments (which are relied upon to load uninstalled modules with
3398         most of the tests in the regresion suite).
3400         * modules/load.c (builtin_load):  Nasty hack to prevent adding
3401         symbols to symtab again if a module is loaded more than once.
3402         * modules/m4.c (builtin_ifelse): removed unused variable argv0.
3404         * m4/symtab.c (m4_remove_table_reference_symbols):  Fixed a
3405         possible NULL pointer dereference.
3407         * m4/module.c (m4_module_find_by_modname): Renamed from
3408         m4_module_modname_find.   Fixed all references.
3409         (m4_module_find_by_builtin):  New function.
3411         * modules/modfreeze.test: load the `load' module with each
3412         invocation.
3413         * src/freeze.c (produce_frozen_state): Simplified in light of
3414         module field in m4_symbol.  Allow a third argument for text macros
3415         to name the originating module.
3416         (reload_frozen_state): ditto.
3417         * m4/m4module.h:  Fixup prototypes.
3418         * m4/builtin.h (m4_builtin_define): Add a module argument so
3419         that symbols can be registered against the defining module.
3420         (m4_macro_define): ditto.
3421         * m4/m4private.h (m4_symbol): Make the module field const to save
3422         on casting in the rest of the code.
3423         (SYMBOL_MODULE): New macro.
3425         * m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
3426         symbol reference maintenance bugs when removing a symbol from the
3427         symtab.
3429         * src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.
3431 2000-11-27  Gary V. Vaughan  <gary@gnu.org>
3433         * configure.in (m4_cv_func_obstack): A better check for whether
3434         libc has an obstack implementation.
3435         * m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.
3437         * configure.in (--with-modules): Changed semantics.  This
3438         option is now used to list modules to be preopened.
3439         * src/m4.h: #include "ltdl.h" unconditionally.
3440         * src/main.c: Removed all dependencies on WITH_MODULES.
3441         * src/freeze.c: ditto.
3442         * modules/Makefile.am: ditto.
3443         * m4/m4.c (builtin_m4exit): ditto.
3444         * modules/modpath1.test: ditto.
3445         * modules/modpath2.test: ditto.
3446         * modules/modpath3.test: ditto.
3447         * modules/modpath4.test: ditto.
3448         * modules/modtest.test: ditto.
3449         * modules/shadow.test: ditto.
3450         * modules/unload.test: ditto.
3452         * m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
3453         comes up on demand in LTLIBOBJS now.
3454         * configure.in (getopt_long):  Creating and relying on a link for
3455         getopt.h on hosts with no getopt_long() of thier own works
3456         correctly now.  This is necessary so that callers of getopt_long()
3457         can simply `#include <getopt.h>': the naive way of doing this
3458         would end up using our own getopt.h and the installed
3459         getopt_long(), which is asking for trouble!
3460         (obstack_init): A similar argument applies to obstack.h and
3461         obstack_init().
3463         * m4/ltdl.c: Upgraded to latest bleeding edge version again.
3464         On Solaris-2.5 (at least) the native dlopen implementation
3465         gets confused about m4.o when looking for module "m4".  This
3466         version always looks for .la an .$lib_ext suffixed names first
3467         to work around the problem.  Sigh.
3469         * po/POTFILES.in: Take account of these file movements.
3470         * src/Makefile.am (m4_SOURCES): removed eval.c.
3471         (EXTRA_m4_SOURCES): removed numb.c and numb.h.
3472         * m4/Makefile.am (libm4_la_SOURCES): added eval.c.
3473         (EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
3474         * modules/m4.c (builtin_eval): Use m4_evaluate().
3475         * m4/eval.c: Moved here from src/eval.c to facilitate
3476         implementation of eval() builtin as part of the `m4' loadable
3477         module.
3478         (m4_evaluate): renamed from evaluate for namespace cleanliness.
3479         * m4/numb.c: Moved here from src/numb.c, since it is #included
3480         into eval.c at compile time.
3481         * m4/m4module.h (m4_evaluate): Added prototype.
3482         * src/m4.h (evaluate): Removed prototype.
3484 2000-11-25  Gary V. Vaughan  <gary@gnu.org>
3486         * modules/perl.c (builtin_perleval):  Use PL_na for
3487         compatibility with perl-5.6.
3489         * src/main.c (main):  It is now safe to
3490         ``m4_module_install("m4")'', without tripping over the m4
3491         binary itself!
3492         * m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
3493         versions having fixed the insidious module search order bug.
3495         * m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
3496         supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.
3498         * configure.in: Figure out whether to use the installed
3499         getopt.h or the supplied one.
3500         * src/Makefile.am: ditto.
3502         * po/POTFILES.in: List files in their new positions.
3504         * config/ltmain.sh:  This needs to be checked in to match the
3505         libtool macros copied to acinclude.m4 (until a released
3506         libtool copes with m4's needs).
3507         * bootstrap:  Run gettextize.
3509 2000-11-24  Gary V. Vaughan  <gary@gnu.org>
3511         * AUTHORS:  Added my details.
3512         * TODO: updated.
3513         * NEWS: updated.
3514         * bootstrap: temporary update until released libtool catches up.
3516         * All files:  Use new GNU GPL copyright blurb with current contact
3517         address.
3519         * configure.in (LTLIBOBJS): Use canonical code for calculation of
3520         this variable.
3522         * config: renamed acm4 directory to config to be more like
3523         other autoconfiscated packages.
3525         * configure.in (M4_AC_CHECK_DEBUGGING): Use it.
3526         * config/debug.m4:  New file implementing configure macros to add
3527         suitable debug flags to the compiler invocation.
3529         * modules/load.c:  New file implementing the ``load'' and
3530         ``unload'' builtins.
3531         * tests/get-them:  Set the module search directory to the modules
3532         build directory in generated tests.
3533         * modules/shadow.test: ditto.
3534         * modules/modtest.test: ditto.
3535         * modules/modpath1.test: ditto.
3536         * modules/modpath2.test: ditto.
3537         * modules/modpath3.test: ditto.
3538         * modules/modpath4.test: ditto.
3539         * modules/modtest.test: ditto.
3540         * modules/modfreeze.test: ditto.
3541         * modules/unload.test: ditto.
3543         * modules/changeword.c:  New file implementing the ``changeword''
3544         builtin as a loadable module.
3545         * modules/mpeval.c:  New file implementing the ``mpeval'' builtin
3546         as a loadable module.
3548         * src/main.c (main):  Load the gnu module if m4 was started
3549         normally -- i.e. without the -G option.
3550         * modules/gnu.c:  New file implementing a new loadable module wuth
3551         definitions for all the gnu extension builtins.
3552         * modules/format.c:  Moved here from src/format.c.  Now included
3553         directly by gnu.c.
3555         * src/main.c (main):  Load the traditional module if m4 was
3556         started in `no_gnu_extensions' mode.
3557         * modules/traditional.c:  New file implementing the ``unix'' macro,
3558         required when m4 is executed in traditional mode, as a loadable
3559         module.
3561         * src/main.c:  Renamed from m4.c to avoid confusion with
3562         modules/m4.c.
3563         (main):  Always load the m4 module.
3564         * modules/m4.c:  New file implementing a new loadable module with
3565         definitions for all m4 builtins that are not gnu extensions.
3567         * m4/Makefile.am:  Adjusted to take new files below into account.
3568         * m4/m4module.h: Prototypes for exported functions and types moved
3569         to this directory from the src directory.
3570         * m4/m4private.h: Moved here from src/m4private.h to facilitate
3571         the migration of all builtin implementations to loadable modules.
3572         * m4/macro.c: Moved this file here from the src directory,
3573         renaming all exported symbols to use the prefix ``m4_''.
3574         * m4/builtin.c: ditto.
3575         * m4/module.c: ditto.
3576         * m4/symtab.c: ditto.
3577         * m4/debug.c: ditto.
3578         * m4/input.c: ditto.
3579         * m4/output.c: ditto.
3580         * m4/path.c: ditto.
3581         * m4/ltdl.h, m4/ltdl.c: ditto.
3582         * m4/utility.c: Odd functions moved here from files in the src
3583         directory to facilitate builtin migration.
3585 2000-08-12  Gary V. Vaughan  <gary@gnu.org>
3587         * src/builtin.c (dump_symbols): Use "Undefined name `%s'" for
3588         error message, to make translators' jobs a little easier.
3589         (builtin_builtin): ditto.
3590         (builtin_traceon): ditto.
3591         (builtin_traceoff): ditto.
3592         Reported by Akim Demaille <akim@epita.fr>
3594         * m4/Makefile.am (pkgincdir):  Deleted.  Use automake's built in
3595         pkgincludedir instead.
3597         * m4/m4module.h (rquote): Renamed with a prefix of `m4_' since
3598         it is exported globally.  Fixed all references.
3599         (lquote): ditto.
3600         (bcomm): ditto.
3601         (ecomm): ditto.
3602         (DEF_RQUOTE): Renamed with a prefix of `M4_' since it is exported
3603         globally.  Fixed all references.
3604         (DEF_LQUOTE): ditto.
3605         (DEF_BCOMM): ditto.
3606         (DEF_ECOMM): ditto.
3608 2000-07-28  Gary V. Vaughan  <gary@gnu.org>
3610         * NEWS: updated.
3611         * TODO: updated.
3613         * configure.in (AC_CHECK_FUNCS): added bzero and calloc.
3614         (AC_OUTPUT): touch stamp-h.in, not stamp-h.
3616         * doc/m4.texinfo: Fixed to work with --html option of makeinfo.
3617         Removed `Prev', `Next' and `Up' fields of all @nodes now that
3618         makeinfo calculates them for us, and to make any future
3619         reorganisation easier.
3620         (Frozen files): Document format version 2.
3621         `V' now takes argument `2'.
3622         `F' can take a single argument if symbol and builtin names
3623         are the same, or 3 arguments if the builtin is from a module.
3624         New `S' specification for saving syntax table contents.
3625         New `M' specification for saving loaded module names.
3626         * src/freeze.c: Implement them.
3627         * src/input.c (syntax_code): For interpreting frozen syntax
3628         state.
3630         * examples/Makefile.am:  Add the contents of the WWW directory to
3631         the distribution.
3632         * examples/WWW/Makefile:  ditto,
3633         (%.htm): Compares file contents (not just sizes) to determine
3634         whether a change has occured.
3635         * examples/WWW/_header.htm: Bumped version number.
3636         * examples/WWW: Regenerated content.
3638         * m4/Makefile.am (AUTOMAKE_OPTIONS): Support for non-ANSI
3639         compilers comes much easier without ansi2knr.
3640         * src/Makefile.am (AUTOMAKE_OPTIONS): ditto.
3642         * m4/list.c: New generic list container type.
3643         * m4/list.h: Interface to new container type.
3644         * m4/Makefile.am (pkginc_HEADERS): Install list.h.
3645         (libm4_la_SOURCES): compile and link list.c.
3646         * src/builtin.c (builtin_tables): Use list container.
3647         * src/module.c (symtab): ditto.
3648         * src/symtab.c (symtab): ditto.
3650         * m4/system.h: New file for common preprocessor definitions.
3651         * m4/Makefile.am (pkginc_HEADERS): install system.h.
3652         * m4/error.c: Use system.h in place of inline preprocessor.
3653         * m4/error.h: ditto.
3654         * m4/module.c: ditto.
3655         * m4/module.h: ditto.
3656         * m4/xmalloc.c: ditto.
3658         * m4/error.h (error_one_per_line): Make M4_GLOBAL_DATA for WIN32
3659         compatibility.
3660         * m4/xmalloc.c (xmalloc_exit_failure): ditto.
3662         * m4module.h (syntax_table): Renamed with a prefix of `m4_' since
3663         it is exported globally.  Fixed all references.
3664         (builtin): ditto.
3665         (module_init_t): ditto.
3666         (module_finish_t): ditto.
3667         (token_data): ditto.
3668         (SYNTAX_OTHER): Renamed with a prefix of `M4_' since
3669         it is exported globally.  Fixed all references.
3670         (SYNTAX_IGNORE): ditto.
3671         (SYNTAX_SPACE): ditto.
3672         (SYNTAX_OPEN): ditto.
3673         (SYNTAX_CLOSE): ditto.
3674         (SYNTAX_COMMA): ditto.
3675         (SYNTAX_DOLLAR): ditto.
3676         (SYNTAX_ACTIVE): ditto.
3677         (SYNTAX_ESCAPE): ditto.
3678         (SYNTAX_ALPHA): ditto.
3679         (SYNTAX_NUM): ditto.
3680         (SYNTAX_ALNUM): ditto.
3681         (SYNTAX_LQUOTE): ditto.
3682         (SYNTAX_RQUOTE): ditto.
3683         (SYNTAX_BCOMM): ditto.
3684         (SYNTAX_ECOMM): ditto.
3685         (SYNTAX_VALUE): ditto.
3686         (SYNTAX_MASKS): ditto.
3687         (IS_OTHER): ditto.
3688         (IS_IGNORE): ditto.
3689         (IS_SPACE): ditto.
3690         (IS_OPEN): ditto.
3691         (IS_CLOSE): ditto.
3692         (IS_COMMA): ditto.
3693         (IS_DOLLAR): ditto.
3694         (IS_ACTIVE): ditto.
3695         (IS_ESCAPE): ditto.
3696         (IS_ALPHA): ditto.
3697         (IS_NUM): ditto.
3698         (IS_ALNUM): ditto.
3699         (IS_LQUOTE): ditto.
3700         (IS_RQUOTE): ditto.
3701         (IS_BCOMM): ditto.
3702         (IS_ECOMM): ditto.
3703         (TOKEN_EOF): ditto.
3704         (TOKEN_NONE): ditto.
3705         (TOKEN_STRING): ditto.
3706         (TOKEN_SPACE): ditto.
3707         (TOKEN_WORD): ditto.
3708         (TOKEN_SIMPLE): ditto.
3709         (TOKEN_MACDEF): ditto.
3711         * m4/m4module.h (voidstar): Removed in favour of `VOID' for
3712         consistency.  Fixed all references.
3713         (STRING): Renamed to `m4_string' for consistency, and because if
3714         is exported globally.  Fixed all references.
3715         (token_type): Renamed to `m4_token_t' for the same reasons.
3716         (token_data_type): Renamed to `m4_token_data_t' for the same
3717         reasons.
3719         * m4/m4module.h (XCALLOC): Wrapper macro which handles type
3720         sizes.
3721         (XMALLOC): ditto.
3722         (XREALLOC): ditto.
3723         (XFREE): Wrapper macro which avoids freeing NULL pointers.
3725         * m4/m4module.h (m4_macro):  New type for module defined user
3726         macros.
3727         * modules/modtest.c (m4_macro_table):  Define module user macros.
3728         * modules/shadow.c (m4_macro_table):  ditto.
3730         * m4/m4module.h (M4BUILTIN_HANDLER):  For defining handlers
3731         declared with M4BUILTIN.
3733         * m4/xmalloc.c: Use memset if bzero is not available when
3734         emulating calloc with malloc.
3735         (xcalloc): Fallback to malloc/bzero if calloc is not available.
3736         (xfree): Added for consistency.  Will not try to free NULL
3737         pointers.
3738         * src/m4.c (xfree):  Deleted in favour of the above.
3739         * m4/xmalloc.c (WITH_DMALLOC): preprocess away the entire file if
3740         linking with libdmalloc.
3741         * m4/xstrdup.c (WITH_DMALLOC): ditto.
3743         * modules/frozen.m4:  New test case.
3744         * modules/unfrozen.m4:  ditto.
3745         * modules/modfreeze.test:  New test.
3746         * modules/unload.test:  ditto.
3747         * modules/Makefile.am (EXTRA_DIST):  Distribute them.
3748         (TESTS): Use them.
3749         * modules/modpath1.test:  Don't try this test if module support is
3750         not compiled in.
3751         * modules/modpath2.test: ditto.
3752         * modules/modpath3.test: ditto.
3753         * modules/modpath4.test: ditto.
3754         * modules/modtest.test: ditto.
3755         * modules/shadow.test: ditto.
3757         * modules/perl.c: New module.
3758         * modules/perl.m4: Example of using it.
3759         * modules/Makefile.am (perl_la_SOURCES):  Build new perl module.
3761         * src/m4.c (main): Assume interactive mode if STDIN is connected
3762         to a tty.
3763         Changed startup sequence slightly so that syntax is not
3764         initialised from here when loading a frozen file.
3766         * src/builtin.c:  Much improved macro definition style.
3767         * src/m4private.h:  Internal structures for m4_builtin and
3768         m4_macro instances.  These are not exposed to module writers.
3769         * src/module.c (module_modname_find):  Find a module structure
3770         from the its name.
3771         (make_macro_table):  Build an internal macro table from a external
3772         definition.
3773         (make_builtin_table):  Build an internal builtin table from an
3774         external definition.
3776         * src/module.c (module_unload): Be extremely careful to remove
3777         builtins and macros that match the module being unloaded -- no
3778         longer assume that the top element can be removed incase another
3779         odule defines an identical name.
3780         * src/symtab.c (remove_table_reference_symbols): remove all symbol
3781         table entries which refer to a given builtin table.
3782         * src/builtin.c (remove_tables): Use it!
3784 2000-07-13  Thomas Tanner  <tanner@ffii.org>
3786         * Makefile.am (SUBDIRS): we need modules/ for "make dist"
3787         * acm4/modules.m4: deleted
3788         * bootstrap: don't libtoolize libltdl!
3789         * configure.in: AC_SUBST INCLTDL and LIBLTDL, -with-modules flag:
3790         if set, enable WITH_MODULES and add modules to DLPREOPEN
3791         * examples/misc.test: redirect standard output
3792         * lib/Makefile.am: don't use DLLDFLAGS
3793         * lib/m4module.c: include necessary headers to silence GCC -Wall
3794         * lib/m4regex.c: fixes to silence GCC -Wall
3795         * modules/Makefile.am: don't use DLLDFLAGS, add INCLTDL to INCLUDES,
3796           build modules conditionally
3797         * modules/shadow.c: define symbol aliases before using them
3798         * modules/test.c: define symbol aliases before using them
3799         * po/de.po: update translation
3800         * src/Makefile.am: delete pathconf.h, set MODULE_PATH to
3801         pkglibexecdir, don't use DLLDFLAGS, add INCLTDL to INCLUDES and
3802         LIBLTDL to LIBS.
3803         * src/m4.c: initialize libltdl's preloaded symbols via
3804         LTDL_SET_PRELOADED_SYMBOLS
3805         * src/module.c: libltdl's memory management must be initialized
3806         before calling lt_dlinit!, fix warnings
3808 2000-01-18  Gary V. Vaughan  <gary@gnu.org>
3810         * README:  Caveat about nls not supported by dll architecture on
3811         Windows.
3813         * TODO (MODULE SPECIFIC ISSUES): more ideas for the future.
3815         * tests/Makefile.am (stamp-TESTS):  now works with VPATH.
3816         * src/Makefile.am (m4_LDADD):  use $(builddir) for VPATH.
3817         * modules/Makefile.am (LIBS): ditto.
3818         (INCLUDES): search $(top_srcdir) (for eg. <m4/error.h>) and then
3819         $(top_srcdir)/m4 (for only <m4module.h>).
3820         * modules/shadow.test: fixed for VPATH.
3821         * modules/modtest.test: ditto.
3822         * modules/modpath4.test: ditto.
3823         * modules/modpath3.test: ditto.
3824         * modules/modpath2.test: ditto.
3825         * modules/modpath1.test: ditto.
3827         * modules/time.test: Removed due to timezone dependence,
3828         * modules/Makefile.am (TESTS): Removed time.test.
3830         * configure.in: Use $3 of AC_DEFINE so that we can,,,
3831         * acconfig.h: Remove everything except the gettext parameters.
3832         * acm4/gmp.m4: Add a serial number, and take advantage of $3 of
3833         AC_DEFINE.
3834         * acm4/ltdl.m4:  Updated to latest from libtool cvs.
3835         * acm4/modules.m4:  Remove code which duplicates ltdl.m4 and
3836         increment serial number.
3838         * Makefile.am (SUBDIRS): Moved @MODULES_DIR@ to compile before
3839         src dir and immediately after libm4 is built for confidence that
3840         it doesn't rely on the src directory.
3841         (SUBDIRS): Moved doc dir to the end since helptoman.pl and
3842         makeinfo stop the build on cygwin (because they don't work).
3844         * src/m4.h: use GNU standard #if HAVE_CONFIG_H ideom.
3846         * m4/m4private.h: ...is not a public header, so moved to src.
3847         Add `#include <config.h>', `#define _COMPILING_M4' and
3848         `#include "m4.h".
3849         * m4/Makefile.am (noinst_HEADERS): remove m4private.h.
3850         * src/Makefile.am (noinst_HEADERS): add m4private.h.
3851         * src/builtin.c: `#include "m4private.h"' now takes care of the
3852         above.  Duplicates removed.
3853         * src/debug.c: ditto.
3854         * src/eval.c: ditto.
3855         * src/evalmp.c: ditto.
3856         * src/format.c: ditto.
3857         * src/freeze.c: ditto.
3858         * src/input.c: ditto.
3859         * src/m4.c: ditto.
3860         * src/macro.c: ditto.
3861         * src/module.c: ditto.
3862         * src/numb.h: ditto.
3863         * src/output.c: ditto.
3864         * src/path.c: ditto.
3865         * stackovf.c: ditto.
3866         * symtab.c: ditto.
3868         * po/POTFILES.in: compensate for renaming of lib/*.
3869         * m4/Makefile.am (CLEANFILES): @EXEEXT@ left libtool wrapper behind.
3870         (INCLUDES): Look first in $(top_srcdir) (for eg. <m4/error.h>),
3871         and then in $(top_srcdir)/lib (for eg. "m4private.h").
3872         * src/Makefile.am (m4_LDADD): replace libi/libm4.la with
3873         m4/libm4.la.
3874         * m4/m4error.h:  Renamed error.h, for installation to
3875         $prefix/include/m4..
3876         * m4/m4obstack.h:  Renamed obstack.h, for same reason.
3877         * m4/m4regex.h: Renamed regex.h, for same reason.
3878         * m4/m4error.c:  Renamed error.c, and use #include "error.h".
3879         * m4/m4obstack.c: Renamed obstack.c, and fix #includes.
3880         * m4/m4regex.c: Renamed regex.c, and fix #includes.
3882         * lib: moved to m4 to easily support header installation to
3883         $prefix/include/m4.
3884         * Makefile.am (SUBDIRS): renamed lib dir to m4.
3885         * configure.in (AC_OUTPUT): reference m4/Makefile.in.
3886         * acm4/regex.m4: Point to m4/regex.c.
3888         * examples/foreach.m4:  Sanitise quoting.
3889         * examples/foreach.test:  New torture test.
3890         From Akim Demaille <akim@epita.fr>
3892 2000-01-17  Gary V. Vaughan  <gary@gnu.org>
3894         * src/ltdl.c: Use access() to abort doomed module load attempts
3895         if module file does not exist.
3897         * src/Makefile.am (m4_SOURCES, EXTRA_SOURCES): getopt.o and
3898         getopt1.o will already be used if appropriate, so I moved getopt.c
3899         and getopt1.c from m4_SOURCES to EXTRA_SOURCES.
3901         * modules/modpath1.test: Use correct filename in header line.
3902         * modules/modpath2.test: ditto.
3903         * modules/modpath3.test: ditto.
3904         * modules/modpath4.test: ditto.
3906         Without these changes lt_dlopen("test") attempts to
3907         LoadLibrary("/bin/test") on Windows, which although harmless
3908         generates a spurious error message which spoils most of the tests:
3909         * modules/Makefile.am (EXTRA_DIST): s/test.m4 /modtest.m4 /
3910         (TESTS): s/test.test /modtest.test /
3911         (pkglibexec_LTLIBRARIES): s/test.la /modtest.la /
3912         (test_la_SOURCES, test_la_LDFLAGS): renamed to use modtest.
3913         * modules/modpath1.test: s/test.m4 /modtest.m4 /
3914         * modules/modpath2.test: ditto.
3915         * modules/modpath4.test: ditto.
3916         * modules/modpath3.test: s/-m test /-m modtest /
3917         * modules/shadow.m4: use {un,}loadmodule(`modtest').
3919 2000-01-16  Gary V. Vaughan  <gary@gnu.org>
3921         * src/ltdl.c (find_file): Updated to new version with fixed memory
3922         allocation bug in `next'.
3923         * src/ltdl.h: updated to match.
3925         * modules/Makefile.am:  Cleaned up and reordered.
3927 2000-01-16  Rene' Seindal  <rene@seindal.dk>
3929         * modules/Makefile.am (TESTS): New tests for the module system.
3931         * modules/*.test: New files.
3933         * src/m4.c (main): Added call to module_init().
3934         Treats -M and -m as the arguments -D -U and -t, ie deferred.
3936         * src/m4.h: Added declaration of module_init().
3938         * src/module.c (module_init): No longer static
3940         * modules/Makefile.am ({test,shadow,time,stdlib}_la_LDFLAGS):
3941         Added to shut up automake about non standard libtool library
3942         names.
3944         * src/module.c: Disabled DEBUG by default.
3946         * modules/README: Changed example from unload.m4 to shadow.m4
3948         * modules/shadow.m4: Renamed from unload.m4
3950         * modules/Makefile.am (EXTRA_DIST): Removed unload.m4.
3952         * src/m4.c (main): Functionality for -m and -M were reversed.
3953         Fixed.
3955 2000-01-12  Gary V. Vaughan  <gary@gnu.org>
3957         * doc/help2man.pl: updated to version 1.020.
3959         * lib/COPYING.LIB:  updated to version 2.1.
3961         * lib/m4module.h: restructure the M4_SCOPE code to work when
3962         creating a dll which links with libm4.la and both DLL_EXPORT
3963         (for the new dll) and LIBM4_DLL_IMPORT (for m4module.h) are
3964         both defined.
3966 2000-01-11  Gary V. Vaughan  <gary@gnu.org>
3968         Merged the following changes from my tree:
3970         1999-06-15  Gary V. Vaughan  <gary@gnu.org>
3972         * configure.in (AC_LIBTOOL_WIN32_DLL): Declare that m4 has been
3973         ported to compile shared libs.
3975         * configure.in (LIBM4_DLL_IMPORT): Discover whether we need to
3976         use `__declspec(dllimport)' when linking libm4.la on win32.
3977         * src/Makefile.am (m4_LDFLAGS): Use dllimport if necessary.
3979         * configure.in (M4OBJS): Discover whether we need the shipped
3980         implementation of getopt_long.
3981         * src/Makefile.am (m4_LDADD): Link the getopt objects into the
3982         main binary here, as opposed to the module library in lib/libm4.la.
3984         1999-06-14  Gary V. Vaughan  <gary@gnu.org>
3986         * modules/README: Updated to describe the improved libltdl based
3987         module scheme.
3988         * README (cygwin): Added some compilation notes for building m4
3989         correctly under cygwin.
3990         * TODO: Cleaned out the entries for the module system since they
3991         are now implemented.
3993         * *.[ch]: __P is in the compiler's reserved namespace, so replaced
3994         all instances of __P with M4_PARAMS.
3996         * lib/getdate.h: removed unreferenced file.
3998         * lib/m4private.h: New file to define the private interface to the
3999         token_data struct, which must be shared between m4module.c, and
4000         builtin.c but not exported to modules built from the installed
4001         m4module.h since it's size changes depending on compile time
4002         options.
4004         * src/m4.h: Lots of stuff moved to lib/m4module.h.
4006         * lib/m4module.h: New file to define the interface available when
4007         compiling m4 modules.
4008         * lib/m4module.c: Moved parts of builtin.c, and m4.c which are
4009         necessary for module compilation into this new file.
4011         * lib/Makefile.am (include_HEADERS): install headers (renamed to
4012         avoid nameclash with other system headers) necessary for compiling
4013         modules.
4014         (libm4_la_SOURCES): always include error.c, obstack.c and regex.c
4015         so that modules can include the (renamed) installed headers and
4016         be guaranteed a matching implementation.
4017         * lib/m4error.h: renamed from error.h.
4018         * lib/m4obstack.h: renamed from obstack.h.
4019         * lib/m4regex.h: renamed from regex.h.
4020         * configure.in (AC_REPLACE_FUNCS):  Don't look for a system
4021         implementation, simply include the shipped version
4022         unconditionally, otherwise it is hard for a module to know
4023         whether the m4obstack.h header it is using matches the
4024         implementation it ends up linking against.
4025         (jm_WITH_REGEX):  Include regex into libm4 unconditionally for
4026         the same reason.
4028         1999-05-18  Gary V. Vaughan  <gary@gnu.org>
4030         * examples/misc.test: Don't run this test on machines which don't
4031         have a root user in /etc/passwd (e.g. cygwin).
4033         * tests/get-them (/^@example$/): Error messages might have a
4034         ``.exe'' suffix to the program name, or else use the libtool
4035         ``.libs/lt-m4'' binary, or generally have an unexpected path.  All
4036         of these cases are now catered for when comparing error messages
4037         in generated tests.
4038         * tests/other-tests/*.test: ditto.
4039         * examples/*.test: ditto.
4041         * tests/defs (M4): use libtool execute mode.
4042         * examples/defs (M4): ditto.
4044         * tests/get-them (END): explicitly close any open file.
4045         (printthem): In a regular expression, '{' is the start of a repeat
4046         count!  Use `[{]' for a literal open brace.
4047         (/^@node /): Don't use substr on a string shorter than the trim
4048         length.
4050         1999-05-17  Gary V. Vaughan  <gary@gnu.org>
4052         * configure.in (LTLIBOBJS): calculated from LIBOBJS, and
4053         substituted.
4054         (AC_LIBTOOL_DLOPEN): declare that this package will use dlopen.
4056 2000-01-10  Andreas Schwab  <schwab@suse.de>
4058         * tests/other-tests/gmp.test: Find config.sh in build directory.
4060         * configure.in: Find tests/mkconfig.sh in $srcdir.
4062         * configure.in: Define HAVE_SIGINFO_T if siginfo_t is defined in
4063         <signal.h> (for SUS2 compliant systems).
4065         * src/stackovf.c: Check for HAVE_SIGINFO_T in addition to
4066         HAVE_SIGINFO_H.
4068 2000-01-10  Rene' Seindal  <rene@seindal.dk>
4070         * Prerelease 1.4o.
4072         * TODO, NEWS: Cleaned up and updated.
4074         * src/m4.c (main): New variable exit_status for exit status in
4075         case of unreadable files.  Now m4 will exit with EXIT_FAILURE if a
4076         file cannot be read instead of EXIT_SUCCESS.
4078         * src/builtin.c (m4_indir): Changed error message to help
4079         translators (from Akim Demaille <demaille@inf.enst.fr>).
4081         * lib/obstack.[hc], getopt*.[ch]: Updated to newest version from
4082         Cygnus.
4084         * lib/error.[hc], lib/regex.[hc], lib/strtol.c: Updated to version
4085         from glic 2.1.2.
4087         * src/input.c (match_input): Reordering of code, to avoid multiple
4088         calls to push_string_init() from obstack_grow(), which can happen
4089         with some compilers (found and fixed by James Bonfield
4090         <jkb@mrc-lmb.cam.ac.uk>).
4092         * src/stackovf.c: Added prototypes for ultrix.
4093         (setup_stackovf_trap): Added __P to cast.
4094         (Both reported by John David Anglin <dave@hiauly1.hia.nrc.ca>)
4096 2000-01-09  Rene' Seindal  <rene@seindal.dk>
4098         * doc/m4.texinfo (Changequote): Added comment about changing
4099         quotes when the old quote is a part of the new.
4101         * src/builtin.c (expand_ranges): Added break after trailing dash.
4102         This caused misbehavious on some systems (found and fixed by Akim
4103         Demaille <demaille@inf.enst.fr>).
4105         * AUTHORS: Thomas Tanner included
4107         * acconfig.h: Added entry for ss_sp (see below).
4109         * configure.in (use_stackovf): Added check for stack_t with member
4110         ss_base instead of ss_sp (BSDI notably).  (Reported by Paul Eggert
4111         <eggert@twinsun.com>).
4113         * doc/m4.texinfo (Frozen files): Added a simpler example for
4114         generating frozen files from several input files.
4116 1999-11-14  Paul Eggert  <eggert@twinsun.com>
4118         * po/POTFILES.in: Add lib/getopt.c, lib/obstack.c,
4119         lib/regex.c, lib/xmalloc.c.
4121 1999-11-10  Rene' Seindal  <rene@seindal.dk>
4123         * Makefile.am (ACLOCAL_AMFLAGS): Passes -I acm4 to aclocal.
4125         * src/module.c: reindented.
4126         (module_load): return if this is a repeated load of same module.
4127         (module_init): slight change of logic to avoid repeated
4128         initialisation debug messages.
4130         * Makefile.am (DIST_SUBDIRS): Added to ensure modules/ is included
4131         in the distribution.
4133         * modules/Makefile.am (test_la_LDFLAGS): set to -module to silence
4134         automake warnings about missing lib prefix.
4135         (time_la_LDFLAGS): ditto
4136         (stdlib_la_LDFLAGS): ditto
4138 1999-11-10  Paul Eggert  <eggert@twinsun.com>
4140         * src/m4.h: Include error.h, since our macros use error.
4141         * src/m4.c: Don't need to include error.h.
4143 1999-11-09  Paul Eggert  <eggert@twinsun.com>
4145         * src/m4.h (voidstar): Define to void * if __STDC__ is defined
4146         and zero, as Solaris 7 cc does.
4147         (bcopy): Remove macro; no longer needed with new obstack.h.
4149         * src/output.c (freeze_diversions): Don't assume that a
4150         diversion size can fit in `int'.  Check for diversion file
4151         size too large to be printed with `unsigned long'.
4153         * src/Makefile.am (CFLAGS): Omit -Wall.
4155         * src/stackovf.c (setup_stackovf_trap): Remove cast to unsigned.
4157         * src/debug.c (trace_format):
4158         Use ANSI C if (defined __STDC__ && __STDC__) || defined PROTOTYPES.
4160         * src/freeze.c (produce_frozen_state):
4161         Don't assume string lengths fit in int.
4163 1999-10-13  Rene' Seindal  <rene@seindal.dk>
4165         * configure.in (ALL_LINGUAS): Added Greek translation (el).
4166         (ALL_LINGUAS): Added Czech translation (cs).
4168 1999-03-30  Gary V. Vaughan  <gary@gnu.org>
4170         * src/builtin.c: moved module loading functions into...
4171         * src/module.c: entirely new implementation using libltdl.
4172         * po/POTFILES.in: added src/module.c.
4173         * modules/Makefile.am (LTLIBRARIES): Removed lib prefix as these
4174         are modules, not linktime libraries.
4175         (LDFLAGS): added -no-undefined -module and -avoid-version flags.
4176         * modules/stdlib.c (m4_macro_table): use <name>_LTX collision
4177         avoidance on exported symbols.
4178         * modules/test.c (m4_macro_table, m4_init_module,
4179         m4_finish_module): ditto.
4180         * modules/time.c (m4_macro_table): ditto.
4182         * modules/time2.m4: new file which requires command line loading
4183         of modules.
4184         * src/m4.c (--load-module): dynamically load named runtime module
4185         into running executable before reading the source.
4186         (--module-directory): prepend a directory to the module search
4187         path.
4188         (module_init()): Do this the first time we load a module instead;
4189         if the module subsystem is broken normal m4 scripts can still run.
4190         * src/m4.h (install_builtin_table): is now exported.
4192 1999-03-26  Gary V. Vaughan  <gary@gnu.org>
4194         * src/module.c: removed.  No longer required.
4195         * po/POTFILES.in: removed src/module.c.
4197         * Makefile.am (MAINTAINERCLEANFILES): Remove all the files that
4198         the bootstrap script can recreate.
4199         * acm4/Makefile.am (MAINTAINERCLEANFILES): ditto.
4200         * doc/Makefile.am (MAINTAINERCLEANFILES): ditto.
4201         * examples/Makefile.am (MAINTAINERCLEANFILES): ditto.
4202         * lib/Makefile.am (MAINTAINERCLEANFILES): ditto.
4203         (AUTOMAKE_OPTIONS): reduced strictness to allow COPYING.LIB.
4204         * modules/Makefile.am (MAINTAINERCLEANFILES): ditto.
4205         * src/Makefile.am (MAINTAINERCLEANFILES): ditto.
4206         * tests/Makefile.am (MAINTAINERCLEANFILES): ditto.
4208         * acinclude.m4: removed.  `aclocal -I acm4' handles this much
4209         better.
4210         * acm4/Makefile.am (ACINCLUDE_M4): ditto.
4211         * acm4/gettext.m4: removed.  It causes a multiple definition vs.
4212         the installed gettext.m4 file when running aclocal.
4214 1999-03-25  Gary V. Vaughan  <gary@gnu.org>
4216         * configure.in (AM_INIT_AUTOMAKE): bumped version number to
4217         distinguish this from the last prerelease.
4218         (AC_LIBLTDL_CONVENIENCE):  build libltdl as a convenience library
4219         in its own subdirectory.
4221         * modules/Makefile.am (*_SOURCES): renamed to use libtool's "no
4222         lib prefix on a module" feature.
4223         (LDFLAGS): Added `-module -avoid-version' flags to build
4224         versionless module libraries.
4225         * src/builtin.c (m4_load_module): use libltdl.
4226         (module_unload_all): use libltdl.
4227         * src/m4.c (module_init): initialise module loading on demand for
4228         better diagnostics, and so that m4 will still work even if
4229         the module code is broken.
4230         * src/m4.h (module_init): removed.  No longer relevant.
4231         * modules/stdlib.c (m4_macro_table): use stdlib_LTX_ prefix on
4232         exported symbols for compatibility with dlpreopening.
4233         * modules/test.c (m4_macro_table, m4_init_module,
4234         m4_finish_module): ditto.
4235         * modules/time.c (m4_macro_table): ditto.
4237         * bootstrap: New file.  Runs all the autoutils in the right order
4238         after a fresh checkout, or a make maintainer-clean.
4240 1999-02-18  Akim Demaille  <demaille@inf.enst.fr>
4242         * src/builtin.c (dump_symbols): New function, factoring common
4243         content of m4_dumpdef and m4_symbols.
4244         (m4_dumpdef): Use it.
4245         (m4_symbols): New function, implementing `symbols'.  Use it.
4246         * doc/m4.texinfo: Fixed missing commas after @xref, so that the
4247         file compile with modern makeinfo.
4248         (Symbols): New node, documenting symbols.
4249         (direntry): Modernize.
4251 1998-12-11  Rene' Seindal  <rene@seindal.dk>
4253         * src/builtin.c (predefined_tab): New predefined macros
4254         __m4_changeword__, __m4_gmp__ and __m4_modules__ for testing for
4255         configure time options.
4257 1998-12-01  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4259         * src/module.c (module_try_load): Don't try to be clever and
4260         overwrite argument string.  Instead allocate all constructed
4261         strings locally, since they can have arbitrary lengths.  Make
4262         arguments pointers to const.
4263         (module_search): Simplify due to above change.
4265 1998-11-29  Rene' Seindal  <rene@seindal.dk>
4267         * Prerelease 1.4n.
4269         * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): New tests.
4271         * tests/other-tests/import-environment.{m4,test}: New test.
4273         * tests/other-tests/discard-comments.{m4,test}: New test.
4275         * doc/m4.texinfo (Invoking m4): Updated for --discard-comments.
4277         * src/m4.c (main): New option -c --discard-comments.
4278         New global variable discard_comments.
4280         * src/m4.h (token_type): New TOKEN_NONE for tokens to be
4281         discarded, ie never returned from next_token().
4282         Added declaration of discard_comments.
4284         * src/input.c (next_token): Now loops until token type is not
4285         TOKEN_NONE.  Comments are now given this type when comments should
4286         be discarded.
4288         * doc/m4.texinfo (Invoking m4): Updated for --import-environment
4289         and mpeval.
4291 1998-11-28  Rene' Seindal  <rene@seindal.dk>
4293         * src/m4.c (main): New option --import-environment (no single
4294         letter option).
4296         * When configured with --with-gmp both the normal (fast) eval()
4297         and the gmp aware mpeval() are defined.  To restore previous
4298         bahaviour use "define(`eval', defn(`mpeval'))".
4300         * tests/other-tests/gmp.m4: Changed to use mpeval().
4302         * src/evalmp.c: New file for compiling eval.c as gmp aware.
4303         Just defines USE_GMP if WITH_GMP is defined and includes eval.c.
4305         * src/eval.c: Now includes "numb.c" directly.  Everything in this
4306         file must by static, except evaluate(), which is changed to
4307         mp_evaluate() if USE_GMP in force.
4309         * src/numb.c: Changed to be included by eval.c instead of being
4310         compiled separately.  Everything is declared static.
4312         * src/numb.h: Removed declarations of functions, as numb.c is now
4313         included by eval.c.
4315         * src/builtin.c: Declaration of m4_mpeval() added.
4316         Inserted `mpeval' in builtin table.
4317         (do_eval): New function with common code for m4_eval and m4_mpeval.
4318         (m4_mpeval): New function for gmp version of eval.
4320         * src/m4.h: Declaration of mp_evaluate().
4322         * src/Makefile.am (m4_SOUCES): Includes mpeval.c.
4323         (EXTRA_m4_SOURCES): Now has numb.c and numb.h
4325         * src/m4.c (main): m4 --version also shows which options were used
4326         for compilation, such as: "GNU m4 1.4n (options: modules gmp)"
4328 1998-11-27  Rene' Seindal  <rene@seindal.dk>
4330         * Error messages now always print program name before input file
4331         name as specified by GNU coding standards.  Reported by Akim
4332         Demaille <demaille@inf.enst.fr>.
4334         * doc/m4.texinfo (Include): Change due to changed error message
4335         format.
4336         (Eval): Do.
4338         * tests/get-them: Minor change to sed script due to changed error
4339         message format.
4341         * src/m4.c (print_program_name): New func used to print program
4342         name, input file and line number in error ().  Used as an
4343         error_print_progname handler.
4344         (reference_error): Removed.
4345         (main): Assigns error_print_progname.
4347         * src/m4.h (M4ERROR): Removed reference_error ().
4349 1998-11-25  Rene' Seindal  <rene@seindal.dk>
4351         * Updated to libtool 1.2b.
4353         * src/builtin.c (install_builtin_table): Added braces to avoid
4354         warning of ambiguous 'else'.
4356         * src/module.c: Inserted search path code from path.c modified to
4357         use new interface.
4358         (module_init): Configured default path used only if M4MODPATH is
4359         not set.
4360         (module_try_load): Now reads libMODULE.la as generated by libtool
4361         for actual module name.
4362         (module_load): Gives better error messages on failure.
4364         * src/m4.h: Added declarations of structures and functions for
4365         generic search path handling.
4367         * src/path.c: Removed all module specific code and introduced new
4368         functions of more generic search path handling.
4370 1998-11-24  Rene' Seindal  <rene@seindal.dk>
4372         * configure.in: Defines INTLINCL to -I$(top_srcdir)/intl if using
4373         included gettext, as <libintl.h> might not be found
4374         otherwise. Reported by Andrew Bettison <andrewb@zip.com.au>.
4376 1998-11-22  Rene' Seindal  <rene@seindal.dk>
4378         * src/output.c (insert_diversion): Fixed bug that might cause m4
4379         to read from standard output!  Triggered by input
4380         'divert(1)undivert(0)'.  Test for divnum>0 changed to divnum>=0,
4381         so now 'undivert(0)' does nothing.
4383 1998-11-18  Rene' Seindal  <rene@seindal.dk>
4385         * Prerelease 1.4m.
4387         * src/input.c (set_word_regexp): Fixed a bug, where word_regexp
4388         could be changed when compiling a illegal regexp, causing later
4389         use of the regexp to dump core.
4391         * src/module.c (module_load): Changed error message to conform to
4392         standards.
4394         * src/m4.c (usage): Added message about reporting bugs.
4396         * doc/m4.texinfo (Changeword): Corrected a wrong example.
4397         (Changeword): Added note about the type of regexps used.
4399         * ltconfig, ltmain.sh: New files from Libtool 1.2.
4401         * configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
4402         and AM_PROG_LIBTOOL.
4404         * acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
4405         with libtool.
4407         * modules/Makefile.am: Changed completely to compile modules using
4408         libtool.  The modules are compiled as shared libraries, and are
4409         renamed when installed.
4411         * src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
4412         USE_SHL_LOAD to HAVE_SHL_LOAD
4414         * src/builtin.c (shipout_string): Now tests for a NULL string.
4416         * src/module.c: New level of indirection around non-portable
4417         functions to load shared objects.  Intended to encapsulate the non
4418         portable parts better and to reduce the number of #ifdefs in the
4419         code.
4421         * Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
4422         directory modules/ to the distribution.
4424 1998-11-15  Rene' Seindal  <rene@seindal.dk>
4426         * Prerelease 1.4l.
4428         * modules/stdlib.c: New module `stdlib' defining some standard
4429         functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
4430         getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.
4432         * src/builtin.c (shipout_string): New convenience function for
4433         builtins and modules.
4435         * src/module.c (module_load): Tentative support for
4436         shl_load/shl_findsym, but I cannot test it.  Copied from MetaHTML.
4438         * Makefile.am (SUBDIRS): Directory modules added if configured.
4440         * modules/Makefile.am: Now correctly compiles and installs
4441         modules in pkglibexecdir.
4443         * src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
4444         These two are now initialised by autoconf macros.
4446         * src/path.c (module_env_init): MODULE_PATH is always on the
4447         search path.
4449         * src/Makefile.am: Now generated pathconf.h which defined the
4450         default MODULE_PATH.
4452         * configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
4453         where modules are installed.
4455         * acm4/modules.m4: Enhanced with code from MetaHTML, contributed
4456         by Brian J. Fox <bfox@datawave.net>.  This change allow modules to
4457         build and install automatically, and it is prepared for other
4458         interfacec than dlopen().
4460         * src/builtin.c (predefined_tab): Added __m4_version__ for the
4461         current version of GNU m4.  It is a GNU extension.
4463 1998-11-14  Rene' Seindal  <rene@seindal.dk>
4465         * tests/Makefile.am (GENERATED_TESTS): Added new
4466         generated-tests/changesy.8.test
4468         * doc/m4.texinfo (Changesyntax): Documentation for escape
4469         syntax class.
4471         * src/macro.c (expand_token): Check for escaped macro call before
4472         symbol table lookup.
4474         * src/builtin.c (m4_changesyntax): Added `@' flag to define escape
4475         characters
4477         * src/input.c: New static variable use_macro_escape, which is TRUE
4478         iff some character has code SYNTAX_ESCAPE
4479         (input_init): Added initialisation of use_macro_escape.
4480         (check_use_macro_escape): New function to synchronise
4481         use_macro_escape with the syntax table.
4482         (set_quotes): Added call to check_use_macro_escape()
4483         (set_comment): Do.
4484         (set_syntax): Do.
4485         (next_token): Added new case for IS_ESCAPE.
4487         * src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.
4489 1998-10-13  René Seindal  <rene@seindal.dk>
4491         * Prerelease 1.4k.
4493         * tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
4494         generated-tests.
4496         * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
4497         maintained tests in tests/other-tests.  These currently tests for
4498         8-bit transparency, multiple precision arithmetic and sync-line
4499         output.  Test for stackoverflow detection does not work.
4501         * examples/Makefile.am (TESTS): Added tests for all example files.
4503         * examples/mktests.sh: New file.  Help program for creating test
4504         files.
4506         * tests/mkconfig.sh: New file to generate tests/config.m4 and
4507         tests/config.sh.  This is for tests of configure selectable
4508         features.  Picks up all set WITH_ and ENABLE_ veriables from
4509         config.h
4511         * src/path.c (path_search): Added argument 'char **expanded_name'
4512         to return the expanded name.
4514         * src/m4.h: Added 2nd argument to declaration of path_search().
4516         * src/m4.c (main): Added 2nd argument to path_search().
4518         * src/freeze.c (reload_frozen_state): Do.
4520         * src/builtin.c (m4_undivert): Do.
4521         (include): Do.
4523 1998-10-11  René Seindal  <rene@seindal.dk>
4525         * acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4
4527         * acm4/modules.m4: New file.  Defines AM_WITH_MODULES.
4529         * acm4/gmp.m4: New file.  Defines AM_WITH_GMP.
4531         * configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.
4533         * AUTHORS, ChangeLog: Changed all dates to ISO 8601.
4535         * intl/: Updated to GNU gettext 0.10.35.
4537         * doc/m4.texinfo (Format): Documented that format is blind.
4539         * src/builtin.c (builtin_tab): Builtin format marked as blind.
4541 1998-10-07  René Seindal  <rene@seindal.dk>
4543         * Prerelease 1.4j.
4545         * tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
4546         .test, as the files are no longer just m4 input.
4548         * tests/get-them (FILE): Changed .m4 extension to .test.
4550         * src/m4.h (token_type): New token type TOKEN_SPACE introduced.
4551         Otherwise quoted strings with leading whitespace first in a macro
4552         argument would be eliminated.
4554         * src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
4555         (expand_argument): Do.
4557         * src/input.c (next_token): SPACE and NUM/OTHER characters are only
4558         grouped together iff both quote and comment strings are single
4559         character.  Otherwise they might include a comment/quote leader.
4560         (next_token): Returns new token type TOKEN_SPACE.
4562         * src/builtin.c (push_builtin_table): New function to push a
4563         builtin_table on the stack without installing its contents.
4564         (find_builtin_by_name): Added call to push_builtin_table() if
4565         reading frozen files.  Otherwise the builtins named in the frozen
4566         files could not be found.
4567         (install_builtin_table): Changed to use push_builtin_table()
4569 1998-10-04  René Seindal  <rene@seindal.dk>
4571         * Prerelease 1.4i.
4573         * configure.in (ALL_LINGUAS): Added Polish pl.po
4575 1998-10-03  René Seindal  <rene@seindal.dk>
4577         * Many files: Incorporated changes to implement dynamic modules.
4578         Detailed comments in src/modules.c and modules/README
4580         * src/module.c: New file, implements the OS dependant parts of
4581         dynamic module loading.
4583         * src/Makefile.am (m4_SOURCES): Added module.c
4585         * src/builtin.h: New file, declares some functions from builtin.c
4586         that are of use for other modules (shipout_int, numeric_arg,
4587         skip_space, bad_argc), and the macros ARG() and DECLARE().
4589         * src/builtin.c (install_builtin_table): New function.  Each
4590         module brings in a builtin_table, which is pushed on a stack.
4591         (struct builtin_table): New struct for list of builtin_tables.
4592         (m4_loadmodule): New function to implement builtin "loadmodule".
4593         (shipout_int): No longer static, to be used by modules.
4594         (numeric_arg): do.
4595         (skip_space): do.
4596         (bad_argc): do.
4597         (builtin_init): changed to call install_builtin_table()
4598         (find_builtin_by_name): Now searches all builtin_tables
4599         (find_builtin_by_addr): do.
4601         * src/path.c: Reorganised to allow for two search paths, one for
4602         include files and one for modules.
4604         * src/m4.h: Added declarations for new functions in module.c and
4605         in path.c.
4607         * src/m4.c (main): Added call to module_init().
4609         * modules: New directory with a few demo modules.
4611         * Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
4612         in SUBDIRS.
4614         * configure.in: Added modules/Makefile to AC_OUTPUT.
4616         * configure.in: Added code to implement --with-modules.  Tests for
4617         <dlfcn.h> and -ldl.
4619         * acconfig.h: Added WITH_MODULES
4621 1998-10-02  René Seindal  <rene@seindal.dk>
4623         * examples/Makefile.am (pkgdata_DATA): Removed special target for
4624         check and variables TESTS.  These tests are now run from the
4625         tests/ directory.
4627         * tests/Makefile.am (OTHER_TESTS): Added tests from the example/
4628         directory.  The files stay there but the tests are run from the
4629         tests/ directory.
4631         * tests/Makefile.am (EXTRA_DIST): Added run-test.
4633         * tests/run-test: New file.  Run a test manually
4635         * tests/Makefile.am, tests/get_them: Moved automatically generated
4636         tests (from the manual) to sub directory tests/gentest/.  The
4637         tests/ directory had gotten a bit messy.
4639 1998-09-06  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
4641         * examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
4642         wrap}.test: Added a few testcases.
4644 1998-08-21  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
4646         * Prerelease 1.4h.
4648         * lib/Makefile.am (noinst_HEADERS): regex.h added
4650         * configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
4651         acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
4653         * acm4/Makefile.am: created providing rules to create
4654         $(top_srcdir)/acinclude.m4 to be used by aclocal.
4656         * tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
4657         `C'. Reported by Ulrich Drepper.
4659         * Makefile.am (SUBDIRS): Removed checks directory
4660         * configure.in (AC_OUTPUT): Removed checks/Makefile
4662         * doc/m4.texinfo (Patsubst,example): @comment added to preserve
4663         the space when m4.texinfo is edited and whitespace.el is active.
4664         (Defn,example): idem.
4666 1998-08-20  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
4668         * doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
4669         ../COPYING. ../Makefile is a file which is certainly present when
4670         test is executed in testSubDir. One can't be sure that the COPYING
4671         file is in .. or ../.. in all situations, the ../Makefile is
4672         always there.
4674         * doc/m4.texinfo (Include): adjusted expected test output
4675         according to new tests, i.e. the input will always come from the
4676         file `in' created by the test.
4678         * tests/Makefile.am: Added three lines at the top to get
4679         esyscmd.1.test working.
4681         * tests/get-them: modified to generate clearer tests who will need
4682         less maintenance when new test examples are created in
4683         `doc/m4.texinfo'. All tests are small (nearly stand-alone, they
4684         need the generic file `defs') shell scripts creating `in', `ok',
4685         `out' and when apropriate `okerr' and `err' in the directory
4686         `testSubDir' when executed. The compare of `ok' and `out'
4687         (and of `okerr' and `err') will be the exit status of the test.
4688         `out' must match `ok' (and `okerr' must match `err') for the test
4689         to be succesful.
4691         * tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
4692         the tests generated by tests/get-them getting it input normally
4693         from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
4694         (dot) before the numeric part) is reserved for all other (hand
4695         written) tests. The `+' means one or more times.
4697 1998-08-12  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
4699         * doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
4700         supported short man page to refer to info documentation
4701         * helptoman.pl: added
4702         * configure.in: AC_PATH_PROG(PERL,perl)
4703         * Makefile.am (SUBDIRS): doc after src
4705         * libitized with libit 0.5 from
4706         ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
4708         * configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
4709         * lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
4710          replacement functions, (libm4_a_LIBADD): @LIBOBJS@
4711         * configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
4712           lib/rx.{c,h}: added
4713         * configure.in (AC_CHECK_FUNC): getopt_long
4715         * src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
4717         * TODO: added entry about dependencies
4719 1998-08-10  René Seindal  <rene@seindal.dk>
4721         * Prerelease 1.4f
4723         * doc/m4.texinfo (Changesyntax): Added documentation for the macro
4724         "changesyntax".
4726         * src/builtin.c (m4_changesyntax): Added builtin macro
4727         "changesyntax" to modify the syntax table.
4729         * src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
4730         table.  All categories are assigned a syntax code and tokens are
4731         read according to this table.
4733 1998-08-09  René Seindal  <rene@seindal.dk>
4735         * src/numb.{c,h}: New files, implements multiple precision eval
4736         using GNU gmp.  Originally submitted by John Gerard Makecki
4737         (johnm@vlibs.com), later modified.  Tested with GNU gmp 2.0.2.
4739         * doc/m4.texinfo (Eval): Added documentation for multiple
4740         precision arithmetic library support.
4742         * src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
4743         to accommodate multiple precision eval.
4745 1998-08-07  René Seindal  <rene@seindal.dk>
4747         * src/input.c (MATCH, match_input), src/m4.h: changed definition
4748         of comment and quote strings to `unsigned int' to allow eight bit
4749         chars (reported by andrewb@zip.com.au (Andrew Bettison)).
4751         * src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
4752         patch from Mike Howard <mike@clove.com>
4754 1998-08-06  René Seindal  <rene@seindal.dk>
4756         * gettext.m4: corrected AM_WITH_NLS to handle use of installed
4757         -lintl.
4759 1998-08-03  René Seindal  <rene@seindal.dk>
4761         * Prerelease 1.4e
4763         * src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
4764         and _ macro.  M4 now builds with --disable-nls.
4766         * src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
4767         to look for right message catalogs.  Call indef'ed by ENABLE_NLS.
4769         * configure.in (ALL_LINGUAS): Added complete list of translations:
4770         de fr it ja nl ru sv.
4772 1998-05-22  Erick Branderhorst  <Erick.Branderhorst@asml.nl>
4774         * Prerelease 1.4d.
4776         * src/m4.c: #include <signal.h> not <sys/signal.h>.
4778         * src/Makefile.am: CFLAGS = -Wall @CFLAGS@.
4780         * checks/Makefile.am: explicit list tests in CHECKS.
4782         * configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
4783         src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
4784         mkinstalldirs, install-sh: Added automake (1.3) support.
4786         * lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
4787         obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
4788         Used libitize (0.4) to update.
4790         * configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
4791         (0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
4792         README accordingly.
4794         * src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
4795         stack overflow functionality.
4797 1994-12-03  François Pinard  <pinard@iro.umontreal.ca>
4799         * Prerelease 1.4.1.
4801         * Makefile.in (realclean-local): Delete stamp-h.in.
4803         * configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
4804         Localize, adapting from how it is done in sharutils.
4806         * fr.tt: New file, for French.
4808         * configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
4809         src/freeze.c: Rename PRODUCT to PACKAGE.
4811 1994-11-26  François Pinard  <pinard@iro.umontreal.ca>
4813         * configure.in: Check for <libintl.h> and <locale.h>.
4814         * src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
4815         src/stackovf.c: Rename _ to __P.
4816         * src/m4.h: Declare _ as a macro returning its argument, or else,
4817         include <libintl.h> and declare _ as gettext.
4818         * src/m4.c: Possibly include <locale.h> and call setlocale.
4819         * src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
4820         src/input.c, src/macro.c, src/output.c, src/path.c,
4821         src/stackovf.c, src/symtab.c: Use _ macro over all localizable
4822         strings.
4824 1994-11-07  François Pinard  <pinard@iro.umontreal.ca>
4826         * doc/Makefile.in (stamp-vti): Use new -r option to date.
4828         * configure.in: Put --with-gmp in place, in prevision for John
4829         Gerard's work.
4830         * acconfig.h: Document WITH_GMP.
4832 1994-11-05  François Pinard  <pinard@iro.umontreal.ca>
4834         * Release 1.4.
4836         * doc/Makefile.in (realclean): Also remove stamp-vti.
4837         Reported by Eric Backus.
4839 1994-11-02  François Pinard  <pinard@iro.umontreal.ca>
4841         * src/freeze.c (produce_frozen_state): If the frozen file cannot
4842         be opened, return immediately after producing the error message.
4843         Reported by Andreas Schwab.
4845         * configure.in: Check for const only after having found possible
4846         ANSIfying compiler flags, this is of no use to check it before.
4847         Reported by Alexander Lehmann.
4849 1994-11-01  François Pinard  <pinard@iro.umontreal.ca>
4851         * src/macro.c (collect_arguments): Cast obstack arguments to
4852         (voidstar), so avoiding compiler warnings.
4853         Reported by Joseph E. Sacco.
4855         * src/freeze.c (produce_frozen_state): Cast printed lengths to
4856         (int) so they correspond to %d format items.
4857         Reported by Joseph E. Sacco.
4859         * src/m4.c (main): Cast the argument to xfree to (voidstar).
4860         * src/symtab.c (free_symbol): Idem.
4861         Reported by Karl Vogel.
4863 1994-10-31  François Pinard  <pinard@iro.umontreal.ca>
4865         * Makefile.in (DISTFILES): Distribute BACKLOG.
4867         * configure.in: Define PRODUCT and VERSION.
4868         * acconfig.h: Document PRODUCT and VERSION.
4869         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
4870         constant string m4 and variable or parameter named version.
4872 1994-10-30  François Pinard  <pinard@iro.umontreal.ca>
4874         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
4875         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
4876         defines __STDC__ to 0, for indicating it is *not* ANSI!
4877         Reported by Kaveh R. Ghazi.
4879         * configure.in: Added obsolescent tests for AIX and Minix.
4881         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
4882         which texclean does not exist anymore.
4883         Reported by Eric Backus, Jim Meyering, John David Anglin and
4884         Joseph E. Sacco.
4886 1994-10-29  François Pinard  <pinard@iro.umontreal.ca>
4888         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
4889         Reported by John David Anglin.
4891         * src/ansi2knr.c: New version, sent by Peter Deutsch.
4892         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
4893         ANSI2KNR, depending on the fact the compiler is ANSI or not.
4894         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
4895         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
4896         of $U, put underline in extensions rather than in basenames.  Use
4897         implicit rules, now that regularity makes this possible.
4898         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
4899         of ansi2knr whenever it is needed.
4900         * configure.in: Adjusted for correct STACKOVF substitution.
4901         * src/debug.c (trace_format): When not __STDC__, use (...) as a
4902         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
4903         Reported by David MacKenzie.
4905         * Makefile.in: Remove binprefix.  Use transform_name instead.
4906         Reported by David MacKenzie.
4908         * doc/Makefile.in: Create version.texi, use it, clean it.
4909         Reported by Jim Meyering.
4911 1994-10-28  François Pinard  <pinard@iro.umontreal.ca>
4913         * Makefile.in (all, install, uninstall): Depend on Makefile.
4915         * Makefile.in: For actions invoking $(MAKE) from within compound
4916         sh statements, exit non-zero if the sub-make fails.  Otherwise,
4917         the top-level make may exit successfully when it should fail.
4918         Reported by Jim Kingdon.
4920         * {,/*}Makefile.in: Use && after all cd, in case they fail.
4922         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
4923         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
4924         * configure.in: Substitute PRODUCT and VERSION.
4926         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
4928 1994-10-27  François Pinard  <pinard@iro.umontreal.ca>
4930         * Makefile.in (mostlyclean-local): Do not remove *~.
4931         * */Makefile.in (mostlyclean): Idem.
4932         Reported by Robert E. Brown and Richard Stallman.
4934 1994-10-09  François Pinard  <pinard@iro.umontreal.ca>
4936         * src/m4.h: Get rid of CONFIG_BROKETS.
4938 1994-10-02  François Pinard  <pinard@iro.umontreal.ca>
4940         * configure.in: Use AC_ARG_PROGRAM.
4941         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
4942         Reported by David MacKenzie.
4944 1994-10-01  François Pinard  <pinard@iro.umontreal.ca>
4946         * configure.in: Do not add -O to CFLAGS for GNU C, now that
4947         configure does it automatically.
4948         Reported by Jim Meyering.
4950 1994-09-23  François Pinard  <pinard@iro.umontreal.ca>
4952         * src/stackovf.c: Declare the handler_t typedef earlier in the
4953         code, use it for stackovf_handler.
4954         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
4955         casting sigsegv_handler.
4956         Reported by Robert Bernstein.
4958         * src/m4.c (main): Initialize program_name to argv[0] without
4959         basename'ing it.
4960         Reported by Karl Berry.
4962 1994-09-18  François Pinard  <pinard@iro.umontreal.ca>
4964         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
4965         Reported by Karl Berry.
4967 1994-09-14  François Pinard  <pinard@iro.umontreal.ca>
4969         * lib/Makefile.in (mostlyclean): Added.
4970         (TAGS): Make in $(srcdir).
4972         * configure.in: Use `choke me' in test, like everywhere!
4974         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
4975         unreacheable and useless.
4977         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
4979         * lib/Makefile.in (DISTFILES): Distribute TAGS.
4980         (distclean): Do not remove TAGS.
4981         (realclean): Remove it.
4982         * Makefile.in: Make TAGS in lib also, not just in src.
4983         Reported by Karl Berry.
4985         * Makefile.in (distclean, realclean): Instead of recursively
4986         calling $(MAKE) for the -local part, allow parallel execution of
4987         -recursive and -local, only delay the removal of config.status,
4988         which is repeated in both goals.
4990 1994-09-13  François Pinard  <pinard@iro.umontreal.ca>
4992         * Release 1.3.
4994         * Makefile.in: Group all *clean-recursive goals in one, using sed
4995         to remove `-recursive' while calling make recursively.  Also, use
4996         a subshell for each recursive $(MAKE).
4997         Reported by Jim Meyering.
4999         * src/m4.h (memcpy): Define with bcopy for BSD systems.
5000         Reported by Kaveh R. Ghazi.
5002         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
5003         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
5004         specify it.
5006         * configure.in: Use date instead of touch for stamp-h.
5007         * Makefile.in (stamp-h.in): Idem.
5009         * Makefile.in (distclean, realclean): Force serial execution of
5010         both goals, in case parallel makes are being used.
5011         Reported by Jim Meyering.
5013         * src/Makefile.in (DISTFILES): Distribute TAGS.
5014         (distclean): Do not remove TAGS.
5015         (realclean): Remove it.
5016         Reported by Karl Berry.
5018 1994-09-10  François Pinard  <pinard@iro.umontreal.ca>
5020         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
5021         to old names, for following Autoconf.
5023 1994-09-08  François Pinard  <pinard@iro.umontreal.ca>
5025         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
5026         ./install.sh will not be correctly referred to in sub-Makefiles.
5027         Reported by John David Anglin.
5029         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
5030         Reported by Eric Backus.
5032         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
5033         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
5034         config.status into remaking this directory's Makefile only.
5035         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
5036         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
5037         Reported by Jim Meyering.
5039 1994-09-06  François Pinard  <pinard@iro.umontreal.ca>
5041         * configure.in: Correct stack overflow detection logic, taking
5042         care of systems having only incomplete implementations (like for
5043         Pyramid 9820 OSx 5.0d).
5044         Reported by Kaveh R. Ghazi.
5046         * src/Makefile.in (TAGS): Remote -t from etags call.
5048 1994-09-02  François Pinard  <pinard@iro.umontreal.ca>
5050         * lib/Makefile.in (install): Depend on all.
5052 1994-08-31  François Pinard  <pinard@iro.umontreal.ca>
5054         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
5055         Reported by Jim Meyering and John David Anglin.
5057         * Makefile.in (distclean-local): Delete config.log.
5058         Reported by Jim Meyering.
5060         Solidify frozen files with respect to -P:
5061         * src/m4.c: Have -P set prefix_all_buitins variable instead of
5062         calling a function by that name.  Declare the variable.
5063         * src/m4.h: Adjust declaration for prefix_all_buitins.
5064         * src/builtin.c (builtin_init): Merge in functionality from
5065         previous prefix_all_buitins function, while making entries in the
5066         symbol table, but not modifying the builtin description itself.
5068         * src/freeze.c (reload_frozen_state): Add a useless `break;',
5069         because *many* compilers do not accept an empty `default:'.
5070         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
5071         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
5073         * configure.in: Use AC_TYPE_SIGNAL.
5074         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
5075         Reported by Robert Bernstein.
5077         * checks/Makefile.in (check): Modify PATH so check-them will find
5078         m4 in the src directory.
5079         * Makefile.in (check): Don't.
5080         Reported by Akiko Matsushita and Jim Meyering.
5082         * src/output.c (make_room_for, output_character_helper): New
5083         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
5084         a per buffer MAXIMUM_BUFFER_SIZE.
5086         * src/output.c (output_text): New function, for optimizing the
5087         output of strings of characters.  Use it.
5089 1994-08-30  François Pinard  <pinard@iro.umontreal.ca>
5091         * doc, src: New directories reorganizing the distribution.
5092         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
5093         files.
5094         * Makefile.in: Adjusted.
5095         * configure.in: Configure new Makefiles.
5097         * m4.h: Declare STRING typedef.  Use it for comment and quote
5098         strings, adjusting all references.  (This is the rudiments of a
5099         beginning for the eventual withdrawal of NUL terminated strings.)
5100         * output.c (shipout_text): Accept a length parameter, and use it.
5101         All callers adjusted.
5103 1994-08-29  François Pinard  <pinard@iro.umontreal.ca>
5105         * m4.h: Include <unistd.h> if it exists.
5106         * stackovf.c: Don't.
5108         Clean up for current_diversion variable:
5109         * output.c: Move current_diversion from builtin.c.
5110         * m4.h: Declare current_diversion so builtin.c can access it.
5111         * output.c (output_init, make_diversion): Initialize or update
5112         current_diversion.
5113         * builtin.c (builtin_init, m4_divert): Leave current_diversion
5114         alone.
5116         Remove limit on number of diversions:
5117         * output.c: Replace ndiversion by diversions, declare it.
5118         (output_init): Allocate only diversion 0.
5119         (make_diversion): Allocate new diversions as needed.
5120         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
5121         * m4.c: Still accept -N, but do nothing with it.
5122         Reported by David MacKenzie.
5124         Freeze diversions:
5125         * output.c (freeze_diversions): New function.
5126         * m4.h: Declare freeze_diversions.
5127         * freeze.c: Document frozen file format, revise it, call
5128         freeze_diversions to add diversions to frozen format, and code to
5129         reload them properly.
5130         * m4.c: Do not undivert automatically at end when status being
5131         frozen.  Do not call builtin_init when reloading frozen state.
5133         Speed up diversion processing:
5134         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
5135         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
5136         structure and variables, cached variables out of output_diversion,
5137         reallocate_diversion_for and OUTPUT_CHARACTER.
5138         (shipout_text, make_diversion, insert_diversion): Adapted to new
5139         structures.
5140         (insert_file): Use better buffering.
5141         Reported by David MacKenzie.
5143 1994-08-28  François Pinard  <pinard@iro.umontreal.ca>
5145         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
5146         dist works from another build directory.
5148 1994-08-27  François Pinard  <pinard@iro.umontreal.ca>
5150         * symtab.c (hack_all_symbols): Use hash_table_size instead of
5151         constant HASHMAX, for -H option to work better.
5153         * builtin.c (DECLARE): Simplify by using _ ().
5155         * freeze.c: New file.
5156         * Makefile.in: Compile it, distribute it.
5157         * m4.c: Recognize, document and process --freeze-state (-F) and
5158         --reload-state (-R) options.  Pass a true flag to builtin_init
5159         only if no reloading some state.
5160         * builtin.c (define_builtin): Remove static specifier.
5161         (find_builtin_by_name): Remove static specifier.
5162         (builtin_init): Accept and obey a flag argument.
5163         * m4.h: Add declarations for freeze.c, changes for builtin.c.
5165 1994-08-24  François Pinard  <pinard@iro.umontreal.ca>
5167         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
5168         specifier.
5170         * configure.in: Implement --with-dmalloc.
5171         * acconfig.h: Document WITH_DMALLOC.
5172         * m4.h: Add code for when WITH_DMALLOC.
5174 1994-08-15  François Pinard  <pinard@iro.umontreal.ca>
5176         * m4.c (long_options): Use "error-output", the dash was missing.
5177         Reported by Akiko Matsushita.
5179 1994-08-12  François Pinard  <pinard@iro.umontreal.ca>
5181         * m4.h: Include <sys/types.h>.
5182         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
5183         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
5184         int.
5185         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
5186         as size_t, not int.
5187         * builtin.c (dump_args): Declare len as size_t, not int.
5189         * debug.c: Prototype the forward declaration of debug_set_file.
5191         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
5192         shadowing of this variable.
5193         * output.c (insert_diversion): Idem.
5195         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
5196         (input_init): Duplicate default quote and comment strings.
5197         (set_quotes): Free previous quote strings in all cases.  Duplicate
5198         even default quote strings.
5199         (set_comment): Free previous comment strings in all cases.
5200         Duplicate even default comment strings.
5202         * configure.in: Updated for Autoconf 2.0.
5203         * Makefile.in (distclean-local): Also delete config.cache.
5205         * m4.c (usage): Reorganize the --help output by topic.  Include a
5206         description for debugging flags.
5208 1994-07-29  François Pinard  <pinard@iro.umontreal.ca>
5210         * configure.in: If sigaction is available and SA_ONSTACK defined,
5211         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
5212         defined, use sigvec.  Else don't compile stackovf.c.
5213         * stackovf.c (setup_stackovf_trap): Idem.
5214         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
5215         and Simon Leinen.
5217 1994-07-21  François Pinard  <pinard@iro.umontreal.ca>
5219         * m4.c (usage): Replace printf par fputs.
5221 1994-07-18  François Pinard  <pinard@iro.umontreal.ca>
5223         * Release 1.2
5225 1994-07-17  François Pinard  <pinard@iro.umontreal.ca>
5227         * configure.in: Check for sigaction and sigvec.  Add a new delayed
5228         check for RLIMIT_STACK, combine in the checking for getrlimit.
5229         All those things are not universally available.
5230         * stackovf.c: Split setting up the trap handler and catching
5231         signals, for better taking care of various configure outcomes.
5232         * examples/stackovf.sh: Correct a typo.
5233         Reported by Eric Backus, Jim Avera and Jim Meyering.
5235 1994-07-16  François Pinard  <pinard@iro.umontreal.ca>
5237         * ansi2knr.c: New version sent by its author, Peter Deutsch.
5239 1994-07-15  François Pinard  <pinard@iro.umontreal.ca>
5241         * Makefile.in: Modify so parallel make will not try making
5242         lib/libm4.a twice simultaneously.
5243         Reported by Jim Meyering.
5245 1994-07-14  François Pinard  <pinard@iro.umontreal.ca>
5247         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
5248         error message, for when no code possibility exists.  Even if this
5249         line is completely #ifdef'ed out, it brings a syntax error.
5250         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
5252         * Makefile.in (install): Have install depend on all too, for lib
5253         to be remade as needed.
5255         * examples/stackovf.sh: Try ksh, bsh and bash for shells
5256         providing ulimit, instead of using only ksh.
5257         Reported by Jim Avera and Joseph E. Sacco.
5259 1994-07-12  François Pinard  <pinard@iro.umontreal.ca>
5261         * Makefile.in (check): Have it depend on all instead of m4.  In
5262         this way, a change in lib will be detected and processed.
5264         * builtin.c (numeric_arg): Use strtol and verify the conversion,
5265         instead of using sscanf which stops as soon as there is a
5266         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
5267         and divert(1xyzzy) were all accepted without any warning or error
5268         messages.
5269         * m4.h: Declare strtol as long if not including stdlib.h.
5270         * configure.in: Check for limits.h, and replace strtol if missing.
5271         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
5272         * lib/strtol.c: New file, from elsewhere.
5273         Reported by Andreas Schwab.
5275 1994-07-07  François Pinard  <pinard@iro.umontreal.ca>
5277         * macro.c (expand_macro): Cast value to (boolean) prior to
5278         assigning it to traced.
5279         Reported by Tom McConnell.
5281         * Makefile.in (m4): Always make all in lib first.
5282         Reported by Jim Meyering.
5284 1994-07-06  Jim Avera <jima@netcom.com>
5286         * stackovf.c: Isolated OS-dependent sections; Improved portability,
5287         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
5288         handlers), and a default error message if the fault address is not
5289         available (when neither siginfo.h nor BSD sigcontext are supported).
5290         * configure.in: Changes for stackovf.h: Check for sigcontext,
5291         sigaction, sigstack, and define rlim_t as int if necessary.
5292         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
5293         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
5294         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
5296 1994-07-05  François Pinard  <pinard@iro.umontreal.ca>
5298         * configure.in: Use AC_SET_MAKE.
5299         * Makefile.in: Use @SET_MAKE@.
5300         Reported by Jim Meyering.
5302         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
5303         Reported by Ian Taylor.
5305 1994-07-02  François Pinard  <pinard@iro.umontreal.ca>
5307         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
5308         because siginfo.h is unrelated to standard headers, and siginfo.h
5309         is already checked for.
5310         Reported by Joseph E. Sacco.
5312         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
5313         PROTOTYPES.
5314         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
5315         AC_PROTOTYPES.
5317 1994-06-29  François Pinard  <pinard@iro.umontreal.ca>
5319         * builtin.c (substitute): Use \& to represent this part of the
5320         string which was matched by the whole regexp, instead of
5321         representing the whole string.  Any usage of \0 issues a warning
5322         and acts like \&, it will disappear in some subsequent release.
5324 1994-06-27  François Pinard  <pinard@iro.umontreal.ca>
5326         * m4.c: Complete prototype for forwarded declaration of usage.
5328         * input.c (init_macro_token): Correct own reference in error
5329         message.  Previous name get_macro_func was referred to instead.
5330         (next_char):  Correct own reference in error message.  Previous
5331         name advance_input was referred to instead.
5333         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
5334         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
5335         and_term, not_term, logical_not_term, cmp_term, shift_term,
5336         add_term, mult_term, exp_term, unary_term, simple_term): Add
5337         prototype to forwarded declarations.  Declare parameter v1 as
5338         eval_t * instead of int *.  Same for local variable v2 in dyadic
5339         functions.  Same for result in exp_term.
5340         * builtin.c (m4_eval): Declare value as eval_t instead of int.
5341         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
5342         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
5343         (shipout_int): Cast first argument of ntoa to eval_t.
5344         Reported by Thorsten Ohl.
5346         * macro.c: Complete the prototypes of forwarded expand_macro and
5347         expand_token.
5348         Reported by Thorsten Ohl.
5350         * m4.h: Define voidstar as void * or char * depending on __STDC__.
5351         The Ultrix 3.1 compiler cannot do much with void pointers.
5353         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
5354         * m4.c (xfree):  Replace void * by voidstar.
5355         Reported by Tom McConnell.
5357         * ansi2knr.1: New, from elsewhere.
5358         * Makefile.in (DISTFILES): Distribute ansi2knr.1
5360         * Makefile.in (stamp-h.in): Avoid running ./config.status if
5361         stamp-h does not exist yet.  This avoids running it a second time
5362         just after the initial ./configure.
5363         Reported by David MacKenzie and Tom McConnell.
5365         * m4.h: Replace the enum debug_info declaration with a series of
5366         #define's.  The Ultrix 3.1 compiler would otherwise need casting
5367         (int) to most references, when used in expressions.
5368         Reported by Tom McConnell.
5370 1994-06-25  François Pinard  <pinard@iro.umontreal.ca>
5372         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
5373         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
5374         calls the compiler.  Previously, FP_PROTOTYPES was only calling
5375         the preprocessor; by not being subject to CFLAGS, this was
5376         discouraging those flags asking for ANSI compilation.
5377         * acconfig.h: Document HAVE_PROTOTYPES.
5378         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
5379         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
5380         Reported by Eric Backus.
5382         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
5383         from the environment.  Default CFLAGS to -g if not set.
5384         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
5385         * lib/Makefile.in: Have CFLAGS substituted from configure.
5386         Reported by Eric Backus and Tom McConnell.
5388         * configure.in: m4_undefine changeword before using AC_ENABLE.
5390         * m4.h: Declare prototypes for error (for ANSI compilers only),
5391         prefix_all_builtins and reference_error.
5392         Reported by Tom McConnell.
5394         * input.c (set_word_regexp): Do not try to initialize the array
5395         test from a string, this does not work with non-ANSI compilers.
5396         Reported by Eric Backus.
5398         * Makefile.in (dist): Clean examples/ before saving it.
5399         (distclean-local): Also remove stamp-h.
5400         Reported by Eric Backus.
5402         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
5403         non ANSI compilers.
5404         Reported by Tom McConnell.
5406         * checks/Makefile.in (clean): Depends on mostlyclean.
5407         (mostlyclean): New goal.
5409 1994-06-24  François Pinard  <pinard@iro.umontreal.ca>
5411         * Makefile.in (DISTFILES): Distribute install.sh.
5412         * install.sh: New file, copied from elsewhere.
5413         Reported by Assar Westerlund and Kaveh R. Ghazi.
5415 1994-06-23  François Pinard  <pinard@iro.umontreal.ca>
5417         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
5418         * acconfig.h: Explain ENABLE_CHANGEWORD.
5420         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
5421         from code provided by Pete Chown]
5422         * m4.h: Add original_text field to u_t variant of union u.
5423         Declare TOKEN_DATA_FUNC macro.
5424         * builtin.c: Declare changeword.
5425         (m4_changeword): New function.
5426         * input.c: Include "regex.h", define variables with word regexps.
5427         (input_init): Initialize the word regexp.
5428         (set_word_regexp): New.
5429         (next_token): Declare local variables, use the previous code if
5430         default_word_regexp is true.  Else, match using a new code.  Save
5431         the original text.
5432         * macro.c (expand_token): Ship out original text if not a macro
5433         name.
5434         Reported by Krste Asanovic and Pete Chown.
5436         [These modifs all depend upon ENABLE_CHANGEWORD]
5437         * m4.h: Declare external user_word_regexp.
5438         * m4.c: Declare user_word_regexp, and initialize it from
5439         --word-regexp or -W, or NULL if not specified.
5440         * input.c: Use user_word_regexp if specified, instead of
5441         DEFAULT_WORD_REGEXP.
5443         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
5444         agree with it.
5446         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
5447         * checks/Makefile.in: Empty the suffix list.
5448         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
5450         * m4.c: Declare nesting_limit and initialize it to 250.
5451         Implement -LNUMBER or --nesting-limit=NUMBER to change its
5452         value.
5453         * m4.h: Declare nesting_limit as external.
5454         * macro.c (expand_macro): Stop execution whenever nesting limit
5455         is exceeded.
5456         Reported by Bengt Mertensson.
5458         * eval.c (evaluate): Diagnose excess characters in eval input.
5459         Things like `eval(08)' used to return 0 with no diagnostic.
5461         * m4.h: Capitalize first letter of all macro arguments in
5462         definitions.
5464         * m4.c: Declare warning_status, initialize it to 0.  Add new
5465         option -E, or --fatal-warnings, which sets warning_status to
5466         EXIT_FAILURE instead.
5467         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
5468         EXIT_FAILURE if not otherwise done by header files.
5469         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
5470         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
5471         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
5472         argument of all M4ERROR calls.
5473         Reported by Noah Friedman.
5475         * examples/incl-test.m4: Renamed from incl_test.m4.
5476         * examples/include.m4: Include incl-test.m4 instead of
5477         incl_test.m4.
5478         * examples/multiquotes.m4: Renamed from multi-quotes.m.
5480 1994-06-22  François Pinard  <pinard@iro.umontreal.ca>
5482         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
5483         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
5484         also tested it on a Sun Sparc workstation running SunOS 4.x.
5486         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
5487         49.format check, abusing a `union values' argument with sprintf
5488         without selecting the proper field.  Now, save the formatting type
5489         first, delaying the fetch of the corresponding argument.
5490         Reported by Joseph E. Sacco and Tom Quinn.
5492         * format.c (format): Remove const from char *fmt declaration when
5493         not HAVE_EFGCVT, because a NUL may be forced into it.
5495         * m4.h: Declare atof() when not STDC_HEADERS.
5496         Reported by Joseph E. Sacco.
5498         * Regenerate configure using Autoconf 1.11, this corrects a
5499         problem about an incorrect cpp seting on NeXT 3.1.
5500         Reported by Alexander Lehmann.
5502 1994-06-05  François Pinard  <pinard@iro.umontreal.ca>
5504         * m4.h (_): Change argument from `x' to `Args'.
5506 1994-04-22  François Pinard  <pinard@iro.umontreal.ca>
5508         * m4.h: Rename Args() to _().
5509         * m4.h: Remove extern specifier from all function declarations.
5511 1994-04-22  Jim Avera <jima@netcom.com>
5513         * stackovf.c: New file implementing stack-overflow detection.
5514         * configure.in: Check for getrlimit, sigaction.  If all of
5515         standard headers, getrlimit and sigaction, define USE_STACKOVF and
5516         substitute ${U}stackovf.o for STACKOVF.
5517         * acconfig.h: Declare USE_STACKOVF.
5518         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
5519         * m4.h: Declare setup_stackovf_trap().
5520         * m4.c: Call setup_stackovf_trap().
5521         * tests/stackovf_test.sh: New file.
5523 1994-04-13  François Pinard  <pinard@iro.umontreal.ca>
5525         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
5527         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
5529 1994-01-30    <pinard@iro.umontreal.ca>
5531         * m4.h: Remove definition of volatile, not used anymore.
5532         Reported by Jim Meyering and Joseph E. Sacco.
5534         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
5535         of `if ... else /* nothing */' for if macros.
5536         Reported by Jim Meyering.
5538         * builtin.c (m4_regexp): Reorganize the code for avoiding a
5539         warning from gcc about `repl' possibly used before defined.
5540         Reported by Jim Meyering.
5542         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
5543         Reported by Jim Meyering.
5545 1994-01-25  François Pinard  <pinard@iro.umontreal.ca>
5547         * m4.h: Move the conditional definition of volatile after the
5548         inclusion of system files, because they may define it first.
5550 1994-01-04  François Pinard  <pinard@iro.umontreal.ca>
5552         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
5553         get around a problem with Alpha make seeing a syntax error, there.
5554         Reported by Vern Paxson.
5556 1994-01-03  François Pinard  <pinard@iro.umontreal.ca>
5558         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
5559         Reported by Richard Stallman.
5561 1993-12-25  François Pinard  <pinard@iro.umontreal.ca>
5563         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
5564         instead of AC_HAVE_FUNCS.
5565         Reported by Noah Friedman.
5567 1993-12-01  François Pinard  <pinard@iro.umontreal.ca>
5569         * m4.c: Initialize show_help and show_version to zero.
5571         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
5572         Use them in exit() and usage() calls.
5574 1993-11-27  François Pinard  <pinard@iro.umontreal.ca>
5576         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
5577         syserr() macro.  Delete errref, add reference_error and M4ERROR.
5578         * m4.c: Replace errref, which was returning an input reference
5579         string, with reference_error, which prints it on standard error.
5580         * builtin.c, output.c: Use errno as second parameter to error,
5581         instead of using syserr() with %s.
5582         * *.c: Use M4ERROR instead of error: no more errref() with %s.
5583         Doing so, the program name appears after the input reference
5584         instead of before, which eases M-x next-error processing.
5586 1993-11-24  François Pinard  <pinard@iro.umontreal.ca>
5588         * checks/get-them: Escape braces with backslashes in patterns,
5589         because HPUX-9.01 awk needs this.
5590         Reported by Jim Meyering.
5592 1993-11-22  François Pinard  <pinard@iro.umontreal.ca>
5594         * builtin.c: Declare "FILE *popen ();".
5596         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
5597         macros, replace error_message_prefix() declaration by errref()'s.
5598         Declare xrealloc, for use in errref().
5599         * m4.c: Delete error_message_prefix() function, add errref().
5600         * *.c: Use error() systematically in place of all error macros,
5601         now that error() flushes stdout first.  Make needed adjustments.
5603         * m4.h: Remove const in sys_errlist[] declaration, it creates
5604         conflicts on SGI and Alpha.
5605         Reported by Kaveh R. Ghazi.
5607 1993-11-20  François Pinard  <pinard@iro.umontreal.ca>
5609         * m4.c: Include <getopt.h> instead of "getopt.h".
5611         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
5612         * acconfig.h: New, for documenting HAVE_EFGCVT.
5613         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
5614         use them wherever appropriate.  Also use -I. for compilations.
5615         * lib/Makefile.in: Use -I.. for compilations.
5616         * *.c: Include <config.h> or "config.h".
5618         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
5619         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
5621 1993-11-17  François Pinard  <pinard@iro.umontreal.ca>
5623         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
5625         * input.c (input_init): Initialize quote and comment strings
5626         explicitely instead of calling set_quotes and set_comment: by
5627         doing so, we ensure we do not free uninitialized variables.
5629         * checks/check-them: Reverse arguments to both diff, so the
5630         expected is on the left and the obtained on the right.
5632         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
5633         macros. Delete declarations for m4error, warning, fatal and
5634         internal_error, add declaration for error_message_prefix.
5635         * m4.c:  Delete m4error, warning, fatal and internal_error
5636         routines, add error_message_prefix routine.
5637         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
5638         warning with WARNING*, fatal with FATAL* and internal_error with
5639         INTERNAL_ERROR*.
5640         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
5641         this is not needed anymore.
5643         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
5644         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
5645         and debug_message, add declaration for debug_message_prefix.
5646         * debug.c: Remove static specifier for FILE *debug declaration.
5647         Delete debug_print and debug_message routines, add
5648         debug_message_prefix routine.
5649         * builtin.c, debug.c: Replace debug_print routine calls with
5650         DEBUG_PRINT* macro calls.
5651         * input.c, path.c: Replace debug_message routine calls with
5652         DEBUG_MESSAGE* macro calls.
5654         * m4.h: Remove inclusion of <varargs.h>.
5655         * debug.c: Include <stdarg.h> or <varargs.h>.
5656         (trace_format): Use stdarg instead of varargs if __STDC__.
5658         * configure.in: Remove checks for vfprintf and _doprnt.  These
5659         implementations use varargs tricks which are not portable enough.
5660         * lib/vfprintf.c: Deleted.
5661         * lib/_doprnt.c: Deleted.
5662         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
5663         Reported by Joel Sherrill.
5665         * path.c (add_include_directory): Use xstrdup.
5667         * builtin.c (find_builtin_by_name): Declare static.
5669         * *.[ch]: Add const to a few "char *" declarations.
5671         * configure.in: Remove commented tests for fileno() and fstat().
5672         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
5674         * debug.c (debug_flush_files): New.
5675         * m4.h: Declares it.
5676         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
5677         Reported by Nicolas Pioch.
5679 1993-11-12  François Pinard  <pinard@iro.umontreal.ca>
5681         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
5682         Reported by Joel Sherrill.
5684         * builtin.c (prefix_all_builtins): Instead of the table size, use
5685         the null entry at end for stopping the loop.  It was overwritten.
5686         Reported by Andreas Schwab and Jim Meyering.
5688         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
5689         Reported by Kaveh R. Ghazi.
5691         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
5692         Reported by Karl Vogel.
5694 1993-11-09  François Pinard  <pinard@iro.umontreal.ca>
5696         * m4.h: Do not define volatile if already defined.
5697         Reported by René Seindal.
5699         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
5701         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
5702         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
5704 1993-11-08  François Pinard  <pinard@iro.umontreal.ca>
5706         * m4.h: Define strchr and strrchr in terms of index and rindex,
5707         instead of the other way around.
5708         * builtin.c, m4.c, path.c: Use strchr instead of index.
5710         * input.c (next_char): Remove a "break;" after a "return ...;".
5711         Reported by Tom McConnell.
5713 1993-11-08  François Pinard  <pinard@iro.umontreal.ca>
5715         * Release 1.1
5717         * configure.in: Do not copy check files in the build hierarchy.
5718         * checks/check-them: Identify the m4 version being checked.  For
5719         finding m4, look in $PATH instead of in the parent directory.
5720         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
5721         * checks/Makefile.in (.all-stamp): Always create check files in
5722         the source hierarchy, not anymore in the build hierarchy.
5723         (check): cd to the source hierarchy before performing checks.
5724         Do not copy nor clean COPYING anymore, take it from `..'.
5725         Reported by Tom McConnell.
5727         * Makefile.in (Makefile): Use $(SHELL).
5728         (config.status): Use $(SHELL).  Use "config.status --recheck"
5729         instead of "configure --no-create", which is obsolete.
5730         Reported by Tom McConnell.
5732 1993-11-05  François Pinard  <pinard@iro.umontreal.ca>
5734         * m4.c (usage): Use "%s" instead of "m4" in format string.
5735         Reported by Jim Meyering.
5737         * Makefile.in: Distribute mkinstalldirs.
5738         Reported by Pierre Gaumond.
5739         Reported by Jim Meyering.
5740         Reported by Tom McConnell.
5741         Reported by Andreas Gustafsson.
5743         * checks/check-them: Renamed from checks/check_them.
5744         * checks/get-them: Renamed from checks/get_them.
5745         * checks/.all-stamp: Renamed from checks/.all_stamp.
5746         * checks/Makefile.in: Changed accordingly.
5747         Reported by Jim Meyering.
5749 1993-11-04  François Pinard  <pinard@iro.umontreal.ca>
5751         * lib/Makefile.in (dist): Correct permissions on files.
5753         * output.c: Declare tmpfile, some systems don't.
5755 1993-11-03  François Pinard  <pinard@iro.umontreal.ca>
5757         * checks/Makefile.in (dist): Correct permissions on files.
5759         * Makefile.in (dist): Ensure recursive linking for subdirectory
5760         `examples', also set read/write permissions on all its files.
5762         * mkinstalldirs: New, from elsewhere.
5763         * Makefile.in: Use it.
5765         * debug.c: Synchronize debug messages and regular output when
5766         the debug file and stdout are redirected to the same file.
5767         * configure.in: Add (commented) checks for fileno and fstat.
5768         Reported by Jim Avera.
5770         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
5771         etc., arguments, then ignore the superfluous one.  m4 used to
5772         diagnose missing arguments and return the empty string.
5773         Reported by Nick S. Kanakakorn.
5775 1993-11-02  François Pinard  <pinard@iro.umontreal.ca>
5777         * m4.c (main): At end of all input, ensure all undiverted text
5778         goes to the main output stream.
5779         Reported by Andreas Gustafsson.
5781         * m4.c (main): exit (0), instead of return 0.
5783         * m4.c: Implement -P and --prefix-builtins.
5784         * builtin.c: Delete const specifier on builtin_tab.
5785         (prefix_all_builtins): New.
5786         Reported by Noah Friedman.
5787         Reported by Scott Bartram.
5789         * c-boxes.el: New, from elsewhere.
5790         * Makefile.in: Distribute it.
5792         * m4.h: Do not define bcopy if <string.h> defines it.
5793         Reported by Stephen Perkins.
5795         * builtin.c (define_macro): Allow a missing second argument, in
5796         which case it is implied empty.  Affects define and pushdef.
5797         Reported by Eric Allman.
5799 1993-11-01  François Pinard  <pinard@iro.umontreal.ca>
5801         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
5802         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
5803         * builtin.c: Initialize all the blindness fields in builtin_tab.
5804         (define_builtin): Copy the blindness of a builtin into its symbol.
5805         * macro.c (expand_token): Avoid processing a blind builtin if the
5806         next character is not an opening parenthesis.
5807         Reported by David MacKenzie.
5808         Reported by Noah Friedman.
5810         * configure.in: Ensure an exit status of 0 on completion.
5811         Reported by Vivek P. Singhal.
5813         * eval.c (eval_lex): Admit both lower and upper case letters for
5814         bases greater than 10.  Only lower case letters were accepted.
5816         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
5817         Reported by Krste Asanovic.
5819         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
5820         * eval.c (logical_not_term): New name for not_term.
5821         * eval.c (xor_term): New, between or_term and and_term.
5822         * eval.c (not_term): New, between and_term and logical_not_term.
5823         * eval.c (shift_term): New, between cmp_term and add_term.
5824         Reported by Krste Asanovic: ~, ^, <<, >>.
5825         Reported by Ben A. Mesander: ** vs ^.
5827         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
5828         * m4.h: Delete xrealloc.c.
5829         * lib/xmalloc.c: New, from elsewhere.
5830         * lib/xstrdup.c: New, from elsewhere.
5831         * lib/Makefile.in: Distribute and compile them.
5833         * m4.c: Change progname to program_name.
5834         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
5835         * lib/error.c: New, from elsewhere.
5836         * lib/Makefile.in: Distribute and compile error.c.
5837         * configure.in: Check AC_VPRINTF and for strerror.
5838         * m4.c: Delete cmd_error.  Use error instead.
5839         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
5841         * m4.h: Delete #define const, let Autoconf takes care of this.
5843         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
5844         Merge parse_args into main.  Declare argv to be `char *const *',
5845         then remove superfluous casts.
5847         * m4.c: Rename --no-gnu-extensions to --traditional.
5848         Reported by Ben A. Mesander.
5850         * m4.c (usage): Add a status parameter.  Supply one in various
5851         calls.  Add --help processing.  Remove -V for --version.
5853         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
5855         * lib/Makefile.in: Have an AR=ar declaration.
5856         Reported by Eric Backus.
5857         Reported by Bjorn R. Bjornsson.
5858         Reported by Tom Tromey.
5859         Reported by Kristine Lund.
5860         Reported by Marion Hakanson.
5862 1993-10-30  François Pinard  <pinard@iro.umontreal.ca>
5864         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
5865         Reported by Noah Friedman.
5867 1993-10-25  François Pinard  <pinard@iro.umontreal.ca>
5869         * Makefile.in: Remove MDEFINES and cleanup.
5871 1993-06-09  François Pinard  <pinard@iro.umontreal.ca>
5873         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
5874         Create a gzip file.
5876 1993-02-06  François Pinard  <pinard@iro.umontreal.ca>
5878         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
5879         ensure 777 mode for directories, so older tar's will restore file
5880         modes properly.
5882 1993-01-17  François Pinard  <pinard@iro.umontreal.ca>
5884         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
5885         so the installer can override automatically configured choices.
5886         Reported by Karl Berry.
5888 1993-01-15  François Pinard  <pinard@iro.umontreal.ca>
5890         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
5891         previous version was not working properly on m68k-hp-bsd4.3.
5892         Reported by Roland McGrath.
5894         * lib/_doprnt.c: Stolen from Oleo distribution.
5895         * configure.in: Check for _doprnt.c if vfprintf.c selected.
5896         * lib/Makefile.in: Distribute _doprnt.c.
5897         Do not distribute regex.[ch].old anymore.
5899 1993-01-01  François Pinard  <pinard@iro.umontreal.ca>
5901         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
5902         Richard wants it there.
5904 1992-12-27  François Pinard  <pinard@iro.umontreal.ca>
5906         * Makefile.in: Add DEFS to MDEFINES.
5907         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
5908         (libm4.a): Remove the library before creating it.
5909         (distclean): Remove tags and TAGS too.
5911 1992-12-23  François Pinard  <pinard@iro.umontreal.ca>
5913         * Makefile.in (dvi, m4.dvi): New goals.
5915         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
5916         macro.c, output.c, path.c, symtab.c: Change Copyright from
5917         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
5919         * examples/divert.m4: Deleted, this bug has been corrected.
5921         * Makefile.in (texclean, mostlyclean): New goals.
5923         * Makefile.in (clean): Remove clutter from ansi2knr.
5924         Reported by Pierre Gaumond.
5926 1992-12-20  François Pinard  <pinard@iro.umontreal.ca>
5928         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
5929         might well use CFLAGS is s/he needs it.
5931         * Makefile.in: Allow installation of info files from a separate
5932         build directory.
5933         Reported by Jason Merrill.
5934         Reported by David MacKenzie.
5935         Reported by Skip Montanaro.
5936         Reported by Erez Zadok.
5937         Reported by Assar Westerlund.
5939 1992-12-19  François Pinard  <pinard@iro.umontreal.ca>
5941         * Release 1.0.3
5942         This is still a beta release for the future GNU m4 version 1.1.
5944         * lib/alloca.c: New, from elsewhere.
5945         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
5947         * m4.h: Do not define index/rindex if already defined.  If
5948         FALSE/TRUE are already defined, do not redefine them, but merely
5949         define boolean typedef to int.
5951         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
5952         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
5953         because some C compilers do not like connectives with #ifdef.
5954         * m4.h: Define `volatile' only if __GNUC__, instead of once for
5955         __GNUC__ and once for __STDC__.
5956         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
5958         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
5959         Makefile dependencies.  Without it, make keeps destroying and
5960         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
5962         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
5963         to diversion/DIVERSION, this was a spelling error.
5965         * m4.c: Declare version[], remove #include "version.h".
5966         * version.h: Deleted.
5967         * Makefile.in: Remove references to version.h.
5969         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
5970         production, by using a simpler and more robust algorithm.  This
5971         solves the problem of synclines sometimes written in the middle of
5972         an output line.  Delete sync_line() and output_lines variable.
5973         * m4.h: Remove sync_line prototype and output_lines declaration.
5974         * input.c (next_char), output.c (shipout_text): Remove references
5975         to output_lines.
5976         * input.c (push_file, pop_file): Merely put the value -1 in
5977         output_current_line instead of calling sync_line, for delaying a
5978         single `#line NUM FILE' before next output line.  Do not test
5979         for sync_output, because this is unnecessary clutter.
5980         * output.c (make_divertion, insert_divertion): Idem.
5981         * input.c: Rename must_advance_line to start_of_input_line, for
5982         consistency.
5984         * debug.c (trace_header): Select a new debug line format, which
5985         better complies with GNU standards for formatting error messages.
5986         With option `-dfl', M-x next-error might be used on the output.
5987         * m4.c (vmesg): Adjust format of error output to GNU standards.
5988         * m4.texinfo: Adjust examples for `make check' to work.
5990         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
5991         case for enum debug_info constants, which were all lower case.
5993         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
5994         re_search_2.
5995         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
5996         collected patches.  I tried a few times using newer regex.[ch], it
5997         mysteriously stopped aborting with this one.  Insecure feeling...
5998         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
6000 1992-12-18  François Pinard  <pinard@iro.umontreal.ca>
6002         * m4.c: Change `--no-warnings' to `--silent'.
6003         Reported by David MacKenzie.
6005         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
6006         leave it off for now.  See comment in m4.c for justification.
6007         Reported by David MacKenzie.
6009         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
6010         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
6012         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
6014         * Makefile.in: Ensure recursive cleaning is done before local
6015         cleaning for all clean goals.
6017         * builtin.c (ntoa): Ensure the value is always interpreted as a
6018         signed quantity, whatever the radix is.
6020 1992-11-18  Jim Meyering  <meyering@idefix>
6022         * builtin.c, format.c, input.c: Split long lines.
6023         * m4.c: Use typedef macro_definition instead of struct
6024         macro_definition.
6025         * symtab.c: Use typedef symbol instead of struct symbol.
6027 1992-11-17  François Pinard  <pinard@iro.umontreal.ca>
6029         * *.[ch]: Remove all trailing whitespace, in code and comments.
6031         * configure.in: Find some awk.
6032         * Makefile.in: Add $(AWK) to MDEFINES.
6033         * checks/Makefile.in: Transmit $(AWK) to get_them.
6034         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
6035         awk script when switching files, because without this, mawk runs
6036         out of file descriptors.
6038 1992-11-16  François Pinard  <pinard@iro.umontreal.ca>
6040         * Makefile.in (realclean): Delete m4.info*.
6041         Reported by Jim Meyering.
6043         * Makefile.in: Adjust and link with checks/Makefile.
6044         * checks/Makefile.in: New.
6045         * configure.in: Output checks/Makefile.
6047         * checks/get_them: Have the dnl header of each test more
6048         recognizable by next-error, also use a better message.
6050 1992-11-16  Jim Meyering  <meyering@idefix>
6052         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
6053         And use that only if __GNUC__ since we're using it's GCC-specific
6054         semantics that tell the compiler the associated function doesn't
6055         return.
6057         * builtin.c (substitute): Don't use character as an array index.
6058         (dumpdef_cmp): Make formal arguments `const void *' to avoid
6059         warnings with gcc -W -Wall on systems with qsort prototype.
6060         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
6061         from gcc -W -Wall.
6063         * eval.c (most functions): Add parentheses to assignments used
6064         as truth values go avoid warnings from gcc -Wall.
6066         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
6067         any functions that don't need external scope.
6069         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
6070         (many functions and arrays): Declare `const'.
6072 1992-11-15  François Pinard  <pinard@iro.umontreal.ca>
6074         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
6075         removing the declaration from m4.h.  Also rename false to FALSE
6076         and true to TRUE.
6078         * lib/Makefile.in (Makefile): New goal.
6080         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
6081         so heavily loaded.  It gets more easily overridable, calling make.
6082         Reported by Jim Meyering.
6084         * Makefile.in (dist): Get .fname from the current directory name,
6085         instead of from version.h.  I need updating many files manually,
6086         when the version changes, version.h is just one of them.
6088 1992-11-14  François Pinard  <pinard@iro.umontreal.ca>
6090         * m4.h: Remove the tag `boolean' on the enum introducing typedef
6091         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
6092         Reported by Tom McConnell.
6094 1992-11-13  François Pinard  <pinard@iro.umontreal.ca>
6096         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
6097         39.cleardiv, which were describing missing or spurious newlines.
6098         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
6099         do not depend on machine word size, `/bin/false' implementation,
6100         or `wc' output format.  `make check' is more dependable, now.
6102         * checks/check_them: Summarize the failed tests by listing their
6103         name, at end.  If none, issue `All checks successful'.  Output
6104         `Checking' instead of `Input file:'.
6106         * checks/get_them, checks/check_them: Reindented.
6108         * Makefile.in (dist): chmod a+r before making the tar file.
6110 1992-11-12  François Pinard  <pinard@iro.umontreal.ca>
6112         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
6114         * input.c (next_token): Reinitialize token_buttom just after using
6115         it as a watermark with obstack_free.  Or else, a future token, big
6116         enough for triggering reallocation of the obstack chunk, could
6117         void the initialized value of token_buttom, later causing panic in
6118         obstack_free.  Rename token_buttom to token_bottom everywhere.
6120         * m4.h: Before declaring errno, first include <errno.h> and
6121         ensure that it does not define errno.
6122         Reported by Richard Stallman.
6124 1992-11-11  François Pinard  <pinard@iro.umontreal.ca>
6126         * builtin.c: Define and use DECLARE macro for builtins.
6128         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
6129         argument, this is a common idiom for introducing long comments.
6131         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
6132         arguments.  The last argument was silently ignored.
6134         * m4.c (cmd_error): Add a missing semicolon before va_end().
6136 1992-11-10  François Pinard  <pinard@iro.umontreal.ca>
6138         * Makefile.in: Now handle protoized sources.  Define and use U.
6139         Compile and use ansi2knr with old compilers.  Update DISTFILES.
6140         Add `aclocal.m4' to `configure' dependencies.
6141         * ansi2knr.c: New, from Ghostscript distribution.
6142         * configure.in: Define U through FP_PROTOTYPES for old compilers.
6143         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
6144         * aclocal.m4: New, provide FP_PROTOTYPES.
6145         * m4.h: Conditionnaly protoized through Args, save for varags.
6146         * builtin.c: Protoized.  Then:
6147         Include <sys/types.h> if size_t is not defined, before "regex.h".
6148         (m4_ifelse): Fetch built-in name properly for diagnostic.
6149         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
6150         (m4_regexp): Add const to `msg' declaration.
6151         (m4_patsubst): Add const to `msg' declaration.
6152         * debug.c: Protoized, save for varargs.
6153         * eval.c: Protoized.
6154         * format.c: Protoized.
6155         * input.c: Protoized.
6156         * m4.c: Protoized, save for varargs.  Then:
6157         (xfree): Accept void * instead of char *.
6158         (xmalloc): Return void * instead of char *.
6159         (xrealloc): Accept and return void * instead of char *.
6160         * macro.c: Protoized.
6161         * output.c: Protoized.
6162         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
6163         * symtab.c: Protoized.
6165 1992-11-06  François Pinard  <pinard@iro.umontreal.ca>
6167         * m4.texinfo: Remove directory from diagnostics in 30.include,
6168         51.eval, 56.errprint and 57.m4exit tests.
6170         * m4.h: Remove declarations for int or void system functions, they
6171         cause more conflicting trouble than they make good.
6173         * configure.in: Avoid configuration header file.  Add some tests.
6174         * m4.h: Remove #include "config.h".
6175         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
6176         Then, rewritten for better compliance with GNU standards.
6178 1992-11-05  François Pinard  <pinard@iro.umontreal.ca>
6180         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
6181         because of a misplaced #endif.
6183         * Many *.[hc] files: Correct intra-line spacing here and there,
6184         according to GNU indent 1.6 advice.
6186         * configure.in: New, using Autoconf 1.2.
6187         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
6188         * Delete old configure.in, configure, etc/configure.in,
6189         etc/configure, lib/configure.in, lib/configure and config/*.
6190         Reported by Jason Merrill.
6192         * symtab.c (hash): Change (char) NULL to '\0'.
6193         Reported by Jason Merrill.
6195         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
6196         etc/nextvers.sh.  Release numbers will be edited `by hand'.
6197         * version.h: De-automatize, force value in.
6199         * m4.c: Changes in order to use a newer getopt.h.
6200         Reported by David MacKenzie.
6202         * checks/: New name for examples/.
6203         * checks/get_them: New location for etc/get_examples.
6204         * checks/check_them: New location for etc/check_examples.
6205         * Makefile.in, checks/get_them, checks/check_them: Adjust.
6206         * lib/vfprintf.c: New location for etc/vfprintf.c.
6207         * Delete empty etc/.
6208         * examples/: New name for test/.
6210 1992-03-10  François Pinard  <pinard@iro.umontreal.ca>
6212         * Makefile.in (check): Add m4 as dependency.
6214         * m4.c: Accept --no-warnings instead of --no_warnings, and
6215         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
6216         usage message more informative.
6217         Reported by David MacKenzie.
6219 1992-03-09  François Pinard  <pinard@iro.umontreal.ca>
6221         * etc/check_examples: New name for check_examples.sh.
6222         * etc/get_examples: New name for get_examples.sh.
6223         * Makefile.in, etc/Makefile.in: Use new names.
6225         * Makefile.in: Transmit $(CC) while making in lib.
6227         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
6228         code disposition by hand.
6230 1992-03-08  François Pinard  <pinard@iro.umontreal.ca>
6232         * m4.h: Delete definitions for abort() and exit().
6233         Reported by Richard Stallman.
6235         * config/hmake-unicos, config/s-unicos.h: New files.
6236         Reported by Hal Peterson.
6238         * eval.c (exp_term): Have N^0 return 1.
6239         Reported by Michael Fetterman.
6241         * eval.c, input.c, m4.h: Remove last comma in enums.
6242         Reported by Mike Lijewski.
6244         * Transfer of maintenance duties from René to François.
6246 1991-10-24  René Seindal <seindal@diku.dk>
6248         * Release 1.0.  Many thanks to those, who provided me with bug
6249         reports and feedback.
6251         * Uses GNU configure, taken from the gdb distribution.
6253         * Uses GNU getopt(), with long option names.
6255         * The -Q/+quiet option is added, which suppresses warnings about
6256         missing or superflous arguments to built-in macros.
6258         * Added default options via the M4OPTS environment variable.
6260         * The built-in format can now be configured to use sprintf as
6261         the formatting engine, for systems without [efg]cvt(3).
6263         * GNU library code is moved to the ./lib subdirectory; other
6264         utility files are now in ./etc.
6266         * Several minor bugs have been fixed.
6268 1991-07-26  René Seindal <seindal@diku.dk>
6270         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
6271         Francois Pinard and Roland H. Pesch for providing me with reports.
6273         * The builtins incr and decr are now implemented without use of
6274         eval.
6276         * The builtin indir is added, to allow for indirect macro calls
6277         (allows use of "illegal" macro names).
6279         * The debugging and tracing facilities has been enhanced
6280         considerably.  See the manual for details.
6282         * The -tMACRO option is added, marks MACRO for tracing as soon
6283         as it is defined.
6285         * Builtins are traced after renaming iff they were before.
6287         * Named files can now be undiverted.
6289         * The -Nnum option can be used to increase the number of
6290         divertions available.
6292         * Calling changecom without arguments now disables all comment
6293         handling.
6295         * The function m4_patsubst() is now consistently declared
6296         static.
6298         * A bug in dnl is fixed.
6300         * A bug in the multi-character quoting code is fixed.
6302         * Several typos in the manual has been corrected.  More probably
6303         persist.
6305         * The m4.info file is now installed along with the program.
6307 1990-11-15  René Seindal <seindal@diku.dk>
6309         * Updated and enhanced version.  Release 0.75, manual 0.07.
6311         * Implemented search path for include files (-I option and
6312         M4PATH envronment variable).
6314         * Implemented builtin "format" for printf-like formatting.
6316         * Implemented builtin "regexp" for searching for regular
6317         expressions.
6319         * Implemented builtin "patsubst" for substitution with regular
6320         expressions.
6322         * Implemented builtin "esyscmd", which expands to a shell
6323         commands output.
6325         * Implemented "__file__" and "__line__" for use in error
6326         messages.
6328         * Implemented character ranges in "translit".
6330         * Implemented control over debugging output.
6332         * Implemented multi-character quotes.
6334         * Implemented multi-character comment delimiters.
6336         * Changed predefined macro "gnu" to "__gnu__".
6338         * Changed predefined macro "unix" to "__unix__", when the -G
6339         option is not used.  With -G, "unix" is still defined.
6341         * Changed "shift", "$@" and "$*" to not insert spaces afters
6342         commas.
6344         * Added program name to error messages.
6346         * Fixed two missing null bytes bugs.
6348 1990-01-22  René Seindal <seindal@diku.dk>
6350         * Initial beta release.  Release 0.50, manual 0.05.
6353         $Revision$ $Date$