1 2005-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3 * bootstrap (AUTORECONF): New variable to allow user overriding of
6 2005-07-07 Gary V. Vaughan <gary@gnu.org>
8 * doc/m4.texinfo (History): Add better notes on the ancestory of
9 GNU m4, and other historical interest.
11 2005-05-08 Gary V. Vaughan <gary@gnu.org>
13 * m4/symtab.c (m4_symbol_rename): New function that performs a low
15 * m4/m4module.h (m4_symbol_rename): Declare it as part of the API.
16 * modules/gnu.c (regsub): Factored out of m4_epatsubst_do...
17 (m4_patsubst_do, m4_renamesyms_do): ...wrappers that use
19 (erenamesyms, renamesyms): ...builtins that use these to implement
20 macro renaming by regular expression.
21 * doc/m4.texinfo (Erenamesyms and Renamesyms): Document them.
22 * tests/generate.awk: Allow some forbidden `m4_' prefixed symbols
23 to stop the new generated tests from choking.
25 2005-05-07 Gary V. Vaughan <gary@gnu.org>
27 Since most of the build is handled from a single Makefile.am now,
28 we can teach make about the dependencies between the m4 binary and
29 the preopened modules it is built against:
31 * configure.ac (PREOPEN_DEPENDENCIES): Substitute for a list of
33 * Makefile.am (src_m4_DEPENDENCIES): Rebuild the m4 program if any
34 of the preopened modules have changed.
36 2005-05-07 Gary V. Vaughan <gary@gnu.org>
38 * configure.ac (gl_MODULES): Add mkstemp for machines that don't
39 have a native implementation.
41 2005-05-06 Gary V. Vaughan <gary@gnu.org>
43 * src/m4.h (EXIT_SUCCESS, EXIT_FAILURE): Removed. These are
44 handled already by gnu/exit.h.
46 * configure.ac (gl_MODULES): Add assert to support a
47 --disable-assert configure time option for NDEBUG setting.
49 * Makefile.am (src_m4_SOURCES): Add version-etc-fsf.c.
50 * bootstrap (src_modules): Add version-etc-fsf.
51 * src/main.c (version_etc_copyright): Removed.
53 * ltdl/m4/m4-getopt.m4 (m4_GETOPT): Synch with gnulib/getopt.m4.
55 2005-05-04 Gary V. Vaughan <gary@gnu.org>
57 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
59 * src/freeze.c (produce_frozen_state): Use \n line-endings even
60 on Windows, so that the frozen file reader will work.
61 Reported by Josef T. Burger <bolo@bolo.com>
63 2005-05-04 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
65 Forward port of a patch that allowed m4-1.4.2 to compile on
68 * configure.ac (AC_CHECK_HEADERS): Add signal.h,
70 * src/m4.h: And include them as appropriate.
71 * src/main.c, src/stackovf.h: Don't include signal.h literally;
72 m4.h will include the correct file.
74 2005-05-04 Gary V. Vaughan <gary@gnu.org>
76 * m4/m4private.h: Make errno visible for the sources patched
79 2005-05-04 Paul Eggert <eggert@twinsun.com>
81 * src/main.c (print_program_name_CB): Preserve errno, since
82 M4ERROR relies on this.
83 * modules/gnu.c (m4_esyscmd): Clear errno before calling popen.
84 * modules/m4.c (m4_maketemp): Clear errno before calling mkstemp.
85 * m4/path.c (m4_path_search): Don't let "free" trash errno when
88 * m4/output.c (m4_insert_file): Don't assume errno has a valid
89 value simply because fread returns zero. This fixes a
90 portability bug reported by Marion Hakanson in
91 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
93 2005-05-04 Santiago Vila <sanvila@debian.org>
95 * tests/stackovf.test: Use tempfile if available.
97 2005-05-04 Robert Bihlmeyer <robbe@orcus.priv.at> (tiny change)
99 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
100 * m4/output.c (m4_insert_file): Do not mix buffered and
101 unbuffered I/O, as this breaks on the Hurd.
103 2005-05-04 Gary V. Vaughan <gary@gnu.org>
105 Gnulib has changed again. Reimport. Adjust. Rinse. Repeat.
106 Automake and Libtool now agree on subdir-objects and LTLIBOBJS,
107 and libtoolize does a better job of ltdl importing now too, so
108 take advantage of that while updating the tree:
110 * acm4, config: Moved from here...
111 * ltdl/m4, ltdl/config: ...to here.
112 * doc/Makefile.am, m4/Makefile.am, modules/Makefile.am,
113 src/Makefile.am, tests/Makefile.am: Removed...
114 * Makefile.am: ...and migrated to here, with adjustments to
115 compensate for relative path differences.
116 * commit: Adjust relative paths.
117 * configure.ac: Adjust relative paths.
118 (AC_PREREQ): 2.59 isn't strictly new enough, we also need a
120 (LT_PREREQ): 2.0 isn't released yet, but will work when it is! In
121 the meanwhile, CVS HEAD libtool is needed.
122 (AM_INIT_AUTOMAKE): Added subdir-objects declaration. 1.9.5 isn't
123 stricly new enough, we also need a patch.
124 (AM_PROG_CC_C_O): Required for subdir-objects in Automake.
125 (AC_WITH_LTDL): Replaced with LT_WITH_LTDL.
126 (gl_MODULES): Don't list getopt and version-etc, as they don't
128 * bootstrap: After running gnulib-tool to import the listed
129 modules, fetch getopt and version-etc into src manually.
130 (ltdldir): Change to ltdl.
131 * src/main.c: Adjust for changes in version-etc API.
132 * ltdl/m4/m4-getopt.m4: New macro to mirror gnulib's getopt.m4,
133 but works when the getopt module isn't to be included in the lib.
134 * README: Add note about patching autoconf and automake to
137 2005-05-02 Matt Kraai <kraai@debian.org> (tiny change)
139 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
140 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
141 empty file rather than to a nonexistent file. This closes a
142 common security hole.
143 * modules/m4.c (m4_maketemp): Implement the above, by using
144 mkstemp rather than mktemp.
146 2005-05-01 Gary V. Vaughan <gary@gnu.org>
148 The FSF are moving offices today. Changed their contact address
149 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
150 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
152 2005-03-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
154 * tests/Makefile (clean-local): Ignore testsuite cleanup
157 2005-03-11 Per Bothner <per@bothner.com> (tiny change)
159 * tests/Makefile (clean-local): Only run the testsuite cleanup
160 if the testsuite has been generated.
162 2005-02-11 Stepan Kasal <kasal@ucw.cz>
164 * TODO: slight clarification of the example of qindir usage.
166 2005-02-08 Gary V. Vaughan <gary@gnu.org>
168 * TODO: Add qindir requirement, and defn bug.
169 From Stepan Kasal <kasal@ucw.cz>
171 2005-02-08 Stepan Kasal <kasal@ucw.cz>
173 * TODO: Add ``execution stack'', fix a typo.
174 * doc/m4.texinfo: Typos.
176 2004-12-24 Eric Blake <ebb9@byu.net>
178 * configure.ac (INCLUDE_STDBOOL_H): Account for gnulib's move
179 to the gnu subdirectory.
180 * acm4/m4-error.m4 (INCLUDE_ERROR_H): Likewise.
181 * acm4/m4-obstack.m4 (INCLUDE_OBSTACK_H): Likewise.
182 * acm4/m4-regex.m4 (INCLUDE_REGEX_H): Likewise.
183 * m4/system_.h: Likewise, in non-configured includes.
185 2004-10-14 Noah Misch <noah@cs.caltech.edu>,
186 Gary V. Vaughan <gary@gnu.org>
188 * m4/m4.c (m4_context_field_table, m4_context_opt_bit_table):
189 Protect definitions from macro expansion under -DNDEBUG by
190 parenthesising the expanded function names.
191 * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
192 (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
193 (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
194 (m4_is_syntax_macro_escaped): Similarly protect function
195 definitions from macro expansion under -DNDEBUG by #undefing the
196 matching macro names before each definition. Also, move all the
197 function definitions to the end of the file so that any
198 invocations in the rest of the file pick up the fast macro
200 * m4/m4private.h (m4_set_symbol_table, m4_set_syntax_table)
201 (m4_set_debug_file, m4_set_trace_messages)
202 (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
203 (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
204 (m4_set_max_debug_arg_length_opt): New fast macro versions of the
205 option setter functions.
207 2004-09-23 Gary V. Vaughan <gary@gnu.org>
209 * src/main.c: Include gnulib files from the correct directory.
211 * gnulib/*: Don't store any of the gnulib files in arch, as they
212 generate spurious changes.
213 * Makefile.am (ACLOCAL_AMFLAGS): Remove gnulib/acm4 since the
214 gnulib macros now share our macro directory.
215 (SUBDIRS): Descend into `gnu' rather than `gnulib'.
216 * bootstrap: Call gnulib-tool to import from the gnulib tree.
217 (gl_AC_HEADER_INT_TYPES_H, gl_AC_HEADER_STDINT_H,
218 gl_AC_TYPE_UINTMAX_T): Patch gnulib.m4 to define these in terms of
219 the gettext macros from autopoint that overwrite the gnulib-tool
220 imported versions. Import sources and Makefile.am into the `gnu'
221 directory. Changed all callers.
222 * configure.ac (gl_EARLY, gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES,
223 gl_INIT): Call these gnulib-tool macros instead of the hardcoded
224 for imported modules.
225 * acm4/m4-error.m4, acm4/m4-gettext.m4, acm4/m4-obstack.m4,
226 acm4/m4-regex.m4: Use AC_BEFORE to enforce ordering rather than
227 hardcoding the gnulib macros they wrap.
229 2004-07-15 Gary V. Vaughan <gary@gnu.org>
231 Latest CVS libtool can preload modules in libraries, including
232 its own module loaders! Tweak m4 so that it doesn't try to treat
233 libltdl's module loaders as m4 modules when freezing and on exit:
235 * gnulib/acm4/*.m4: Don't store these files in arch since they
236 generate spurious changes.
237 * bootstrap: Simplify initial libtoolize call, since CVS
238 libtoolize is smarter these days.
239 * doc/Makefile.am (%.1): Make the helptoman call work with a VPATH
241 * m4/module.h (m4__module_exit): Missing declaration.
242 * m4/m4private.h (m4__module_next): New function declaration.
243 * m4/module.c (m4__module_next): lt_dlhandle_{firs,nex}t
244 encapsulation. Changed all callers.
245 (m4__module_interface): New function to verify m4 loadable module
247 (m4__module_init): Register the interface validator.
248 (m4__module_exit): Only close my own modules.
249 * modules/m4.c (unistd.h): Provide missing declaration.
250 (m4_set_sysval, m4_sysval_flush, m4_dump_symbols)
251 (m4_expand_ranges): More missing declarations.
252 * modules/modtest.c (export_test): Ditto.
253 * src/Makefile.am (AM_CPPFLAGS): Add libltdl directory.
254 * src/main.c (main): Bump copyright year.
255 * tests/modules.at: Fix sed syntax error.
258 2004-06-17 Gary V. Vaughan <gary@gnu.org>
260 Tweaking to enable compilation with latest CVS libtool and
261 libltdl. We can't just dump the library files directly into the
262 m4 directory anymore now that libltdl is built from pieces itself:
264 * bootstrap: Rewritten to use latest libtoolize sanely, and to
265 set up libltdl subdirectory.
266 * configure.ac (AC_CONFIG_AUX_DIR): Point to our own, not the
267 gnulib subdirectory's config.
268 (TIMESTAMP): Use $ac_aux_dir for VPATH builds.
269 (m4_pattern_forbid): Remove the cruft to deal with renamed jm_
271 (AC_LIB_LTDL): Latest libltdl is a sub-project with its own
272 configure.ac, so use AC_WITH_LTDL instead.
273 * Makefile.am (SUBDIRS): Add libltdl.
274 * acm4/m4-regex.m4 (jm_INCLUDED_REGEX): Updated. gnulib now uses
276 * m4/Makefile.am (AM_CPPFLAGS): Add INCLTDL.
277 (libm4_la_SOURCES): Remove ltdl.c and ltdl.h.
278 (libm4_la_LIBADD): Add LIBLTDL.
279 * m4/ltdl.c, m4/ltdl.h: Removed.
280 * m4/m4module.h: Include canonical ltdl.h.
283 2004-06-14 Gary V. Vaughan <gary@gnu.org>
285 * gnulib/import: Now updates makefile fragments, and configure.ac.
286 * gnulib/m4/gnulib.am: New file. Generated makefile fragments.
287 * gnulib/m4/Makefile.am: include it.
288 * gnulib/acm4/intmax.m4, gnulib/acm4/longdouble.m4,
289 gnulib/acm4/longlong.m4, gnulib/acm4/printf-posix.m4,
290 gnulib/acm4/signed.m4, gnulib/acm4/size_max.m4,
291 gnulib/acm4/wchar_t.m4, gnulib/acm4/wint_t.m4,
292 gnulib/acm4/xsize.m4: New macro files from latest gnulib import.
293 * gnulib/acm4/alloca.m4, gnulib/acm4/inttypes_h.m4,
294 gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-prefix.m4,
295 gnulib/acm4/error.m4, gnulib/acm4/po.m4, gnulib/acm4/regex.m4,
296 gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
297 gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
298 gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
299 gnulib/acm4/free.m4, gnulib/acm4/gettext.m4,
300 gnulib/acm4/glibc21.m4: Updated macro files from latest gnulib
302 * gnulib/m4/getopt_int.h: New source file from latest gnulib
304 * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/getopt1.c,
305 gnulib/m4/obstack.c, gnulib/m4/obstack.h, gnulib/m4/regex.c,
306 gnulib/m4/unlocked-io.h, gnulib/m4/version-etc.c,
307 gnulib/m4/xmalloc.c, gnulib/m4/getopt.c, gnulib/m4/getopt.h:
308 Updated source files from latest gnulib.
310 2004-02-29 Gary V. Vaughan <gary@gnu.org>
312 * config/mailnotify: New file for mailing commit notifications,
313 imported from cvs-utils.
314 * commit: Updated from cvs-utils and tweaked for m4.
316 2003-12-01 Gary V. Vaughan <gary@gnu.org>
318 * config/mkstamp: Updated from CVS libtool.
319 * configure.ac: Generate a gnu coding standards compliant version
320 number, and use it for the banner.
321 * Makefile.am (stamp-vcl): New rules to force m4 to be regenerated
322 mhen the TIMESTAMP changes in ChangeLog, but the file modification
323 time doesn't (e.g. in cvs commit). Otherwise dist tarballs will
324 contain the previous version number.
325 * src/main.c: Make --version output conform to the GNU standard.
327 * configure.ac (AM_INIT_AUTOMAKE): Require 1.7g...
328 * modules/Makefile.am (gnu_la_SOURCES, load_la_SOURCES,
329 m4_la_SOURCES, traditional_la_SOURCES, modtest_la_SOURCES,
330 shadow_la_SOURCES, import_la_SOURCES, stdlib_la_SOURCES,
331 time_la_SOURCES): ...so that these are defaulted correctly, and
332 can be removed from this file.
333 (AM_LDFLAGS): Add -module...
334 (gnu_la_LDFLAGS, load_la_LDFLAGS, m4_la_LDFLAGS,
335 traditional_la_LDFLAGS, modtest_la_LDFLAGS, shadow_la_LDFLAGS,
336 import_la_LDFLAGS, stdlib_la_LDFLAGS, time_la_LDFLAGS): ...so that
337 the individual settings can be removed.
338 * m4/Makefile.am (libm4_la_LIBADD): Add $(LTLIBINTL) here once...
339 * module/Makefile.am (gnu_la_LIBADD, load_la_LIBADD,
340 m4_la_LIBADD, traditional_la_LIBADD, modtest_la_LIBADD,
341 shadow_la_LIBADD, import_la_LIBADD, stdlib_la_LIBADD,
342 time_la_LIBADD): ...so that these are picked up as a deplib of
343 libm4 and don't need to be set explicitly.
345 2003-11-18 Gary V. Vaughan <gary@gnu.org>
347 * modules/Makefile.am (pkglibexec_LTLIBRARIES): Remove perl.la
348 from the standard build. It is too fragile.
350 * gnulib/acm4/libtool.m4, m4/ltdl.c, m4/ltdl.h: Reimported from
351 CVS libtool after merging m4 changes across to libtool.
353 * m4/symtab.c (m4_symtab_create): Fix a careless use of sizeof.
354 * m4/path.c (search_path_add): Ditto.
356 2003-11-13 Gary V. Vaughan <gary@gnu.org>
358 * configure.ac (AC_LIBTOOL_TAGS): Don't include shell code for
359 libtool tags we don't use in configure. This reduces the size
360 of the script from over 1Mb to under 700Kb.
362 2003-11-13 Gary V. Vaughan <gary@gnu.org>
364 The import script was not written properly, and the last gnulib
365 import was incomplete. Fixed that problem, and reimport our
366 gnulib dependencies, which picks up the address calculation
367 overflow checks described by Paul below. Also tweak the clients
368 of the gnulib xalloc module not to use deprecated macros:
370 * gnulib/import: Recurse through module dependencies rather than
371 naively descending only one level.
372 * configure.ac: Add calls to gnulib's strnlen and extension module
374 * gnulib/m4/Makefile.am: Add snippets from gnulib's strnlen and
376 * gnulib/acm4/extensions.m4, gnulib/acm4/xalloc.m4,
377 gnulib/m4/alloca.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
378 gnulib/m4/stdbool_.h, gnulib/m4/unlocked-io.h, gnulib/m4/xalloc.h,
379 gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Updated from CVS
381 * gnulib/acm4/libtool.m4: Updated from CVS libtool.
382 * m4/hash.c (m4_get_hash_iterator_next): Use `xzalloc (S)' in
383 place of `xcalloc (1, S)'.
384 * m4/m4.c (m4_create): Likewise.
385 * m4/m4private.h (m4_symbol_value_create): Likewise.
386 * m4/symtab.c (symtab_fetch): Likewise.
387 * m4/syntax.c (m4_syntax_create): Likewise.
388 * src/freeze.c (reload_frozen_state): Likewise.
389 * m4/path.c (search_path_add): Eliminate use of deprecated NEW
391 * m4/symtab.c (m4_symtab_create): Likewise.
393 2003-11-13 Gary V. Vaughan <gary@gnu.org>
395 * tests/module.at: Comment typo.
397 2003-10-10 Gary V. Vaughan <gary@gnu.org>
399 * tests/modules.at (modules: importing): Apply some lateral
400 thinking, and use AT_CHECK to compare the output of a sed pass
401 over stderr against the canonical strerror string.
403 * tests/modules.at (modules: importing): Edit the generated stderr
404 output to canonicalize strerror output, before a comparison.
406 2003-10-10 Gary V. Vaughan <gary@gnu.org>
408 Tru64UNIX perl is sloppy with namespace pollution. This patch is
409 careful not to trip over the mess:
411 * modules/perl.c: Some builds of perl install headers that contain
412 `#define try __builtin_try'. Be sure to undefine that macro
413 before `m4/hash.h' gets included, which uses the `try' symbol.
414 * m4/system_.h: Similarly for `bool'. Undefine `bool', `true' and
415 `false' before including `stdbool.h'.
416 (DELETE): This symbol is not in m4's namespace, and is in any
417 case only used internally...
418 * m4/m4private.h (DELETE): ...so move it to here.
419 Reported by Martin MOKREJS <mmokrejs@natur.cuni.cz>
421 2003-10-08 Paul Eggert <eggert@twinsun.com>
423 Don't use XMALLOC and XCALLOC. Once we install the
424 corresponding patch into gnulib, this will fix some
425 address-calculation overflow bugs on hosts where calloc (A, B)
426 returns garbage when A*B overflows.
428 * m4/hash.c (m4_hash_new, node_new, m4_hash_resize,
429 maybe_grow, m4_get_hash_iterator_next): Replace XMALLOC with
430 xmalloc, XCALLOC with xcalloc.
431 * m4/m4.c (m4_create): Likewise.
432 * m4/m4private.h (m4_symbol_value_create): Likewise.
433 * m4/output.c (m4_output_init): Likewise.
434 * m4/symtab.c (symtab_fetch, m4_set_symbol_traced): Likewise.
435 * m4/syntax.c (remove_syntax_attribute): Likewise.
436 * src/freeze.c (reload_frozen_state): Likewise.
437 * src/main.c (main): Likewise.
439 2003-10-07 Gary V. Vaughan <gary@gnu.org>
441 * Makefile.am (ACLOCAL_AMFLAGS): Search in the new acm4 and
442 gnulib/acm4 directories for aclocal m4 macros.
443 * gnulib/Makefile.am (EXTRA_DIST): Removed.
444 (MAINTAINERCLEANFILES): Add Makefile.in.
445 * configure.ac (m4_GNULIB_MODULES): Use it to declare which gnulib
447 * acm4/m4-gnulib.m4 (m4_GNULIB_MODULES): New macro.
448 * gnulib/import: New file. Temporary script for updating gnulib
449 imported files, until gnulib-tool is working.
450 * gnulib/config/codeset.m4, gnulib/config/error.m4,
451 gnulib/config/exitfail.m4, gnulib/config/extensions.m4,
452 gnulib/config/getopt.m4, gnulib/config/gettext.m4,
453 gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
454 gnulib/config/intdiv0.m4, gnulib/config/inttypes-pri.m4,
455 gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
456 gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
457 gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
458 gnulib/config/lib-prefix.m4, gnulib/config/malloc.m4,
459 gnulib/config/nls.m4, gnulib/config/obstack.m4,
460 gnulib/config/onceonly_2_57.m4, gnulib/config/po.m4,
461 gnulib/config/progtest.m4, gnulib/config/realloc.m4,
462 gnulib/config/regex.m4, gnulib/config/restrict.m4.
463 gnulib/config/stdbool.m4, gnulib/config/stdint_h.m4,
464 gnulib/config/strerror_r.m4, gnulib/config/strndup.m4,
465 gnulib/config/strnlen.m4, gnulib/config/strtol.m4,
466 gnulib/config/uintmax_t.m4, gnulib/config/ulonglong.m4,
467 gnulib/config/unlocked-io.m4, gnulib/config/xalloc.m4,
468 gnulib/config/xstrndup.m4: Removed.
469 * gnulib/acm4/alloca.m4, gnulib/acm4/codeset.m4,
470 gnulib/acm4/error.m4, gnulib/acm4/exitfail.m4,
471 gnulib/acm4/extensions.m4, gnulib/acm4/free.m4,
472 gnulib/acm4/getopt.m4, gnulib/acm4/gettext.m4,
473 gnulib/acm4/glibc21.m4, gnulib/acm4/iconv.m4,
474 gnulib/acm4/intdiv0.m4, gnulib/acm4/inttypes-pri.m4,
475 gnulib/acm4/inttypes.m4, gnulib/acm4/inttypes_h.m4,
476 gnulib/acm4/isc-posix.m4, gnulib/acm4/lcmessage.m4,
477 gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-link.m4,
478 gnulib/acm4/lib-prefix.m4, gnulib/acm4/malloc.m4,
479 gnulib/acm4/nls.m4, gnulib/acm4/obstack.m4,
480 gnulib/acm4/onceonly_2_57.m4, gnulib/acm4/po.m4,
481 gnulib/acm4/progtest.m4, gnulib/acm4/realloc.m4,
482 gnulib/acm4/regex.m4, gnulib/acm4/restrict.m4.
483 gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
484 gnulib/acm4/strerror_r.m4, gnulib/acm4/strndup.m4,
485 gnulib/acm4/strnlen.m4, gnulib/acm4/strtol.m4,
486 gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
487 gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
488 gnulib/acm4/xstrndup.m4: Reimported from CVS gnulib with
489 gnulib/import script.
490 * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/error.c,
491 gnulib/m4/error.h, gnulib/m4/exitfail.c, gnulib/m4/free.c,
492 gnulib/m4/malloc.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
493 gnulib/m4/realloc.c, gnulib/m4/regex.c, gnulib/m4/strtol.c,
494 gnulib/m4/version-etc.c, gnulib/m4/version-etc.h,
495 gnulib/m4/xalloc.h, gnulib/m4/xmalloc.c: Updated from CVS
496 gnulib with gnulib/import script.
497 * configure.ac, gnulib/m4/Makefile.am: Manually insert anticipated
498 guards ready for gnulib-tool to autoupdate on import.
499 * config/debug.m4, config/gmp.m4, config/m4-error.m4,
500 config/m4-gettext.m4, config/m4-obstack.m4, config/m4-regex.m4,
501 config/stackovf.m4: Moved from here...
502 * acm4/debug.m4, acm4/gmp.m4, acm4/m4-error.m4,
503 acm4/m4-gettext.m4, acm4/m4-obstack.m4, acm4/m4-regex.m4,
504 acm4/stackovf.m4: ...to here, to separate aclocal macros from
505 configure time helper scripts.
506 * config/error.m4: Removed; superceded by gnulib/acm4/error.m4.
507 * m4/hash.c, m4/m4.c, m4/macro.c, m4/module.c, m4/output.c,
508 m4/path.c, m4/symtab.c, m4/syntax, m4/system_.h, modules/m4.c,
509 src/main.c, src/stackovf.c: s/xfree/free/g to comply with new
511 * src/main.c (version_etc_copyright): Only output the current
513 (version_etc): Call with new variadic API.
515 2003-09-16 Gary V. Vaughan <gary@gnu.org>
517 * gnulib/m4/version-etc.c, gnulib/m4/version-etc.h: Import
518 version-etc module from CVS gnulib.
519 * po/POTFILES.in: Add gnulib/m4/version-etc.c.
520 * src/Makefile.am: Build it.
521 * src/main.c: Use it.
523 * gnulib/m4/exit.h: Import exit module from CVS gnulib.
524 * gnulib/m4/Makefile.am (pkginclude_HEADERS): Add exit.h.
525 * m4/system_.h: Don't define EXIT_SUCCESS and FAILURE, include
528 2003-09-15 Charles Wilson <cygwin@cwilson.fastmail.fm>,
529 Gary V. Vaughan <gary@gnu.org>
531 * bootstrap: Separate options.
532 * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
533 * gnulib/m4/Makefile.am (stdbool.h): Use srcdir, gnulib_srcdir is
535 * modules/Makefile.am (gnu_la_LIBADD, load_la_LIBADD)
536 (m4_la_LIBADD, mpeval_la_LIBADD, traditianal_la_LIBADD)
537 (modtest_la_LIBADD, import_la_LIBADD, perl_la_LIBADD)
538 (shadow_la_LIBADD, stdlib_la_LIBADD, time_la_LIBADD): Add
539 $(LTLIBINTL) for gettext support on cygwin.
540 * src/Makefile.am (m4_LDADD): Remove $(INTLLIBS), since we now
541 have $(LTLIBINTL) from the preloaded module la files.
542 * README: Remove the warning about using --disable-nls on Windows
545 2003-09-15 Gary V. Vaughan <gary@gnu.org>
547 * gnulib/m4/regex.c: s/<regex.h>/"regex.h"/ or else the compiler
548 picks up the system regex.h if gl_REGEX decides gnulib/m4/regex.c
551 2003-09-12 Gary V. Vaughan <gary@gnu.org>
553 * doc/STYLE: Document the gnulib header naming conventions, and
555 * gnulib/m4/error_.h, gnulib/m4/gettext_.h, gnulib/m4/obstack_.h,
556 gnulib/m4/regex_.h: Renamed to gnulib/m4/error.h,
557 gnulib/m4/gettext.h, gnulib/m4/obstack.h, gnulib/m4/regex.h
559 * gnulib/m4/Makefile.am: Remove the rules to build these headers.
561 * gnulib/m4/strtol.c, gnulib/config/strtol.m4: Import strtol
562 module from CVS gnulib.
563 * configure.ac (AC_REPLACE_FUNCS): Remove strtol.
564 (gl_FUNC_STRTOL): In favour of the module macro.
566 2003-09-12 Gary V. Vaughan <gary@gnu.org>
568 Replace the getopt code with CVS gnulib getopt. The source files
569 detect whether they are in a glibc environment and preprocess away
570 all of the code if there is a system getopt, so we can compile
571 them into the m4 executable unconditionally:
573 * gnulib/m4/getopt.c, gnulib/m4/getopt1.c, gnulib/m4/getopt.h,
574 gnulib/config/getopt.m4: Import getopt module from CVS gnulib.
575 * configure.ac (gl_GETOPT): Use this instead of homebrew inline
577 * src/getopt.c, src/getopt1.c, src/gnu-getopt.h: Removed old
579 * src/Makefile.am: Adjust.
580 * src/main.c: Always include our shipped getopt.h.
581 * po/POTFILES.in: Use new location of getopt.c.
583 2003-09-12 Gary V. Vaughan <gary@gnu.org>
585 * configure.ac (AC_CONFIG_FILES): Remove config/Makefile.
586 * config/Makefile.am: Removed. Automake 1.8 distributes the files
587 in this directory automatically.
588 * Makefile.am (EXTRA_DIST): Except config/mkstamp.
590 * configure.ac (pkglibexecdir): Don't try and set it here, PACKAGE
592 * m4/Makefile.am (MODULE_PATH): Removed. Calculate pkglibexecdir
594 * modules/Makefile.am (pkglibexecdir): Set it here.
595 (pkgmodincdir): Renamed to pkgmodincludedir). Changed all clients.
597 * gnulib/m4/regex.c, gnulib/m4/regex_.h, gnulib/config/regex.m4:
598 Import regex module from CVS gnulib.
599 * gnulib/config/restrict.m4: Ditto for dependee module restrict.
600 * config/m4-regex.m4 (m4_REGEX): Wrap gnulib/config/regex.m4, but
601 do extra substitutions for Makefile.
602 * configure.ac: Use it.
603 * gnulib/m4/Makefile.am: Maybe install regex.h after linking it
604 from regex_.h if necessary.
605 * m4/system_.h: Include the correct version of regex.h.
606 * m4/regex.c, m4/regex.h, config/regex.m4: Removed legacy
608 * po/POTFILES.in: Use new location of regex.c.
610 * gnulib/m4/Makefile.am (EXTRA_DIST): Removed malloc.c and
611 realloc.c: automake distributes these files already.
613 2003-09-12 Gary V. Vaughan <gary@gnu.org>
615 Replace the xstrzdup code by importing the xstrndup module from
616 CVS gnulib, along with its dependencies: strndup and strnlen:
618 * gnulib/m4/xstrndup.c, gnulib/m4/xstrndup.h,
619 gnulib/config/xstrndup.m4: Import xstrndup module from CVS
621 * gnulib/m4/strndup.c, gnulib/m4/strndup.h,
622 gnulib/config/strndup.m4: Ditto wrt strndup.
623 * gnulib/m4/strnlen.c, gnulib/config/strnlen.m4: Ditto wrt
625 * gnulib/m4/Makefile.am: Add rules from newly imported modules.
626 However, contrary to gnulib, we install xstrndup.h.
627 * configure.ac (AC_REPLACE_FUNCS): Remove xstrzdup.
628 * gnulib/lib/xstrzdup.c: Delete. This was never a gnulib file, it
629 is an artifact of the old m4 portability layer.
630 * configure.ac (gl_XSTRNDUP): This is the gnulib equivalent.
631 * m4/system_.h: Include xstrndup.h.
632 * m4/macro.c (process_macro): Call xstrndup, not xstrzdup.
634 2003-09-11 Gary V. Vaughan <gary@gnu.org>
636 Reimport the latest xalloc module from CVS gnulib, and adjust the
637 m4 sources to take advantage of xalloc xfree. Also create a new
638 macro DELETE with the same semantics as the old m4 XFREE macro,
639 and carefully tweak callers:
641 * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h: Updated from CVS
643 * m4/utility.c (xfree): Removed. This function is now supplied by
645 * m4/m4private.h (WITH_DMALLOC): Removed XFREE redefine.
646 * m4/path.c (search_path_add): Use NEW macro from xalloc.h.
647 * m4/symtab.c (m4_symtab_create): Ditto.
648 * m4/system_.h: Removed XFREE redefine.
649 (DELETE): New macro with same functionality as the original m4
650 XFREE macro, but based on xalloc.h now. Changed all callers.
651 * src/main.c (main): Use XMALLOC macro.
652 * m4/hash.c, m4/macro.c, m4/symtab.c, m4/syntax.c: Use xfree
654 * m4/output.c (m4_output_exit): Use DELETE instead of XFREE.
656 2003-09-10 Gary V. Vaughan <gary@gnu.org>
658 Import the xalloc module from CVS gnulib, along with its
659 dependencies: exitfail, malloc and realloc. We had different
660 semantics for our XFREE and a function xfree() not supplied by
661 gnulib, so also a bit of work to keep everything running
664 * configure.ac (AC_REPLACE_FUNCS): Removed xmalloc and xstrdup.
665 (gl_XALLOC): Use gnulib equivalents.
666 * gnulib/config/exitfail.m4, gnulib/m4/exitfail.h,
667 gnulib/m4/exitfail.c: Import exitfail module from CVS gnulib.
668 * gnulib/config/malloc.m4, gnulib/m4/malloc.c: Ditto wrt malloc.
669 * gnulib/config/realloc.m4, gnulib/m4/realloc.c: Ditto wrt
671 * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h,
672 gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Ditto wrt xalloc.
673 * gnulib/m4/Makefile.am: Add fragment from gnulib for newly
675 (pkgincdir): Removed. Use pkgincludedir instead.
676 * m4/m4private.h (XFREE): xfree already checks for NULL.
677 * m4/system_.h: Use xalloc module, and remove macros already
678 supplied by xalloc.h.
679 * m4/utility.c (xfree): xalloc does not yet implement xfree, so
680 moved the old definition from m4/xmalloc.c to here for now.
682 2003-09-09 Gary V. Vaughan <gary@gnu.org>
684 Import the error and progname modules from CVS gnulib. Our old
685 error.c subsumed the functionality of both, so a little adjustment
686 was required to accomodate the split in sources. Also added more
687 wrapper macros to choose between a system installed error.h or our
688 shipped gnulib error module:
690 * m4/error.c, m4/error.h: Removed.
691 * m4/Makefile.am: Adjust.
692 (pkgincdir): Removed. Use pkgincludedir instead.
693 * m4/module.h, src/main.c: Don't include `m4/error.h'.
694 * m4/system_.h (INCLUDE_ERROR_H): Add a substitution for suitable
696 * gnulib/m4/progname.c: Imported from CVS gnulib.
697 * gnulib/m4/progname.h: Ditto.
698 * src/main.c: Adjust to use progname module.
699 * gnulib/m4/error.c: Imported from CVS gnulib.
700 * gnulib/m4/error_.h: Ditto.
701 * gnulib/m4/Makefile.am: Build the error module into our libgnu.la
702 if appropriate, and link a local error.h if the system version is
704 (libgnu_la_SOURCES) Add progname module sources.
705 * gnulib/config/error.m4: Imported from CVS gnulib.
706 * gnulib/config/strerror_r.m4: Ditto.
707 * config/m4-error.c: New file. Wrap gnulib error.m4 but arrange
708 to have ERROR_H for Makefile substitutions and tell system.h
709 whether the system error.h should be used, or a locally installed
711 * configure.ac (jm_PREREQ_ERROR): Replaced by a call to m4_ERROR.
713 2003-09-09 Gary V. Vaughan <gary@gnu.org>
715 * gnulib/m4/Makefile.am (MOSTLYCLEANFILES): Typo
716 s/gettext_.h/gettext.h/.
718 * bootstrap: Revert 2003-09-04 patch now that CVS autoconf and
719 automake have been fixed.
721 * config/m4-obstack.m4 (m4_FUNC_OBSTACK): D'oh! Now that we wrap
722 gl_OBSTACK, which in turn calls AC_FUNC_OBSTACK, don't rerun bits
723 of code originally snarfed from AC_FUNC_OBSTACK!!! While I'm here
724 rename to m4_OBSTACK in light of wrapping gl_OBSTACK.
726 2003-09-09 Gary V. Vaughan <gary@gnu.org>
728 The gnulib obstack module requires the gnulib gettext module for
729 systems that do not have GNU gettext installed. Because we use
730 -Ignulib/m4 in our Makefiles it is not safe to drop gettext.h in
731 that directory incase it clashes with the system gettext.h. This
732 delta uses gettext_.h and extra rules in the Makefile to make a
733 link to gettext.h when needed:
735 * Makefile.am (auxdir): Removed. No longer used.
736 * configure.ac (ac_aux_dir): Removed AC_SUBST. No longer used.
737 (TIMESTAMP): List path to `mkstamp' literally, as ac_aux_dir has
739 (AC_CONFIG_LIBOBJ_DIR): Declare this for possible future single
740 Makefile based build.
741 (AC_CONFIG_AUX_DIR): Now we use gnulib/config where the majority
742 of the macros are kept.
743 * Makefile.am (ACLOCAL_MFLAGS): Search gnulib/config first.
744 * configure.ac (AM_INIT_AUTOMAKE): Require 1.7a.
745 * config/Makefile (ACLOCAL_MACROS): Removed. Automake 1.7a
746 distributes these automatically.
747 * config/regex.m4 (jm_WITH_REGEX): Fixed underquoting to prevent
748 warning from automake-1.7a.
749 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Renamed to
750 m4_CHECK_DEBUGGING for consistency with gnulib prefixes. Changed
752 * config/m4-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto
753 wrt. m4_FUNC_OBSTACK.
754 * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto
755 wrt. m4_sys_STACKOVF.
756 * config/gmp.m4 (_M4_AC_LIB_GMP, M4_AC_LIB_GMP): Ditto
757 wrt. _m4_LIB_GMP, m4_LIB_GMP.
758 (ac_gmp_save_LIBS, ac_cv_using_lib_gmp): Don't use autoconf's
759 namespace. Renamed to m4_gmp_save_LIBS and m4_cv_using_lib_gmp
761 * config/m4-gettext.m4: New file to set GETTEXT_H appropriately.
762 * gnulib/m4/Makefile.am: Added a new block to make an appropriate
763 gettext.h link on deficient systems.
764 (pkginc_HEADERS): Mention $(GETTEXT_H).
765 (EXTRA_HEADERS): Mention gettext.h.
766 * gnulib/config/gettext_.h: New file from gnulib's gettext.h.
767 * gnulib/config/codeset.m4, gnulib/config/gettext.m4,
768 gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
769 gnulib/config/intdiv.m4, gnulib/config/inttypes-pri.m4,
770 gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
771 gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
772 gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
773 gnulib/config/lib-prefix.m4, gnulib/config/nls.m4,
774 gnulib/config/po.m4, gnulib/config/progtest.m4,
775 gnulib/config/stdint_h.m4, gnulib/config/uintmax_t.m4,
776 gnulib/config/ulonglong.m4: Imported from CVS gnulib.
778 2003-09-05 Gary V. Vaughan <gary@gnu.org>
780 We can't mirror the gnulib directory structure here, since we need
781 to be able to eg. `#include <m4/obstack.h>' from our source files,
782 which is much easier if the local obstack.h is created in a
783 directory named m4. Rather than trying to symlink everything into
784 the m4 directory, now we build a libtool convenience library from
785 the sources we get from gnulib and link that with libm4.la:
787 * gnulib/config/extensions.m4: Imported from CVS gnulib.
788 * gnulib/config/unlocked-io.m4: Ditto.
789 * gnulib/m4/unlocked-io.h: Ditto.
790 * gnulib/m4/obstack.m4, gnulib/m4/onceonly_2_57.m4,
791 gnulib/m4/stdbool.m4: All moved to gnulib/config directory.
792 * gnulib/lib/obstack.c, gnulib/lib/obstack_.h,
793 gnulib/lib/stdbool_.h: All moved to gnulib/m4 directory.
794 * m4/strtol.c, m4/xmalloc.c, m4/xstrdup.c, m4/xstrzdup.c: Ditto.
795 * m4/Makefile.am: Adjust.
796 * gnulib/Makefile.am (EXTRA_DIST): Name just the additional gnulib
797 macros we redistribute.
798 * gnulib/m4/Makefile.am: New file. Build libgnu.la convenience
799 library among others.
800 (GNULIB_SRCS, GNULIB_MACROS): Removed.
801 * Makefile.am (ACLOCAL_AMFLAGS): Adjust.
802 * config/m4-obstack.m4: Adjust.
803 * po/POTFILES.in: Adjust.
804 * configure.ac: Reformatting. Call newly imported gnulib macros.
805 * m4/builtin.c, m4/macro.c, m4/module.c, m4/utility.c: Removed
806 bogus calls of `#include "m4.h"'.
807 * Makefile.am: INCLUDES has been deprecated in favour of
809 * m4/Makefile.am: Ditto.
810 * modules/Makefile.am: Ditto.
811 * src/Makefile.am: Ditto.
813 2003-09-05 Gary V. Vaughan <gary@gnu.org>
815 * config/Makefile.am: Reverting yesterdays patch for VPATH builds.
817 2003-09-04 Gary V. Vaughan <gary@gnu.org>
819 Migrate the obstack support into the gnulib directories for easy
820 synchronisation with upstream files in gnulib:
822 * config/gnu-obstack.m4: Moved from here...
823 * config/m4-obstack.m4: ...to here.
824 * config/Makefile.am (SPECIFIC_MACROS): Adjust.
825 * m4/obstack.c, m4/obstack_.h: Moved from here...
826 * gnulib/obstack.c, gnulib/obstack.h: ...to here.
827 * po/POTFILES.in: Adjust.
828 * gnulib/Makefile.am (GNULIB_SRCS, GNULIB_MACROS): Adjust.
829 * m4/Makefile.am: Add a whole new section to link the obstack
830 sources from the gnulib tree if necessary.
831 * gnulib/m4/onceonly_2_57.m4, gnulib/m4/obstack.m4: New macros
833 * config/m4-obstack.m4: Rewrite as a wrapper for
834 gnulib/m4/obstack.m4.
836 2003-09-04 Gary V. Vaughan <gary@gnu.org>
838 GNU M4 currently builds with a number of files adapted from
839 upstream sources. Recently the gnulib project on savannah.gnu.org
840 has pulled together a great many of these externally maintained
841 files. This delta is the beginnings of isolating those files
842 maintained in gnulib to make it easy to synchronise M4 with the
843 upstream files prior to releases.
845 * Makefile.am (ACLOCAL_AMFLAGS): Mention gnulib/m4 macro
847 (SUBDIRS): Added new gnulib subdirectory.
848 * configure.ac (AC_CONFIG_FILES): Add new gnulib tree Makefiles.
849 * config/stdbool.m4: Moved from here...
850 * gnulib/m4/stdbool.m4: ...to here.
851 * m4/stdbool_.h: Moved from here...
852 * gnulib/lib/stdbool_.h: ...to here.
853 * gnulib/Makefile.am: New file. Make sure the gnulib tree is
855 * m4/Makefile.am: Adjust gnulib/modules/stdbool:Makefile.am based
856 code to work with new stdbool_.h location.
857 (gnulib_srcdir): New.
859 2003-09-04 Gary V. Vaughan <gary@gnu.org>
861 * config/Makefile.am (MAINTAINERCLEANFILES, ACLOCAL_MACROS)
862 (STANDARD_TOOLS, SPECIFIC_MACROS): Needed `$(srcdir)/' for VPATH
864 (SPECIFIC_TOOLS): New variable. Moved mkstamp to here.
865 (EXTRA_DIST): Use it.
867 * bootstrap: CVS autoreconf leaves file droppings. Remove
868 aclocal.m4t incase autoreconf doesn't.
870 2003-08-29 Gary V. Vaughan <gary@gnu.org>
872 * m4/gnu-obstack.h: Updated from CVS gnulib. For consistency with
873 the other gnulib imports, renamed to m4/obstack_.h.
874 * m4/obstack.c: Updated from CVS gnulib.
875 * m4/Makefile.am (EXTRA_HEADERS): Adjust.
876 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Merge in additional
877 header tests from gnulib obstack module. AC_CONFIG_LINKS knows
878 about vpath already, and $top_srcdir upsets CVS Automake, so the
879 $top_srcdir reference was removed.
881 * m4/system-h.in: For consistency with the gnulib imports, renamed
883 * m4/Makefile (EXTRA_HEADERS): Adjust.
884 * configure.ac (AC_CONFIG_FILES): Adjust.
886 * m4/stdbool_.h: New file from gnulib for systems without their
888 * m4/Makefile.am: Add snippets from gnulib for C99 bool support.
889 * config/stdbool.m4: New file. Macros from gnulib for same.
890 * configure.ac: Use it.
892 2003-08-27 Gary V. Vaughan <gary@gnu.org>
894 * config/debug.m4: `perl -pi.bak -e 's/(Copyright) (\d)/$1 (C) $2/g'`
895 * config/gmp.m4: Ditto.
896 * config/gnu-obstack.m4: Ditto.
897 * config/stackovf.m4: Ditto.
898 * m4/builtin.c: Ditto.
902 * m4/gnu-obstack.h: Ditto.
907 * m4/m4module.h: Ditto.
908 * m4/m4private.h: Ditto.
910 * m4/module.c: Ditto.
911 * m4/obstack.c: Ditto.
912 * m4/output.c: Ditto.
916 * m4/strtol.c: Ditto.
917 * m4/symtab.c: Ditto.
918 * m4/syntax.c: Ditto.
919 * m4/utility.c: Ditto.
920 * m4/xmalloc.c: Ditto.
921 * m4/xstrdup.c: Ditto.
922 * m4/xstrzdup.c: Ditto.
923 * modules/evalparse.c: Ditto.
924 * modules/format.c: Ditto.
925 * modules/gnu.c: Ditto.
926 * modules/import.c: Ditto.
927 * modules/load.c: Ditto.
928 * modules/m4.c: Ditto.
929 * modules/m4.h: Ditto.
930 * modules/modtest.c: Ditto.
931 * modules/mpeval.c: Ditto.
932 * modules/perl.c: Ditto.
933 * modules/shadow.c: Ditto.
934 * modules/stdlib.c: Ditto.
935 * modules/time.c: Ditto.
936 * modules/traditional.c: Ditto.
937 * src/freeze.c: Ditto.
938 * src/getopt.c: Ditto.
939 * src/getopt1.c: Ditto.
942 * src/stackovf.c: Ditto.
944 * config/gmp.m4 (M4_AC_LIB_GMP): Use AC_INCLUDES_DEFAULT:
945 ac_default_headers is an autoconf internal variable.
946 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
947 * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
949 * configure.ac (AC_CONFIG_FILES): Add tests/atlocal.
950 * tests/Makefile.am (TESTS_ENVIRONMENT): Revert the 2003-08-14
953 2003-08-15 Gary V. Vaughan <gary@gnu.org>
955 * configure.ac (AC_HEADER_STDBOOL, INCLUDE_STDBOOL_H): Check for
957 * system-h.in (m4_boolean): Removed in favour of using C99 bool if
958 possible or faking one with a typedef. Changed all callers.
960 2003-08-15 Gary V. Vaughan <gary@gnu.org>
962 Still cleaning up the users' module API, by taking out the stuff
963 that isn't used by any existing modules, and moving specialised
964 functions out of libm4 and into the module they are used by.
966 * m4/m4module.h (m4_skip_space): No need to export this. Moved...
967 * m4/utility.c (m4_skip_space): ...to here the home of its only
968 use, made static and renamed to `skip_space'. Changed all
970 * m4/m4module.h (m4_expand_ranges): Removed prototype.
971 * m4/utility.c (m4_expand_ranges): Moved definition from here...
972 * modules/m4.c (m4_expand_ranges): ...to here, and exported using
974 * modules/m4.h (m4_expand_ranges_func): For lt_dlsym import
976 * modules/gnu.c (builtin_syntax): Import and use in this
977 builtin implementation.
978 * m4/m4module.h (M4_DEBUG_PRINT1, M4_DEBUG_PRINT2, M4_DEBUG_PRINT3):
980 * m4/macro.c (trace_flush): Except here where the macro is now
982 * m4/m4module.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
983 (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): Only used internally, so
985 * m4/m4private.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
986 (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): ...to here.
988 2003-08-14 Gary V. Vaughan <gary@gnu.org>
990 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use the interrim new
991 compiler based AC_CHECK_HEADER that was introduced in
993 * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
994 * config/gmp.m4 (AC_LIB_GMP): Ditto. And renamed to M4_AC_LIB_GMP.
995 * configure.ac: Use renamed M4_AC_LIB_GMP.
997 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Don't AC_REQUIRE a
998 macro that requires arguments! This stops the shell's bad
999 substitution error at configure time.
1001 * tests/Makefile.am (TESTS_ENVIRONMENT): Now we can pass make
1002 variables to the testsuite shell. Set the value of USE_GMP so
1003 that the gmp test will run!
1004 (check-local, clean-local): Use the TESTS_ENVIRONMENT variable.
1006 2003-08-11 Gary V. Vaughan <gary@gnu.org>
1008 Libltdl already has an excellent mechanism for accessing C symbols
1009 in modules. Lets use that! Remove all the exporting cruft and
1010 just use lt_dlsym in conjunction with a few conventions to
1011 simplify module writers' jobs. Also removed the table address
1012 caching code and otherwise simplified the module loader quite a
1013 bit. To access exported symbols in other modules, first the
1014 exporting module must name the symbols <modname>_LTX_<symname>,
1015 and the importing module must define a function type called
1016 <symname>_func. The importer then adds
1017 M4_MODULE_IMPORT(<modname>, <symname>) at the top of any function
1018 that wishes to call out to the exported functions. Care must be
1019 taken that <symname> is non-NULL in the importing module incase
1020 M4_MODULE_IMPORT fails, but otherwise it can be called as if the
1021 definition was in the importers source. Study
1022 `modules/{gnu.c,m4.{c,h}' for a model example. At the moment,
1023 m4_module_import will attempt to automatically load a module
1024 required for symbol access if it is not loaded already.
1026 * TODO: Removed the items fixed in this delta.
1027 * m4/ltdl.c (lt_dlhandle_find): New function to find a handle by
1029 * m4/ltdl.h (lt_dlhandle_find): Declare it.
1030 * m4/module.c (m4_module_unload): Use it.
1031 * src/freeze.c (reload_frozen_state): Ditto.
1032 * m4/m4module.h (m4_export): Deleted. Removed all references.
1033 (M4_MODULE_IMPORT): New user convenience macro for importing
1034 arbitrary symbols from other modules.
1035 * m4/module.c (m4_module_import): New function to service
1036 M4_MODULE_IMPORT macro.
1037 (module_data): Removed. Looking up the tables on demand with
1038 lt_dlsym, rather than caching their addresses here simplifies the
1040 (m4_get_module_builtin_table, m4_get_module_macro_table):
1041 Removed. Changed all callers.
1042 (set_module_macro_table, set_module_builtin_table): Renamed to
1043 install_macro_table and install_builtin_table respectively, and
1044 simplified now that the cache is no more.
1045 * modules/gnu.c (builtin_symbols): Use this new mechanism to
1046 import m4_dump_symbols from the m4 module.
1047 (builtin_esyscmd): Likewise for m4_set_sysval and
1049 * modules/m4.c (m4_export_table): Removed. Functions are
1050 addressed with the new mechanism which doesn't need this.
1051 (m4_set_sysval): New exported accessor function to prevent
1052 problems with variable access on inferior architectures.
1053 * modules/m4.h (m4_sysval_flush_func, m4_set_sysval_func)
1054 (m4_dump_symbols_func): Typedefs required by M4_MODULE_IMPORT so
1055 that we can have some type safety.
1056 * modules/modtest.c (export_test): C level exported function for
1057 testing the new import mechanism.
1058 * modules/import.c: New file for the import end of the test.
1059 * modules/Makefile.am (pkglibexec_LTLIBRARIES): Added import.la.
1060 * tests/modules.at: New test cases for intermodule symbol
1063 2003-08-07 Gary V. Vaughan <gary@gnu.org>
1065 * m4/m4module.c (m4_string): Moved from here...
1066 * m4/m4private.c (m4_string): ...to here.
1068 * m4/utility.c (dumpdef_cmp): Removed stale declaration.
1070 2003-07-29 Gary V. Vaughan <gary@gnu.org>
1072 * m4/m4module.h (M4_DEFAULT_NESTING_LIMIT): This value is
1073 already available to module writers through
1074 m4_{get,set}_nesting_limit_opt(), so moved from here...
1075 * m4/m4.c (DEFAULT_NESTING_LIMIT): ...to here and renamed.
1076 (m4_create): Use it.
1078 2003-07-28 Gary V. Vaughan <gary@gnu.org>
1080 Aside from auditing path.c for m4module.h api obfuscation, this
1081 delta introduces the concept of private struct members in opaque
1082 data types to GNU m4: See the STYLE file for details.
1084 * TODO: Remind ourselves that a rewrite of path.c is needed.
1085 * m4/m4module.h (m4_search_path, struct m4_search_path_info):
1087 * m4/m4private.h (m4__search_path, m4__search_path_info): ...to
1088 here and renamed. These type definitions are for internal api use
1089 only. Changed all callers.
1090 * m4/m4module.h (m4_search_path_env_init, m4_search_path_add):
1092 * m4/path.c (search_path_env_init, search_path_add): ...to here
1093 and renamed. These calls were never used outside this file.
1094 Changed all callers.
1095 (dirpath): Moved functionality of this static declaration...
1096 * m4/m4private.h (struct m4): ...to this new internal only
1097 search_path field. Changed all callers.
1098 (m4__get_search_path): Added new internal api accessor.
1099 * m4/path.c (m4_search_path_info_new): Removed. Not used.
1100 (m4_include_init): Removed...
1101 * m4/m4.c (m4_create): ...because the new m4 field is now
1103 (m4_delete): Recycle search_path memory.
1104 * src/main.c (main): Don't call m4_include_init now that it's
1106 * doc/STYLE: Document convention for private fields in opaque
1109 2003-07-24 Gary V. Vaughan <gary@gnu.org>
1111 Sometimes exporting the address of a symbol from a module isn't
1112 enough for other modules to call that symbol correctly. If
1113 custom data types are used for function parameters, they need to
1114 be known to the caller. This change introduces the concept of
1115 $(prefix)/include/modules/$(modulename).h to declare those
1116 structures. Also we move m4_dump_symbols from libm4 to the m4
1117 module to show this concept in action.
1119 * m4/m4module.h (m4_dump_symbol_data): Moved from here...
1120 * modules/m4.h (m4_dump_symbol_data): ...to this new file for
1121 exporting data structures from modules/m4.c.
1122 * modules/m4.c, modules/gnu.c: Include it.
1123 * modules/Makefile.am (pkgmodinc_HEADERS): Install it.
1124 * m4/m4module.h (m4_dump_symbol_CB, m4_dump_symbols): Removed
1126 * m4/utility.c (dumpdef_cmp, m4_dump_symbol_CB, m4_dump_symbols):
1128 * modules/m4.c (dumpdef_cmp_CB, dump_symbol_CB, m4_dump_symbols):
1129 ...to here, with slight renaming.
1130 (m4_export_table): Prototype and add m4_dump_symbols.
1131 * m4/symtab.c (m4_is_symbol_value_void): Needed for an external
1132 definition of m4_dump_symbols.
1133 * m4/m4module.h (m4_is_symbol_value_void): Prototype it.
1134 * m4/m4private.h (m4_is_symbol_value_void): Fast macro version.
1136 2003-07-24 Gary V. Vaughan <gary@gnu.org>
1138 Create an export table in modules/m4.c in readiness for beefing up
1139 the module loader to track module exports and imports.
1141 * m4/m4module.h (m4_debug_flush_files): Removed prototype.
1142 * m4/debug.c (m4_debug_flush_files): Moved...
1143 * modules/m4.c (m4_sysval_flush): ...to here and renamed.
1144 * modules/gnu.c (builtin_esysval): Use it.
1145 * m4/m4module.h (m4_export): New type for declaring module symbols
1147 * modules/m4.c (m4_export_table): List symbols exported from this
1148 module for use by other modules.
1150 2003-07-24 Gary V. Vaughan <gary@gnu.org>
1152 An experiment: There is loads of code in libm4 which should be in
1153 the m4 module, but is also used by another module. Just because
1154 some linkers won't cope with calls across dynamic runtime loaded
1155 objects I initially left the code in libm4. It will tidy the
1156 module api immensely if this code moves to the right place, I just
1157 need to remember to invent a suitable calling mechanism at some
1158 point. For now, only modules that are statically linked and
1159 preloaded will get this treatment, so the only platforms that will
1160 break are those that require all symbols to be resolved at link
1163 * TODO: Reminder that what I am doing could reduce portability
1164 unless I do something more robust later.
1165 * m4/m4module.h (m4_sysval): No longer exported from libm4.
1166 * m4/utility.c (m4_sysval): No longer declared in libm4.
1167 * modules/Makefile.am: Reformatting.
1168 * modules/m4.c (m4_sysval): Declare it at place of use.
1169 * modules/gnu.c (m4_sysval): Import it for use in esyscmd.
1171 2003-07-23 Gary V. Vaughan <gary@gnu.org>
1173 * m4/m4module.h: Reformatting and rearranging lines a bit.
1174 (m4_obstack): Save typing by typedefing `struct obstack'. Changed
1176 (m4_call_macro, m4_expand_input): Renamed...
1177 (m4_macro_call, m4_macro_expand_input): ...to these. Changed all
1179 (m4_expansion_level, m4_process_macro): Moved...
1180 * m4/macro.c (expansion_level, process_macro): ...to here, and
1183 * m4/m4module.h (program_name): Not used by modules at all, so
1185 * src/main.c (program_name): ...to here.
1186 (print_program_name): Renamed...
1187 (print_program_name_CB): ...to conform to the STYLE guide.
1189 2003-07-23 Gary V. Vaughan <gary@gnu.org>
1191 More refactoring of the m4module.h API. Replace #defines with an
1192 enum, and move non-public functions out of the public API.
1194 * m4/debug.c (stdarg.h, varargs.h): Remove variadic header
1196 * m4/macro.c (stdarg.h): Add ANSI C variadic header.
1197 * m4/debug.c (m4_debug, trace): Moved...
1198 * m4/m4private.h (struct m4): ...to fields of this struct.
1199 (m4_get_debug_file, m4_get_trace_messages): New fast access macros
1201 * m4/debug.c (m4_debug_init, m4_debug_exit): Removed functions...
1202 * src/main.c (m4_debug_init, m4_debug_exit): ...invocations...
1203 * m4/m4.c (m4_create, m4_delete): ...and handled here instead.
1204 * m4/m4module.h (m4_context_field_table): Add entries for new
1205 debug_file and trace_messages fields.
1206 (M4_DEBUG_TRACE_ARGS, M4_DEBUG_TRACE_EXPANSION)
1207 (M4_DEBUG_TRACE_QUOTE, M4_DEBUG_TRACE_ALL, M4_DEBUG_TRACE_LINE)
1208 (M4_DEBUG_TRACE_FILE, M4_DEBUG_TRACE_PATH, M4_DEBUG_TRACE_CALL)
1209 (M4_DEBUG_TRACE_INPUT, M4_DEBUG_TRACE_CALLID)
1210 (M4_DEBUG_TRACE_VERBOSE): Replaced #defines with an enum.
1211 (m4_is_debug_bit): New macro to simplfy checks against the debug
1213 (m4_trace_format, m4_trace_header, m4_trace_flush)
1214 (m4_trace_prepre, m4_trace_pre, m4_trace_post): Removed
1216 * m4/debug.c (m4_trace_format, m4_trace_header, m4_trace_flush)
1217 (m4_trace_prepre, m4_trace_pre, m4_trace_post): Moved...
1218 * m4/macro.c (trace_format, trace_header, trace_flush)
1219 (trace_prepre, trace_pre, trace_post): ...to these newly static
1220 functions, since they are only ever used from this file. Changed
1223 2003-07-17 Gary V. Vaughan <gary@gnu.org>
1225 Change the macros for checking syntax so that matching against
1226 multiple possible syntax classes can be done with a single
1227 comparison some of the time. The various classes are now bits of
1228 an int that can be checked with bitwise logic operators.
1230 * m4/m4module.h (M4_SYNTAX_IGNORE, M4_SYNTAX_OTHER)
1231 (M4_SYNTAX_SPACE, M4_SYNTAX_OPEN, M4_SYNTAX_CLOSE, M4_SYNTAX_COMMA)
1232 (M4_SYNTAX_DOLLAR, M4_SYNTAX_ACTIVE, M4_SYNTAX_ESCAPE)
1233 (M4_SYNTAX_ASSIGN, M4_SYNTAX_ALPHA, M4_SYNTAX_NUM)
1234 (M4_SYNTAX_LQUOTE, M4_SYNTAX_RQUOTE, M4_SYNTAX_BCOMM)
1235 (M4_SYNTAX_ECOMM): Replaced #defines with an enum.
1236 (M4_SYNTAX_ALNUM): Removed. Changed all callers.
1237 (M4_IS_IGNORE, M4_IS_OTHER, M4_IS_SPACE, M4_IS_OPEN, M4_IS_CLOSE)
1238 (M4_IS_COMMA, M4_IS_DOLLAR, M4_IS_ACTIVE, M4_IS_ESCAPE)
1239 (M4_IS_ASSIGN, M4_IS_ALPHA, M4_IS_NUM, M4_IS_LQUOTE, M4_IS_RQUOTE)
1240 (M4_IS_BCOMM, M4_IS_ECOMM, M4__IS_STRING, M4_IS_IDENT): Removed.
1241 Replace all calls with invocations of these...
1242 (m4_is_syntax, m4_has_syntax): ...New macros.
1243 * src/freeze.c (produce_syntax_dump): Remove mask argument, which
1244 is no longer required with new macros. Changed all callers.
1246 2003-07-15 Gary V. Vaughan <gary@gnu.org>
1248 * m4/input.c (CHAR_EOF, CHAR_BUILTIN, CHAR_RETRY): These token
1249 values are returned as part of the internal interface, so they
1251 * m4/private.h: ...to here.
1252 * m4/macro.c (expand_token): Check for out of range
1253 m4_peek_input() results before looking up in the syntax table.
1254 (collect_arguments): Ditto.
1256 * NEWS: Note `$' syntax class.
1258 2003-07-08 Paul Eggert <eggert@twinsun.com> and
1259 Gary V. Vaughan <gary@gnu.org>
1261 Conform to POSIX if the POSIXLY_CORRECT environment is set.
1262 --traditional `define' now smashes all the definitions.
1264 * NEWS: Explain this.
1265 * doc/m4.texinfo (Defn): `defn' takes any number of arguments.
1266 (Extensions): Explain that extensions that are incompatible with
1267 POSIX are disabled if POSIXLY_CORRECT is set.
1268 (Incompatibilities): Remove.
1269 (Define, Other Incompat): Explain difference
1270 between GNU and POSIX behavior of define, pushdef, popdef.
1271 * m4/m4.c (m4_get_posixly_correct_opt): New undef.
1272 * m4/m4module.h (m4_context_opt_bit_table): Add POSIXLY_CORRECT entry.
1273 * m4/m4private.h (M4_OPT_POSIXLY_CORRECT_BIT): New macro.
1274 (m4_get_posixly_correct_opt): New macro.
1275 * m4/m4macro.c (m4_process_macro): Disable $10, $abc etc. if
1277 * modules/m4.c (builtin_functions): defn now takes any number of args.
1278 (builtin_define): Smash all the definitions if
1280 (builtin_defn)): Allow any number of arguments.
1281 (builtin_undivert): Do not allow nonnumeric arguments
1283 * src/main.c (main): Set posixly-correct behavior if either
1284 POSIXLY_CORRECT is set, or if -G is given.
1285 * tests/builtins.at: New test for smashed definitions.
1287 2003-06-27 Gary V. Vaughan <gary@gnu.org>
1289 * doc/m4.texinfo (Changesyntax): Document Dollar syntax class.
1290 * m4/m4module.h (M4__SYNTAX_STRING): New syntax class. Be careful
1291 not to slow the parser down.
1292 (M4__IS_STRING): New macro to test string syntax class membership.
1293 * m4/syntax.c: Adjust docucomment.
1294 (m4_syntax_create): Add a default M4_SYNTAX_DOLLAR element.
1295 (m4_syntax_code): Translate `$' -> M4_SYNTAX_DOLLAR.
1296 * m4/input.c (init_builtin_token): Comment typo.
1297 (m4__next_token): Comment typo.
1298 Accept M4_SYNTAX_DOLLAR items into M4_TOKEN_STRING type tokens
1299 by using the new M4__IS_STRING macro.
1300 * m4/macro.c (m4_process_macro): Use M4_IS_DOLLAR to test for
1301 variable references in macro expansions.
1303 * doc/m4.texinfo (Eregexp and Regexp): Typo.
1304 (Epatsubst and Patsubst): Typo.
1307 2003-06-26 Gary V. Vaughan <gary@gnu.org>
1309 Move the global variables that pertain to syntax to a new `struct
1310 m4_syntax_table', and then add one of these to `struct m4'. The
1311 ripple effect through the code to both change formerly global
1312 references, and make sure a suitable context is available in
1313 lexical scope is disproportionately large compared to the size of
1314 the change proper. This change is a large part of decoupling
1315 syntax.c from the rest of the code that uses it.
1317 * m4/m4private.h (struct m4): Add a syntax field.
1318 * m4/m4.c (m4_create): Initialise it,
1319 (m4_delete): Recycle it.
1320 (m4_get_symtab): Remove hand coded version...
1321 (m4_get_symbol_table): ...and generate this with cpp. Changed all
1323 * m4/m4module.h (m4_context_field_table): Add an extra field so we
1324 can generate m4_get_symbol_table. Add a new row for
1325 m4_get_syntax_table.
1326 (M4SYNTAX): Syntactic sugar for module writers.
1327 (m4_symtab): Renamed to m4_symbol_table. Changed all callers.
1328 (m4_syntax_table): New home for syntax related formerly global
1330 * m4/m4private.h (struct m4_syntax_table): Define it.
1331 * m4/input.c (m4_input_init): Initialisation of these formerly
1332 global variables moved...
1333 * m4/syntax.c (m4_syntax_create): ...to here.
1334 * m4/input.c (m4_input_exit): And similarly, recycling of the
1335 memory used by those values moved...
1336 * m4/syntax.c (m4_syntax_delete): ...to here.
1337 * m4/m4module.h (DEF_LQUOTE, DEF_RQUOTE, DEF_BCOMM, DEF_ECOMM):
1338 Moved to m4/m4private.h.
1339 * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
1340 (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
1341 (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
1342 (m4_is_syntax_macro_escaped): New accessors for m4_syntax_table
1343 objects. Changed all callers that used to directly access the
1345 (m4__single_quotes, m4__single_comments, m4__use_macro_escape):
1346 Removed and incorporated into m4_syntax_table structure.
1347 * m4/utility.c (lquote, rquote, bcomm, ecomm): Ditto.
1348 * m4/syntax.c (m4_set_syntax): Now returns an error status,
1349 instead of requiring a `struct m4' to generate its own errors.
1350 Changed all callers.
1351 * src/main.c (main): Now that the syntax table is initialised as
1352 part of m4_create, we have to manually wipe the syntax entries if
1353 we are about to read a frozen file.
1355 2003-06-26 Gary V. Vaughan <gary@gnu.org>
1357 * doc/STYLE: Added notes on callback naming schemes.
1359 * m4/module.c (m4_set_module_macro_table)
1360 (m4_set_module_builtin_table): Declarations weren't changed when
1361 definitions were renamed on 2003-06-19.
1363 * m4/hash.c (m4_hash_resize): ifdefed out. This function is
1364 neither used nor particularly appropriate since it exposes the
1365 internal workings of the hash module. I haven't yet decided
1366 whether to remove it entirely.
1368 2003-06-20 Gary V. Vaughan <gary@gnu.org>
1370 Two related changes, and a huge knockon effect throughout the
1371 source: Moved the option variables out of global space and into
1372 `struct m4'; made `m4_symtab' a real datatype, so that its api
1373 is not marred passing `struct m4' around just so it can decide
1374 whether to keep traced symbol names or not. Added setters and
1375 getters for the formerly global option variables, and obviously
1376 changed a vast number of functions to take a `struct m4' and use
1377 the getter funcs to find option values.
1379 * m4/utility.c (interactive, sync_output, debug_level)
1380 (no_gnu_extensions, prefix_all_builtins, suppress_warnings)
1381 (max_debug_argument_length, warning_status, nesting_limit)
1382 (discard_comments): Removed.
1383 * m4/m4module (warning_status, no_gnu_extensions, nesting_limit)
1384 (debug_level, max_debug_argument_length, prefix_all_builtins)
1385 (suppress_warnings, discard_comments, interactive, sync_output):
1386 Removed from here...
1387 * m4/m4private.h (struct m4): ...and equivalent fields added to
1389 (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1390 (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1391 (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1392 (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1393 (m4_get_interactive_opt, m4_get_sync_output_opt): Fast access
1394 macros for the new fields.
1395 * m4/m4module.h (m4_context_field_table)
1396 (m4_context_opt_bit_table): Helper macros used to generate
1397 prototypes, setters and getters for new option fields
1399 * m4/m4.c (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1400 (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1401 (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1402 (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1403 (m4_get_interactive_opt, m4_get_sync_output_opt)
1404 (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
1405 (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
1406 (m4_set_max_debug_arg_length_opt, m4_set_prefix_builtins_opt)
1407 (m4_set_suppress_warnings_opt, m4_set_discard_comments_opt)
1408 (m4_set_interactive_opt, m4_set_sync_output_opt): Addressable
1409 setter and getter functions generated by cpp from
1410 m4_context_field_table and m4_context_opt_bit_table, exported as
1411 part of the module api. Changed all callers.
1412 * m4/symtab (struct m4_symtab): Used as the concrete type for
1414 (m4_symtab_create): Allocate and initialise a new struct.
1415 (m4_symtab_apply): New function that works like m4_hash_apply, but
1416 with different callbacks specific to symbol tables. Changed all
1418 (symbol_destroy, arg_destroy, arg_copy): Renamed
1419 symbol_destroy_CB, arg_destroy_CB, arg_copy_CB to remind me that
1420 they have unused parameters for a reason!
1421 (dump_symbol_CB): New callback to dump the contents of a single
1423 (symtob_dump): Rewritten in terms of dump_symbol_CB.
1424 * m4/utility.c (m4_dump_symbol): Renamed to m4_dump_symbol_CB.
1425 Changed all callers.
1426 * m4/m4.c (m4_create): By default point the `nuke_trace_bit' field
1427 of the contained `m4_symtab' at the `no_gnu_extensions' field.
1428 Although I'm not convinced these semantics are correct, they are
1429 at least consistent with how things were before this delta. Also
1430 set the default nesting limit to M4_DEFAULT_NESTING_LIMIT.
1432 2003-06-19 Gary V. Vaughan <gary@gnu.org>
1434 Tie down the interface to libm4 some more. Make more structures
1435 opaque to modules by moving them to m4private.h, and writing
1436 setters and getters. To win back the speed penalty for doing this
1437 also wrote macroized versions that do know about structure layout
1438 in m4private.h and #include that file into modules when NDEBUG is
1439 defined at compile time. There are still some accessor macros in
1440 m4private.h that need to go, but that is not necessary to clean
1443 * m4/m4module.h (m4_symbol_type): Moved...
1444 * m4/m4private.h (m4__symbol_type): ...to here.
1445 * m4/symtab.c (m4_get_symbol_value, m4_get_symbol_traced)
1446 (m4_set_symbol_traced, m4_set_symbol_name_traced)
1447 (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1448 (m4_get_symbol_func, m4_symbol_value_create)
1449 (m4_symbol_value_delete, m4_set_symbol_value_text)
1450 (m4_set_symbol_value_func): New exported api to symbols.
1451 (m4_get_symbol_value_type): Replaced by m4_is_symbol_value_text
1452 and m4_is_symbol_value_func.
1453 * m4/m4module.h: Prototype these guys.
1454 * m4/module.c (m4_set_module_macro_table)
1455 (m4_set_module_builtin_table): Make these static, there is no
1456 reason to pollute the api with them.
1457 * m4/m4private.h: Reformatting.
1458 (m4_get_symtab): Only define when NDEBUG is defined.
1459 (m4_get_symbol_value, m4_get_symbol_traced)
1460 (m4_set_symbol_traced, m4_set_symbol_name_traced)
1461 (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1462 (m4_get_symbol_func, m4_symbol_value_create)
1463 (m4_symbol_value_delete, m4_set_symbol_value_text)
1464 (m4_set_symbol_value_func): Macro implementations of the new
1465 functions when NDEBUG is defined.
1466 (SYMBOL_TRACED, SYMBOL_VALUE, SYMBOL_TYPE, SYMBOL_TEXT)
1467 (SYMBOL_FUNC, VALUE_TYPE, VALUE_TEXT, VALUE_FUNC): Removed.
1468 Superceded by the above. All callers changed.
1469 (M4ARG): Removed. This is no longer different to the
1470 m4/m4module.h definition.
1471 * modules/gnu.c, modules/m4.c: Only include m4private.h when
1472 NDEBUG is defined. That way we exercise the same (albeit slower)
1473 api that external modules must use.
1475 2003-06-18 Gary V. Vaughan <gary@gnu.org>
1477 Renamed some of the types and their accessors to make more sense.
1478 Now we have a SYMTAB in which we store SYMBOLs, and each SYMBOL
1479 has a stack of SYMBOL_VALUEs.
1481 * m4/m4module.h (m4_token, m4_get_token_type, m4_get_token_text)
1482 (m4_get_token_func, m4_token_copy): Renamed to m4_symbol_value,
1483 m4_get_symbol_value_type, m4_get_symbol_value_text,
1484 m4_get_symbol_value_func and m4_symbol_value_copy respectively.
1485 Changed all callers.
1486 (m4_symbol_type): s/M4_TOKEN_/M4_SYMBOL_/
1487 (m4_get_token_type): Renamed
1488 * m4/input.c (m4_next_token): Renamed to m4__next_token, and moved
1489 to the internal api.
1490 * m4/m4private.h: s/TOKEN_ARG_/SYMBOL_ARG_/
1492 (m4__symtab_init, m4__symtab_exit): Removed prototypes.
1493 (m4_token_arg): Renamed to m4_symbol_arg. Changed all callers.
1494 (m4__token_type): Moved here from m4module.h.
1495 (m4__next_token): Renamed from m4_next_token.
1496 * m4/symtab.c: Removed some of the parameterised macro support
1497 functions for modularisation later.
1498 (m4_token_copy): Renamed to m4_symbol_value_copy, and use new
1499 m4_hash_dup to perform a true deep copy of the SRC.
1500 (arg_copy): Callback for m4_symbol_value_copy.
1501 * utility.c (m4_token_get_type, m4_token_text, m4_token_func):
1502 Renamed to m4_get_symbol_value_type, m4_get_symbol_value_text and
1503 m4_get_symbol_value_func. Changed all callers.
1505 2003-06-18 Gary V. Vaughan <gary@gnu.org>
1507 Tidy up style of hash.[ch] in accordance with doc/STYLE.
1509 * m4/hash.c: Internal symbol renaming and formatting.
1510 (m4_hash_dup): New function to facilitate deep copies of hash
1512 (m4_hash_apply_func): Returns a void* now, which is a richer type
1513 for returning exceptions (NULL means keep going).
1514 (m4_hash_apply): Ditto.
1515 * m4/hash.h: Declare exported symbols with an explicit extern.
1518 2003-06-17 Gary V. Vaughan <gary@gnu.org>
1520 Still refactoring furiously. This delta represents a change in
1521 semantics to symtab.c. Instead of building temporary m4_tokens
1522 in the caller, and copying fields in the methods, we now create
1523 the actual m4_token for hashing in the caller so the methods just
1524 slot them in directly. Also, this means that we don't lookup a
1525 symbol and get back an allocated but VOID token to copy fields
1526 into, we create the token we want to push and pass that to
1527 m4_symbol_define or m4_symbol_pushdef. And that's it. There are
1528 a few other small changes to stop knowledge of the implementation
1529 of symtab.c leaking out into other files.
1531 * m4/macro.c (expand_argument): Comment typo corrected.
1532 * m4/symtab.c (symtab_fetch): New function to fetch the address of
1534 (m4_symbol_pushdef): Take an extra value parameter and use this
1535 directly as the new top of the value stack. All callers changed
1536 to build a token and pass responsibility for memory in, rather
1537 than copying as we used to.
1538 (m4_symbol_define): Also use the new value parameter directly as a
1539 replacement for the top of the value stack. All callers changed
1540 to build a token as above.
1541 (m4_set_symbol_traced): New function to set the traced bit on the
1542 named symbol, creating it if necessary.
1543 (symbol_popval): The guts of the old m4_symbol_popdef.
1544 (m4_symbol_popdef): Use it.
1545 * m4/builtin.c (m4_symbol_set_token): Removed,
1546 (m4__symbol_set_builtin, m4__symbol_set_macro): Removed and
1548 * m4/module.c (m4_set_module_builtin_table)
1549 (m4_set_module_macro_table): ...with these more orthogonal
1551 * m4/m4module.h (m4_macro_pushdef, m4_macro_define)
1552 (m4_builtin_pushdef, m4_builtin_define): Removed. No longer
1554 * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE)
1555 (m4_arg_signature_parse): Moved...
1556 * m4/symtab.c: ...to here.
1557 * m4/input.c (m4_token_copy): Arghh... I'm amazed this didn't
1558 screw something up. Moved...
1559 * m4/symtab.c (m4_token_copy): ...to here, and fixed so that it
1560 actually does a proper deep copy of source to dest.
1562 2003-06-16 Gary V. Vaughan <gary@gnu.org>
1564 Further refactoring to stabilise the module API. Renaming some
1565 functions for orthogonality, and judicious definition migration to
1566 move things out of the set of exported symbols.
1568 * doc/STYLE: New file. Notes on coding style.
1569 * m4/m4module.c: Updated bitrotted docucomment at the top of the
1571 (m4_module_name, m4_module_builtins, m4_module_macros): Renamed to
1572 m4_get_module_name, m4_get_module_builtin_table,
1573 m4_get_module_macro_table which are verb phrases. Changed all
1575 * m4/builtin.c (m4_builtin_table_install, m4_macro_table_install):
1577 * m4/module.c (m4_set_module_builtin_table)
1578 (m4_set_module_macro_table): ...here, and renamed. Changed all
1580 * m4/m4module.c (m4_module_data): This...
1581 * m4/m4private.c (struct m4_module_data): ...and this...
1582 * m4/module.c (module_data) ...consolidated here and no longer
1583 exported. Changed all callers.
1585 2003-06-16 Gary V. Vaughan <gary@gnu.org>
1587 Begin work on lifting the curse of the global variables. To start
1588 with create a `struct m4' context container, and replace
1589 `m4__symtab' with `context->symtab' throughout. This means
1590 initialising a context container in main, and adjusting many
1591 functions between main and the module entry points so that the
1592 container gets passed through. It would have been nice to
1593 defer this until after 1.5, but it has a major effect on the
1594 user's module writing ABI, so it needs to be addressed now - at
1595 least in the areas that impact the ABI. An interrelated change
1596 in the symtab API removes the dependency on a global symbol table,
1597 and instead focuses on a passed table (from the context
1600 * TODO: Reminders for finishing context functionality.
1601 * m4/Makefile.am (libm4_la_SOURCES): Add m4.c.
1602 * m4/m4.c: New file. Manage new struct m4 objects to eliminate
1603 global variables and eventually allow m4 to be reentrant.
1604 * m4/m4private.h (m4): Define the new structure here...
1605 (M4_SYMTAB, m4_get_symtab): ...so we can have fast accessors that
1606 don't carry the overhead of a function call.
1607 * m4/m4module.h: Prototype extern functions from m4/m4.c.
1608 (m4): Declare type for new struct m4 objects.
1609 (M4SYMTAB): User macro to ease finding the symbol table for the
1610 current context for module developers.
1611 (m4_symbol_token): Renamed to m4_symbol_set_token which contains a
1613 (M4_BUILTIN, m4_builtin_func, M4_BUILTIN_HANDLER)
1614 (m4_builtin_define, m4_builtin_pushdef, m4_builtin_table_install)
1615 (m4_call_macro, m4_dump_symbols, m4_expand_input)
1616 (M4_FINISH_HANDLER, M4_INIT_HANDLE, m4_macro_define)
1617 (m4_macro_pushdef, m4_macro_table_install, m4_module_load)
1618 (m4_module_unload, m4_process_macro, m4_symbol_set_token): Add an
1619 m4* context parameter. Changed definitions and all callers.
1620 (m4_symtab): Alias for m4_hash to decouple the
1621 m4_symtab api from m4_hash.
1622 (m4_symtab_apply, m4_symtab_apply_func): Use m4_symtab instead of
1624 (m4_symtab_create): New function to return an initialised
1626 (m4_symtab_delete): New function to delete an m4_symtab's memory.
1627 (m4_symbol_define, m4_symbol_delete, m4_symbol_lookup)
1628 (m4_symbol_popdef, m4_symbol_pushdef): Add an m4_symtab parameter
1629 instead of simply using the global m4__symtab. Changed
1630 definitions and all callers.
1631 * m4/m4private.h (m4__symtab_remove_module_references): Ditto.
1632 * m4/symtab.c (m4__symtab_init, m4__symtab_exit): Removed.
1633 * src/main.c (main): Create a context and use that instead of the
1634 former global m4__symtab.
1636 2003-06-13 Gary V. Vaughan <gary@gnu.org>
1638 * m4/hash.c (m4_hash_apply): Pass an initial hash table parameter
1639 to the callback. Callbacks should not need to hardcode the
1640 hashtable they are working from, nor should we have to waste the
1641 userdata parameter to pass the table in.
1642 * m4/hash.h (m4_hash_apply_func): Require the initial table
1644 * m4/symtab.c (symtab_destroy): Use the passed table instead
1645 of hardcoding m4__symtab.
1646 (m4_symbol_popdef): Don't use the userdata parameter to pass the
1647 table to arg_destroy.
1648 (arg_destroy): Use the hash parameter, ignore userdata.
1649 * modules/m4.c (set_trace): Make it fit the m4_hash_apply_func
1651 (traceon, traceoff): Call set_trace with the extra initial
1654 2003-06-13 Gary V. Vaughan <gary@gnu.org>
1656 More refactoring to stabilise the module api, this time for
1657 symtab.c. Additionally, start to pay attention to function names
1658 that don't contain a verb like they should.
1660 * m4/m4module.h (m4_symtab_apply): Reintroduced this function as a
1661 wrapper for m4_hash_apply to decouple the symtab module from the
1663 (m4_symbol_builtin, m4_symbol_macro): Renamed to
1664 m4__symbol_set_builtin and m4__symbol_set_macro. Changed all
1666 (m4_symbol_delete): Create a macro version to save a function
1668 (m4_token_t, m4_data_t): These violate the POSIX reserved
1669 namespace. Renamed to m4_token_type and m4_symbol_type. Changed
1671 (m4_token_type): Renamed to m4_token_get_type.
1672 (m4_symtab, m4_symtab_init, m4_symtab_remove_module_references)
1673 (m4_symtab_exit): Removed from the exported module
1675 * m4/m4private.h (m4__symtab, m4__symtab_init)
1676 (m4__symtab_remove_module_references, m4__symtab_exit): ...and
1677 renamed and added to the internal api. Changed all callers.
1678 (m4_symtab_apply): A faster macro version of the function for
1679 users of the internal api.
1680 * m4/symtab.c (m4_symbol_destroy, m4_arg_destroy): Renamed to
1681 symbol_destroy and arg_destroy.
1682 (symtab_debug): Added a prototype.
1683 (m4_symtab_apply, m4_symbol_delete): Moved to the end of the file
1684 so that callers in this file get the faster macro versions from
1687 2003-06-12 Gary V. Vaughan <gary@gnu.org>
1689 Refactoring modules to rationalise the API into an external
1690 documented (eventually!) API for use by modules in the `m4_'
1691 namespace declared in m4/m4module.h, an internal API between the
1692 source files we ship (including our shipped modules) in the `m4__'
1693 namespace declared in m4/m4private.h and making the rest as
1694 cohesive as possible with liberal use of the `static' keyword.
1695 This change represents an audit to m4/module.c along these
1698 * m4/m4module.h (m4_module_close_all, m4_module_find_by_builtin):
1699 Removed. No longer used.
1700 (m4_module_close): Removed prototypes.
1701 (m4_module_init, m4_module_open, m4_module_unload_all): Removed
1702 from the exported module api...
1703 * m4/m4private.h (m4__module_init, m4__module_open)
1704 (m4__module_exit): ...and renamed and added to the internal api.
1705 Changed all callers.
1706 (BUILTIN_SYMBOL, MACRO_SYMBOL, INIT_SYMBOL, FINISH_SYMBOL):
1707 Centralised definitions after renaming...
1708 * m4/module.c (M4_BUILTIN_SYMBOL, M4_MACRO_SYMBOL, M4_INIT_SYMBOL)
1709 (M4_FINISH_SYMBOL): ...and removing from here.
1710 (m4_module_dlerror, m4_module_remove, m4_module_close)
1711 (m4_caller_id): Not exported at all, so renamed to module_dlerror,
1712 module_remove, module_close and caller_id.
1713 (MODULE_SELF_NAME): New macro to make reporting self errors
1715 (m4_module_load, module_close, module_remove): Use it.
1716 * m4/m4private.h (USER_MODULE_PATH_ENV): Macro to hold "M4MODPATH"
1718 * src/main.c (main): Use it.
1720 2003-06-12 Gary V. Vaughan <gary@gnu.org>
1722 * README: Remove references to --enable-changeword, which has been
1723 removed from the code.
1725 2003-06-11 Gary V. Vaughan <gary@gnu.org>
1727 Getting rid of the annoying bug with configure --enable-debug,
1728 which spewed -e: command not found errors. This was an interaction
1729 between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4.
1730 You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or
1731 branch-1-5) to get the full fix.
1733 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version
1734 of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED),
1735 and then use the probed value of $SED.
1736 (AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define
1737 this, it messes up the AC_REQUIRE stack.
1739 2003-06-10 Gary V. Vaughan <gary@gnu.org>
1741 * m4/symtab.c (m4_symbol_popdef): Need to pass the hash address to
1742 the destroy callback.
1743 (m4_arg_destroy): Use the hash address to free the hash node key
1746 2003-06-06 Gary V. Vaughan <gary@gnu.org>
1748 First cut at formal parameters in macros.
1750 * configure.ac (AC_REPLACE_FUNCS): Add xstrzdup.
1751 * m4/xstrzdup.c: New file.
1752 * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE): Start size for
1753 associative array of parameter names to details.
1754 (m4_symbol_token): Capture macro names with parameter lists.
1755 (m4_arg_signature_parse): And build an associative array to hang
1756 from the symbol structure to map names to details.
1757 * m4/hash.c (m4_hash_new): Break the m4_hash_new followed by
1758 m4_hash_resize idiom. Now that we potentially add a little hash
1759 table to many of the entries in the symbol table, added an extra
1760 arg to set the initial size. Changed all callers.
1761 (m4_hash_apply): New function that is basically a generalised
1763 * m4/symtab.c (m4_symbol_apply): ...this. Now deleted. Adjusted
1764 all callers to call m4_hash_apply instead.
1765 (m4_arg_destroy): Recycle memory used by an m4_token_arg.
1766 (m4_symbol_popdef): Use m4_arg_destroy to help recycle the
1767 m4_arg_signature association that might be attached to the symbol,
1768 * m4/hash.h (m4_hash_apply_func): Replacement type for...
1769 * m4/m4module.h (m4_symtab_apply_func): ...this. Now deleted.
1770 (M4_SYNTAX_ASSIGN): Placeholder for assigning default values in
1772 (M4_IS_ASSIGN): Detect characters with M4_SYNTAX_ASSIGN syntax.
1773 (M4_IS_IDENT): Detect characters that can be safely used in
1775 * m4/syntax.c (m4_syntax_init): Add an M4_SYNTAX_ASSIGN character.
1776 * m4/macro.c: Corrected grammar in some comments. Use `token'
1777 rather than `td' for m4_token variables.
1778 (m4_process_macro): If we find a dollar followed by some
1779 M4_IS_IDENT characters, replace that with the contents of the argv
1780 entry with offset stored in the m4_token_arg associated with the
1781 collected identifier.
1783 2003-06-05 Gary V. Vaughan <gary@gnu.org>
1785 Begin preparations for supporting formal parameters in m4 macros.
1787 * m4/m4private.h (struct m4_token_arg): Placeholder for holding
1788 the details of a formal parameter.
1789 (m4_token): Add an arg_signature member to hold a hash table for
1790 looking up formal parameters.
1791 * m4/input.c: Update more bitrotted comments.
1792 (m4_push_builtin): Initialise arg_signature member.
1793 (init_builtin_token): Copy arg_signature member.
1794 * m4/m4module.h (m4_builtin_pushdef, m4_builtin_define)
1795 (m4_macro_pushdef, m4_macro_define): Rewritten as macros to
1797 * m4/builtin.c (m4_builtin_pushdef, m4_builtin_define)
1798 (m4_macro_pushdef, m4_macro_define): ...these, And...
1799 (m4_symbol_token): ...wrapped around this new function, which
1800 vastly simplifies the arguments required by the functions it
1802 Changed all callers.
1804 2003-06-05 Gary V. Vaughan <gary@gnu.org>
1806 * m4/macro.c: Format changes.
1808 2003-06-04 Gary V. Vaughan <gary@gnu.org>
1810 * m4/input.c: Updated various bitrotted comments.
1811 (m4_push_builtin): Just pass the whole m4_token, rather than
1812 extracting all the fields in the caller. This also allows us to
1813 check the token type for consistency.
1814 (macro_funcs, macro_peek, macro_read, m4_push_macro, CHAR_MACRO):
1815 Renamed to builtin_funcs, builtin_peek, builtin_read,
1816 m4_push_builtin and CHAR_BUILTIN for consistency with the rest of
1817 the code. Changed all callers.
1818 (struct input_block): Similarly renamed u_m member to u_b, and
1819 changed all callers.
1820 (m4_next_token): Use bzero to initialise the data fields.
1821 * m4/m4module (m4_push_macro): Renamed to m4_push_builtin.
1823 2003-05-29 Gary V. Vaughan <gary@gnu.org>
1825 These changes were necessary to get m4 to build on my iBook
1826 running "powerpc-apple-darwin6.6" using Apples build of gcc "gcc
1827 (GCC) 3.1 20020420 (prerelease)":
1829 * src/main.c: Don't include dlfcn.h, ltdl.h handles correct
1830 inclusion of module loader headers.
1831 * modules/Makefile.am: Use AM_LDFLAGS, not LDFLAGS.
1832 * m4/Makefile.am: Ditto.
1833 (libm4_la_LIBADD): Added $(LTLIBINTL).
1834 * m4/utility.c (program_name): Removed declaration in favour of
1835 the one already in error.c!
1836 * m4/m4module.h (program_name): Define to program_invocation_name
1837 when using GNU C library. Use an explicit extern declaration.
1838 (interactive, sync_output, debug_level, hash_table_size)
1839 (no_gnu_extensions, prefix_all_builtins, max_debug_argument_length)
1840 (suppress_warnings, warning_status, nesting_limit, discard_comments)
1841 (lquote, rquote, bcomm, ecomm, m4_bad_argc, m4_skip_space)
1842 (m4_numeric_arg, m4_shipout_int, m4_shipout_string, m4_dump_args)
1843 (m4_debug, m4_debug_init, m4_debug_exit, m4_debug_decode)
1844 (m4_debug_flush_files, m4_debug_set_output, m4_debug_message_prefix)
1845 (m4_trace_prepre, m4_trace_pre, m4_trace_post, m4_sysval)
1846 (m4_expansion_level, m4_expand_ranges, m4_expand_input)
1847 (m4_call_macro, m4_process_macro, m4_syntax_table, m4_current_file)
1848 (m4_current_line, m4_current_diversion, m4_output_current_line):
1849 Don't rely on default, use an explicit extern.
1850 * m4/error.h (error, error_at_line, error_print_progname)
1851 (error_message_count, error_one_per_line): Ditto.
1852 * m4/ltdl.c: Update from CVS libtool.
1854 * commit: Update from CVS cvs-utils.
1856 2002-11-04 Akim Demaille <akim@epita.fr>
1858 * doc/m4.texinfo (Esyscmd): Don't grep, use something easier:
1860 * tests/others.at (iso8859): Use abs_srcdir, not srcdir.
1862 2002-11-04 Akim Demaille <akim@epita.fr>
1864 * config/Makefile.am (ACLOCAL_MACROS): Ship the Gettext macros.
1866 2002-11-04 Akim Demaille <akim@epita.fr>
1868 * configure.ac: Automake 1.7.1, Autoconf 2.54, Gettext 0.11.5,
1869 used as `external', and Libtool 1.4.3.
1871 (LTLIBOBJS): Don't play with it.
1873 * Makefile.am (SUBDIRS): Remove intl.
1874 (ACLOCAL_AMFLAGS): Add -I config.
1875 (EXTRA_DIST): Add config/config.rpath.
1878 * modules/perl.c (M4INIT_HANDLER): Don't prototype xs_init.
1880 2002-05-29 Gary V. Vaughan <gary@gnu.org>
1882 Preparations for refactoring syntax tables to allow reverse
1883 lookups [fetch me a M4_SYNTAX_OPEN], without compromising the
1884 speed of normal lookups in an array of unsigned short.
1886 * m4/input.c (single_quotes, single_comments, use_macro_escape):
1888 * m4/m4private.h (m4__single_quotes, m4__single_comments,
1889 m4__use_macro_escape): ...to here, and renamed. The `m4__' prefix
1890 is for internal symbols which unavoidably pollute the global
1891 namespace, but are not published APIs.
1892 Adjusted all callers.
1893 * m4/input.c (m4_syntax_init, m4_syntax_code, m4_set_quotes,
1894 m4_set_comment, m4_set_syntax, set_syntax_internal,
1895 unset_syntax_attribute): Moved from this file...
1896 * m4/syntax.c: New. ...to this file.
1897 Also added an m4_syntax_exit stub for orthogonality.
1898 * src/main.c (main): Use it.
1899 * m4/Makefile.am (libm4_la_SOURCES): Add syntax.c.
1900 * m4/m4module.h: Reformatting. New prototypes.
1902 2002-05-29 Gary V. Vaughan <gary@gnu.org>
1904 * bootstrap (aclocal_apiversion): The aclocal apiversion is
1905 distinct from the automake release number (in that the apiversion
1906 apparently has no micro-version-component).
1907 (aclocal_apilibdir): Use it.
1909 2002-05-28 Gary V. Vaughan <gary@gnu.org>
1911 * m4/hash.c (m4_hash_resize): New function.
1912 * m4/hash.h: Add prototype.
1913 * m4/symtab.c (m4_symtab_init): Use it. This could do with some
1914 benchmarking to find a good value for, say, autoconf. This is
1915 already a little quicker than before for me.
1917 * m4/symtab.c (m4_symtab_hash, m4_symtab_cmp): Moved from here...
1918 * m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): .. to here,
1920 * m4/hash.h: Adjust prototypes.
1922 2002-01-22 Akim Demaille <akim@epita.fr>
1924 * bootstrap (aclocal_apilibdir): New, to cope with Automake's new
1926 * tests/Makefile.am (package.m4): New.
1927 * tests/atlocal.in: Adjust to CVS Autotest.
1928 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use AC_LIBOBJ.
1929 * configure.ac: LIBOBJ is a forbidden string.
1930 Simplify AM_INIT_AUTOMAKE invocation.
1931 * config/Makefile.am (ACLOCAL_MACROS): Add amversion.m4 and
1934 2001-10-19 Akim Demaille <akim@epita.fr>
1936 * m4/module.c, m4/output.c, src/main.c: Normalize error messages.
1938 2001-10-19 Akim Demaille <akim@epita.fr>
1940 * m4/input.c (m4_next_token): Display where was opened what is
1943 2001-10-19 Akim Demaille <akim@epita.fr>
1945 * m4/macro.c (expand_argument): Display where was opened what is
1948 2001-10-18 Akim Demaille <akim@epita.fr>
1950 * m4/input.c, modules/m4.c: Formatting changes.
1952 2001-10-17 Gary V. Vaughan <gary@gnu.org>
1954 * bootstrap: s/configure.in/configure.ac/
1956 2001-10-16 Gary V. Vaughan <gary@gnu.org>
1958 * m4/symtab.c (m4_symbol_destroy): This function calls
1959 m4_symbol_popdef, which recycles a symbols memory when the last
1960 definition is popped. Since we were passing the address of the
1961 symbol name found in the symbol table, and it was being removed
1962 partway through m4_symbol_destroy() we were referencing freed
1963 memory for the balance of the function. Now we take a copy of the
1964 symbol name tring and use that as a key into the symbol
1965 table... that way if the original symbol name is freed, the copy
1968 2001-10-13 Akim Demaille <akim@epita.fr>
1970 * m4/ltdl.c: Update.
1972 2001-10-13 Akim Demaille <akim@epita.fr>
1974 * src/main.c, src/freeze.c, m4/debug.c, m4/input.c, m4/macro.c:
1975 Don't gettextize internal error messages.
1977 2001-10-13 Akim Demaille <akim@epita.fr>
1979 * tests/macros.at (Arity and defn): New failing test.
1980 (Arity, defn, and freeze): New.
1982 Fix `Arity and defn'.
1984 * m4/input.c (m4_push_macro): Don't forget the arity.
1985 * modules/m4.c (defn): Likewise.
1987 2001-10-13 Akim Demaille <akim@epita.fr>
1989 * tests/builtins.at (pushdef/popdef, trace, trace2, trace3): Move
1991 * tests/macros.at (pushdef/popdef, Tracing Hanoi Towers)
1992 (Propagation of traceon, Propagation of --trace): this new file.
1994 2001-10-13 Akim Demaille <akim@epita.fr>
1996 * m4/utility.c (m4_numeric_arg): Use the usual (argc, argv, ...)
1997 interface instead of (name, argc...).
1998 Upon failure, specify which argument was guilty.
2001 2001-10-13 Akim Demaille <akim@epita.fr>
2003 * modules/evalparse.c: Save translators' time: don't translate
2004 internal error messages.
2005 (m4_evaluate): Simplify/normalize error messages.
2006 * doc/m4.texinfo (Eval): Adjust.
2008 2001-10-13 Akim Demaille <akim@epita.fr>
2010 * m4/macro.c (expand_macro): Let m4_bad_argc handle the cases
2011 where no checking is needed.
2012 * m4/utility.c (m4_bad_argc): Use the usual (argc, argv, ...)
2013 interface instead of (name, argc...).
2015 * modules/gnu.c (m4_patsubst_do): Don't check argc, done
2018 2001-10-13 Akim Demaille <akim@epita.fr>
2020 * m4/utility.c (m4_bad_argc): Display user argument counts, i.e.,
2021 exclude the builtin name from the count.
2022 * modules/m4.c (ifelse): Do not use the regular argc mechanism, as
2023 calling ifelse with a single argument is valid.
2024 * doc/m4.texinfo (Ifelse): Add an example where ifelse is invoked
2025 with 1 and 2 args, mostly to strengthen the test suite.
2027 2001-10-13 Akim Demaille <akim@epita.fr>
2029 * m4/output.c (m4_make_diversion, m4_insert_file)
2030 (m4_insert_diversion, +m4_freeze_diversions): Ansify.
2032 2001-10-12 Gary V. Vaughan <gary@gnu.org>
2034 * m4/input.c (init_builtin_token): Renamed from init_macro_token,
2035 since we call these things builtins in the rest of the code!
2037 * modules/gnu.c (m4_regexp_compile): s/%0/%s/
2039 2001-10-12 Gary V. Vaughan <gary@gnu.org>
2041 Rather than forcing each builtin definition to manage its own
2042 argument range checking, tabulate the maxima and minima for all
2043 builtins in each module. This forces us to consider what the
2044 valid ranges for each builtin should be, and moves the checking
2045 code out of each builtin implementation and into the builtin
2046 caller infrastructure.
2048 * m4/m4module.h (struct m4_builtin): Add argument minima and
2050 * m4/m4private.h (struct m4_token): Reflect them here too.
2051 * m4/input.c (struct input_block): ...and here.
2052 (m4_token_copy): New function for token copying.
2053 (init_macro_token): Copy them from a token to the input stack.
2054 (m4_next_token): Don't forget to initialise them for text
2056 * m4/macro.c (expand_argument): Use m4_token_copy, and also
2057 check argument counts before calling the builtin handler.
2058 * m4/symtab.c (m4_symbol_builtin): Take minima and maxima params.
2059 (m4_symbol_macro): Likewise.
2060 * m4/builtin.c (m4_builtin_pushdef): Add min_args and max_args
2061 parameters. Updated all callers.
2062 (m4_builtin_define): Ditto.
2063 (m4_macro_pushdef, m4_macro_define): Ditto.
2064 * m4/symtab.c (m4_symbol_builtin, m4_symbol_define): Ditto.
2065 * modules/evalparse.c: Declare argument counts for defined
2066 builtins and remove explicit calls to m4_bad_argc().
2067 * modules/gnu.c: Ditto.
2068 * modules/load.c: Ditto.
2069 * modules/m4.c: Ditto.
2070 * modules/modtest.c: Ditto.
2071 * modules/mpeval.c: Ditto.
2072 * modules/perl.c: Ditto.
2073 * modules/shadow.c: Ditto.
2074 * modules/stdlib.c: Ditto.
2075 * modules/time.c: Ditto.
2078 2001-10-10 Gary V. Vaughan <gary@gnu.org>
2080 The trace semantics now attach the trace bit to a symbol name.
2081 For as long as a traceon(`foo') is active, calls to foo will be
2082 traced regardless of intervening undefines or module unloads.
2083 Fixed the flag propogation issues differently to the fixes
2084 reverted with the last attempt at nailing down trace:
2086 * m4/m4private.h: This file is not visible outside of the m4
2087 source tree, so I removed all the `M4_' and `m4_' prefixes to save
2088 on typing. Updated all clients.
2089 (m4_token): New typedef contains the fields that need to be passed
2090 around with the low level tokeniser.
2091 (m4_token_data): Removed.
2092 (m4_symbol): Now contains the traced flag again.
2093 * m4/symtab.c: Rewritten again. Now we don't remove symbols with
2094 the trace bit set. This change is contained entirely within this
2095 module and doesn't leak out into the callers. Updated all
2097 (m4_symbol_builtin, m4_symbol_macro): Adjusted to make use of the
2098 new fields in m4_token. Updated all clients.
2099 * m4/builtin.c (m4_builtin_pushdef): Needs a flags argument so
2100 that `groks_macro_args' and `blind_if_no_args' flags are retained
2101 when defn() results are passed around in m4 code. Updated all
2103 (m4_builtin_define): Ditto.
2104 (m4_macro_pushdef, m4_macro_define): Ditto.
2105 * m4/input.c (struct input_block): Add a flags field to facilitate
2107 (m4_push_macro): ...use it.
2108 (init_macro_token): Retrieve it.
2109 (m4_next_token): Initialise it.
2110 * m4/macro.c (expand_argument): Copy it.
2111 * m4/m4module.h: Adjust.
2112 * tests/builtins.at: Adjust the expected output of the trace
2113 tests to reflect the change in semantics.
2114 * tests/modules.at (modules: trace): Check that unloading a
2115 module which supplies a traced symbol definition doesn't lose te
2118 2001-10-07 Gary V. Vaughan <gary@gnu.org>
2120 * modules/gnu.c (m4_macro_table): Display the timetamp when
2121 expanding __m4_version__.
2123 * configure.ac (--with-modules): Forgot a comma in the
2124 AC_HELP_STRING parameter list.
2126 2001-10-05 Gary V. Vaughan <gary@gnu.org>
2128 * bootstrap: Remove aclocal.m4t when it is no longer required.
2130 2001-10-05 Akim Demaille <akim@epita.fr>
2132 * tests/Makefile.am: Adjust for gnuprog2.
2133 * tests/m4.in: There can be a leading path.
2134 * tests/modules.at (AT_CHECK_M4_MODTEST): No need for $4 and $5.
2135 * tests/testsuite.at: Adjust to the most recent Autotest.
2136 (AT_CHECK_M4_FILTER): Fix and rename as...
2138 * tests/others.at: Use it.
2140 * config/gmp.m4 (_AC_LIB_GMP): In order to read the content of a
2141 variable in shell scripts, one uses `$'...
2143 2001-10-04 Gary V. Vaughan <gary@gnu.org>
2145 * configure.ac: `rm -f $m4_getopt_h' was lost.
2147 2001-10-04 Gary V. Vaughan <gary@gnu.org>
2149 * configure.ac (TIMESTAMP): Display with AS_BOX at configure
2150 time. Define it for config.h in order to...
2151 * src/main.c (main): ...display the timestamp for --version.
2153 2001-10-04 Akim Demaille <akim@epita.fr>
2155 * modules/gnu.c (m4_regexp_do, m4_patsubst_do): Extracted from
2156 previous builtins `regexp' and `patsubst'.
2157 (regexp, patsubst): Use them.
2158 (eregexp, epatsubst): New builtins.
2159 * doc/m4.texinfo (Patsubst, Regexp): Rename and complete as...
2160 (Epatsubst and Patsubst, Eregexp and Regexp): these.
2161 (Extensions): More info on REs.
2163 2001-10-04 Akim Demaille <akim@epita.fr>
2165 * modules/modtest.c (init_handler): Consistently output to stderr.
2166 (finish_handler): New.
2167 (test): The `if' is an `assert'.
2168 * tests/modules.at: Adjust.
2170 2001-10-04 Akim Demaille <akim@epita.fr>
2172 * m4/utility.c (m4_bad_argc): Detail the mismatches.
2174 2001-10-01 Akim Demaille <akim@epita.fr>
2176 * tests/generate.awk: Tag the tests with `documentation'.
2177 * tests/modules.at (AT_CHECK_M4_MODTEST): New.
2178 Use the make the existing modtest tests more uniform, and complete
2179 the set of possibilities.
2181 2001-10-01 Akim Demaille <akim@epita.fr>
2183 * config/gmp.m4: Consult the user before using GMP: use
2185 * configure.ac: Adjust.
2186 * modules/gmp.c: No protection needed as the module is not built
2189 2001-10-01 Akim Demaille <akim@epita.fr>
2191 * tests/generate.awk: Remove debugging code.
2192 (fatal): Specify the current location.
2194 * m4/debug.c, m4/macro.c, m4/utility.c, modules/format.c,
2195 * modules/gnu.c, modules/m4.c: Use M4ARG.
2197 2001-10-01 Akim Demaille <akim@epita.fr>
2199 * modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE): New.
2200 (m4_regexp_compile): New.
2201 (regexp, patsubst): Use it.
2203 2001-09-30 Gary V. Vaughan <gary@gnu.org>
2205 Reinstate the memory handling improvements from the patch I just
2206 reverted. Relevant ChangeLog entries repeated here:
2208 * m4/module.c (m4_module_remove): New function that holds the core
2209 of the old m4_module_unload.
2210 (m4_module_unload): Use it.
2211 (m4_module_unload_all): When we know the modules will never be
2212 used again (i.e. on exit), free up as much module memory as
2213 possible. There are still some artifacts from resident modules
2214 living inside ltdl.c, but everything else is freed.
2215 * m4/debug.c (m4_debug_exit): Free memory allocated in
2217 * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2218 * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2219 * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2220 * m4/m4module.h: Updated prototypes.
2221 * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2222 * m4/hash.h: Updated prototypes.
2223 * src/main.c (main): Use all these new functions to clean up as
2224 much memory as possible before exit.
2226 2001-09-30 Gary V. Vaughan <gary@gnu.org>
2228 Reverted my large patch for removing the old m4_symbol
2229 structure on 2001-09-20. We are still not happy about the way
2230 trace works in conjunction with defn and undefine, and leaving
2231 the reverted patch active prevents us from moving the traced
2232 bit from the definition back to the symbol.
2234 2001-09-30 Gary V. Vaughan <gary@gnu.org>
2236 * configure.in: Moved to...
2237 * configure.ac: ...here. Added a libtool like timestamped
2238 banner, and tidied up the libltdl cruft.
2239 * config/mkstamp: Script to extract a timestamp from ChangeLog.
2240 * modules/Makefile.am (INCLTDL): Removed. This is required
2241 only when libltdl is configured in a subdirectory.
2242 * src/Makefile.am: Ditto.
2243 (LIBADD_DL): No need to add this again, libtool already knows
2244 that libm4.la depends on it.
2245 * m4/Makefile.am: Automake sets variables from AC_SUBST. Use
2248 * TODO: stackovf.c is basically broken.
2249 Reported by Marc Espie <espie@schutzenberger.liafa.jussieu.fr>
2251 2001-09-28 Akim Demaille <akim@epita.fr>
2253 * tests/Makefile.am (EXTRA_DIST): `m4' is not to be shipped.
2255 2001-09-27 Akim Demaille <akim@epita.fr>
2257 * tests/m4.in: Don't use short options.
2258 Simplify the stderr signature normalization.
2260 2001-09-27 Akim Demaille <akim@epita.fr>
2262 tests/m4 shall be position independent.
2266 * tests/testsuite.at: No args to AT_INIT.
2267 * configure.in, tests/Makefile.am: Adjust.
2269 2001-09-22 Akim Demaille <akim@epita.fr>
2271 Autotest has changed again.
2273 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2274 (package.m4): Remove.
2275 * configure.in: Adjust to LIBADD_GMP.
2277 2001-09-21 Gary V. Vaughan <gary@gnu.org>
2279 * config/gmp.m4 (AC_ARG_WITH): Removed.
2280 (GMP_LIB): Renamed to LIBADD_GMP for consistency.
2281 (AC_LIB_GMP): When performing a test compile against libgmp,
2282 include the header gmp.h if possible, and link against -lgmp. If
2283 they both work define USE_GMP.
2284 * modules/Makefile.am (mpeval_la_LIBADD): Add LIBADD_GMP.
2285 (mpeval_LTX_init_func): Complain on load that there was no libgmp
2288 2001-09-20 Gary V. Vaughan <gary@gnu.org>
2290 * m4/evalparse.c: Moved to...
2291 * modules/evalparse.c: ...here. This code is shared between
2292 modules/mpeval.c and modules/m4.c, so there is no need to pollute
2293 the libm4 API with its details. Moderately rewritten to interface
2294 into its clients more simply.
2295 * m4/eval.c: Deleted. Migrated functionality to...
2296 * modules/m4.c: ...here.
2297 (builtin_eval): Implemented in terms of the new interface style.
2298 * modules/mpeval.c (builtin_mpeval): Ditto.
2299 * m4/m4module.h: Removed references to the former m4/eval.c.
2300 * m4/Makefile.am (libm4_la_SOURCES): Removed eval.c.
2301 (EXTRA_libm4_la_SOURCES): Deleted.
2302 * modules/Makefile.am (EXTRA_m4_la_SOURCES): Reference evalparse.c.
2303 (EXTRA_mpeval_la_SOURCES): Reference evalparse.c.
2305 2001-09-20 Akim Demaille <akim@epita.fr>
2307 * config/gmp.m4 (AM_WITH_GMP): Rename as...
2309 By default, use gmp.
2311 * configure.in: Adjust.
2312 Use Automake conditionals for USE_GMP.
2313 Always compute sizeof (long long int).
2314 This was a bug BTW, as `eval' (not `mpeval') depends on it:
2315 before, it was used _only_ if mpeval was not activated.
2316 * modules/Makefile.am (pkglibexec2dir, +pkglibexec2_LTLIBRARIES)
2317 (mpeval_la_LIBADD): New macros.
2318 * modules/mpeval.c: No longer be conditioned by WITH_GMP.
2320 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Create package.m4.
2321 * tests/atlocal.in, tests/builtins.at: Depend upon USE_GMP, not
2324 2001-09-20 Akim Demaille <akim@epita.fr>
2326 * tests/Makefile.am (package.m4): New.
2327 * tests/testsuite.at: Adjust AT_INIT and AT_VICTIMS.
2329 2001-09-20 Gary V. Vaughan <gary@gnu.org>
2331 More cleanup. After the last patch, m4_symbol holds nothing but
2332 the head of a chain of m4_token_data. So I have removed the old
2333 m4_symbol, so that m4_token_data chains are stored directly in the
2334 value cell of a hash table node. But there's more... m4_symbol
2335 was a more natural name for the symbol value cell, and now that it
2336 is gone I have renamed the former m4_token_data structure to
2337 m4_symbol. This change turned out to be a pig to get right, since
2338 the original code didn't need to modify the value cell itself,
2339 since changing the chain happened inside the m4_symbol that used
2340 to be returned -- I had to pass the address of the value cell
2341 across various function calls, incase the head value changed. I
2342 also tightened up the memory management to help me find a nasty
2343 memory corruption bug that took me all night to track down...
2345 * m4/m4private.h (struct m4_symbol): Removed.
2346 (struct m4_token_data): Renamed to `struct m4_symbol'. Updated
2348 * m4/hash.c (m4_hash_iterator_value): Return the address of the
2349 value cell. Updated all callers.
2350 * m4/symtab.c: Took advantage of the simplification in the data
2351 structures to rewrite a lot of this file more simply. There is
2352 still some room for optimisation here, but we should tackle that
2353 systematically closer to the release.
2355 * m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
2356 revealed. This version is ahead of CVS libtool until I get chance
2357 to flush my changes.
2358 * m4/module.c (m4_module_remove): New function that holds the core
2359 of the old m4_module_unload.
2360 (m4_module_unload): Use it.
2361 (m4_module_unload_all): When we know the modules will never be
2362 used again (i.e. on exit), free up as much module memory as
2363 possible. There are still some artifacts from resident modules
2364 living inside ltdl.c, but everything else is freed.
2365 * m4/debug.c (m4_debug_exit): Free memory allocated in
2367 * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2368 * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2369 * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2370 * m4/m4module.h: Updated prototypes.
2371 * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2372 * m4/hash.h: Updated prototypes.
2373 * src/main.c (main): Use all these new functions to clean up as
2374 much memory as possible before exit.
2376 2001-09-18 Gary V. Vaughan <gary@gnu.org>
2378 The `traced' flag needs to be attached to the definition of a
2379 symbol rather than the current symbol containing the definition.
2380 Implementing this showed up some long standing post 1.4 bugs in
2381 flag propogation which I also fixed.
2383 * m4/m4private.h (struct m4_symbol): Remove the traced flag.
2384 (struct m4_token_data): And add it back in here.
2385 * m4/input.c (init_macro_token): Propogate the traced flag
2387 * m4/macro.c (expand_argument): Ditto.
2388 * tests/builtins.at (trace2, trace3): New tests based on Akim's
2391 2001-09-08 Gary V. Vaughan <gary@gnu.org>
2393 * m4/m4private.h (struct m4_token_data): Simplified by removing
2394 the redundant `traced' flag, and one level of structure nesting.
2395 (M4_TOKEN_DATA_FUNC_TRACED): Removed.
2396 * m4/input.c (init_macro_token): No need to initialise removed
2398 * m4/macro.c (expand_argument): No need to copy it either.
2399 * m4/utility.c (m4_token_data_func_traced): Or provide an access
2402 * m4/hash.c (m4_hash_bucket_insert): Symbol shadowing is no longer
2403 dependant on multiple symbols with the same key, so preserving
2404 relative symbol order in each bucket during resizing is no longer
2405 required. The resize function is considerably faster as a result.
2407 * m4/m4module.h, m4/builtin.c, m4/symtab.c:
2408 s/m4_symbol_insert/m4_symbol_define/g;
2409 s/m4_builtin_insert/m4_builtin_define/g;
2410 s/m4_macro_insert/m4_macro_define/g. Updated all callers.
2412 2001-09-08 Gary V. Vaughan <gary@gnu.org>
2414 Get rid of m4_symbol_lookup_t entirely. With Akim's earlier
2415 commits, the m4_lookup_symbol dispatch function is split into
2416 specialised functions that must be called directly.
2418 * m4/m4module.h (m4_symbol_lookup_t): Removed.
2419 * m4/symtab.c (m4_lookup_symbol): Removed.
2420 (m4_symbol_builtin, m4_symbol_macro): New functions.
2421 * m4/builtin.c (m4_builtin_define): Split into...
2422 (m4_builtin_pushdef, m4_builtin_insert): ...these.
2423 (m4_macro_define): Split into...
2424 (m4_macro_pushdef, m4_macro_insert): ...these.
2425 * src/main.c (main): Set command line macros from `-D' parameters
2426 using `m4_macro_define'.
2428 2001-09-08 Gary V. Vaughan <gary@gnu.org>
2430 * m4/symtab.c (m4_symtab_remove_module_references): Renamed as
2431 this from m4_remove_table_reference_symbols().
2432 * m4/m4module.h, m4/module.c: Updated all references.
2434 2001-09-07 Akim Demaille <akim@epita.fr>
2436 * modules/stdlib.c, modules/times.c: Misc cleanups.
2438 2001-09-07 Akim Demaille <akim@epita.fr>
2440 * configure.in: We now need Autoconf 2.52e.
2441 * m4/m4module.h (m4_symbol_lookup_t): Remove `M4_SYMBOL_POPDEF'
2442 and `M4_SYMBOL_DELETE'.
2443 * m4/symtab.c (m4_lookup_symbol, symtab_debug): Adjust.
2444 * src/main.c (main): Adjust.
2446 2001-09-06 Gary V. Vaughan <gary@gnu.org>
2448 Fix the obstack.h problem once and for all! At configure time we
2449 can test for a system supplied obstack.h: depending on the
2450 result, we now generate system.h with an #include of the correct
2451 header. As a bonus, I've also added a --with-included-obstack,
2452 incase the user doesn't like the system obstack for some
2453 reason... and also we can test the shipped obstack on a system
2454 that has oe of its own. We also now need to be careful to add
2455 build directories to the include search path, since the generated
2456 system.h will be in the build tree.
2458 * configure.in (AC_CONFIG_FILES): Generate system.h from
2460 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Determine whether to
2461 include the system obstack header or the copy shipped with M4.
2462 Allow the user to override configure and force the build to use
2463 the shipped version.
2464 * m4/system-h.in: New file, template for...
2465 * m4/system.h: ...this. Now deleted.
2466 * m4/m4module.h: Include system.h before everything else.
2467 * src/freeze.c: Ditto.
2468 * m4/Makefile.am (dist-hook): Remove generated system.h.
2469 (INCLUDES): Check builddir for generated headers before checking
2471 * modules/Makefile.am (INCLUDES): Ditto.
2472 * src/Makefile.am (INCLUDES): Ditto.
2474 2001-09-05 Gary V. Vaughan <gary@gnu.org>
2476 * TODO: Remove the items that have been addressed already.
2478 2001-09-05 Akim Demaille <akim@epita.fr>
2480 * src/main.c (main): Standardize --version.
2482 2001-09-05 Akim Demaille <akim@epita.fr>
2484 * modules/format.c (format): Have a bigger `str'.
2486 2001-09-05 Akim Demaille <akim@epita.fr>
2488 Rationalize warnings, reporting the macro name as if it were a
2489 program name, and assertions.
2491 * m4/m4module.h (m4_lookup_symbol): Prototype, it is still used.
2493 * m4/symtab.c (m4_lookup_symbol, m4_symbol_popdef)
2495 Use assert for internal errors.
2496 * m4/utility.c (m4_bad_argc, m4_numeric_arg, m4_dump_symbols): Use
2498 * modules/m4.c (undefine, defn, traceon, traceoff, dumpdef): use
2500 * tests/builtins.at (pushpop): Adjust.
2502 2001-09-05 Akim Demaille <akim@epita.fr>
2504 * m4/symtab.c (m4_symbol_insert): Don't use `foo () || bar ()'
2507 2001-09-05 Akim Demaille <akim@epita.fr>
2509 * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_LOOKUP.
2510 * m4/macro.c, m4/symtab.c: Adjust.
2512 2001-09-05 Akim Demaille <akim@epita.fr>
2514 * m4/symtab.c (m4_symbol_popdef, m4_symbol_delete): Rename as...
2515 (m4_symbol_pop, m4_symbol_del): this.
2516 (m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_insert)
2517 (m4_symbol_popdef, m4_symbol_delete): New.
2518 (m4_lookup_symbol): Adjust.
2519 * m4/m4module.h, src/main.c, modules/gnu.c, modules/m4.c: Adjust.
2521 2001-09-05 Akim Demaille <akim@epita.fr>
2523 * m4/m4module.h (m4_symbol_lookup): Rename as...
2524 (m4_symbol_lookup_t): this.
2526 2001-09-05 Akim Demaille <akim@epita.fr>
2528 * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_IGNORE,
2530 * m4/symtab.c (m4_lookup_symbol): Adjust.
2532 2001-09-03 Gary V. Vaughan <gary@gnu.org>
2534 Bootstrap will now work with Libtool 1.4.1 or higher:
2535 * bootstrap: Remove stale autom4te.cache files when
2537 * config/Makefile.am (ACLOCAL_MACROS): Add ltdl.m4 and
2539 * bootstrap: Ignore acinclude.m4 now the we include ltdl.m4 and
2540 libtool.m4 directly.
2541 Run libtoolize to refresh ltmain.sh.
2542 * config/ltmain.sh: Deleted.
2543 * acinclude.m4: Deleted.
2544 * m4/ltdl.c, m4/ltdl.h: Updated from libtool-1.4.1.
2546 * config/debug.m4 (AC_LIBTOOL_COMPILER_OPTION): Provide a fallback
2547 implementation for the cvs impaired libtool user.
2549 2001-09-03 Akim Demaille <akim@epita.fr>
2551 * m4/symtab.c (m4_lookup_symbol): Give more details when reporting
2553 Avoid using `default' in switch, as it hides useful compiler
2554 warnings when a case is forgotten.
2556 2001-09-03 Akim Demaille <akim@epita.fr>
2558 * src/main.c (MODULE_SHORTOPT, MODULEPATH_SHORTOPT): Remove, there
2559 is no such thing as `WITH_MODULES'.
2561 2001-09-03 Akim Demaille <akim@epita.fr>
2563 Improve the test suite's selfcontainedness.
2565 * doc/m4.texinfo: Let `input.m4' be the input file, not `in'.
2566 (Include, Undivert): Tag the other input files.
2567 * tests/generate.awk: Catch `@comment file:'.
2568 `-I $src' is no longer needed.
2569 `next' is really like `return': the rest is skipped.
2570 Adjust to `input.m4'.
2571 (fatal): New function.
2572 * tests/foo, tests/incl.m4: Remove.
2574 2001-09-01 Gary V. Vaughan <gary@gnu.org>
2576 The shadowing mechanism and, infact, the whole symbol table
2577 implementation was creaking under the weight of the features piled
2578 on top of it. We now have a separate hash table module which will
2579 dynamically resize to keep symbol density withing good performace
2580 limits, and a new symtab module layered above it. Symbol lookups
2581 are now marginally more efficient (since the shadowed flag is no
2582 longer required) and symbol removal, such as on module unload, is
2583 considerably faster due to a reorganisation of the data structures
2586 * src/main.c (main): Don't mention `-H'.
2587 * doc/m4.texinfo (Invoking m4): Document that -H no longer has any
2590 * m4/hash.c: New generalised dynamic hash table data structure
2592 * m4/hash.h: Public interface.
2593 * m4/Makefile.am (pkginc_HEADERS): Add hash.h.
2594 (libm4_la_SOURCES): Add hash.c.
2595 * m4/symtab.c: More or less rewritten from scratch, within the
2596 bounds of the previous API.
2597 (m4_symtab_apply): A cleaner version of the old hack_all_symbols
2598 call. Updated all callers.
2599 * m4/m4module.c: #include <m4/hash.h>, and changed all affected
2600 declarations to reflect API changes.
2601 (M4INIT): Generate a declaration too, to avoid the warning with
2602 --enable-debug builds.
2605 * m4/utility.c (hash_table_size): Removed.
2606 (m4_dump_symbols): Rewritten to build and qsort an array of symbol
2607 names, which are then looked up by builtin_dumpdef() as necessary.
2608 This implies a small speedup in builtin_symbols(), which discarded
2609 all of the symbol info under the old call.
2610 * m4/m4private.h (m4_symbol): Removed shadowed flag -- symbol
2611 shadowing is implicit in respect to the new data structures.
2612 symbol names are no longer duplicated here, they are stored in the
2613 key field of the hash table.
2614 Moved macro_args and blind_no_args...
2615 (m4_token_data): ...to here.
2616 m4/macro.c (expand_macro): Added a name argument since the symbol
2617 name is no longer copied into each struct m4_symbol. Modified all
2619 (collect_arguments): Ditto.
2620 * modules/m4.c (set_trace): Ditto.
2621 * modules/gnu.c (builtin_symbols): Updated.
2622 * src/freeze.c (produce_symbol_dump): Much improved in light of
2623 the improved symbol table layout.
2625 2001-09-01 Gary V. Vaughan <gary@gnu.org>
2627 * m4/m4private.h (SYMBOL_NEXT): Move into m4's name space; renamed
2629 (SYMBOL_TRACED): Similarly renamed by prefixing with `M4_'.
2630 (SYMBOL_SHADOWED, SYMBOL_MACRO_ARGS, SYMBOL_BLIND_NO_ARGS,
2631 SYMBOL_NAME, SYMBOL_TYPE, SYMBOL_TEXT, SYMBOL_FUNC,
2632 SYMBOL_HANDLE): Ditto.
2633 * m4/builtin.c, m4/macro.c, m4/symtab.c, m4/utility.c,
2634 modules/gnu.c, modules/m4.c, src/freeze.c,
2635 src/main.c: Updated all references.
2637 * src/Makefile.am (m4_SOURCES): Don't list $(M4OBJS) here, since
2638 Automake 1.5 chokes on dynamic source file lists, Besides, it is
2639 already listed in m4_LDADD... how did that ever used to work?
2640 * configure.in (getopt.h): Use AC_CONFIG_LINKS instead of a manual
2642 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
2643 Suggested by Tim Van Holder <tim.van.holder@pandora.be>
2645 * tests/m4: Don't call the m4 wrapper script with libtool, it
2646 works fine all by itself.
2648 2001-08-30 Gary V. Vaughan <gary@gnu.org>
2650 The experimental `changeword' feature never took off, and has
2651 no obvious advantages over `changesyntax' to compensate the
2652 enormous speed penalty it carries:
2653 * configure.in (ENABLE_CHANGEWORD): Removed.
2654 * m4/m4module.h (m4_set_word_regexp): Removed.
2655 * m4/m4private.h (m4_token_data): Removed original_text field.
2656 * m4/utility.c (m4_token_data_orig_text): Removed.
2657 * m4/input,c: Removed all conditional ENABLE_CHANGEWORD code.
2658 * m4/macro.c: Ditto.
2659 * src/main.c: Ditto.
2660 * modules/Makefile.am (changeword.la): Removed.
2661 * modules/changeword.c: File removed.
2662 * doc/m4.texinfo: References to changeword and --word-regexp
2664 * po/POTFILES.in: modules/changeword.c removed.
2665 * tests/atlocal.in (ENABLE_CHANGEWORD): Removed.
2666 * tests/builtins.at (changeword): Test removed.
2668 2001-08-30 Akim Demaille <akim@epita.fr>
2670 * bootstrap.sh: Create aclocal.m4 instead of modifying it.
2671 This also help having a single list of m4 files: in
2673 * config/Makefile.am (STANDARD_MACROS): Rename as...
2674 (ACLOCAL_MACROS): this.
2675 (list-standard-macros): Remove.
2678 2001-08-29 Gary V. Vaughan <gary@gnu.org>
2680 In an attempt to moderate my egomania...
2681 * tests/modules.at: Remove attributions.
2683 * tests/generate.awk: When making substitutions to "@&t@", either
2684 "&" or "\&" in the substitution string argument to gsub refer back
2685 to the matched text. "@\\&t@" seems to work though, Tests 43 and
2688 2001-08-29 Akim Demaille <akim@epita.fr>
2690 * tests/others.at (changeword, ddivert, debug, esyscmd, exp, gmp)
2691 (include, indir, multiquotes, patsubst, pushdef/popdef, regexp)
2692 (sync-lines, trace, translit, undivert, wrap): Move to...
2693 * tests/builtins.at: this new file.
2694 * tests/others.at (Discard comments, import-environment): Move to...
2695 * tests/options.at: this new file.
2697 2001-08-29 Akim Demaille <akim@epita.fr>
2699 * tests/others.at (Freezing modules)
2700 (--module-directory: absolute path, modpath2, modpath3)
2701 (M4MODPATH: absolute path, modtest, shadow, unload): Move to...
2702 * tests/modules.at: here, new file.
2703 * tests/others.at, tests/generate.awk: Add a banner.
2704 * tests/testsuite.at: Adjust.
2705 (AT_CHECK_M4_FILTER): New, but unused.
2707 2001-08-29 Akim Demaille <akim@epita.fr>
2709 * tests/testsuite.at (AT_CHECK_M4): Don't pass -I, let the tests
2711 * tests/others.at (wrap): Inline wrap.m4.
2712 (shadow): Inline shadow.m4.
2713 (iso8859): Don't specify the path from top_srcdir, but from srcdir.
2714 * tests/m4: Simplify.
2716 2001-08-29 Akim Demaille <akim@epita.fr>
2718 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Use autom4te's
2721 2001-08-29 Akim Demaille <akim@epita.fr>
2723 * tests/generate.awk (normalize): s/@__@/@&t@/.
2725 2001-08-28 Akim Demaille <akim@epita.fr>
2727 * examples/indir.m4, tests/others.at (indir): s/nonsens/nonsense/.
2729 2001-08-28 Gary V. Vaughan <gary@gnu.org>
2731 * bootstrap (generate.awk): Generate test cases with new script.
2733 2001-08-27 Akim Demaille <akim@epita.fr>
2735 * tests/Makefile.am (installcheck-local): Don't use
2736 `dc_install_base' which is not visible here, but `exec_prefix'
2737 which is clearly the RT anyway.
2738 * tests/testsuite.at (AT_CHECK_M4): Don't pass -M here since it is
2739 related to testing a now installed m4.
2740 * tests/m4: Do it here.
2742 2001-08-27 Akim Demaille <akim@epita.fr>
2744 * tests/others.at (indir): Formatting change.
2746 2001-08-27 Akim Demaille <akim@epita.fr>
2748 * tests/Makefile.am (installcheck-local): New.
2749 * tests/testsuite.at (AT_CHECK_M4): Pass `-b' so that C-c works on
2751 Prefer options over envvars.
2752 * src/main.c (main): First bug caught by the test suite (yeah!):
2753 --batch lacked a `break' which resulted in an accidental
2754 invocation of --discard-comments.
2756 2001-08-27 Akim Demaille <akim@epita.fr>
2758 * tests/others.at (capitalize, changeword, comments, ddivert)
2759 (debug, esyscmd, exp, foreach, forloop, fstab, hanoi, include)
2760 (misc, multiquotes, patsubst, pushdef/popdef, regexp, reverse)
2761 (sysv-args, trace, translit, undivert): Don't rely on files in
2762 examples/: AT_DATA them.
2764 2001-08-27 Akim Demaille <akim@epita.fr>
2766 Let the test suite use a wrapper around the not installed m4 to
2767 pretend it is (installed).
2769 * bootstrap (aclocal.m4): Output AC_SUBST's and AM_CONDITIONAL's in
2770 such a way that m4 does not process them.
2771 * configure.in: The package name seems to be `m4', not `M4'.
2773 * tests/atlocal.in (at_package, M4): Remove.
2774 * tests/testsuite.at, tests/others.at: Use m4, not $M4.
2776 2001-08-27 Akim Demaille <akim@epita.fr>
2778 * tests/Makefile.am (CLEANFILES): Remove.
2779 (DISTCLEANFILES, clean-local): New.
2780 * examples/mktests.sh: Remove.
2782 2001-08-27 Akim Demaille <akim@epita.fr>
2784 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2785 Don't use aclocal: it's written by hand.
2786 * aclocal.m4: m4_include all the files instead of being built by
2788 * bootstrap: Help automake find the AC_SUBSTs and AM_CONDITIONALs
2789 until it reads the traces by itself.
2790 * configure.in: Require Autoconf 2.42c as we are now using
2791 AC_CONFIG_TESTDIR instead of AT_CONFIG.
2792 Catch unexpanded `jm_' macros.
2793 * config/atconfig.m4: Remove.
2794 * config/error.m4: new.
2795 * config/Makefile.am: Ship the files included by aclocal.m4.
2796 * tests/Makefile.am (TESTSUITE_SOURCES): Rename as...
2797 (TESTSUITE_AT): this, to please Automake.
2798 (TESTSUITE): This target uses autotest/autotest.m4, not
2799 autotest/general.m4.
2800 * tests/testsuite.at: Prereq Autotest 2.52c.
2801 * examples/Makefile.am (pkgdata_DATA): Rename as...
2802 (dist_pkgdata_DATA): this.
2803 * doc/Makefile.am (man_MANS): Rename as...
2804 (dist_man_mans): this.
2806 2001-08-20 Gary V. Vaughan <gary@gnu.org>
2808 * m4/system.h [cygwin*]: Thanks to Paul Sokolovsky and
2809 Robert Collins, building on Cygwin no longer requires Windows
2810 import and export symbol decorations.
2811 * m4/m4module.h (M4_SCOPE) [cygwin*]: Deleted all occurences.
2812 * m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
2813 * m4/debug.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2814 * m4/error.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2815 * m4/input.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2816 * m4/macro.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2817 * m4/output.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2818 * m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2819 * m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2820 * configure.in (LIBM4_DLL_IMPORT) [cygwin*]: Don't set this
2822 * src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
2823 * modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.
2825 2001-08-20 Gary V. Vaughan <gary@gnu.org>
2827 Ansify the source. Previously we had a mix, where my code was
2828 in a K&R compatible style, and the preexisting code was in ANSI
2829 style. Nothing is lost wrt release 1.4 by reverting to ANSI,
2830 and now the code base is much cleaner.
2832 * m4/system.h: Remove M4_PARAMS macro and all users. Remove
2833 VOID macro and all users.
2834 * m4/m4module.h: Ansify function prototypes and headers.
2835 * m4/builtin.c: Ditto.
2836 * m4/evalparse.c: Ditto.
2837 * m4/input.c: Ditto.
2838 * m4/macro.c: Ditto.
2839 * m4/module.c: Ditto.
2840 * m4/output.c: Ditto.
2842 * m4/symtab.c: Ditto.
2843 * m4/utility.c: Ditto.
2844 * modules/format.c: Ditto.
2845 * modules/gnu.c: Ditto.
2846 * modules/m4.c: Ditto.
2847 * modules/mpeval.c: Ditto.
2848 * src/freeze.c: Ditto.
2850 * src/main.c: Ditto.
2852 2001-08-20 Akim Demaille <akim@epita.fr>
2854 * config/atconfig.m4: s/EOF/ATEOF/, so that configure can be
2855 generated with stock 2.52.
2857 2001-08-20 Akim Demaille <akim@epita.fr>
2859 * config/atconfig.m4: New, until part of Autoconf per se.
2860 * configure.in (AT_CONFIG): Use it.
2862 * tests/mkconfig.sh, tests/atconfig.in, tests/defs: Remove.
2863 * tests/atlocal.in: New.
2864 * tests/generate.awk: For the time being, the empty quadrigraph is
2866 * tests/others.at (changeword, gmp): Check the configuration
2867 variable against `yes'.
2868 * tests/testsuite.at (dnl): Allow it, as it's used all over the
2871 2001-08-20 Akim Demaille <akim@epita.fr>
2873 * m4/utility.c (m4_numeric_arg): Spell out the culprit.
2874 * modules/m4.c (undivert): Disable the possibility of undiverting
2875 several files at once: it is not documented, it is inconsistent
2876 with the other macros, it can be straightforwardly mocked by
2877 several invocations, and most importantly, it prevents the
2878 possibility of other kinds of extension.
2879 Use `m4_numeric_arg'.
2881 2001-08-20 Akim Demaille <akim@epita.fr>
2883 * examples/include.m4: Typo.
2884 * tests/generate.awk: Really add it.
2885 * tests/Makefile.am: Adjust.
2886 * tests/others.at (Discard comments): It sure fails without `-c'.
2887 (include, undivert): Add -I examples/.
2889 2001-08-20 Akim Demaille <akim@epita.fr>
2891 Use sprintf, not ecft and friends since it is standard, portable,
2892 simplifies the code, and since the latter is even deprecated
2893 according to the GNU libc documentation.
2895 * modules/format.c: Drop evct support.
2897 2001-08-19 Gary V. Vaughan <gary@gnu.org>
2899 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Cleaned up. Don't test
2901 * configure.in: ...do it here instead.
2903 * c-boxes.el: Deleted.
2904 * m4/builtin.c: Reformat box comments to be closer to GNU
2906 * m4/debug.c: Ditto.
2908 * m4/evalparse.c: Ditto.
2909 * m4/input.c: Ditto.
2910 * m4/m4module.h: Ditto.
2911 * m4/macro.c: Ditto.
2912 * m4/output.c: Ditto.
2913 * m4/symtab.c: Ditto.
2914 * m4/utility.c: Ditto.
2915 * modules/changeword.c: Ditto.
2916 * modules/format.c: Ditto.
2917 * modules/gnu.c: Ditto.
2918 * modules/load.c: Ditto.
2919 * modules/m4.c: Ditto.
2920 * modules/modtest.c: Ditto.
2921 * modules/mpeval.c: Ditto.
2922 * modules/perl.c: Ditto.
2923 * modules/shadow.c: Ditto.
2924 * modules/stdlib.c: Ditto.
2925 * modules/time.c: Ditto.
2926 * src/freeze.c: Ditto.
2927 * src/main.c: Ditto.
2929 2001-08-17 Gary V. Vaughan <gary@gnu.org>
2931 * m4/module.c: Fixup some errors in the description comment.
2933 2001-08-17 Akim Demaille <akim@epita.fr>
2935 * tests/others.at (iso8859): Specify the path to the M4 test file.
2936 * tests/testsuite.at (AT_CHECK_M4): Normalize the path of input
2937 files in error messages.
2939 2001-08-17 Akim Demaille <akim@epita.fr>
2941 * tests/testsuite.at (AT_CHECK_M4): Anchor M4PATH in $top_srcdir.
2942 * tests/others.at: Adjust input files paths.
2943 * tests/atconfig.in: Set top_builddir.
2944 * tests/Makefile.am: Adjust.
2945 `testsuite' is in src, not build.
2947 2001-08-17 Akim Demaille <akim@epita.fr>
2949 * tests/Makefile.am (EXTRA_DIST): Ship generate.awk.
2950 (generate.at): Install a temporary hack until the actual
2951 generate.awk is added to the repository.
2952 * tests/atconfig.in: New.
2954 2001-08-17 Akim Demaille <akim@epita.fr>
2956 Really apply the patch ``Drop Autoconf 2.13 compatibility.''
2958 2001-08-17 Akim Demaille <akim@epita.fr>
2960 * doc/m4.texinfo: Promote proper quotation.
2962 2001-08-17 Akim Demaille <akim@epita.fr>
2964 Remove the non Autotest tests.
2966 * tests/other-tests/capitalize.test,
2967 * tests/other-tests/changeword.test,
2968 * tests/other-tests/comments.test, tests/other-tests/ddivert.test,
2969 * tests/other-tests/debug.test,
2970 * tests/other-tests/discard-comments.m4,
2971 * tests/other-tests/discard-comments.test,
2972 * tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
2973 * tests/other-tests/foreach.test, tests/other-tests/forloop.test,
2974 * tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
2975 * tests/other-tests/gmp.m4, tests/other-tests/gmp.test,
2976 * tests/other-tests/hanoi.test,
2977 * tests/other-tests/import-environment.m4,
2978 * tests/other-tests/import-environment.test,
2979 * tests/other-tests/include.test, tests/other-tests/indir.test,
2980 * tests/other-tests/iso8859.m4, tests/other-tests/iso8859.test,
2981 * tests/other-tests/misc.test, tests/other-tests/modfreeze.test,
2982 * tests/other-tests/modpath1.test, tests/other-tests/modpath2.test,
2983 * tests/other-tests/modpath3.test, tests/other-tests/modpath4.test,
2984 * tests/other-tests/modtest.test,
2985 * tests/other-tests/multiquotes.test,
2986 * tests/other-tests/patsubst.test, tests/other-tests/pushpop.test,
2987 * tests/other-tests/regexp.test, tests/other-tests/reverse.test,
2988 * tests/other-tests/shadow.test, tests/other-tests/stackovf.test,
2989 * tests/other-tests/sync-lines.m4,
2990 * tests/other-tests/sync-lines.test,
2991 * tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
2992 * tests/other-tests/translit.test, tests/other-tests/undivert.test,
2993 * tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
2994 * tests/other-tests/wrap.test: Remove.
2996 * tests/run-test, tests/get-them: Remove.
2997 * tests/Makefile.am: Adjust.
2999 2001-08-17 Akim Demaille <akim@epita.fr>
3001 others.at no longer depends on other-tests/.
3003 * tests/others.at (stackovf): You're actually...
3005 (modfreeze, modpath1, modpath2, modpath3, modpath4, modtest, shadow)
3006 (unload.test): Keep their authorship.
3007 (discard-comments, gmp, import-environment, modfreeze)
3008 (sync-lines): Embed the input files.
3009 * tests/stackovf.test: Copy from other-tests/stackovf.test.
3010 * tests/iso8850.m4: Copy from other-tests/iso8859.m4.
3012 2001-08-17 Akim Demaille <akim@epita.fr>
3014 * doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
3015 (M4exit): Tag the exit status of the example.
3016 * tests/get-them: Adjust.
3017 * tests/generate.awk: New, based on get-them.
3018 * tests/Makefile.am: Adjust to generate `generated.at'.
3019 * tests/testsuite.at: Adjust.
3020 (AT_CHECK_M4): Don't overquote. Blush...
3022 2001-08-17 Akim Demaille <akim@epita.fr>
3024 Start using Autotest. atconfig creation is still lacking.
3026 * examples/patsubst.m4, modules/modtest.m4, modules/shadow.m4,
3027 * examples/reverse.m4, tests/other-tests/import-environment.m4,
3028 * tests/other-tests/iso8859.m4: Don't produce trailing blanks.
3029 * tests/other-tests/import-environment.test: Don't check LANGUAGE
3030 as it might be `unset', or set to `C'.
3031 * tests/other-tests/iso8859.test, tests/other-tests/modpath1.test,
3032 * tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3033 * tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3034 * tests/other-tests/patsubst.test, tests/other-tests/reverse.test,
3035 * tests/other-tests/shadow.test: Adjust.
3036 * tests/testsuite.at, tests/others.at: New.
3037 * tests/Makefile.am: Adjust.
3039 2001-08-17 Akim Demaille <akim@epita.fr>
3041 Drop Autoconf 2.13 compatibility.
3043 * configure.in (changeword): No need to undefine it, as anyway if
3044 it's defined, M4sugar moved it as m4_changeword.
3045 And anyway, proper quotation is enough.
3046 (m4_pattern_allow): As it exists in 2.50, just use it.
3047 (AC_OUTPUT): Split in AC_CONFIG_FILES and AC_CONFIG_COMMANDS.
3048 Don't handle Gettext's duties, let it handle them.
3049 * config/gnu-obstack.m4: Use m4_pattern_allow directly.
3051 2001-08-17 Akim Demaille <akim@epita.fr>
3053 * modules/m4.c (m4_dumpdef): Output to stderr, not m4_debug.
3054 (m4_errprint): Use fputs.
3055 * doc/m4.texinfo (Invoking m4) <--error-output>: errprint and
3056 dumpdef are not concerned.
3057 (Dumpdef, Errprint): Emphasize their insensitivity to
3059 * doc/Makefile.am: Add `TAGS' support.
3060 (MAINTAINERCLEANFILES): Remove texinfo.tex and mdate-sh which are
3062 * config/Makefile.am (MAINTAINERCLEANFILES): New.
3064 2001-08-17 Akim Demaille <akim@epita.fr>
3066 * modules/Makefile.am (ETAGS_ARGS): New.
3068 2001-08-17 Akim Demaille <akim@epita.fr>
3070 * m4/symtab.c (m4_hack_all_symbols, m4_lookup_symbol): Formatting
3073 2001-08-17 Akim Demaille <akim@epita.fr>
3075 * m4/builtin.c (m4_macro_define): Do not reset SYMBOL_TRACED.
3077 2001-08-17 Akim Demaille <akim@epita.fr>
3079 * m4/m4module.h (m4/list.h): Don't include it.
3081 2001-08-16 Gary V. Vaughan <gary@gnu.org>
3083 m4_modules are no more, we use lt_dlhandles directly and let
3084 latest libltdl features manage the list of loaded modules.
3085 * acinclude.m4: Regenerated.
3086 * m4/ltdl.c: Updated from master copy.
3087 * m4/module.c: Reimplemented to take advantage of advances in
3089 * m4/builtin.c (m4_builtin_find_by_name): Traverse loaded module
3090 list with lt_dlhandle_next.
3091 (m4_builtin_find_by_func): Ditto.
3092 (m4_builtin_table_install): Use lt_dlhandle.
3093 (m4_macro_define): Ditto.
3094 (m4_macro_table_install): Ditto.
3095 m4/module.h: Prototype new module management API.
3096 (m4_modules): No longer required.
3097 (m4_module_init_t, m4_module_finish_t): POSIX namespace
3098 violations, renamed to...
3099 (m4_module_init_func, m4_module_finish_func): ...these,
3101 (M4INIT_HANDLER): Clean way to declare init functions in modules.
3102 (M4FINISH_HANDLER): And similarly for finish functions.
3103 * m4/system.h (_CONC): Used by M4INIT_HANDLER and M4FINISH_HANDLER
3104 -- Add indirection to the CONC macro so that arguments are
3106 * modules/modtest.c (m4_init_module): Replaced with M4INIT_HANDLER.
3107 * modules/shadow.c (m4_init_module): Ditto.
3108 Due to new init function semantics, be careful to perform the
3109 initialisation only on first load.
3110 * modules/perl.c (m4_init_module): Ditto. And Ditto.
3111 (m4_finish_module): Replaced with M4FINISH_HANDLER.
3112 Due to new finish function semantics, be careful to perform the
3113 finalisation only on first load.
3114 * m4/m4private.h (m4_module): Removed in favour of...
3115 (m4_module_data): ...structure without all the wrapper fields.
3116 Instances of this new structure are stored associated lt_dlhandles
3117 with lt_dlcaller_data_set().
3118 * m4/builtin.c (m4_builtin_define): Takes a handle argument
3119 instead of the old module argument.
3120 (m4_builtin_table_install): Ditto.
3121 * modules/load.c (m4_resident_module): Removed. This is no
3122 longer implemented as a magic symbol...
3123 * modules/m4.c (m4_resident_module): Ditto.
3124 * modules/load.c (M4INIT_HANDLER): ...the module init function now
3125 uses the ltdl api to make the module resident.
3126 * modules/m4.c (M4INIT_HANDLER): Ditto.
3127 * modules/load.c (builtin_modules): Traverse the loaded module
3128 list with lt_dlhandle_next.
3129 (builtin_load): Much simplified in light of the reimplemented
3131 * src/freeze.c (produce_module_dump): Cleaned up and optimised in
3132 light of the m4/module.c rewrite.
3133 (produce_symbol_dump): Ditto.
3134 (reload_frozen_state): Ditto.
3135 * m4/list.c, m4/list.h: Files deleted. No longer required.
3136 * m4/Makefile.am (pkginc_HEADERS): Delete list.h reference.
3137 (libm4_la_SOURCES): Delete list.c reference.
3138 * m4/m4private.h (m4_token_data): Add a handle field. This
3139 eliminates many of the searches to find the handle associated with
3140 various tokens that are passed between functions.
3141 (struct m4_symbol): Removed the module field. The
3142 module association does not belong with the symbol...
3143 * m4/input.c (struct m4_builtin): ...it belongs with the builtin
3144 that the module implementation code is from. Added a handle
3146 (m4_push_macro): Add a `handle' argument. Changed all callers.
3147 (init_macro_token): Set the `handle' field for the
3149 * m4/macro.c (expand_argument): Copy the new handle field during
3151 * modules/m4.c (macro_install): Use the new handle field to
3152 optimise the search for the correct builtin structure, and pass
3153 the handle details to m4_builtin_define.
3155 2001-08-15 Akim Demaille <akim@epita.fr>
3157 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Be sure `m4/' exists
3158 when creating `m4/obstack.h'.
3159 * tests/Makefile.am (TESTS_ENVIRONMENT): Pass top_srcdir and
3161 * tests/defs: Make them absolute.
3162 (CDPATH) Neutralize.
3163 * tests/gethem: Use them.
3165 2001-08-14 Gary V. Vaughan <gary@gnu.org>
3167 * config/ltmain.sh: Doh! Import again for a quoting fix that
3168 prevented any regression test from passing.
3170 * m4/m4module.h (obstack.h): Choose between installed version
3171 and shipped version based on configure tests.
3172 * src/freeze.c (obstack.h): Ditto.
3174 * acconfig.h: Removed. No longer required.
3176 * bootstrap: Rewritten to play nicely with Autoconf 2.5x.
3177 * configure.in (MY_NAME, MY_VERSION): Define these once, and feed
3178 them to AC_INIT and AM_INIT_AUTOMAKE.
3179 * Makefile.am (AUTOMAKE_OPTIONS): Remove `gnits' which would
3180 disallow MY_NAME and MY_VERSION arguments to AM_INIT_AUTOMAKE.
3181 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Don't choke on
3182 shell variable m4_cv_func_obstack_h.
3183 * tests/defs (M4): Be more careful about relative path to libtool
3184 script and m4 binary by using $srcdir.
3186 * src/main.c (main): Use lt_dlinsertsearchdir to prepend -M
3187 optargs to the existing libltdl search path.
3188 * acinclude.m4: Regenerate from latest libtool,m4 and ltdl.m4.
3189 * m4/ltdl.c: Updated.
3191 * config/ltmain.sh: Ditto.
3193 2001-08-11 Gary V. Vaughan <gary@gnu.org>
3195 * src/main.c (main): Add `-b' (for `batch') mode switch to force
3196 interactive mode off.
3198 2001-08-10 Akim Demaille <akim@epita.fr>
3200 * configure.in: Require Autoconf 2.52.
3201 (AC_ARG_PROGRAM): Remove, handled by Automake.
3202 (m4_getopt): Rename as...
3203 (m4_getopt_h): this.
3204 Allow the tokens `m4_cv_*', `m4_top_srcdir', and `m4_getopt_h'.
3205 Undefine `changeword' only if defined.
3206 * config/gnu-obstack.m4: Require Autoconf 2.52.
3207 (M4_AC_FUNC_OBSTACK): Rename `m4_obstack' and `m4_obstack_h'.
3210 2001-08-09 Yuji Minejima <ggb01164@nifty.ne.jp>
3212 * doc/m4.texinfo: Fix some typos, and apply some small
3215 2001-08-09 Andreas Schwab <schwab@suse.de>
3217 * src/main.c (main): Fix improper uses of error (missing format
3220 2001-08-07 Akim Demaille <akim@epita.fr>
3222 Improve `make distcheck'.
3224 * configure.in: Be sure to be able to run `mkconfig.sh' when src
3226 * Makefile.am (dist-hook): Remove, as it is no longer needed.
3227 * doc/m4.texinfo (Include): Add missing blank.
3228 * m4/Makefile.am (EXTRA_DIST): Distribute gnu-obstack.h and
3231 2001-08-07 Akim Demaille <akim@epita.fr>
3233 * m4/evalparse.c: A better introductory comment.
3234 * m4/m4module.h (M4_DEBUG_PRINT2): s/M4_debug/m4_debug/.
3235 * m4/macro.c: Adjust old comments.
3236 * modules/README: Typo.
3238 2001-08-07 Akim Demaille <akim@epita.fr>
3240 * config/gnu-obstack.m4: New.
3242 2001-08-07 Akim Demaille <akim@epita.fr>
3244 * config/Makefile.am, config/stackovf.m4: New.
3245 * configure.in, Makefile.am: Adjust.
3247 2001-04-08 Roderick Koehle <Roderick.Koehle@infineon.com>
3249 * modules/format.c (format): Formatting for %f was not
3250 interpreting the position of the decimal point correctly for
3253 2000-12-01 Gary V. Vaughan <gary@gnu.org>
3255 * TODO: Removed m4exit bug.
3256 * modules/load.c (m4_resident_module): Make this module resident.
3257 * module/m4.c (m4_resident_module): Ditto.
3258 * m4/modules.c (m4_module_load): Use new ltdl resident modules
3259 feature to mark modules as resident if they export
3260 `m4_resident_module' as TRUE.
3261 (m4_module_unload): Do not remove resident modules, and take care
3262 with symbol insertion and deletion with resident modules.
3263 * m4/ltdl.c, m4/ltdl.h: Update to latest unreleased versions to
3264 use resident modules feature.
3266 2000-11-30 Gary V. Vaughan <gary@gnu.org>
3268 * TODO: Updated. Removed some cruft that has since been fixed
3269 or implemented. Added some more entries.
3272 * modules/README: Updated.
3273 * doc/m4.texinfo: Updated.
3275 * modules/gnu.c (builtin_functions): Make indir orthogonal to
3276 builtin, in that each is recognised as a macro only with parameters
3277 (builtin_indir): Passing 0 arguments is now an error, as with
3280 * src/main.c (usage): Added missing description of `-c' option.
3282 2000-11-29 Gary V. Vaughan <gary@gnu.org>
3284 Consolidate the myriad of dispersed test scripts into the
3285 tests subdirectory. I think I now have all the file where I
3286 want them, so there shouldn't be anymore upheaval =)O|
3288 * tests/Makefile.am: Updated to run the new tests added below.
3289 * tests/other-tests/capitalize.test, tests/other-tests/comments.test,
3290 tests/other-tests/ddivert.test, tests/other-tests/debug.test,
3291 tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
3292 tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3293 tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3294 tests/other-tests/hanoi.test, tests/other-tests/include.test,
3295 tests/other-tests/indir.test, tests/other-tests/misc.test,
3296 tests/other-tests/modfreeze.test, tests/other-tests/modpath1.test,
3297 tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3298 tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3299 tests/other-tests/multiquotes.test, tests/other-tests/patsubst.test,
3300 tests/other-tests/pushpop.test, tests/other-tests/regexp.test,
3301 tests/other-tests/reverse.test, tests/other-tests/shadow.test,
3302 tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3303 tests/other-tests/translit.test, tests/other-tests/undivert.test,
3304 tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3305 tests/other-tests/wrap.test: New tests based on the contents
3306 of the tests removed below.
3307 * examples/Makefile.am, modules/Makefile.am: Updated to
3308 reflect removed tests.
3309 * examples/defs,modules/defs: Removed.
3310 * examples/capitalize.test, examples/comments.test,
3311 examples/ddivert.test, examples/debug.test,
3312 examples/esyscmd.test, examples/exp.test,
3313 examples/foreach.test, examples/forloop.test,
3314 examples/fstab.test, examples/hanoi.test,
3315 examples/include.test, examples/indir.test,
3316 examples/misc.test, examples/multiquotes.test,
3317 examples/patsubst.test, examples/pushpop.test,
3318 examples/regexp.test, examples/reverse.test,
3319 examples/sysv-args.test, examples/trace.test,
3320 examples/translit.test, examples/undivert.test,
3321 examples/wrap.test, modules/frozen.m4, modules/modfreeze.test,
3322 modules/modpath1.test, modules/modpath2.test,
3323 modules/modpath3.test, modules/modpath4.test,
3324 modules/modtest.test, modules/shadow.test,
3325 modules/unfrozen.m4, modules/unload.test: Removed.
3327 Move the implementation of GMP support for the mpeval() builtin
3328 into a loadable module that depends on libgmp. mpeval() and
3329 eval() share a common parser, now in m4/evalparser.c; the code
3330 in m4/numb.c and m4/numb.h is now physically split between
3331 m4/eval.c (the eval() backend) and modules/mpeval.c (the
3332 mpeval() backend), rather than being differentiated by cpp
3333 macros and multiple inclusion. The mpeval module is always
3334 built but will generate an diagnostic if it is used from an
3335 installation that didn't link in the gmp library.
3336 * modules/Makefile.am: build and install the new mpeval module.
3337 * modules/mpeval.c: Now contains the former parts of m4/numb.c
3338 and m4/numb.h that are required for gmp support in mpeval().
3339 * m4/Makefile.am (libm4_la_SOURCES): Removed evalmp.c.
3340 * m4/evalmp.c: Removed.
3341 * m4/m4module.h: Removed conditional prototype for
3343 * m4/eval.c: Rewritten. Contains the former parts of m4/numb.c
3344 and m4/numb.h that do not rely on gmp.
3345 * m4/evalparse.c: New file, contains the shared parts of the
3346 eval() and evalmp() parser implementations, and is no longer
3347 unencumbered by cpp magic to uncover the right parts.
3348 * m4/numb.h: Removed. It's former contents are split between
3349 m4/eval.c and modules/mpeval.c.
3352 * tests/other-tests/changeword.test: New test. Rudimentary
3353 testing of changeword builtin runs only if --wnable-changeword
3354 was used at configure time.
3355 * tests/mkconfig.sh: Solaris sed (at least) does not parse nested
3356 alternation correctly. Split into two expressions to compensate.
3357 * m4/input.c (m4_input_init): Use m4_ prefix on m4_set_word_regexp.
3358 * modules/Makefile.am: Build changeword module.
3359 * modules/changeword.c (m4_macro_table): Define __m4_changeword__
3360 only when --enable-changeword was passed to configure.
3361 (builtin_changeword): If --enable-changeword was not used, then
3362 report that changeword() builtin has no support in m4 binary.
3364 2000-11-28 Gary V. Vaughan <gary@gnu.org>
3366 * src/main.c (main): Fixed a particularly nasty bug is
3367 user_search_path setting -- the -M flag processing must be
3368 extremely careful with search path ordering, or else the default
3369 installed module directory (possibly containing modules from a
3370 previous release) is placed earlier in the search path than any -M
3371 arguments (which are relied upon to load uninstalled modules with
3372 most of the tests in the regresion suite).
3374 * modules/load.c (builtin_load): Nasty hack to prevent adding
3375 symbols to symtab again if a module is loaded more than once.
3376 * modules/m4.c (builtin_ifelse): removed unused variable argv0.
3378 * m4/symtab.c (m4_remove_table_reference_symbols): Fixed a
3379 possible NULL pointer dereference.
3381 * m4/module.c (m4_module_find_by_modname): Renamed from
3382 m4_module_modname_find. Fixed all references.
3383 (m4_module_find_by_builtin): New function.
3385 * modules/modfreeze.test: load the `load' module with each
3387 * src/freeze.c (produce_frozen_state): Simplified in light of
3388 module field in m4_symbol. Allow a third argument for text macros
3389 to name the originating module.
3390 (reload_frozen_state): ditto.
3391 * m4/m4module.h: Fixup prototypes.
3392 * m4/builtin.h (m4_builtin_define): Add a module argument so
3393 that symbols can be registered against the defining module.
3394 (m4_macro_define): ditto.
3395 * m4/m4private.h (m4_symbol): Make the module field const to save
3396 on casting in the rest of the code.
3397 (SYMBOL_MODULE): New macro.
3399 * m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
3400 symbol reference maintenance bugs when removing a symbol from the
3403 * src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.
3405 2000-11-27 Gary V. Vaughan <gary@gnu.org>
3407 * configure.in (m4_cv_func_obstack): A better check for whether
3408 libc has an obstack implementation.
3409 * m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.
3411 * configure.in (--with-modules): Changed semantics. This
3412 option is now used to list modules to be preopened.
3413 * src/m4.h: #include "ltdl.h" unconditionally.
3414 * src/main.c: Removed all dependencies on WITH_MODULES.
3415 * src/freeze.c: ditto.
3416 * modules/Makefile.am: ditto.
3417 * m4/m4.c (builtin_m4exit): ditto.
3418 * modules/modpath1.test: ditto.
3419 * modules/modpath2.test: ditto.
3420 * modules/modpath3.test: ditto.
3421 * modules/modpath4.test: ditto.
3422 * modules/modtest.test: ditto.
3423 * modules/shadow.test: ditto.
3424 * modules/unload.test: ditto.
3426 * m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
3427 comes up on demand in LTLIBOBJS now.
3428 * configure.in (getopt_long): Creating and relying on a link for
3429 getopt.h on hosts with no getopt_long() of thier own works
3430 correctly now. This is necessary so that callers of getopt_long()
3431 can simply `#include <getopt.h>': the naive way of doing this
3432 would end up using our own getopt.h and the installed
3433 getopt_long(), which is asking for trouble!
3434 (obstack_init): A similar argument applies to obstack.h and
3437 * m4/ltdl.c: Upgraded to latest bleeding edge version again.
3438 On Solaris-2.5 (at least) the native dlopen implementation
3439 gets confused about m4.o when looking for module "m4". This
3440 version always looks for .la an .$lib_ext suffixed names first
3441 to work around the problem. Sigh.
3443 * po/POTFILES.in: Take account of these file movements.
3444 * src/Makefile.am (m4_SOURCES): removed eval.c.
3445 (EXTRA_m4_SOURCES): removed numb.c and numb.h.
3446 * m4/Makefile.am (libm4_la_SOURCES): added eval.c.
3447 (EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
3448 * modules/m4.c (builtin_eval): Use m4_evaluate().
3449 * m4/eval.c: Moved here from src/eval.c to facilitate
3450 implementation of eval() builtin as part of the `m4' loadable
3452 (m4_evaluate): renamed from evaluate for namespace cleanliness.
3453 * m4/numb.c: Moved here from src/numb.c, since it is #included
3454 into eval.c at compile time.
3455 * m4/m4module.h (m4_evaluate): Added prototype.
3456 * src/m4.h (evaluate): Removed prototype.
3458 2000-11-25 Gary V. Vaughan <gary@gnu.org>
3460 * modules/perl.c (builtin_perleval): Use PL_na for
3461 compatibility with perl-5.6.
3463 * src/main.c (main): It is now safe to
3464 ``m4_module_install("m4")'', without tripping over the m4
3466 * m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
3467 versions having fixed the insidious module search order bug.
3469 * m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
3470 supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.
3472 * configure.in: Figure out whether to use the installed
3473 getopt.h or the supplied one.
3474 * src/Makefile.am: ditto.
3476 * po/POTFILES.in: List files in their new positions.
3478 * config/ltmain.sh: This needs to be checked in to match the
3479 libtool macros copied to acinclude.m4 (until a released
3480 libtool copes with m4's needs).
3481 * bootstrap: Run gettextize.
3483 2000-11-24 Gary V. Vaughan <gary@gnu.org>
3485 * AUTHORS: Added my details.
3488 * bootstrap: temporary update until released libtool catches up.
3490 * All files: Use new GNU GPL copyright blurb with current contact
3493 * configure.in (LTLIBOBJS): Use canonical code for calculation of
3496 * config: renamed acm4 directory to config to be more like
3497 other autoconfiscated packages.
3499 * configure.in (M4_AC_CHECK_DEBUGGING): Use it.
3500 * config/debug.m4: New file implementing configure macros to add
3501 suitable debug flags to the compiler invocation.
3503 * modules/load.c: New file implementing the ``load'' and
3504 ``unload'' builtins.
3505 * tests/get-them: Set the module search directory to the modules
3506 build directory in generated tests.
3507 * modules/shadow.test: ditto.
3508 * modules/modtest.test: ditto.
3509 * modules/modpath1.test: ditto.
3510 * modules/modpath2.test: ditto.
3511 * modules/modpath3.test: ditto.
3512 * modules/modpath4.test: ditto.
3513 * modules/modtest.test: ditto.
3514 * modules/modfreeze.test: ditto.
3515 * modules/unload.test: ditto.
3517 * modules/changeword.c: New file implementing the ``changeword''
3518 builtin as a loadable module.
3519 * modules/mpeval.c: New file implementing the ``mpeval'' builtin
3520 as a loadable module.
3522 * src/main.c (main): Load the gnu module if m4 was started
3523 normally -- i.e. without the -G option.
3524 * modules/gnu.c: New file implementing a new loadable module wuth
3525 definitions for all the gnu extension builtins.
3526 * modules/format.c: Moved here from src/format.c. Now included
3529 * src/main.c (main): Load the traditional module if m4 was
3530 started in `no_gnu_extensions' mode.
3531 * modules/traditional.c: New file implementing the ``unix'' macro,
3532 required when m4 is executed in traditional mode, as a loadable
3535 * src/main.c: Renamed from m4.c to avoid confusion with
3537 (main): Always load the m4 module.
3538 * modules/m4.c: New file implementing a new loadable module with
3539 definitions for all m4 builtins that are not gnu extensions.
3541 * m4/Makefile.am: Adjusted to take new files below into account.
3542 * m4/m4module.h: Prototypes for exported functions and types moved
3543 to this directory from the src directory.
3544 * m4/m4private.h: Moved here from src/m4private.h to facilitate
3545 the migration of all builtin implementations to loadable modules.
3546 * m4/macro.c: Moved this file here from the src directory,
3547 renaming all exported symbols to use the prefix ``m4_''.
3548 * m4/builtin.c: ditto.
3549 * m4/module.c: ditto.
3550 * m4/symtab.c: ditto.
3551 * m4/debug.c: ditto.
3552 * m4/input.c: ditto.
3553 * m4/output.c: ditto.
3555 * m4/ltdl.h, m4/ltdl.c: ditto.
3556 * m4/utility.c: Odd functions moved here from files in the src
3557 directory to facilitate builtin migration.
3559 2000-08-12 Gary V. Vaughan <gary@gnu.org>
3561 * src/builtin.c (dump_symbols): Use "Undefined name `%s'" for
3562 error message, to make translators' jobs a little easier.
3563 (builtin_builtin): ditto.
3564 (builtin_traceon): ditto.
3565 (builtin_traceoff): ditto.
3566 Reported by Akim Demaille <akim@epita.fr>
3568 * m4/Makefile.am (pkgincdir): Deleted. Use automake's built in
3569 pkgincludedir instead.
3571 * m4/m4module.h (rquote): Renamed with a prefix of `m4_' since
3572 it is exported globally. Fixed all references.
3576 (DEF_RQUOTE): Renamed with a prefix of `M4_' since it is exported
3577 globally. Fixed all references.
3578 (DEF_LQUOTE): ditto.
3582 2000-07-28 Gary V. Vaughan <gary@gnu.org>
3587 * configure.in (AC_CHECK_FUNCS): added bzero and calloc.
3588 (AC_OUTPUT): touch stamp-h.in, not stamp-h.
3590 * doc/m4.texinfo: Fixed to work with --html option of makeinfo.
3591 Removed `Prev', `Next' and `Up' fields of all @nodes now that
3592 makeinfo calculates them for us, and to make any future
3593 reorganisation easier.
3594 (Frozen files): Document format version 2.
3595 `V' now takes argument `2'.
3596 `F' can take a single argument if symbol and builtin names
3597 are the same, or 3 arguments if the builtin is from a module.
3598 New `S' specification for saving syntax table contents.
3599 New `M' specification for saving loaded module names.
3600 * src/freeze.c: Implement them.
3601 * src/input.c (syntax_code): For interpreting frozen syntax
3604 * examples/Makefile.am: Add the contents of the WWW directory to
3606 * examples/WWW/Makefile: ditto,
3607 (%.htm): Compares file contents (not just sizes) to determine
3608 whether a change has occured.
3609 * examples/WWW/_header.htm: Bumped version number.
3610 * examples/WWW: Regenerated content.
3612 * m4/Makefile.am (AUTOMAKE_OPTIONS): Support for non-ANSI
3613 compilers comes much easier without ansi2knr.
3614 * src/Makefile.am (AUTOMAKE_OPTIONS): ditto.
3616 * m4/list.c: New generic list container type.
3617 * m4/list.h: Interface to new container type.
3618 * m4/Makefile.am (pkginc_HEADERS): Install list.h.
3619 (libm4_la_SOURCES): compile and link list.c.
3620 * src/builtin.c (builtin_tables): Use list container.
3621 * src/module.c (symtab): ditto.
3622 * src/symtab.c (symtab): ditto.
3624 * m4/system.h: New file for common preprocessor definitions.
3625 * m4/Makefile.am (pkginc_HEADERS): install system.h.
3626 * m4/error.c: Use system.h in place of inline preprocessor.
3627 * m4/error.h: ditto.
3628 * m4/module.c: ditto.
3629 * m4/module.h: ditto.
3630 * m4/xmalloc.c: ditto.
3632 * m4/error.h (error_one_per_line): Make M4_GLOBAL_DATA for WIN32
3634 * m4/xmalloc.c (xmalloc_exit_failure): ditto.
3636 * m4module.h (syntax_table): Renamed with a prefix of `m4_' since
3637 it is exported globally. Fixed all references.
3639 (module_init_t): ditto.
3640 (module_finish_t): ditto.
3641 (token_data): ditto.
3642 (SYNTAX_OTHER): Renamed with a prefix of `M4_' since
3643 it is exported globally. Fixed all references.
3644 (SYNTAX_IGNORE): ditto.
3645 (SYNTAX_SPACE): ditto.
3646 (SYNTAX_OPEN): ditto.
3647 (SYNTAX_CLOSE): ditto.
3648 (SYNTAX_COMMA): ditto.
3649 (SYNTAX_DOLLAR): ditto.
3650 (SYNTAX_ACTIVE): ditto.
3651 (SYNTAX_ESCAPE): ditto.
3652 (SYNTAX_ALPHA): ditto.
3653 (SYNTAX_NUM): ditto.
3654 (SYNTAX_ALNUM): ditto.
3655 (SYNTAX_LQUOTE): ditto.
3656 (SYNTAX_RQUOTE): ditto.
3657 (SYNTAX_BCOMM): ditto.
3658 (SYNTAX_ECOMM): ditto.
3659 (SYNTAX_VALUE): ditto.
3660 (SYNTAX_MASKS): ditto.
3678 (TOKEN_NONE): ditto.
3679 (TOKEN_STRING): ditto.
3680 (TOKEN_SPACE): ditto.
3681 (TOKEN_WORD): ditto.
3682 (TOKEN_SIMPLE): ditto.
3683 (TOKEN_MACDEF): ditto.
3685 * m4/m4module.h (voidstar): Removed in favour of `VOID' for
3686 consistency. Fixed all references.
3687 (STRING): Renamed to `m4_string' for consistency, and because if
3688 is exported globally. Fixed all references.
3689 (token_type): Renamed to `m4_token_t' for the same reasons.
3690 (token_data_type): Renamed to `m4_token_data_t' for the same
3693 * m4/m4module.h (XCALLOC): Wrapper macro which handles type
3697 (XFREE): Wrapper macro which avoids freeing NULL pointers.
3699 * m4/m4module.h (m4_macro): New type for module defined user
3701 * modules/modtest.c (m4_macro_table): Define module user macros.
3702 * modules/shadow.c (m4_macro_table): ditto.
3704 * m4/m4module.h (M4BUILTIN_HANDLER): For defining handlers
3705 declared with M4BUILTIN.
3707 * m4/xmalloc.c: Use memset if bzero is not available when
3708 emulating calloc with malloc.
3709 (xcalloc): Fallback to malloc/bzero if calloc is not available.
3710 (xfree): Added for consistency. Will not try to free NULL
3712 * src/m4.c (xfree): Deleted in favour of the above.
3713 * m4/xmalloc.c (WITH_DMALLOC): preprocess away the entire file if
3714 linking with libdmalloc.
3715 * m4/xstrdup.c (WITH_DMALLOC): ditto.
3717 * modules/frozen.m4: New test case.
3718 * modules/unfrozen.m4: ditto.
3719 * modules/modfreeze.test: New test.
3720 * modules/unload.test: ditto.
3721 * modules/Makefile.am (EXTRA_DIST): Distribute them.
3723 * modules/modpath1.test: Don't try this test if module support is
3725 * modules/modpath2.test: ditto.
3726 * modules/modpath3.test: ditto.
3727 * modules/modpath4.test: ditto.
3728 * modules/modtest.test: ditto.
3729 * modules/shadow.test: ditto.
3731 * modules/perl.c: New module.
3732 * modules/perl.m4: Example of using it.
3733 * modules/Makefile.am (perl_la_SOURCES): Build new perl module.
3735 * src/m4.c (main): Assume interactive mode if STDIN is connected
3737 Changed startup sequence slightly so that syntax is not
3738 initialised from here when loading a frozen file.
3740 * src/builtin.c: Much improved macro definition style.
3741 * src/m4private.h: Internal structures for m4_builtin and
3742 m4_macro instances. These are not exposed to module writers.
3743 * src/module.c (module_modname_find): Find a module structure
3745 (make_macro_table): Build an internal macro table from a external
3747 (make_builtin_table): Build an internal builtin table from an
3748 external definition.
3750 * src/module.c (module_unload): Be extremely careful to remove
3751 builtins and macros that match the module being unloaded -- no
3752 longer assume that the top element can be removed incase another
3753 odule defines an identical name.
3754 * src/symtab.c (remove_table_reference_symbols): remove all symbol
3755 table entries which refer to a given builtin table.
3756 * src/builtin.c (remove_tables): Use it!
3758 2000-07-13 Thomas Tanner <tanner@ffii.org>
3760 * Makefile.am (SUBDIRS): we need modules/ for "make dist"
3761 * acm4/modules.m4: deleted
3762 * bootstrap: don't libtoolize libltdl!
3763 * configure.in: AC_SUBST INCLTDL and LIBLTDL, -with-modules flag:
3764 if set, enable WITH_MODULES and add modules to DLPREOPEN
3765 * examples/misc.test: redirect standard output
3766 * lib/Makefile.am: don't use DLLDFLAGS
3767 * lib/m4module.c: include necessary headers to silence GCC -Wall
3768 * lib/m4regex.c: fixes to silence GCC -Wall
3769 * modules/Makefile.am: don't use DLLDFLAGS, add INCLTDL to INCLUDES,
3770 build modules conditionally
3771 * modules/shadow.c: define symbol aliases before using them
3772 * modules/test.c: define symbol aliases before using them
3773 * po/de.po: update translation
3774 * src/Makefile.am: delete pathconf.h, set MODULE_PATH to
3775 pkglibexecdir, don't use DLLDFLAGS, add INCLTDL to INCLUDES and
3777 * src/m4.c: initialize libltdl's preloaded symbols via
3778 LTDL_SET_PRELOADED_SYMBOLS
3779 * src/module.c: libltdl's memory management must be initialized
3780 before calling lt_dlinit!, fix warnings
3782 2000-01-18 Gary V. Vaughan <gary@gnu.org>
3784 * README: Caveat about nls not supported by dll architecture on
3787 * TODO (MODULE SPECIFIC ISSUES): more ideas for the future.
3789 * tests/Makefile.am (stamp-TESTS): now works with VPATH.
3790 * src/Makefile.am (m4_LDADD): use $(builddir) for VPATH.
3791 * modules/Makefile.am (LIBS): ditto.
3792 (INCLUDES): search $(top_srcdir) (for eg. <m4/error.h>) and then
3793 $(top_srcdir)/m4 (for only <m4module.h>).
3794 * modules/shadow.test: fixed for VPATH.
3795 * modules/modtest.test: ditto.
3796 * modules/modpath4.test: ditto.
3797 * modules/modpath3.test: ditto.
3798 * modules/modpath2.test: ditto.
3799 * modules/modpath1.test: ditto.
3801 * modules/time.test: Removed due to timezone dependence,
3802 * modules/Makefile.am (TESTS): Removed time.test.
3804 * configure.in: Use $3 of AC_DEFINE so that we can,,,
3805 * acconfig.h: Remove everything except the gettext parameters.
3806 * acm4/gmp.m4: Add a serial number, and take advantage of $3 of
3808 * acm4/ltdl.m4: Updated to latest from libtool cvs.
3809 * acm4/modules.m4: Remove code which duplicates ltdl.m4 and
3810 increment serial number.
3812 * Makefile.am (SUBDIRS): Moved @MODULES_DIR@ to compile before
3813 src dir and immediately after libm4 is built for confidence that
3814 it doesn't rely on the src directory.
3815 (SUBDIRS): Moved doc dir to the end since helptoman.pl and
3816 makeinfo stop the build on cygwin (because they don't work).
3818 * src/m4.h: use GNU standard #if HAVE_CONFIG_H ideom.
3820 * m4/m4private.h: ...is not a public header, so moved to src.
3821 Add `#include <config.h>', `#define _COMPILING_M4' and
3823 * m4/Makefile.am (noinst_HEADERS): remove m4private.h.
3824 * src/Makefile.am (noinst_HEADERS): add m4private.h.
3825 * src/builtin.c: `#include "m4private.h"' now takes care of the
3826 above. Duplicates removed.
3827 * src/debug.c: ditto.
3828 * src/eval.c: ditto.
3829 * src/evalmp.c: ditto.
3830 * src/format.c: ditto.
3831 * src/freeze.c: ditto.
3832 * src/input.c: ditto.
3834 * src/macro.c: ditto.
3835 * src/module.c: ditto.
3836 * src/numb.h: ditto.
3837 * src/output.c: ditto.
3838 * src/path.c: ditto.
3839 * stackovf.c: ditto.
3842 * po/POTFILES.in: compensate for renaming of lib/*.
3843 * m4/Makefile.am (CLEANFILES): @EXEEXT@ left libtool wrapper behind.
3844 (INCLUDES): Look first in $(top_srcdir) (for eg. <m4/error.h>),
3845 and then in $(top_srcdir)/lib (for eg. "m4private.h").
3846 * src/Makefile.am (m4_LDADD): replace libi/libm4.la with
3848 * m4/m4error.h: Renamed error.h, for installation to
3849 $prefix/include/m4..
3850 * m4/m4obstack.h: Renamed obstack.h, for same reason.
3851 * m4/m4regex.h: Renamed regex.h, for same reason.
3852 * m4/m4error.c: Renamed error.c, and use #include "error.h".
3853 * m4/m4obstack.c: Renamed obstack.c, and fix #includes.
3854 * m4/m4regex.c: Renamed regex.c, and fix #includes.
3856 * lib: moved to m4 to easily support header installation to
3858 * Makefile.am (SUBDIRS): renamed lib dir to m4.
3859 * configure.in (AC_OUTPUT): reference m4/Makefile.in.
3860 * acm4/regex.m4: Point to m4/regex.c.
3862 * examples/foreach.m4: Sanitise quoting.
3863 * examples/foreach.test: New torture test.
3864 From Akim Demaille <akim@epita.fr>
3866 2000-01-17 Gary V. Vaughan <gary@gnu.org>
3868 * src/ltdl.c: Use access() to abort doomed module load attempts
3869 if module file does not exist.
3871 * src/Makefile.am (m4_SOURCES, EXTRA_SOURCES): getopt.o and
3872 getopt1.o will already be used if appropriate, so I moved getopt.c
3873 and getopt1.c from m4_SOURCES to EXTRA_SOURCES.
3875 * modules/modpath1.test: Use correct filename in header line.
3876 * modules/modpath2.test: ditto.
3877 * modules/modpath3.test: ditto.
3878 * modules/modpath4.test: ditto.
3880 Without these changes lt_dlopen("test") attempts to
3881 LoadLibrary("/bin/test") on Windows, which although harmless
3882 generates a spurious error message which spoils most of the tests:
3883 * modules/Makefile.am (EXTRA_DIST): s/test.m4 /modtest.m4 /
3884 (TESTS): s/test.test /modtest.test /
3885 (pkglibexec_LTLIBRARIES): s/test.la /modtest.la /
3886 (test_la_SOURCES, test_la_LDFLAGS): renamed to use modtest.
3887 * modules/modpath1.test: s/test.m4 /modtest.m4 /
3888 * modules/modpath2.test: ditto.
3889 * modules/modpath4.test: ditto.
3890 * modules/modpath3.test: s/-m test /-m modtest /
3891 * modules/shadow.m4: use {un,}loadmodule(`modtest').
3893 2000-01-16 Gary V. Vaughan <gary@gnu.org>
3895 * src/ltdl.c (find_file): Updated to new version with fixed memory
3896 allocation bug in `next'.
3897 * src/ltdl.h: updated to match.
3899 * modules/Makefile.am: Cleaned up and reordered.
3901 2000-01-16 Rene' Seindal <rene@seindal.dk>
3903 * modules/Makefile.am (TESTS): New tests for the module system.
3905 * modules/*.test: New files.
3907 * src/m4.c (main): Added call to module_init().
3908 Treats -M and -m as the arguments -D -U and -t, ie deferred.
3910 * src/m4.h: Added declaration of module_init().
3912 * src/module.c (module_init): No longer static
3914 * modules/Makefile.am ({test,shadow,time,stdlib}_la_LDFLAGS):
3915 Added to shut up automake about non standard libtool library
3918 * src/module.c: Disabled DEBUG by default.
3920 * modules/README: Changed example from unload.m4 to shadow.m4
3922 * modules/shadow.m4: Renamed from unload.m4
3924 * modules/Makefile.am (EXTRA_DIST): Removed unload.m4.
3926 * src/m4.c (main): Functionality for -m and -M were reversed.
3929 2000-01-12 Gary V. Vaughan <gary@gnu.org>
3931 * doc/help2man.pl: updated to version 1.020.
3933 * lib/COPYING.LIB: updated to version 2.1.
3935 * lib/m4module.h: restructure the M4_SCOPE code to work when
3936 creating a dll which links with libm4.la and both DLL_EXPORT
3937 (for the new dll) and LIBM4_DLL_IMPORT (for m4module.h) are
3940 2000-01-11 Gary V. Vaughan <gary@gnu.org>
3942 Merged the following changes from my tree:
3944 1999-06-15 Gary V. Vaughan <gary@gnu.org>
3946 * configure.in (AC_LIBTOOL_WIN32_DLL): Declare that m4 has been
3947 ported to compile shared libs.
3949 * configure.in (LIBM4_DLL_IMPORT): Discover whether we need to
3950 use `__declspec(dllimport)' when linking libm4.la on win32.
3951 * src/Makefile.am (m4_LDFLAGS): Use dllimport if necessary.
3953 * configure.in (M4OBJS): Discover whether we need the shipped
3954 implementation of getopt_long.
3955 * src/Makefile.am (m4_LDADD): Link the getopt objects into the
3956 main binary here, as opposed to the module library in lib/libm4.la.
3958 1999-06-14 Gary V. Vaughan <gary@gnu.org>
3960 * modules/README: Updated to describe the improved libltdl based
3962 * README (cygwin): Added some compilation notes for building m4
3963 correctly under cygwin.
3964 * TODO: Cleaned out the entries for the module system since they
3965 are now implemented.
3967 * *.[ch]: __P is in the compiler's reserved namespace, so replaced
3968 all instances of __P with M4_PARAMS.
3970 * lib/getdate.h: removed unreferenced file.
3972 * lib/m4private.h: New file to define the private interface to the
3973 token_data struct, which must be shared between m4module.c, and
3974 builtin.c but not exported to modules built from the installed
3975 m4module.h since it's size changes depending on compile time
3978 * src/m4.h: Lots of stuff moved to lib/m4module.h.
3980 * lib/m4module.h: New file to define the interface available when
3981 compiling m4 modules.
3982 * lib/m4module.c: Moved parts of builtin.c, and m4.c which are
3983 necessary for module compilation into this new file.
3985 * lib/Makefile.am (include_HEADERS): install headers (renamed to
3986 avoid nameclash with other system headers) necessary for compiling
3988 (libm4_la_SOURCES): always include error.c, obstack.c and regex.c
3989 so that modules can include the (renamed) installed headers and
3990 be guaranteed a matching implementation.
3991 * lib/m4error.h: renamed from error.h.
3992 * lib/m4obstack.h: renamed from obstack.h.
3993 * lib/m4regex.h: renamed from regex.h.
3994 * configure.in (AC_REPLACE_FUNCS): Don't look for a system
3995 implementation, simply include the shipped version
3996 unconditionally, otherwise it is hard for a module to know
3997 whether the m4obstack.h header it is using matches the
3998 implementation it ends up linking against.
3999 (jm_WITH_REGEX): Include regex into libm4 unconditionally for
4002 1999-05-18 Gary V. Vaughan <gary@gnu.org>
4004 * examples/misc.test: Don't run this test on machines which don't
4005 have a root user in /etc/passwd (e.g. cygwin).
4007 * tests/get-them (/^@example$/): Error messages might have a
4008 ``.exe'' suffix to the program name, or else use the libtool
4009 ``.libs/lt-m4'' binary, or generally have an unexpected path. All
4010 of these cases are now catered for when comparing error messages
4012 * tests/other-tests/*.test: ditto.
4013 * examples/*.test: ditto.
4015 * tests/defs (M4): use libtool execute mode.
4016 * examples/defs (M4): ditto.
4018 * tests/get-them (END): explicitly close any open file.
4019 (printthem): In a regular expression, '{' is the start of a repeat
4020 count! Use `[{]' for a literal open brace.
4021 (/^@node /): Don't use substr on a string shorter than the trim
4024 1999-05-17 Gary V. Vaughan <gary@gnu.org>
4026 * configure.in (LTLIBOBJS): calculated from LIBOBJS, and
4028 (AC_LIBTOOL_DLOPEN): declare that this package will use dlopen.
4030 2000-01-10 Andreas Schwab <schwab@suse.de>
4032 * tests/other-tests/gmp.test: Find config.sh in build directory.
4034 * configure.in: Find tests/mkconfig.sh in $srcdir.
4036 * configure.in: Define HAVE_SIGINFO_T if siginfo_t is defined in
4037 <signal.h> (for SUS2 compliant systems).
4039 * src/stackovf.c: Check for HAVE_SIGINFO_T in addition to
4042 2000-01-10 Rene' Seindal <rene@seindal.dk>
4046 * TODO, NEWS: Cleaned up and updated.
4048 * src/m4.c (main): New variable exit_status for exit status in
4049 case of unreadable files. Now m4 will exit with EXIT_FAILURE if a
4050 file cannot be read instead of EXIT_SUCCESS.
4052 * src/builtin.c (m4_indir): Changed error message to help
4053 translators (from Akim Demaille <demaille@inf.enst.fr>).
4055 * lib/obstack.[hc], getopt*.[ch]: Updated to newest version from
4058 * lib/error.[hc], lib/regex.[hc], lib/strtol.c: Updated to version
4061 * src/input.c (match_input): Reordering of code, to avoid multiple
4062 calls to push_string_init() from obstack_grow(), which can happen
4063 with some compilers (found and fixed by James Bonfield
4064 <jkb@mrc-lmb.cam.ac.uk>).
4066 * src/stackovf.c: Added prototypes for ultrix.
4067 (setup_stackovf_trap): Added __P to cast.
4068 (Both reported by John David Anglin <dave@hiauly1.hia.nrc.ca>)
4070 2000-01-09 Rene' Seindal <rene@seindal.dk>
4072 * doc/m4.texinfo (Changequote): Added comment about changing
4073 quotes when the old quote is a part of the new.
4075 * src/builtin.c (expand_ranges): Added break after trailing dash.
4076 This caused misbehavious on some systems (found and fixed by Akim
4077 Demaille <demaille@inf.enst.fr>).
4079 * AUTHORS: Thomas Tanner included
4081 * acconfig.h: Added entry for ss_sp (see below).
4083 * configure.in (use_stackovf): Added check for stack_t with member
4084 ss_base instead of ss_sp (BSDI notably). (Reported by Paul Eggert
4085 <eggert@twinsun.com>).
4087 * doc/m4.texinfo (Frozen files): Added a simpler example for
4088 generating frozen files from several input files.
4090 1999-11-14 Paul Eggert <eggert@twinsun.com>
4092 * po/POTFILES.in: Add lib/getopt.c, lib/obstack.c,
4093 lib/regex.c, lib/xmalloc.c.
4095 1999-11-10 Rene' Seindal <rene@seindal.dk>
4097 * Makefile.am (ACLOCAL_AMFLAGS): Passes -I acm4 to aclocal.
4099 * src/module.c: reindented.
4100 (module_load): return if this is a repeated load of same module.
4101 (module_init): slight change of logic to avoid repeated
4102 initialisation debug messages.
4104 * Makefile.am (DIST_SUBDIRS): Added to ensure modules/ is included
4105 in the distribution.
4107 * modules/Makefile.am (test_la_LDFLAGS): set to -module to silence
4108 automake warnings about missing lib prefix.
4109 (time_la_LDFLAGS): ditto
4110 (stdlib_la_LDFLAGS): ditto
4112 1999-11-10 Paul Eggert <eggert@twinsun.com>
4114 * src/m4.h: Include error.h, since our macros use error.
4115 * src/m4.c: Don't need to include error.h.
4117 1999-11-09 Paul Eggert <eggert@twinsun.com>
4119 * src/m4.h (voidstar): Define to void * if __STDC__ is defined
4120 and zero, as Solaris 7 cc does.
4121 (bcopy): Remove macro; no longer needed with new obstack.h.
4123 * src/output.c (freeze_diversions): Don't assume that a
4124 diversion size can fit in `int'. Check for diversion file
4125 size too large to be printed with `unsigned long'.
4127 * src/Makefile.am (CFLAGS): Omit -Wall.
4129 * src/stackovf.c (setup_stackovf_trap): Remove cast to unsigned.
4131 * src/debug.c (trace_format):
4132 Use ANSI C if (defined __STDC__ && __STDC__) || defined PROTOTYPES.
4134 * src/freeze.c (produce_frozen_state):
4135 Don't assume string lengths fit in int.
4137 1999-10-13 Rene' Seindal <rene@seindal.dk>
4139 * configure.in (ALL_LINGUAS): Added Greek translation (el).
4140 (ALL_LINGUAS): Added Czech translation (cs).
4142 1999-03-30 Gary V. Vaughan <gary@gnu.org>
4144 * src/builtin.c: moved module loading functions into...
4145 * src/module.c: entirely new implementation using libltdl.
4146 * po/POTFILES.in: added src/module.c.
4147 * modules/Makefile.am (LTLIBRARIES): Removed lib prefix as these
4148 are modules, not linktime libraries.
4149 (LDFLAGS): added -no-undefined -module and -avoid-version flags.
4150 * modules/stdlib.c (m4_macro_table): use <name>_LTX collision
4151 avoidance on exported symbols.
4152 * modules/test.c (m4_macro_table, m4_init_module,
4153 m4_finish_module): ditto.
4154 * modules/time.c (m4_macro_table): ditto.
4156 * modules/time2.m4: new file which requires command line loading
4158 * src/m4.c (--load-module): dynamically load named runtime module
4159 into running executable before reading the source.
4160 (--module-directory): prepend a directory to the module search
4162 (module_init()): Do this the first time we load a module instead;
4163 if the module subsystem is broken normal m4 scripts can still run.
4164 * src/m4.h (install_builtin_table): is now exported.
4166 1999-03-26 Gary V. Vaughan <gary@gnu.org>
4168 * src/module.c: removed. No longer required.
4169 * po/POTFILES.in: removed src/module.c.
4171 * Makefile.am (MAINTAINERCLEANFILES): Remove all the files that
4172 the bootstrap script can recreate.
4173 * acm4/Makefile.am (MAINTAINERCLEANFILES): ditto.
4174 * doc/Makefile.am (MAINTAINERCLEANFILES): ditto.
4175 * examples/Makefile.am (MAINTAINERCLEANFILES): ditto.
4176 * lib/Makefile.am (MAINTAINERCLEANFILES): ditto.
4177 (AUTOMAKE_OPTIONS): reduced strictness to allow COPYING.LIB.
4178 * modules/Makefile.am (MAINTAINERCLEANFILES): ditto.
4179 * src/Makefile.am (MAINTAINERCLEANFILES): ditto.
4180 * tests/Makefile.am (MAINTAINERCLEANFILES): ditto.
4182 * acinclude.m4: removed. `aclocal -I acm4' handles this much
4184 * acm4/Makefile.am (ACINCLUDE_M4): ditto.
4185 * acm4/gettext.m4: removed. It causes a multiple definition vs.
4186 the installed gettext.m4 file when running aclocal.
4188 1999-03-25 Gary V. Vaughan <gary@gnu.org>
4190 * configure.in (AM_INIT_AUTOMAKE): bumped version number to
4191 distinguish this from the last prerelease.
4192 (AC_LIBLTDL_CONVENIENCE): build libltdl as a convenience library
4193 in its own subdirectory.
4195 * modules/Makefile.am (*_SOURCES): renamed to use libtool's "no
4196 lib prefix on a module" feature.
4197 (LDFLAGS): Added `-module -avoid-version' flags to build
4198 versionless module libraries.
4199 * src/builtin.c (m4_load_module): use libltdl.
4200 (module_unload_all): use libltdl.
4201 * src/m4.c (module_init): initialise module loading on demand for
4202 better diagnostics, and so that m4 will still work even if
4203 the module code is broken.
4204 * src/m4.h (module_init): removed. No longer relevant.
4205 * modules/stdlib.c (m4_macro_table): use stdlib_LTX_ prefix on
4206 exported symbols for compatibility with dlpreopening.
4207 * modules/test.c (m4_macro_table, m4_init_module,
4208 m4_finish_module): ditto.
4209 * modules/time.c (m4_macro_table): ditto.
4211 * bootstrap: New file. Runs all the autoutils in the right order
4212 after a fresh checkout, or a make maintainer-clean.
4214 1999-02-18 Akim Demaille <demaille@inf.enst.fr>
4216 * src/builtin.c (dump_symbols): New function, factoring common
4217 content of m4_dumpdef and m4_symbols.
4218 (m4_dumpdef): Use it.
4219 (m4_symbols): New function, implementing `symbols'. Use it.
4220 * doc/m4.texinfo: Fixed missing commas after @xref, so that the
4221 file compile with modern makeinfo.
4222 (Symbols): New node, documenting symbols.
4223 (direntry): Modernize.
4225 1998-12-11 Rene' Seindal <rene@seindal.dk>
4227 * src/builtin.c (predefined_tab): New predefined macros
4228 __m4_changeword__, __m4_gmp__ and __m4_modules__ for testing for
4229 configure time options.
4231 1998-12-01 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4233 * src/module.c (module_try_load): Don't try to be clever and
4234 overwrite argument string. Instead allocate all constructed
4235 strings locally, since they can have arbitrary lengths. Make
4236 arguments pointers to const.
4237 (module_search): Simplify due to above change.
4239 1998-11-29 Rene' Seindal <rene@seindal.dk>
4243 * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): New tests.
4245 * tests/other-tests/import-environment.{m4,test}: New test.
4247 * tests/other-tests/discard-comments.{m4,test}: New test.
4249 * doc/m4.texinfo (Invoking m4): Updated for --discard-comments.
4251 * src/m4.c (main): New option -c --discard-comments.
4252 New global variable discard_comments.
4254 * src/m4.h (token_type): New TOKEN_NONE for tokens to be
4255 discarded, ie never returned from next_token().
4256 Added declaration of discard_comments.
4258 * src/input.c (next_token): Now loops until token type is not
4259 TOKEN_NONE. Comments are now given this type when comments should
4262 * doc/m4.texinfo (Invoking m4): Updated for --import-environment
4265 1998-11-28 Rene' Seindal <rene@seindal.dk>
4267 * src/m4.c (main): New option --import-environment (no single
4270 * When configured with --with-gmp both the normal (fast) eval()
4271 and the gmp aware mpeval() are defined. To restore previous
4272 bahaviour use "define(`eval', defn(`mpeval'))".
4274 * tests/other-tests/gmp.m4: Changed to use mpeval().
4276 * src/evalmp.c: New file for compiling eval.c as gmp aware.
4277 Just defines USE_GMP if WITH_GMP is defined and includes eval.c.
4279 * src/eval.c: Now includes "numb.c" directly. Everything in this
4280 file must by static, except evaluate(), which is changed to
4281 mp_evaluate() if USE_GMP in force.
4283 * src/numb.c: Changed to be included by eval.c instead of being
4284 compiled separately. Everything is declared static.
4286 * src/numb.h: Removed declarations of functions, as numb.c is now
4289 * src/builtin.c: Declaration of m4_mpeval() added.
4290 Inserted `mpeval' in builtin table.
4291 (do_eval): New function with common code for m4_eval and m4_mpeval.
4292 (m4_mpeval): New function for gmp version of eval.
4294 * src/m4.h: Declaration of mp_evaluate().
4296 * src/Makefile.am (m4_SOUCES): Includes mpeval.c.
4297 (EXTRA_m4_SOURCES): Now has numb.c and numb.h
4299 * src/m4.c (main): m4 --version also shows which options were used
4300 for compilation, such as: "GNU m4 1.4n (options: modules gmp)"
4302 1998-11-27 Rene' Seindal <rene@seindal.dk>
4304 * Error messages now always print program name before input file
4305 name as specified by GNU coding standards. Reported by Akim
4306 Demaille <demaille@inf.enst.fr>.
4308 * doc/m4.texinfo (Include): Change due to changed error message
4312 * tests/get-them: Minor change to sed script due to changed error
4315 * src/m4.c (print_program_name): New func used to print program
4316 name, input file and line number in error (). Used as an
4317 error_print_progname handler.
4318 (reference_error): Removed.
4319 (main): Assigns error_print_progname.
4321 * src/m4.h (M4ERROR): Removed reference_error ().
4323 1998-11-25 Rene' Seindal <rene@seindal.dk>
4325 * Updated to libtool 1.2b.
4327 * src/builtin.c (install_builtin_table): Added braces to avoid
4328 warning of ambiguous 'else'.
4330 * src/module.c: Inserted search path code from path.c modified to
4332 (module_init): Configured default path used only if M4MODPATH is
4334 (module_try_load): Now reads libMODULE.la as generated by libtool
4335 for actual module name.
4336 (module_load): Gives better error messages on failure.
4338 * src/m4.h: Added declarations of structures and functions for
4339 generic search path handling.
4341 * src/path.c: Removed all module specific code and introduced new
4342 functions of more generic search path handling.
4344 1998-11-24 Rene' Seindal <rene@seindal.dk>
4346 * configure.in: Defines INTLINCL to -I$(top_srcdir)/intl if using
4347 included gettext, as <libintl.h> might not be found
4348 otherwise. Reported by Andrew Bettison <andrewb@zip.com.au>.
4350 1998-11-22 Rene' Seindal <rene@seindal.dk>
4352 * src/output.c (insert_diversion): Fixed bug that might cause m4
4353 to read from standard output! Triggered by input
4354 'divert(1)undivert(0)'. Test for divnum>0 changed to divnum>=0,
4355 so now 'undivert(0)' does nothing.
4357 1998-11-18 Rene' Seindal <rene@seindal.dk>
4361 * src/input.c (set_word_regexp): Fixed a bug, where word_regexp
4362 could be changed when compiling a illegal regexp, causing later
4363 use of the regexp to dump core.
4365 * src/module.c (module_load): Changed error message to conform to
4368 * src/m4.c (usage): Added message about reporting bugs.
4370 * doc/m4.texinfo (Changeword): Corrected a wrong example.
4371 (Changeword): Added note about the type of regexps used.
4373 * ltconfig, ltmain.sh: New files from Libtool 1.2.
4375 * configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
4376 and AM_PROG_LIBTOOL.
4378 * acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
4381 * modules/Makefile.am: Changed completely to compile modules using
4382 libtool. The modules are compiled as shared libraries, and are
4383 renamed when installed.
4385 * src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
4386 USE_SHL_LOAD to HAVE_SHL_LOAD
4388 * src/builtin.c (shipout_string): Now tests for a NULL string.
4390 * src/module.c: New level of indirection around non-portable
4391 functions to load shared objects. Intended to encapsulate the non
4392 portable parts better and to reduce the number of #ifdefs in the
4395 * Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
4396 directory modules/ to the distribution.
4398 1998-11-15 Rene' Seindal <rene@seindal.dk>
4402 * modules/stdlib.c: New module `stdlib' defining some standard
4403 functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
4404 getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.
4406 * src/builtin.c (shipout_string): New convenience function for
4407 builtins and modules.
4409 * src/module.c (module_load): Tentative support for
4410 shl_load/shl_findsym, but I cannot test it. Copied from MetaHTML.
4412 * Makefile.am (SUBDIRS): Directory modules added if configured.
4414 * modules/Makefile.am: Now correctly compiles and installs
4415 modules in pkglibexecdir.
4417 * src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
4418 These two are now initialised by autoconf macros.
4420 * src/path.c (module_env_init): MODULE_PATH is always on the
4423 * src/Makefile.am: Now generated pathconf.h which defined the
4424 default MODULE_PATH.
4426 * configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
4427 where modules are installed.
4429 * acm4/modules.m4: Enhanced with code from MetaHTML, contributed
4430 by Brian J. Fox <bfox@datawave.net>. This change allow modules to
4431 build and install automatically, and it is prepared for other
4432 interfacec than dlopen().
4434 * src/builtin.c (predefined_tab): Added __m4_version__ for the
4435 current version of GNU m4. It is a GNU extension.
4437 1998-11-14 Rene' Seindal <rene@seindal.dk>
4439 * tests/Makefile.am (GENERATED_TESTS): Added new
4440 generated-tests/changesy.8.test
4442 * doc/m4.texinfo (Changesyntax): Documentation for escape
4445 * src/macro.c (expand_token): Check for escaped macro call before
4446 symbol table lookup.
4448 * src/builtin.c (m4_changesyntax): Added `@' flag to define escape
4451 * src/input.c: New static variable use_macro_escape, which is TRUE
4452 iff some character has code SYNTAX_ESCAPE
4453 (input_init): Added initialisation of use_macro_escape.
4454 (check_use_macro_escape): New function to synchronise
4455 use_macro_escape with the syntax table.
4456 (set_quotes): Added call to check_use_macro_escape()
4459 (next_token): Added new case for IS_ESCAPE.
4461 * src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.
4463 1998-10-13 René Seindal <rene@seindal.dk>
4467 * tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
4470 * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
4471 maintained tests in tests/other-tests. These currently tests for
4472 8-bit transparency, multiple precision arithmetic and sync-line
4473 output. Test for stackoverflow detection does not work.
4475 * examples/Makefile.am (TESTS): Added tests for all example files.
4477 * examples/mktests.sh: New file. Help program for creating test
4480 * tests/mkconfig.sh: New file to generate tests/config.m4 and
4481 tests/config.sh. This is for tests of configure selectable
4482 features. Picks up all set WITH_ and ENABLE_ veriables from
4485 * src/path.c (path_search): Added argument 'char **expanded_name'
4486 to return the expanded name.
4488 * src/m4.h: Added 2nd argument to declaration of path_search().
4490 * src/m4.c (main): Added 2nd argument to path_search().
4492 * src/freeze.c (reload_frozen_state): Do.
4494 * src/builtin.c (m4_undivert): Do.
4497 1998-10-11 René Seindal <rene@seindal.dk>
4499 * acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4
4501 * acm4/modules.m4: New file. Defines AM_WITH_MODULES.
4503 * acm4/gmp.m4: New file. Defines AM_WITH_GMP.
4505 * configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.
4507 * AUTHORS, ChangeLog: Changed all dates to ISO 8601.
4509 * intl/: Updated to GNU gettext 0.10.35.
4511 * doc/m4.texinfo (Format): Documented that format is blind.
4513 * src/builtin.c (builtin_tab): Builtin format marked as blind.
4515 1998-10-07 René Seindal <rene@seindal.dk>
4519 * tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
4520 .test, as the files are no longer just m4 input.
4522 * tests/get-them (FILE): Changed .m4 extension to .test.
4524 * src/m4.h (token_type): New token type TOKEN_SPACE introduced.
4525 Otherwise quoted strings with leading whitespace first in a macro
4526 argument would be eliminated.
4528 * src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
4529 (expand_argument): Do.
4531 * src/input.c (next_token): SPACE and NUM/OTHER characters are only
4532 grouped together iff both quote and comment strings are single
4533 character. Otherwise they might include a comment/quote leader.
4534 (next_token): Returns new token type TOKEN_SPACE.
4536 * src/builtin.c (push_builtin_table): New function to push a
4537 builtin_table on the stack without installing its contents.
4538 (find_builtin_by_name): Added call to push_builtin_table() if
4539 reading frozen files. Otherwise the builtins named in the frozen
4540 files could not be found.
4541 (install_builtin_table): Changed to use push_builtin_table()
4543 1998-10-04 René Seindal <rene@seindal.dk>
4547 * configure.in (ALL_LINGUAS): Added Polish pl.po
4549 1998-10-03 René Seindal <rene@seindal.dk>
4551 * Many files: Incorporated changes to implement dynamic modules.
4552 Detailed comments in src/modules.c and modules/README
4554 * src/module.c: New file, implements the OS dependant parts of
4555 dynamic module loading.
4557 * src/Makefile.am (m4_SOURCES): Added module.c
4559 * src/builtin.h: New file, declares some functions from builtin.c
4560 that are of use for other modules (shipout_int, numeric_arg,
4561 skip_space, bad_argc), and the macros ARG() and DECLARE().
4563 * src/builtin.c (install_builtin_table): New function. Each
4564 module brings in a builtin_table, which is pushed on a stack.
4565 (struct builtin_table): New struct for list of builtin_tables.
4566 (m4_loadmodule): New function to implement builtin "loadmodule".
4567 (shipout_int): No longer static, to be used by modules.
4571 (builtin_init): changed to call install_builtin_table()
4572 (find_builtin_by_name): Now searches all builtin_tables
4573 (find_builtin_by_addr): do.
4575 * src/path.c: Reorganised to allow for two search paths, one for
4576 include files and one for modules.
4578 * src/m4.h: Added declarations for new functions in module.c and
4581 * src/m4.c (main): Added call to module_init().
4583 * modules: New directory with a few demo modules.
4585 * Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
4588 * configure.in: Added modules/Makefile to AC_OUTPUT.
4590 * configure.in: Added code to implement --with-modules. Tests for
4593 * acconfig.h: Added WITH_MODULES
4595 1998-10-02 René Seindal <rene@seindal.dk>
4597 * examples/Makefile.am (pkgdata_DATA): Removed special target for
4598 check and variables TESTS. These tests are now run from the
4601 * tests/Makefile.am (OTHER_TESTS): Added tests from the example/
4602 directory. The files stay there but the tests are run from the
4605 * tests/Makefile.am (EXTRA_DIST): Added run-test.
4607 * tests/run-test: New file. Run a test manually
4609 * tests/Makefile.am, tests/get_them: Moved automatically generated
4610 tests (from the manual) to sub directory tests/gentest/. The
4611 tests/ directory had gotten a bit messy.
4613 1998-09-06 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4615 * examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
4616 wrap}.test: Added a few testcases.
4618 1998-08-21 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4622 * lib/Makefile.am (noinst_HEADERS): regex.h added
4624 * configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
4625 acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
4627 * acm4/Makefile.am: created providing rules to create
4628 $(top_srcdir)/acinclude.m4 to be used by aclocal.
4630 * tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
4631 `C'. Reported by Ulrich Drepper.
4633 * Makefile.am (SUBDIRS): Removed checks directory
4634 * configure.in (AC_OUTPUT): Removed checks/Makefile
4636 * doc/m4.texinfo (Patsubst,example): @comment added to preserve
4637 the space when m4.texinfo is edited and whitespace.el is active.
4638 (Defn,example): idem.
4640 1998-08-20 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4642 * doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
4643 ../COPYING. ../Makefile is a file which is certainly present when
4644 test is executed in testSubDir. One can't be sure that the COPYING
4645 file is in .. or ../.. in all situations, the ../Makefile is
4648 * doc/m4.texinfo (Include): adjusted expected test output
4649 according to new tests, i.e. the input will always come from the
4650 file `in' created by the test.
4652 * tests/Makefile.am: Added three lines at the top to get
4653 esyscmd.1.test working.
4655 * tests/get-them: modified to generate clearer tests who will need
4656 less maintenance when new test examples are created in
4657 `doc/m4.texinfo'. All tests are small (nearly stand-alone, they
4658 need the generic file `defs') shell scripts creating `in', `ok',
4659 `out' and when apropriate `okerr' and `err' in the directory
4660 `testSubDir' when executed. The compare of `ok' and `out'
4661 (and of `okerr' and `err') will be the exit status of the test.
4662 `out' must match `ok' (and `okerr' must match `err') for the test
4665 * tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
4666 the tests generated by tests/get-them getting it input normally
4667 from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
4668 (dot) before the numeric part) is reserved for all other (hand
4669 written) tests. The `+' means one or more times.
4671 1998-08-12 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4673 * doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
4674 supported short man page to refer to info documentation
4675 * helptoman.pl: added
4676 * configure.in: AC_PATH_PROG(PERL,perl)
4677 * Makefile.am (SUBDIRS): doc after src
4679 * libitized with libit 0.5 from
4680 ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
4682 * configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
4683 * lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
4684 replacement functions, (libm4_a_LIBADD): @LIBOBJS@
4685 * configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
4687 * configure.in (AC_CHECK_FUNC): getopt_long
4689 * src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
4691 * TODO: added entry about dependencies
4693 1998-08-10 René Seindal <rene@seindal.dk>
4697 * doc/m4.texinfo (Changesyntax): Added documentation for the macro
4700 * src/builtin.c (m4_changesyntax): Added builtin macro
4701 "changesyntax" to modify the syntax table.
4703 * src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
4704 table. All categories are assigned a syntax code and tokens are
4705 read according to this table.
4707 1998-08-09 René Seindal <rene@seindal.dk>
4709 * src/numb.{c,h}: New files, implements multiple precision eval
4710 using GNU gmp. Originally submitted by John Gerard Makecki
4711 (johnm@vlibs.com), later modified. Tested with GNU gmp 2.0.2.
4713 * doc/m4.texinfo (Eval): Added documentation for multiple
4714 precision arithmetic library support.
4716 * src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
4717 to accommodate multiple precision eval.
4719 1998-08-07 René Seindal <rene@seindal.dk>
4721 * src/input.c (MATCH, match_input), src/m4.h: changed definition
4722 of comment and quote strings to `unsigned int' to allow eight bit
4723 chars (reported by andrewb@zip.com.au (Andrew Bettison)).
4725 * src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
4726 patch from Mike Howard <mike@clove.com>
4728 1998-08-06 René Seindal <rene@seindal.dk>
4730 * gettext.m4: corrected AM_WITH_NLS to handle use of installed
4733 1998-08-03 René Seindal <rene@seindal.dk>
4737 * src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
4738 and _ macro. M4 now builds with --disable-nls.
4740 * src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
4741 to look for right message catalogs. Call indef'ed by ENABLE_NLS.
4743 * configure.in (ALL_LINGUAS): Added complete list of translations:
4744 de fr it ja nl ru sv.
4746 1998-05-22 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4750 * src/m4.c: #include <signal.h> not <sys/signal.h>.
4752 * src/Makefile.am: CFLAGS = -Wall @CFLAGS@.
4754 * checks/Makefile.am: explicit list tests in CHECKS.
4756 * configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
4757 src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
4758 mkinstalldirs, install-sh: Added automake (1.3) support.
4760 * lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
4761 obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
4762 Used libitize (0.4) to update.
4764 * configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
4765 (0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
4768 * src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
4769 stack overflow functionality.
4771 1994-12-03 François Pinard <pinard@iro.umontreal.ca>
4775 * Makefile.in (realclean-local): Delete stamp-h.in.
4777 * configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
4778 Localize, adapting from how it is done in sharutils.
4780 * fr.tt: New file, for French.
4782 * configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
4783 src/freeze.c: Rename PRODUCT to PACKAGE.
4785 1994-11-26 François Pinard <pinard@iro.umontreal.ca>
4787 * configure.in: Check for <libintl.h> and <locale.h>.
4788 * src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
4789 src/stackovf.c: Rename _ to __P.
4790 * src/m4.h: Declare _ as a macro returning its argument, or else,
4791 include <libintl.h> and declare _ as gettext.
4792 * src/m4.c: Possibly include <locale.h> and call setlocale.
4793 * src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
4794 src/input.c, src/macro.c, src/output.c, src/path.c,
4795 src/stackovf.c, src/symtab.c: Use _ macro over all localizable
4798 1994-11-07 François Pinard <pinard@iro.umontreal.ca>
4800 * doc/Makefile.in (stamp-vti): Use new -r option to date.
4802 * configure.in: Put --with-gmp in place, in prevision for John
4804 * acconfig.h: Document WITH_GMP.
4806 1994-11-05 François Pinard <pinard@iro.umontreal.ca>
4810 * doc/Makefile.in (realclean): Also remove stamp-vti.
4811 Reported by Eric Backus.
4813 1994-11-02 François Pinard <pinard@iro.umontreal.ca>
4815 * src/freeze.c (produce_frozen_state): If the frozen file cannot
4816 be opened, return immediately after producing the error message.
4817 Reported by Andreas Schwab.
4819 * configure.in: Check for const only after having found possible
4820 ANSIfying compiler flags, this is of no use to check it before.
4821 Reported by Alexander Lehmann.
4823 1994-11-01 François Pinard <pinard@iro.umontreal.ca>
4825 * src/macro.c (collect_arguments): Cast obstack arguments to
4826 (voidstar), so avoiding compiler warnings.
4827 Reported by Joseph E. Sacco.
4829 * src/freeze.c (produce_frozen_state): Cast printed lengths to
4830 (int) so they correspond to %d format items.
4831 Reported by Joseph E. Sacco.
4833 * src/m4.c (main): Cast the argument to xfree to (voidstar).
4834 * src/symtab.c (free_symbol): Idem.
4835 Reported by Karl Vogel.
4837 1994-10-31 François Pinard <pinard@iro.umontreal.ca>
4839 * Makefile.in (DISTFILES): Distribute BACKLOG.
4841 * configure.in: Define PRODUCT and VERSION.
4842 * acconfig.h: Document PRODUCT and VERSION.
4843 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
4844 constant string m4 and variable or parameter named version.
4846 1994-10-30 François Pinard <pinard@iro.umontreal.ca>
4848 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
4849 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
4850 defines __STDC__ to 0, for indicating it is *not* ANSI!
4851 Reported by Kaveh R. Ghazi.
4853 * configure.in: Added obsolescent tests for AIX and Minix.
4855 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
4856 which texclean does not exist anymore.
4857 Reported by Eric Backus, Jim Meyering, John David Anglin and
4860 1994-10-29 François Pinard <pinard@iro.umontreal.ca>
4862 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
4863 Reported by John David Anglin.
4865 * src/ansi2knr.c: New version, sent by Peter Deutsch.
4866 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
4867 ANSI2KNR, depending on the fact the compiler is ANSI or not.
4868 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
4869 Remove the sed filter after ansi2knr for debug.c. Use $O instead
4870 of $U, put underline in extensions rather than in basenames. Use
4871 implicit rules, now that regularity makes this possible.
4872 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
4873 of ansi2knr whenever it is needed.
4874 * configure.in: Adjusted for correct STACKOVF substitution.
4875 * src/debug.c (trace_format): When not __STDC__, use (...) as a
4876 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
4877 Reported by David MacKenzie.
4879 * Makefile.in: Remove binprefix. Use transform_name instead.
4880 Reported by David MacKenzie.
4882 * doc/Makefile.in: Create version.texi, use it, clean it.
4883 Reported by Jim Meyering.
4885 1994-10-28 François Pinard <pinard@iro.umontreal.ca>
4887 * Makefile.in (all, install, uninstall): Depend on Makefile.
4889 * Makefile.in: For actions invoking $(MAKE) from within compound
4890 sh statements, exit non-zero if the sub-make fails. Otherwise,
4891 the top-level make may exit successfully when it should fail.
4892 Reported by Jim Kingdon.
4894 * {,/*}Makefile.in: Use && after all cd, in case they fail.
4896 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
4897 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
4898 * configure.in: Substitute PRODUCT and VERSION.
4900 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
4902 1994-10-27 François Pinard <pinard@iro.umontreal.ca>
4904 * Makefile.in (mostlyclean-local): Do not remove *~.
4905 * */Makefile.in (mostlyclean): Idem.
4906 Reported by Robert E. Brown and Richard Stallman.
4908 1994-10-09 François Pinard <pinard@iro.umontreal.ca>
4910 * src/m4.h: Get rid of CONFIG_BROKETS.
4912 1994-10-02 François Pinard <pinard@iro.umontreal.ca>
4914 * configure.in: Use AC_ARG_PROGRAM.
4915 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
4916 Reported by David MacKenzie.
4918 1994-10-01 François Pinard <pinard@iro.umontreal.ca>
4920 * configure.in: Do not add -O to CFLAGS for GNU C, now that
4921 configure does it automatically.
4922 Reported by Jim Meyering.
4924 1994-09-23 François Pinard <pinard@iro.umontreal.ca>
4926 * src/stackovf.c: Declare the handler_t typedef earlier in the
4927 code, use it for stackovf_handler.
4928 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
4929 casting sigsegv_handler.
4930 Reported by Robert Bernstein.
4932 * src/m4.c (main): Initialize program_name to argv[0] without
4934 Reported by Karl Berry.
4936 1994-09-18 François Pinard <pinard@iro.umontreal.ca>
4938 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
4939 Reported by Karl Berry.
4941 1994-09-14 François Pinard <pinard@iro.umontreal.ca>
4943 * lib/Makefile.in (mostlyclean): Added.
4944 (TAGS): Make in $(srcdir).
4946 * configure.in: Use `choke me' in test, like everywhere!
4948 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
4949 unreacheable and useless.
4951 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
4953 * lib/Makefile.in (DISTFILES): Distribute TAGS.
4954 (distclean): Do not remove TAGS.
4955 (realclean): Remove it.
4956 * Makefile.in: Make TAGS in lib also, not just in src.
4957 Reported by Karl Berry.
4959 * Makefile.in (distclean, realclean): Instead of recursively
4960 calling $(MAKE) for the -local part, allow parallel execution of
4961 -recursive and -local, only delay the removal of config.status,
4962 which is repeated in both goals.
4964 1994-09-13 François Pinard <pinard@iro.umontreal.ca>
4968 * Makefile.in: Group all *clean-recursive goals in one, using sed
4969 to remove `-recursive' while calling make recursively. Also, use
4970 a subshell for each recursive $(MAKE).
4971 Reported by Jim Meyering.
4973 * src/m4.h (memcpy): Define with bcopy for BSD systems.
4974 Reported by Kaveh R. Ghazi.
4976 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
4977 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
4980 * configure.in: Use date instead of touch for stamp-h.
4981 * Makefile.in (stamp-h.in): Idem.
4983 * Makefile.in (distclean, realclean): Force serial execution of
4984 both goals, in case parallel makes are being used.
4985 Reported by Jim Meyering.
4987 * src/Makefile.in (DISTFILES): Distribute TAGS.
4988 (distclean): Do not remove TAGS.
4989 (realclean): Remove it.
4990 Reported by Karl Berry.
4992 1994-09-10 François Pinard <pinard@iro.umontreal.ca>
4994 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
4995 to old names, for following Autoconf.
4997 1994-09-08 François Pinard <pinard@iro.umontreal.ca>
4999 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
5000 ./install.sh will not be correctly referred to in sub-Makefiles.
5001 Reported by John David Anglin.
5003 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
5004 Reported by Eric Backus.
5006 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
5007 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
5008 config.status into remaking this directory's Makefile only.
5009 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
5010 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
5011 Reported by Jim Meyering.
5013 1994-09-06 François Pinard <pinard@iro.umontreal.ca>
5015 * configure.in: Correct stack overflow detection logic, taking
5016 care of systems having only incomplete implementations (like for
5017 Pyramid 9820 OSx 5.0d).
5018 Reported by Kaveh R. Ghazi.
5020 * src/Makefile.in (TAGS): Remote -t from etags call.
5022 1994-09-02 François Pinard <pinard@iro.umontreal.ca>
5024 * lib/Makefile.in (install): Depend on all.
5026 1994-08-31 François Pinard <pinard@iro.umontreal.ca>
5028 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
5029 Reported by Jim Meyering and John David Anglin.
5031 * Makefile.in (distclean-local): Delete config.log.
5032 Reported by Jim Meyering.
5034 Solidify frozen files with respect to -P:
5035 * src/m4.c: Have -P set prefix_all_buitins variable instead of
5036 calling a function by that name. Declare the variable.
5037 * src/m4.h: Adjust declaration for prefix_all_buitins.
5038 * src/builtin.c (builtin_init): Merge in functionality from
5039 previous prefix_all_buitins function, while making entries in the
5040 symbol table, but not modifying the builtin description itself.
5042 * src/freeze.c (reload_frozen_state): Add a useless `break;',
5043 because *many* compilers do not accept an empty `default:'.
5044 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
5045 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
5047 * configure.in: Use AC_TYPE_SIGNAL.
5048 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
5049 Reported by Robert Bernstein.
5051 * checks/Makefile.in (check): Modify PATH so check-them will find
5052 m4 in the src directory.
5053 * Makefile.in (check): Don't.
5054 Reported by Akiko Matsushita and Jim Meyering.
5056 * src/output.c (make_room_for, output_character_helper): New
5057 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
5058 a per buffer MAXIMUM_BUFFER_SIZE.
5060 * src/output.c (output_text): New function, for optimizing the
5061 output of strings of characters. Use it.
5063 1994-08-30 François Pinard <pinard@iro.umontreal.ca>
5065 * doc, src: New directories reorganizing the distribution.
5066 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
5068 * Makefile.in: Adjusted.
5069 * configure.in: Configure new Makefiles.
5071 * m4.h: Declare STRING typedef. Use it for comment and quote
5072 strings, adjusting all references. (This is the rudiments of a
5073 beginning for the eventual withdrawal of NUL terminated strings.)
5074 * output.c (shipout_text): Accept a length parameter, and use it.
5075 All callers adjusted.
5077 1994-08-29 François Pinard <pinard@iro.umontreal.ca>
5079 * m4.h: Include <unistd.h> if it exists.
5080 * stackovf.c: Don't.
5082 Clean up for current_diversion variable:
5083 * output.c: Move current_diversion from builtin.c.
5084 * m4.h: Declare current_diversion so builtin.c can access it.
5085 * output.c (output_init, make_diversion): Initialize or update
5087 * builtin.c (builtin_init, m4_divert): Leave current_diversion
5090 Remove limit on number of diversions:
5091 * output.c: Replace ndiversion by diversions, declare it.
5092 (output_init): Allocate only diversion 0.
5093 (make_diversion): Allocate new diversions as needed.
5094 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
5095 * m4.c: Still accept -N, but do nothing with it.
5096 Reported by David MacKenzie.
5099 * output.c (freeze_diversions): New function.
5100 * m4.h: Declare freeze_diversions.
5101 * freeze.c: Document frozen file format, revise it, call
5102 freeze_diversions to add diversions to frozen format, and code to
5103 reload them properly.
5104 * m4.c: Do not undivert automatically at end when status being
5105 frozen. Do not call builtin_init when reloading frozen state.
5107 Speed up diversion processing:
5108 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
5109 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
5110 structure and variables, cached variables out of output_diversion,
5111 reallocate_diversion_for and OUTPUT_CHARACTER.
5112 (shipout_text, make_diversion, insert_diversion): Adapted to new
5114 (insert_file): Use better buffering.
5115 Reported by David MacKenzie.
5117 1994-08-28 François Pinard <pinard@iro.umontreal.ca>
5119 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
5120 dist works from another build directory.
5122 1994-08-27 François Pinard <pinard@iro.umontreal.ca>
5124 * symtab.c (hack_all_symbols): Use hash_table_size instead of
5125 constant HASHMAX, for -H option to work better.
5127 * builtin.c (DECLARE): Simplify by using _ ().
5129 * freeze.c: New file.
5130 * Makefile.in: Compile it, distribute it.
5131 * m4.c: Recognize, document and process --freeze-state (-F) and
5132 --reload-state (-R) options. Pass a true flag to builtin_init
5133 only if no reloading some state.
5134 * builtin.c (define_builtin): Remove static specifier.
5135 (find_builtin_by_name): Remove static specifier.
5136 (builtin_init): Accept and obey a flag argument.
5137 * m4.h: Add declarations for freeze.c, changes for builtin.c.
5139 1994-08-24 François Pinard <pinard@iro.umontreal.ca>
5141 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
5144 * configure.in: Implement --with-dmalloc.
5145 * acconfig.h: Document WITH_DMALLOC.
5146 * m4.h: Add code for when WITH_DMALLOC.
5148 1994-08-15 François Pinard <pinard@iro.umontreal.ca>
5150 * m4.c (long_options): Use "error-output", the dash was missing.
5151 Reported by Akiko Matsushita.
5153 1994-08-12 François Pinard <pinard@iro.umontreal.ca>
5155 * m4.h: Include <sys/types.h>.
5156 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
5157 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
5159 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
5161 * builtin.c (dump_args): Declare len as size_t, not int.
5163 * debug.c: Prototype the forward declaration of debug_set_file.
5165 * builtin.c (m4_undivert): Replace div by file, for avoiding the
5166 shadowing of this variable.
5167 * output.c (insert_diversion): Idem.
5169 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
5170 (input_init): Duplicate default quote and comment strings.
5171 (set_quotes): Free previous quote strings in all cases. Duplicate
5172 even default quote strings.
5173 (set_comment): Free previous comment strings in all cases.
5174 Duplicate even default comment strings.
5176 * configure.in: Updated for Autoconf 2.0.
5177 * Makefile.in (distclean-local): Also delete config.cache.
5179 * m4.c (usage): Reorganize the --help output by topic. Include a
5180 description for debugging flags.
5182 1994-07-29 François Pinard <pinard@iro.umontreal.ca>
5184 * configure.in: If sigaction is available and SA_ONSTACK defined,
5185 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
5186 defined, use sigvec. Else don't compile stackovf.c.
5187 * stackovf.c (setup_stackovf_trap): Idem.
5188 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
5191 1994-07-21 François Pinard <pinard@iro.umontreal.ca>
5193 * m4.c (usage): Replace printf par fputs.
5195 1994-07-18 François Pinard <pinard@iro.umontreal.ca>
5199 1994-07-17 François Pinard <pinard@iro.umontreal.ca>
5201 * configure.in: Check for sigaction and sigvec. Add a new delayed
5202 check for RLIMIT_STACK, combine in the checking for getrlimit.
5203 All those things are not universally available.
5204 * stackovf.c: Split setting up the trap handler and catching
5205 signals, for better taking care of various configure outcomes.
5206 * examples/stackovf.sh: Correct a typo.
5207 Reported by Eric Backus, Jim Avera and Jim Meyering.
5209 1994-07-16 François Pinard <pinard@iro.umontreal.ca>
5211 * ansi2knr.c: New version sent by its author, Peter Deutsch.
5213 1994-07-15 François Pinard <pinard@iro.umontreal.ca>
5215 * Makefile.in: Modify so parallel make will not try making
5216 lib/libm4.a twice simultaneously.
5217 Reported by Jim Meyering.
5219 1994-07-14 François Pinard <pinard@iro.umontreal.ca>
5221 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
5222 error message, for when no code possibility exists. Even if this
5223 line is completely #ifdef'ed out, it brings a syntax error.
5224 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
5226 * Makefile.in (install): Have install depend on all too, for lib
5227 to be remade as needed.
5229 * examples/stackovf.sh: Try ksh, bsh and bash for shells
5230 providing ulimit, instead of using only ksh.
5231 Reported by Jim Avera and Joseph E. Sacco.
5233 1994-07-12 François Pinard <pinard@iro.umontreal.ca>
5235 * Makefile.in (check): Have it depend on all instead of m4. In
5236 this way, a change in lib will be detected and processed.
5238 * builtin.c (numeric_arg): Use strtol and verify the conversion,
5239 instead of using sscanf which stops as soon as there is a
5240 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
5241 and divert(1xyzzy) were all accepted without any warning or error
5243 * m4.h: Declare strtol as long if not including stdlib.h.
5244 * configure.in: Check for limits.h, and replace strtol if missing.
5245 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
5246 * lib/strtol.c: New file, from elsewhere.
5247 Reported by Andreas Schwab.
5249 1994-07-07 François Pinard <pinard@iro.umontreal.ca>
5251 * macro.c (expand_macro): Cast value to (boolean) prior to
5252 assigning it to traced.
5253 Reported by Tom McConnell.
5255 * Makefile.in (m4): Always make all in lib first.
5256 Reported by Jim Meyering.
5258 1994-07-06 Jim Avera <jima@netcom.com>
5260 * stackovf.c: Isolated OS-dependent sections; Improved portability,
5261 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
5262 handlers), and a default error message if the fault address is not
5263 available (when neither siginfo.h nor BSD sigcontext are supported).
5264 * configure.in: Changes for stackovf.h: Check for sigcontext,
5265 sigaction, sigstack, and define rlim_t as int if necessary.
5266 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
5267 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
5268 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
5270 1994-07-05 François Pinard <pinard@iro.umontreal.ca>
5272 * configure.in: Use AC_SET_MAKE.
5273 * Makefile.in: Use @SET_MAKE@.
5274 Reported by Jim Meyering.
5276 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
5277 Reported by Ian Taylor.
5279 1994-07-02 François Pinard <pinard@iro.umontreal.ca>
5281 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
5282 because siginfo.h is unrelated to standard headers, and siginfo.h
5283 is already checked for.
5284 Reported by Joseph E. Sacco.
5286 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
5288 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
5291 1994-06-29 François Pinard <pinard@iro.umontreal.ca>
5293 * builtin.c (substitute): Use \& to represent this part of the
5294 string which was matched by the whole regexp, instead of
5295 representing the whole string. Any usage of \0 issues a warning
5296 and acts like \&, it will disappear in some subsequent release.
5298 1994-06-27 François Pinard <pinard@iro.umontreal.ca>
5300 * m4.c: Complete prototype for forwarded declaration of usage.
5302 * input.c (init_macro_token): Correct own reference in error
5303 message. Previous name get_macro_func was referred to instead.
5304 (next_char): Correct own reference in error message. Previous
5305 name advance_input was referred to instead.
5307 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
5308 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
5309 and_term, not_term, logical_not_term, cmp_term, shift_term,
5310 add_term, mult_term, exp_term, unary_term, simple_term): Add
5311 prototype to forwarded declarations. Declare parameter v1 as
5312 eval_t * instead of int *. Same for local variable v2 in dyadic
5313 functions. Same for result in exp_term.
5314 * builtin.c (m4_eval): Declare value as eval_t instead of int.
5315 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
5316 unsigned_eval_t instead of unsigned int. Change casts accordingly.
5317 (shipout_int): Cast first argument of ntoa to eval_t.
5318 Reported by Thorsten Ohl.
5320 * macro.c: Complete the prototypes of forwarded expand_macro and
5322 Reported by Thorsten Ohl.
5324 * m4.h: Define voidstar as void * or char * depending on __STDC__.
5325 The Ultrix 3.1 compiler cannot do much with void pointers.
5327 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
5328 * m4.c (xfree): Replace void * by voidstar.
5329 Reported by Tom McConnell.
5331 * ansi2knr.1: New, from elsewhere.
5332 * Makefile.in (DISTFILES): Distribute ansi2knr.1
5334 * Makefile.in (stamp-h.in): Avoid running ./config.status if
5335 stamp-h does not exist yet. This avoids running it a second time
5336 just after the initial ./configure.
5337 Reported by David MacKenzie and Tom McConnell.
5339 * m4.h: Replace the enum debug_info declaration with a series of
5340 #define's. The Ultrix 3.1 compiler would otherwise need casting
5341 (int) to most references, when used in expressions.
5342 Reported by Tom McConnell.
5344 1994-06-25 François Pinard <pinard@iro.umontreal.ca>
5346 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
5347 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
5348 calls the compiler. Previously, FP_PROTOTYPES was only calling
5349 the preprocessor; by not being subject to CFLAGS, this was
5350 discouraging those flags asking for ANSI compilation.
5351 * acconfig.h: Document HAVE_PROTOTYPES.
5352 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
5353 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
5354 Reported by Eric Backus.
5356 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
5357 from the environment. Default CFLAGS to -g if not set.
5358 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
5359 * lib/Makefile.in: Have CFLAGS substituted from configure.
5360 Reported by Eric Backus and Tom McConnell.
5362 * configure.in: m4_undefine changeword before using AC_ENABLE.
5364 * m4.h: Declare prototypes for error (for ANSI compilers only),
5365 prefix_all_builtins and reference_error.
5366 Reported by Tom McConnell.
5368 * input.c (set_word_regexp): Do not try to initialize the array
5369 test from a string, this does not work with non-ANSI compilers.
5370 Reported by Eric Backus.
5372 * Makefile.in (dist): Clean examples/ before saving it.
5373 (distclean-local): Also remove stamp-h.
5374 Reported by Eric Backus.
5376 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
5378 Reported by Tom McConnell.
5380 * checks/Makefile.in (clean): Depends on mostlyclean.
5381 (mostlyclean): New goal.
5383 1994-06-24 François Pinard <pinard@iro.umontreal.ca>
5385 * Makefile.in (DISTFILES): Distribute install.sh.
5386 * install.sh: New file, copied from elsewhere.
5387 Reported by Assar Westerlund and Kaveh R. Ghazi.
5389 1994-06-23 François Pinard <pinard@iro.umontreal.ca>
5391 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
5392 * acconfig.h: Explain ENABLE_CHANGEWORD.
5394 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
5395 from code provided by Pete Chown]
5396 * m4.h: Add original_text field to u_t variant of union u.
5397 Declare TOKEN_DATA_FUNC macro.
5398 * builtin.c: Declare changeword.
5399 (m4_changeword): New function.
5400 * input.c: Include "regex.h", define variables with word regexps.
5401 (input_init): Initialize the word regexp.
5402 (set_word_regexp): New.
5403 (next_token): Declare local variables, use the previous code if
5404 default_word_regexp is true. Else, match using a new code. Save
5406 * macro.c (expand_token): Ship out original text if not a macro
5408 Reported by Krste Asanovic and Pete Chown.
5410 [These modifs all depend upon ENABLE_CHANGEWORD]
5411 * m4.h: Declare external user_word_regexp.
5412 * m4.c: Declare user_word_regexp, and initialize it from
5413 --word-regexp or -W, or NULL if not specified.
5414 * input.c: Use user_word_regexp if specified, instead of
5415 DEFAULT_WORD_REGEXP.
5417 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
5420 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
5421 * checks/Makefile.in: Empty the suffix list.
5422 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
5424 * m4.c: Declare nesting_limit and initialize it to 250.
5425 Implement -LNUMBER or --nesting-limit=NUMBER to change its
5427 * m4.h: Declare nesting_limit as external.
5428 * macro.c (expand_macro): Stop execution whenever nesting limit
5430 Reported by Bengt Mertensson.
5432 * eval.c (evaluate): Diagnose excess characters in eval input.
5433 Things like `eval(08)' used to return 0 with no diagnostic.
5435 * m4.h: Capitalize first letter of all macro arguments in
5438 * m4.c: Declare warning_status, initialize it to 0. Add new
5439 option -E, or --fatal-warnings, which sets warning_status to
5440 EXIT_FAILURE instead.
5441 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
5442 EXIT_FAILURE if not otherwise done by header files.
5443 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
5444 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
5445 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
5446 argument of all M4ERROR calls.
5447 Reported by Noah Friedman.
5449 * examples/incl-test.m4: Renamed from incl_test.m4.
5450 * examples/include.m4: Include incl-test.m4 instead of
5452 * examples/multiquotes.m4: Renamed from multi-quotes.m.
5454 1994-06-22 François Pinard <pinard@iro.umontreal.ca>
5456 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
5457 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
5458 also tested it on a Sun Sparc workstation running SunOS 4.x.
5460 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
5461 49.format check, abusing a `union values' argument with sprintf
5462 without selecting the proper field. Now, save the formatting type
5463 first, delaying the fetch of the corresponding argument.
5464 Reported by Joseph E. Sacco and Tom Quinn.
5466 * format.c (format): Remove const from char *fmt declaration when
5467 not HAVE_EFGCVT, because a NUL may be forced into it.
5469 * m4.h: Declare atof() when not STDC_HEADERS.
5470 Reported by Joseph E. Sacco.
5472 * Regenerate configure using Autoconf 1.11, this corrects a
5473 problem about an incorrect cpp seting on NeXT 3.1.
5474 Reported by Alexander Lehmann.
5476 1994-06-05 François Pinard <pinard@iro.umontreal.ca>
5478 * m4.h (_): Change argument from `x' to `Args'.
5480 1994-04-22 François Pinard <pinard@iro.umontreal.ca>
5482 * m4.h: Rename Args() to _().
5483 * m4.h: Remove extern specifier from all function declarations.
5485 1994-04-22 Jim Avera <jima@netcom.com>
5487 * stackovf.c: New file implementing stack-overflow detection.
5488 * configure.in: Check for getrlimit, sigaction. If all of
5489 standard headers, getrlimit and sigaction, define USE_STACKOVF and
5490 substitute ${U}stackovf.o for STACKOVF.
5491 * acconfig.h: Declare USE_STACKOVF.
5492 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
5493 * m4.h: Declare setup_stackovf_trap().
5494 * m4.c: Call setup_stackovf_trap().
5495 * tests/stackovf_test.sh: New file.
5497 1994-04-13 François Pinard <pinard@iro.umontreal.ca>
5499 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
5501 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
5503 1994-01-30 <pinard@iro.umontreal.ca>
5505 * m4.h: Remove definition of volatile, not used anymore.
5506 Reported by Jim Meyering and Joseph E. Sacco.
5508 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
5509 of `if ... else /* nothing */' for if macros.
5510 Reported by Jim Meyering.
5512 * builtin.c (m4_regexp): Reorganize the code for avoiding a
5513 warning from gcc about `repl' possibly used before defined.
5514 Reported by Jim Meyering.
5516 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
5517 Reported by Jim Meyering.
5519 1994-01-25 François Pinard <pinard@iro.umontreal.ca>
5521 * m4.h: Move the conditional definition of volatile after the
5522 inclusion of system files, because they may define it first.
5524 1994-01-04 François Pinard <pinard@iro.umontreal.ca>
5526 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
5527 get around a problem with Alpha make seeing a syntax error, there.
5528 Reported by Vern Paxson.
5530 1994-01-03 François Pinard <pinard@iro.umontreal.ca>
5532 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
5533 Reported by Richard Stallman.
5535 1993-12-25 François Pinard <pinard@iro.umontreal.ca>
5537 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
5538 instead of AC_HAVE_FUNCS.
5539 Reported by Noah Friedman.
5541 1993-12-01 François Pinard <pinard@iro.umontreal.ca>
5543 * m4.c: Initialize show_help and show_version to zero.
5545 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
5546 Use them in exit() and usage() calls.
5548 1993-11-27 François Pinard <pinard@iro.umontreal.ca>
5550 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
5551 syserr() macro. Delete errref, add reference_error and M4ERROR.
5552 * m4.c: Replace errref, which was returning an input reference
5553 string, with reference_error, which prints it on standard error.
5554 * builtin.c, output.c: Use errno as second parameter to error,
5555 instead of using syserr() with %s.
5556 * *.c: Use M4ERROR instead of error: no more errref() with %s.
5557 Doing so, the program name appears after the input reference
5558 instead of before, which eases M-x next-error processing.
5560 1993-11-24 François Pinard <pinard@iro.umontreal.ca>
5562 * checks/get-them: Escape braces with backslashes in patterns,
5563 because HPUX-9.01 awk needs this.
5564 Reported by Jim Meyering.
5566 1993-11-22 François Pinard <pinard@iro.umontreal.ca>
5568 * builtin.c: Declare "FILE *popen ();".
5570 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
5571 macros, replace error_message_prefix() declaration by errref()'s.
5572 Declare xrealloc, for use in errref().
5573 * m4.c: Delete error_message_prefix() function, add errref().
5574 * *.c: Use error() systematically in place of all error macros,
5575 now that error() flushes stdout first. Make needed adjustments.
5577 * m4.h: Remove const in sys_errlist[] declaration, it creates
5578 conflicts on SGI and Alpha.
5579 Reported by Kaveh R. Ghazi.
5581 1993-11-20 François Pinard <pinard@iro.umontreal.ca>
5583 * m4.c: Include <getopt.h> instead of "getopt.h".
5585 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
5586 * acconfig.h: New, for documenting HAVE_EFGCVT.
5587 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
5588 use them wherever appropriate. Also use -I. for compilations.
5589 * lib/Makefile.in: Use -I.. for compilations.
5590 * *.c: Include <config.h> or "config.h".
5592 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
5593 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
5595 1993-11-17 François Pinard <pinard@iro.umontreal.ca>
5597 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
5599 * input.c (input_init): Initialize quote and comment strings
5600 explicitely instead of calling set_quotes and set_comment: by
5601 doing so, we ensure we do not free uninitialized variables.
5603 * checks/check-them: Reverse arguments to both diff, so the
5604 expected is on the left and the obtained on the right.
5606 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
5607 macros. Delete declarations for m4error, warning, fatal and
5608 internal_error, add declaration for error_message_prefix.
5609 * m4.c: Delete m4error, warning, fatal and internal_error
5610 routines, add error_message_prefix routine.
5611 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
5612 warning with WARNING*, fatal with FATAL* and internal_error with
5614 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
5615 this is not needed anymore.
5617 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
5618 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
5619 and debug_message, add declaration for debug_message_prefix.
5620 * debug.c: Remove static specifier for FILE *debug declaration.
5621 Delete debug_print and debug_message routines, add
5622 debug_message_prefix routine.
5623 * builtin.c, debug.c: Replace debug_print routine calls with
5624 DEBUG_PRINT* macro calls.
5625 * input.c, path.c: Replace debug_message routine calls with
5626 DEBUG_MESSAGE* macro calls.
5628 * m4.h: Remove inclusion of <varargs.h>.
5629 * debug.c: Include <stdarg.h> or <varargs.h>.
5630 (trace_format): Use stdarg instead of varargs if __STDC__.
5632 * configure.in: Remove checks for vfprintf and _doprnt. These
5633 implementations use varargs tricks which are not portable enough.
5634 * lib/vfprintf.c: Deleted.
5635 * lib/_doprnt.c: Deleted.
5636 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
5637 Reported by Joel Sherrill.
5639 * path.c (add_include_directory): Use xstrdup.
5641 * builtin.c (find_builtin_by_name): Declare static.
5643 * *.[ch]: Add const to a few "char *" declarations.
5645 * configure.in: Remove commented tests for fileno() and fstat().
5646 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
5648 * debug.c (debug_flush_files): New.
5649 * m4.h: Declares it.
5650 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
5651 Reported by Nicolas Pioch.
5653 1993-11-12 François Pinard <pinard@iro.umontreal.ca>
5655 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
5656 Reported by Joel Sherrill.
5658 * builtin.c (prefix_all_builtins): Instead of the table size, use
5659 the null entry at end for stopping the loop. It was overwritten.
5660 Reported by Andreas Schwab and Jim Meyering.
5662 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
5663 Reported by Kaveh R. Ghazi.
5665 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
5666 Reported by Karl Vogel.
5668 1993-11-09 François Pinard <pinard@iro.umontreal.ca>
5670 * m4.h: Do not define volatile if already defined.
5671 Reported by René Seindal.
5673 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
5675 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
5676 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
5678 1993-11-08 François Pinard <pinard@iro.umontreal.ca>
5680 * m4.h: Define strchr and strrchr in terms of index and rindex,
5681 instead of the other way around.
5682 * builtin.c, m4.c, path.c: Use strchr instead of index.
5684 * input.c (next_char): Remove a "break;" after a "return ...;".
5685 Reported by Tom McConnell.
5687 1993-11-08 François Pinard <pinard@iro.umontreal.ca>
5691 * configure.in: Do not copy check files in the build hierarchy.
5692 * checks/check-them: Identify the m4 version being checked. For
5693 finding m4, look in $PATH instead of in the parent directory.
5694 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
5695 * checks/Makefile.in (.all-stamp): Always create check files in
5696 the source hierarchy, not anymore in the build hierarchy.
5697 (check): cd to the source hierarchy before performing checks.
5698 Do not copy nor clean COPYING anymore, take it from `..'.
5699 Reported by Tom McConnell.
5701 * Makefile.in (Makefile): Use $(SHELL).
5702 (config.status): Use $(SHELL). Use "config.status --recheck"
5703 instead of "configure --no-create", which is obsolete.
5704 Reported by Tom McConnell.
5706 1993-11-05 François Pinard <pinard@iro.umontreal.ca>
5708 * m4.c (usage): Use "%s" instead of "m4" in format string.
5709 Reported by Jim Meyering.
5711 * Makefile.in: Distribute mkinstalldirs.
5712 Reported by Pierre Gaumond.
5713 Reported by Jim Meyering.
5714 Reported by Tom McConnell.
5715 Reported by Andreas Gustafsson.
5717 * checks/check-them: Renamed from checks/check_them.
5718 * checks/get-them: Renamed from checks/get_them.
5719 * checks/.all-stamp: Renamed from checks/.all_stamp.
5720 * checks/Makefile.in: Changed accordingly.
5721 Reported by Jim Meyering.
5723 1993-11-04 François Pinard <pinard@iro.umontreal.ca>
5725 * lib/Makefile.in (dist): Correct permissions on files.
5727 * output.c: Declare tmpfile, some systems don't.
5729 1993-11-03 François Pinard <pinard@iro.umontreal.ca>
5731 * checks/Makefile.in (dist): Correct permissions on files.
5733 * Makefile.in (dist): Ensure recursive linking for subdirectory
5734 `examples', also set read/write permissions on all its files.
5736 * mkinstalldirs: New, from elsewhere.
5737 * Makefile.in: Use it.
5739 * debug.c: Synchronize debug messages and regular output when
5740 the debug file and stdout are redirected to the same file.
5741 * configure.in: Add (commented) checks for fileno and fstat.
5742 Reported by Jim Avera.
5744 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
5745 etc., arguments, then ignore the superfluous one. m4 used to
5746 diagnose missing arguments and return the empty string.
5747 Reported by Nick S. Kanakakorn.
5749 1993-11-02 François Pinard <pinard@iro.umontreal.ca>
5751 * m4.c (main): At end of all input, ensure all undiverted text
5752 goes to the main output stream.
5753 Reported by Andreas Gustafsson.
5755 * m4.c (main): exit (0), instead of return 0.
5757 * m4.c: Implement -P and --prefix-builtins.
5758 * builtin.c: Delete const specifier on builtin_tab.
5759 (prefix_all_builtins): New.
5760 Reported by Noah Friedman.
5761 Reported by Scott Bartram.
5763 * c-boxes.el: New, from elsewhere.
5764 * Makefile.in: Distribute it.
5766 * m4.h: Do not define bcopy if <string.h> defines it.
5767 Reported by Stephen Perkins.
5769 * builtin.c (define_macro): Allow a missing second argument, in
5770 which case it is implied empty. Affects define and pushdef.
5771 Reported by Eric Allman.
5773 1993-11-01 François Pinard <pinard@iro.umontreal.ca>
5775 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
5776 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
5777 * builtin.c: Initialize all the blindness fields in builtin_tab.
5778 (define_builtin): Copy the blindness of a builtin into its symbol.
5779 * macro.c (expand_token): Avoid processing a blind builtin if the
5780 next character is not an opening parenthesis.
5781 Reported by David MacKenzie.
5782 Reported by Noah Friedman.
5784 * configure.in: Ensure an exit status of 0 on completion.
5785 Reported by Vivek P. Singhal.
5787 * eval.c (eval_lex): Admit both lower and upper case letters for
5788 bases greater than 10. Only lower case letters were accepted.
5790 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
5791 Reported by Krste Asanovic.
5793 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
5794 * eval.c (logical_not_term): New name for not_term.
5795 * eval.c (xor_term): New, between or_term and and_term.
5796 * eval.c (not_term): New, between and_term and logical_not_term.
5797 * eval.c (shift_term): New, between cmp_term and add_term.
5798 Reported by Krste Asanovic: ~, ^, <<, >>.
5799 Reported by Ben A. Mesander: ** vs ^.
5801 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
5802 * m4.h: Delete xrealloc.c.
5803 * lib/xmalloc.c: New, from elsewhere.
5804 * lib/xstrdup.c: New, from elsewhere.
5805 * lib/Makefile.in: Distribute and compile them.
5807 * m4.c: Change progname to program_name.
5808 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
5809 * lib/error.c: New, from elsewhere.
5810 * lib/Makefile.in: Distribute and compile error.c.
5811 * configure.in: Check AC_VPRINTF and for strerror.
5812 * m4.c: Delete cmd_error. Use error instead.
5813 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
5815 * m4.h: Delete #define const, let Autoconf takes care of this.
5817 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
5818 Merge parse_args into main. Declare argv to be `char *const *',
5819 then remove superfluous casts.
5821 * m4.c: Rename --no-gnu-extensions to --traditional.
5822 Reported by Ben A. Mesander.
5824 * m4.c (usage): Add a status parameter. Supply one in various
5825 calls. Add --help processing. Remove -V for --version.
5827 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
5829 * lib/Makefile.in: Have an AR=ar declaration.
5830 Reported by Eric Backus.
5831 Reported by Bjorn R. Bjornsson.
5832 Reported by Tom Tromey.
5833 Reported by Kristine Lund.
5834 Reported by Marion Hakanson.
5836 1993-10-30 François Pinard <pinard@iro.umontreal.ca>
5838 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
5839 Reported by Noah Friedman.
5841 1993-10-25 François Pinard <pinard@iro.umontreal.ca>
5843 * Makefile.in: Remove MDEFINES and cleanup.
5845 1993-06-09 François Pinard <pinard@iro.umontreal.ca>
5847 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
5850 1993-02-06 François Pinard <pinard@iro.umontreal.ca>
5852 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
5853 ensure 777 mode for directories, so older tar's will restore file
5856 1993-01-17 François Pinard <pinard@iro.umontreal.ca>
5858 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
5859 so the installer can override automatically configured choices.
5860 Reported by Karl Berry.
5862 1993-01-15 François Pinard <pinard@iro.umontreal.ca>
5864 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
5865 previous version was not working properly on m68k-hp-bsd4.3.
5866 Reported by Roland McGrath.
5868 * lib/_doprnt.c: Stolen from Oleo distribution.
5869 * configure.in: Check for _doprnt.c if vfprintf.c selected.
5870 * lib/Makefile.in: Distribute _doprnt.c.
5871 Do not distribute regex.[ch].old anymore.
5873 1993-01-01 François Pinard <pinard@iro.umontreal.ca>
5875 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
5876 Richard wants it there.
5878 1992-12-27 François Pinard <pinard@iro.umontreal.ca>
5880 * Makefile.in: Add DEFS to MDEFINES.
5881 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
5882 (libm4.a): Remove the library before creating it.
5883 (distclean): Remove tags and TAGS too.
5885 1992-12-23 François Pinard <pinard@iro.umontreal.ca>
5887 * Makefile.in (dvi, m4.dvi): New goals.
5889 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
5890 macro.c, output.c, path.c, symtab.c: Change Copyright from
5891 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
5893 * examples/divert.m4: Deleted, this bug has been corrected.
5895 * Makefile.in (texclean, mostlyclean): New goals.
5897 * Makefile.in (clean): Remove clutter from ansi2knr.
5898 Reported by Pierre Gaumond.
5900 1992-12-20 François Pinard <pinard@iro.umontreal.ca>
5902 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
5903 might well use CFLAGS is s/he needs it.
5905 * Makefile.in: Allow installation of info files from a separate
5907 Reported by Jason Merrill.
5908 Reported by David MacKenzie.
5909 Reported by Skip Montanaro.
5910 Reported by Erez Zadok.
5911 Reported by Assar Westerlund.
5913 1992-12-19 François Pinard <pinard@iro.umontreal.ca>
5916 This is still a beta release for the future GNU m4 version 1.1.
5918 * lib/alloca.c: New, from elsewhere.
5919 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
5921 * m4.h: Do not define index/rindex if already defined. If
5922 FALSE/TRUE are already defined, do not redefine them, but merely
5923 define boolean typedef to int.
5925 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
5926 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
5927 because some C compilers do not like connectives with #ifdef.
5928 * m4.h: Define `volatile' only if __GNUC__, instead of once for
5929 __GNUC__ and once for __STDC__.
5930 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
5932 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
5933 Makefile dependencies. Without it, make keeps destroying and
5934 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
5936 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
5937 to diversion/DIVERSION, this was a spelling error.
5939 * m4.c: Declare version[], remove #include "version.h".
5940 * version.h: Deleted.
5941 * Makefile.in: Remove references to version.h.
5943 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
5944 production, by using a simpler and more robust algorithm. This
5945 solves the problem of synclines sometimes written in the middle of
5946 an output line. Delete sync_line() and output_lines variable.
5947 * m4.h: Remove sync_line prototype and output_lines declaration.
5948 * input.c (next_char), output.c (shipout_text): Remove references
5950 * input.c (push_file, pop_file): Merely put the value -1 in
5951 output_current_line instead of calling sync_line, for delaying a
5952 single `#line NUM FILE' before next output line. Do not test
5953 for sync_output, because this is unnecessary clutter.
5954 * output.c (make_divertion, insert_divertion): Idem.
5955 * input.c: Rename must_advance_line to start_of_input_line, for
5958 * debug.c (trace_header): Select a new debug line format, which
5959 better complies with GNU standards for formatting error messages.
5960 With option `-dfl', M-x next-error might be used on the output.
5961 * m4.c (vmesg): Adjust format of error output to GNU standards.
5962 * m4.texinfo: Adjust examples for `make check' to work.
5964 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
5965 case for enum debug_info constants, which were all lower case.
5967 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
5969 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
5970 collected patches. I tried a few times using newer regex.[ch], it
5971 mysteriously stopped aborting with this one. Insecure feeling...
5972 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
5974 1992-12-18 François Pinard <pinard@iro.umontreal.ca>
5976 * m4.c: Change `--no-warnings' to `--silent'.
5977 Reported by David MacKenzie.
5979 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
5980 leave it off for now. See comment in m4.c for justification.
5981 Reported by David MacKenzie.
5983 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
5984 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
5986 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
5988 * Makefile.in: Ensure recursive cleaning is done before local
5989 cleaning for all clean goals.
5991 * builtin.c (ntoa): Ensure the value is always interpreted as a
5992 signed quantity, whatever the radix is.
5994 1992-11-18 Jim Meyering <meyering@idefix>
5996 * builtin.c, format.c, input.c: Split long lines.
5997 * m4.c: Use typedef macro_definition instead of struct
5999 * symtab.c: Use typedef symbol instead of struct symbol.
6001 1992-11-17 François Pinard <pinard@iro.umontreal.ca>
6003 * *.[ch]: Remove all trailing whitespace, in code and comments.
6005 * configure.in: Find some awk.
6006 * Makefile.in: Add $(AWK) to MDEFINES.
6007 * checks/Makefile.in: Transmit $(AWK) to get_them.
6008 * checks/get_them: Use $AWK instead of gawk. Add a close in the
6009 awk script when switching files, because without this, mawk runs
6010 out of file descriptors.
6012 1992-11-16 François Pinard <pinard@iro.umontreal.ca>
6014 * Makefile.in (realclean): Delete m4.info*.
6015 Reported by Jim Meyering.
6017 * Makefile.in: Adjust and link with checks/Makefile.
6018 * checks/Makefile.in: New.
6019 * configure.in: Output checks/Makefile.
6021 * checks/get_them: Have the dnl header of each test more
6022 recognizable by next-error, also use a better message.
6024 1992-11-16 Jim Meyering <meyering@idefix>
6026 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
6027 And use that only if __GNUC__ since we're using it's GCC-specific
6028 semantics that tell the compiler the associated function doesn't
6031 * builtin.c (substitute): Don't use character as an array index.
6032 (dumpdef_cmp): Make formal arguments `const void *' to avoid
6033 warnings with gcc -W -Wall on systems with qsort prototype.
6034 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
6037 * eval.c (most functions): Add parentheses to assignments used
6038 as truth values go avoid warnings from gcc -Wall.
6040 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
6041 any functions that don't need external scope.
6043 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
6044 (many functions and arrays): Declare `const'.
6046 1992-11-15 François Pinard <pinard@iro.umontreal.ca>
6048 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
6049 removing the declaration from m4.h. Also rename false to FALSE
6052 * lib/Makefile.in (Makefile): New goal.
6054 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
6055 so heavily loaded. It gets more easily overridable, calling make.
6056 Reported by Jim Meyering.
6058 * Makefile.in (dist): Get .fname from the current directory name,
6059 instead of from version.h. I need updating many files manually,
6060 when the version changes, version.h is just one of them.
6062 1992-11-14 François Pinard <pinard@iro.umontreal.ca>
6064 * m4.h: Remove the tag `boolean' on the enum introducing typedef
6065 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
6066 Reported by Tom McConnell.
6068 1992-11-13 François Pinard <pinard@iro.umontreal.ca>
6070 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
6071 39.cleardiv, which were describing missing or spurious newlines.
6072 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
6073 do not depend on machine word size, `/bin/false' implementation,
6074 or `wc' output format. `make check' is more dependable, now.
6076 * checks/check_them: Summarize the failed tests by listing their
6077 name, at end. If none, issue `All checks successful'. Output
6078 `Checking' instead of `Input file:'.
6080 * checks/get_them, checks/check_them: Reindented.
6082 * Makefile.in (dist): chmod a+r before making the tar file.
6084 1992-11-12 François Pinard <pinard@iro.umontreal.ca>
6086 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
6088 * input.c (next_token): Reinitialize token_buttom just after using
6089 it as a watermark with obstack_free. Or else, a future token, big
6090 enough for triggering reallocation of the obstack chunk, could
6091 void the initialized value of token_buttom, later causing panic in
6092 obstack_free. Rename token_buttom to token_bottom everywhere.
6094 * m4.h: Before declaring errno, first include <errno.h> and
6095 ensure that it does not define errno.
6096 Reported by Richard Stallman.
6098 1992-11-11 François Pinard <pinard@iro.umontreal.ca>
6100 * builtin.c: Define and use DECLARE macro for builtins.
6102 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
6103 argument, this is a common idiom for introducing long comments.
6105 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
6106 arguments. The last argument was silently ignored.
6108 * m4.c (cmd_error): Add a missing semicolon before va_end().
6110 1992-11-10 François Pinard <pinard@iro.umontreal.ca>
6112 * Makefile.in: Now handle protoized sources. Define and use U.
6113 Compile and use ansi2knr with old compilers. Update DISTFILES.
6114 Add `aclocal.m4' to `configure' dependencies.
6115 * ansi2knr.c: New, from Ghostscript distribution.
6116 * configure.in: Define U through FP_PROTOTYPES for old compilers.
6117 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
6118 * aclocal.m4: New, provide FP_PROTOTYPES.
6119 * m4.h: Conditionnaly protoized through Args, save for varags.
6120 * builtin.c: Protoized. Then:
6121 Include <sys/types.h> if size_t is not defined, before "regex.h".
6122 (m4_ifelse): Fetch built-in name properly for diagnostic.
6123 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
6124 (m4_regexp): Add const to `msg' declaration.
6125 (m4_patsubst): Add const to `msg' declaration.
6126 * debug.c: Protoized, save for varargs.
6127 * eval.c: Protoized.
6128 * format.c: Protoized.
6129 * input.c: Protoized.
6130 * m4.c: Protoized, save for varargs. Then:
6131 (xfree): Accept void * instead of char *.
6132 (xmalloc): Return void * instead of char *.
6133 (xrealloc): Accept and return void * instead of char *.
6134 * macro.c: Protoized.
6135 * output.c: Protoized.
6136 * path.c: Protoized. Then cast some (char *) over xmalloc's.
6137 * symtab.c: Protoized.
6139 1992-11-06 François Pinard <pinard@iro.umontreal.ca>
6141 * m4.texinfo: Remove directory from diagnostics in 30.include,
6142 51.eval, 56.errprint and 57.m4exit tests.
6144 * m4.h: Remove declarations for int or void system functions, they
6145 cause more conflicting trouble than they make good.
6147 * configure.in: Avoid configuration header file. Add some tests.
6148 * m4.h: Remove #include "config.h".
6149 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
6150 Then, rewritten for better compliance with GNU standards.
6152 1992-11-05 François Pinard <pinard@iro.umontreal.ca>
6154 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
6155 because of a misplaced #endif.
6157 * Many *.[hc] files: Correct intra-line spacing here and there,
6158 according to GNU indent 1.6 advice.
6160 * configure.in: New, using Autoconf 1.2.
6161 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
6162 * Delete old configure.in, configure, etc/configure.in,
6163 etc/configure, lib/configure.in, lib/configure and config/*.
6164 Reported by Jason Merrill.
6166 * symtab.c (hash): Change (char) NULL to '\0'.
6167 Reported by Jason Merrill.
6169 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
6170 etc/nextvers.sh. Release numbers will be edited `by hand'.
6171 * version.h: De-automatize, force value in.
6173 * m4.c: Changes in order to use a newer getopt.h.
6174 Reported by David MacKenzie.
6176 * checks/: New name for examples/.
6177 * checks/get_them: New location for etc/get_examples.
6178 * checks/check_them: New location for etc/check_examples.
6179 * Makefile.in, checks/get_them, checks/check_them: Adjust.
6180 * lib/vfprintf.c: New location for etc/vfprintf.c.
6181 * Delete empty etc/.
6182 * examples/: New name for test/.
6184 1992-03-10 François Pinard <pinard@iro.umontreal.ca>
6186 * Makefile.in (check): Add m4 as dependency.
6188 * m4.c: Accept --no-warnings instead of --no_warnings, and
6189 --no-gnu-extensions instead of --no_gnu_extensions. Make the
6190 usage message more informative.
6191 Reported by David MacKenzie.
6193 1992-03-09 François Pinard <pinard@iro.umontreal.ca>
6195 * etc/check_examples: New name for check_examples.sh.
6196 * etc/get_examples: New name for get_examples.sh.
6197 * Makefile.in, etc/Makefile.in: Use new names.
6199 * Makefile.in: Transmit $(CC) while making in lib.
6201 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
6202 code disposition by hand.
6204 1992-03-08 François Pinard <pinard@iro.umontreal.ca>
6206 * m4.h: Delete definitions for abort() and exit().
6207 Reported by Richard Stallman.
6209 * config/hmake-unicos, config/s-unicos.h: New files.
6210 Reported by Hal Peterson.
6212 * eval.c (exp_term): Have N^0 return 1.
6213 Reported by Michael Fetterman.
6215 * eval.c, input.c, m4.h: Remove last comma in enums.
6216 Reported by Mike Lijewski.
6218 * Transfer of maintenance duties from René to François.
6220 1991-10-24 René Seindal <seindal@diku.dk>
6222 * Release 1.0. Many thanks to those, who provided me with bug
6223 reports and feedback.
6225 * Uses GNU configure, taken from the gdb distribution.
6227 * Uses GNU getopt(), with long option names.
6229 * The -Q/+quiet option is added, which suppresses warnings about
6230 missing or superflous arguments to built-in macros.
6232 * Added default options via the M4OPTS environment variable.
6234 * The built-in format can now be configured to use sprintf as
6235 the formatting engine, for systems without [efg]cvt(3).
6237 * GNU library code is moved to the ./lib subdirectory; other
6238 utility files are now in ./etc.
6240 * Several minor bugs have been fixed.
6242 1991-07-26 René Seindal <seindal@diku.dk>
6244 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
6245 Francois Pinard and Roland H. Pesch for providing me with reports.
6247 * The builtins incr and decr are now implemented without use of
6250 * The builtin indir is added, to allow for indirect macro calls
6251 (allows use of "illegal" macro names).
6253 * The debugging and tracing facilities has been enhanced
6254 considerably. See the manual for details.
6256 * The -tMACRO option is added, marks MACRO for tracing as soon
6259 * Builtins are traced after renaming iff they were before.
6261 * Named files can now be undiverted.
6263 * The -Nnum option can be used to increase the number of
6264 divertions available.
6266 * Calling changecom without arguments now disables all comment
6269 * The function m4_patsubst() is now consistently declared
6272 * A bug in dnl is fixed.
6274 * A bug in the multi-character quoting code is fixed.
6276 * Several typos in the manual has been corrected. More probably
6279 * The m4.info file is now installed along with the program.
6281 1990-11-15 René Seindal <seindal@diku.dk>
6283 * Updated and enhanced version. Release 0.75, manual 0.07.
6285 * Implemented search path for include files (-I option and
6286 M4PATH envronment variable).
6288 * Implemented builtin "format" for printf-like formatting.
6290 * Implemented builtin "regexp" for searching for regular
6293 * Implemented builtin "patsubst" for substitution with regular
6296 * Implemented builtin "esyscmd", which expands to a shell
6299 * Implemented "__file__" and "__line__" for use in error
6302 * Implemented character ranges in "translit".
6304 * Implemented control over debugging output.
6306 * Implemented multi-character quotes.
6308 * Implemented multi-character comment delimiters.
6310 * Changed predefined macro "gnu" to "__gnu__".
6312 * Changed predefined macro "unix" to "__unix__", when the -G
6313 option is not used. With -G, "unix" is still defined.
6315 * Changed "shift", "$@" and "$*" to not insert spaces afters
6318 * Added program name to error messages.
6320 * Fixed two missing null bytes bugs.
6322 1990-01-22 René Seindal <seindal@diku.dk>
6324 * Initial beta release. Release 0.50, manual 0.05.