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