1 2005-10-20 Gary V. Vaughan <gary@gnu.org>
3 * m4/module.c (caller_id): To match libtool-2.0 interface, changed
5 (iface_id): ...an lt_dlinterface_id type.
6 (m4__module_find): New abstraction for lt_dlhandle_fetch. Use
7 throughout, instead of calling obsolete lt_dlhandle_find directly.
8 (m4__module_next): Use multiloader-safe lt_dlhandle_iterate. Use
9 throughout, instead of calling obsolete lt_dlhandle_next.
10 * m4/m4private.h (m4__module_find): Declare it.
11 * m4/builtin.c (m4_builtin_find_by_name, m4_builtin_find_by_func):
12 Use m4__module_next instead of obsolete lt_dlhandle_next.
14 2005-10-20 Gary V. Vaughan <gary@gnu.org>
16 * bootstrap (func_update_po): Update pofiles directly from the
18 * po/LINGUAS, po/cs.po, po/de.po, po/el.po, po/fr.po, po/it.po,
19 po/ja.po, po/nl.po, po/pl.po, po/ru.po, po/sv.po: No need to store
20 these files under source control anymore.
21 Suggested by Eric Blake <ebb9@byu.net>
23 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
25 * ltdl/m4/m4-gnulib.m4: Update FSF contact address. Somehow this
26 file escaped the address updates on 2005-05-01.
28 2005-07-07 Gary V. Vaughan <gary@gnu.org>
30 * bootstrap: Allow user overriding of gnulib-tool location, and
31 correctly determine module source directories whether gnulib-tool
32 is given as a relative or absolute path, or is found by searching
34 Reported by Eric Blake <ebb9@byu.net>
36 2005-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
38 * ltdl/m4/debug.m4 (m4_CHECK_DEBUGGING): Make sure that both $rm
39 and $RM are defined for various versions of
40 AC_LIBTOOL_COMPILER_OPTION.
42 * bootstrap (AUTORECONF): New variable to allow user overriding of
45 2005-07-07 Gary V. Vaughan <gary@gnu.org>
47 * doc/m4.texinfo (History): Add better notes on the ancestory of
48 GNU m4, and other historical interest.
50 2005-05-08 Gary V. Vaughan <gary@gnu.org>
52 * m4/symtab.c (m4_symbol_rename): New function that performs a low
54 * m4/m4module.h (m4_symbol_rename): Declare it as part of the API.
55 * modules/gnu.c (regsub): Factored out of m4_epatsubst_do...
56 (m4_patsubst_do, m4_renamesyms_do): ...wrappers that use
58 (erenamesyms, renamesyms): ...builtins that use these to implement
59 macro renaming by regular expression.
60 * doc/m4.texinfo (Erenamesyms and Renamesyms): Document them.
61 * tests/generate.awk: Allow some forbidden `m4_' prefixed symbols
62 to stop the new generated tests from choking.
64 2005-05-07 Gary V. Vaughan <gary@gnu.org>
66 Since most of the build is handled from a single Makefile.am now,
67 we can teach make about the dependencies between the m4 binary and
68 the preopened modules it is built against:
70 * configure.ac (PREOPEN_DEPENDENCIES): Substitute for a list of
72 * Makefile.am (src_m4_DEPENDENCIES): Rebuild the m4 program if any
73 of the preopened modules have changed.
75 2005-05-07 Gary V. Vaughan <gary@gnu.org>
77 * configure.ac (gl_MODULES): Add mkstemp for machines that don't
78 have a native implementation.
80 2005-05-06 Gary V. Vaughan <gary@gnu.org>
82 * src/m4.h (EXIT_SUCCESS, EXIT_FAILURE): Removed. These are
83 handled already by gnu/exit.h.
85 * configure.ac (gl_MODULES): Add assert to support a
86 --disable-assert configure time option for NDEBUG setting.
88 * Makefile.am (src_m4_SOURCES): Add version-etc-fsf.c.
89 * bootstrap (src_modules): Add version-etc-fsf.
90 * src/main.c (version_etc_copyright): Removed.
92 * ltdl/m4/m4-getopt.m4 (m4_GETOPT): Synch with gnulib/getopt.m4.
94 2005-05-04 Gary V. Vaughan <gary@gnu.org>
96 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
98 * src/freeze.c (produce_frozen_state): Use \n line-endings even
99 on Windows, so that the frozen file reader will work.
100 Reported by Josef T. Burger <bolo@bolo.com>
102 2005-05-04 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
104 Forward port of a patch that allowed m4-1.4.2 to compile on
107 * configure.ac (AC_CHECK_HEADERS): Add signal.h,
109 * src/m4.h: And include them as appropriate.
110 * src/main.c, src/stackovf.h: Don't include signal.h literally;
111 m4.h will include the correct file.
113 2005-05-04 Gary V. Vaughan <gary@gnu.org>
115 * m4/m4private.h: Make errno visible for the sources patched
118 2005-05-04 Paul Eggert <eggert@twinsun.com>
120 * src/main.c (print_program_name_CB): Preserve errno, since
121 M4ERROR relies on this.
122 * modules/gnu.c (m4_esyscmd): Clear errno before calling popen.
123 * modules/m4.c (m4_maketemp): Clear errno before calling mkstemp.
124 * m4/path.c (m4_path_search): Don't let "free" trash errno when
127 * m4/output.c (m4_insert_file): Don't assume errno has a valid
128 value simply because fread returns zero. This fixes a
129 portability bug reported by Marion Hakanson in
130 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
132 2005-05-04 Santiago Vila <sanvila@debian.org>
134 * tests/stackovf.test: Use tempfile if available.
136 2005-05-04 Robert Bihlmeyer <robbe@orcus.priv.at> (tiny change)
138 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
139 * m4/output.c (m4_insert_file): Do not mix buffered and
140 unbuffered I/O, as this breaks on the Hurd.
142 2005-05-04 Gary V. Vaughan <gary@gnu.org>
144 Gnulib has changed again. Reimport. Adjust. Rinse. Repeat.
145 Automake and Libtool now agree on subdir-objects and LTLIBOBJS,
146 and libtoolize does a better job of ltdl importing now too, so
147 take advantage of that while updating the tree:
149 * acm4, config: Moved from here...
150 * ltdl/m4, ltdl/config: ...to here.
151 * doc/Makefile.am, m4/Makefile.am, modules/Makefile.am,
152 src/Makefile.am, tests/Makefile.am: Removed...
153 * Makefile.am: ...and migrated to here, with adjustments to
154 compensate for relative path differences.
155 * commit: Adjust relative paths.
156 * configure.ac: Adjust relative paths.
157 (AC_PREREQ): 2.59 isn't strictly new enough, we also need a
159 (LT_PREREQ): 2.0 isn't released yet, but will work when it is! In
160 the meanwhile, CVS HEAD libtool is needed.
161 (AM_INIT_AUTOMAKE): Added subdir-objects declaration. 1.9.5 isn't
162 stricly new enough, we also need a patch.
163 (AM_PROG_CC_C_O): Required for subdir-objects in Automake.
164 (AC_WITH_LTDL): Replaced with LT_WITH_LTDL.
165 (gl_MODULES): Don't list getopt and version-etc, as they don't
167 * bootstrap: After running gnulib-tool to import the listed
168 modules, fetch getopt and version-etc into src manually.
169 (ltdldir): Change to ltdl.
170 * src/main.c: Adjust for changes in version-etc API.
171 * ltdl/m4/m4-getopt.m4: New macro to mirror gnulib's getopt.m4,
172 but works when the getopt module isn't to be included in the lib.
173 * README: Add note about patching autoconf and automake to
176 2005-05-02 Matt Kraai <kraai@debian.org> (tiny change)
178 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
179 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
180 empty file rather than to a nonexistent file. This closes a
181 common security hole.
182 * modules/m4.c (m4_maketemp): Implement the above, by using
183 mkstemp rather than mktemp.
185 2005-05-01 Gary V. Vaughan <gary@gnu.org>
187 The FSF are moving offices today. Changed their contact address
188 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
189 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
191 2005-03-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
193 * tests/Makefile (clean-local): Ignore testsuite cleanup
196 2005-03-11 Per Bothner <per@bothner.com> (tiny change)
198 * tests/Makefile (clean-local): Only run the testsuite cleanup
199 if the testsuite has been generated.
201 2005-02-11 Stepan Kasal <kasal@ucw.cz>
203 * TODO: slight clarification of the example of qindir usage.
205 2005-02-08 Gary V. Vaughan <gary@gnu.org>
207 * TODO: Add qindir requirement, and defn bug.
208 From Stepan Kasal <kasal@ucw.cz>
210 2005-02-08 Stepan Kasal <kasal@ucw.cz>
212 * TODO: Add ``execution stack'', fix a typo.
213 * doc/m4.texinfo: Typos.
215 2004-12-24 Eric Blake <ebb9@byu.net>
217 * configure.ac (INCLUDE_STDBOOL_H): Account for gnulib's move
218 to the gnu subdirectory.
219 * acm4/m4-error.m4 (INCLUDE_ERROR_H): Likewise.
220 * acm4/m4-obstack.m4 (INCLUDE_OBSTACK_H): Likewise.
221 * acm4/m4-regex.m4 (INCLUDE_REGEX_H): Likewise.
222 * m4/system_.h: Likewise, in non-configured includes.
224 2004-10-14 Noah Misch <noah@cs.caltech.edu>,
225 Gary V. Vaughan <gary@gnu.org>
227 * m4/m4.c (m4_context_field_table, m4_context_opt_bit_table):
228 Protect definitions from macro expansion under -DNDEBUG by
229 parenthesising the expanded function names.
230 * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
231 (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
232 (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
233 (m4_is_syntax_macro_escaped): Similarly protect function
234 definitions from macro expansion under -DNDEBUG by #undefing the
235 matching macro names before each definition. Also, move all the
236 function definitions to the end of the file so that any
237 invocations in the rest of the file pick up the fast macro
239 * m4/m4private.h (m4_set_symbol_table, m4_set_syntax_table)
240 (m4_set_debug_file, m4_set_trace_messages)
241 (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
242 (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
243 (m4_set_max_debug_arg_length_opt): New fast macro versions of the
244 option setter functions.
246 2004-09-23 Gary V. Vaughan <gary@gnu.org>
248 * src/main.c: Include gnulib files from the correct directory.
250 * gnulib/*: Don't store any of the gnulib files in arch, as they
251 generate spurious changes.
252 * Makefile.am (ACLOCAL_AMFLAGS): Remove gnulib/acm4 since the
253 gnulib macros now share our macro directory.
254 (SUBDIRS): Descend into `gnu' rather than `gnulib'.
255 * bootstrap: Call gnulib-tool to import from the gnulib tree.
256 (gl_AC_HEADER_INT_TYPES_H, gl_AC_HEADER_STDINT_H,
257 gl_AC_TYPE_UINTMAX_T): Patch gnulib.m4 to define these in terms of
258 the gettext macros from autopoint that overwrite the gnulib-tool
259 imported versions. Import sources and Makefile.am into the `gnu'
260 directory. Changed all callers.
261 * configure.ac (gl_EARLY, gl_SOURCE_BASE, gl_M4_BASE, gl_MODULES,
262 gl_INIT): Call these gnulib-tool macros instead of the hardcoded
263 for imported modules.
264 * acm4/m4-error.m4, acm4/m4-gettext.m4, acm4/m4-obstack.m4,
265 acm4/m4-regex.m4: Use AC_BEFORE to enforce ordering rather than
266 hardcoding the gnulib macros they wrap.
268 2004-07-15 Gary V. Vaughan <gary@gnu.org>
270 Latest CVS libtool can preload modules in libraries, including
271 its own module loaders! Tweak m4 so that it doesn't try to treat
272 libltdl's module loaders as m4 modules when freezing and on exit:
274 * gnulib/acm4/*.m4: Don't store these files in arch since they
275 generate spurious changes.
276 * bootstrap: Simplify initial libtoolize call, since CVS
277 libtoolize is smarter these days.
278 * doc/Makefile.am (%.1): Make the helptoman call work with a VPATH
280 * m4/module.h (m4__module_exit): Missing declaration.
281 * m4/m4private.h (m4__module_next): New function declaration.
282 * m4/module.c (m4__module_next): lt_dlhandle_{firs,nex}t
283 encapsulation. Changed all callers.
284 (m4__module_interface): New function to verify m4 loadable module
286 (m4__module_init): Register the interface validator.
287 (m4__module_exit): Only close my own modules.
288 * modules/m4.c (unistd.h): Provide missing declaration.
289 (m4_set_sysval, m4_sysval_flush, m4_dump_symbols)
290 (m4_expand_ranges): More missing declarations.
291 * modules/modtest.c (export_test): Ditto.
292 * src/Makefile.am (AM_CPPFLAGS): Add libltdl directory.
293 * src/main.c (main): Bump copyright year.
294 * tests/modules.at: Fix sed syntax error.
297 2004-06-17 Gary V. Vaughan <gary@gnu.org>
299 Tweaking to enable compilation with latest CVS libtool and
300 libltdl. We can't just dump the library files directly into the
301 m4 directory anymore now that libltdl is built from pieces itself:
303 * bootstrap: Rewritten to use latest libtoolize sanely, and to
304 set up libltdl subdirectory.
305 * configure.ac (AC_CONFIG_AUX_DIR): Point to our own, not the
306 gnulib subdirectory's config.
307 (TIMESTAMP): Use $ac_aux_dir for VPATH builds.
308 (m4_pattern_forbid): Remove the cruft to deal with renamed jm_
310 (AC_LIB_LTDL): Latest libltdl is a sub-project with its own
311 configure.ac, so use AC_WITH_LTDL instead.
312 * Makefile.am (SUBDIRS): Add libltdl.
313 * acm4/m4-regex.m4 (jm_INCLUDED_REGEX): Updated. gnulib now uses
315 * m4/Makefile.am (AM_CPPFLAGS): Add INCLTDL.
316 (libm4_la_SOURCES): Remove ltdl.c and ltdl.h.
317 (libm4_la_LIBADD): Add LIBLTDL.
318 * m4/ltdl.c, m4/ltdl.h: Removed.
319 * m4/m4module.h: Include canonical ltdl.h.
322 2004-06-14 Gary V. Vaughan <gary@gnu.org>
324 * gnulib/import: Now updates makefile fragments, and configure.ac.
325 * gnulib/m4/gnulib.am: New file. Generated makefile fragments.
326 * gnulib/m4/Makefile.am: include it.
327 * gnulib/acm4/intmax.m4, gnulib/acm4/longdouble.m4,
328 gnulib/acm4/longlong.m4, gnulib/acm4/printf-posix.m4,
329 gnulib/acm4/signed.m4, gnulib/acm4/size_max.m4,
330 gnulib/acm4/wchar_t.m4, gnulib/acm4/wint_t.m4,
331 gnulib/acm4/xsize.m4: New macro files from latest gnulib import.
332 * gnulib/acm4/alloca.m4, gnulib/acm4/inttypes_h.m4,
333 gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-prefix.m4,
334 gnulib/acm4/error.m4, gnulib/acm4/po.m4, gnulib/acm4/regex.m4,
335 gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
336 gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
337 gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
338 gnulib/acm4/free.m4, gnulib/acm4/gettext.m4,
339 gnulib/acm4/glibc21.m4: Updated macro files from latest gnulib
341 * gnulib/m4/getopt_int.h: New source file from latest gnulib
343 * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/getopt1.c,
344 gnulib/m4/obstack.c, gnulib/m4/obstack.h, gnulib/m4/regex.c,
345 gnulib/m4/unlocked-io.h, gnulib/m4/version-etc.c,
346 gnulib/m4/xmalloc.c, gnulib/m4/getopt.c, gnulib/m4/getopt.h:
347 Updated source files from latest gnulib.
349 2004-02-29 Gary V. Vaughan <gary@gnu.org>
351 * config/mailnotify: New file for mailing commit notifications,
352 imported from cvs-utils.
353 * commit: Updated from cvs-utils and tweaked for m4.
355 2003-12-01 Gary V. Vaughan <gary@gnu.org>
357 * config/mkstamp: Updated from CVS libtool.
358 * configure.ac: Generate a gnu coding standards compliant version
359 number, and use it for the banner.
360 * Makefile.am (stamp-vcl): New rules to force m4 to be regenerated
361 mhen the TIMESTAMP changes in ChangeLog, but the file modification
362 time doesn't (e.g. in cvs commit). Otherwise dist tarballs will
363 contain the previous version number.
364 * src/main.c: Make --version output conform to the GNU standard.
366 * configure.ac (AM_INIT_AUTOMAKE): Require 1.7g...
367 * modules/Makefile.am (gnu_la_SOURCES, load_la_SOURCES,
368 m4_la_SOURCES, traditional_la_SOURCES, modtest_la_SOURCES,
369 shadow_la_SOURCES, import_la_SOURCES, stdlib_la_SOURCES,
370 time_la_SOURCES): ...so that these are defaulted correctly, and
371 can be removed from this file.
372 (AM_LDFLAGS): Add -module...
373 (gnu_la_LDFLAGS, load_la_LDFLAGS, m4_la_LDFLAGS,
374 traditional_la_LDFLAGS, modtest_la_LDFLAGS, shadow_la_LDFLAGS,
375 import_la_LDFLAGS, stdlib_la_LDFLAGS, time_la_LDFLAGS): ...so that
376 the individual settings can be removed.
377 * m4/Makefile.am (libm4_la_LIBADD): Add $(LTLIBINTL) here once...
378 * module/Makefile.am (gnu_la_LIBADD, load_la_LIBADD,
379 m4_la_LIBADD, traditional_la_LIBADD, modtest_la_LIBADD,
380 shadow_la_LIBADD, import_la_LIBADD, stdlib_la_LIBADD,
381 time_la_LIBADD): ...so that these are picked up as a deplib of
382 libm4 and don't need to be set explicitly.
384 2003-11-18 Gary V. Vaughan <gary@gnu.org>
386 * modules/Makefile.am (pkglibexec_LTLIBRARIES): Remove perl.la
387 from the standard build. It is too fragile.
389 * gnulib/acm4/libtool.m4, m4/ltdl.c, m4/ltdl.h: Reimported from
390 CVS libtool after merging m4 changes across to libtool.
392 * m4/symtab.c (m4_symtab_create): Fix a careless use of sizeof.
393 * m4/path.c (search_path_add): Ditto.
395 2003-11-13 Gary V. Vaughan <gary@gnu.org>
397 * configure.ac (AC_LIBTOOL_TAGS): Don't include shell code for
398 libtool tags we don't use in configure. This reduces the size
399 of the script from over 1Mb to under 700Kb.
401 2003-11-13 Gary V. Vaughan <gary@gnu.org>
403 The import script was not written properly, and the last gnulib
404 import was incomplete. Fixed that problem, and reimport our
405 gnulib dependencies, which picks up the address calculation
406 overflow checks described by Paul below. Also tweak the clients
407 of the gnulib xalloc module not to use deprecated macros:
409 * gnulib/import: Recurse through module dependencies rather than
410 naively descending only one level.
411 * configure.ac: Add calls to gnulib's strnlen and extension module
413 * gnulib/m4/Makefile.am: Add snippets from gnulib's strnlen and
415 * gnulib/acm4/extensions.m4, gnulib/acm4/xalloc.m4,
416 gnulib/m4/alloca.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
417 gnulib/m4/stdbool_.h, gnulib/m4/unlocked-io.h, gnulib/m4/xalloc.h,
418 gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Updated from CVS
420 * gnulib/acm4/libtool.m4: Updated from CVS libtool.
421 * m4/hash.c (m4_get_hash_iterator_next): Use `xzalloc (S)' in
422 place of `xcalloc (1, S)'.
423 * m4/m4.c (m4_create): Likewise.
424 * m4/m4private.h (m4_symbol_value_create): Likewise.
425 * m4/symtab.c (symtab_fetch): Likewise.
426 * m4/syntax.c (m4_syntax_create): Likewise.
427 * src/freeze.c (reload_frozen_state): Likewise.
428 * m4/path.c (search_path_add): Eliminate use of deprecated NEW
430 * m4/symtab.c (m4_symtab_create): Likewise.
432 2003-11-13 Gary V. Vaughan <gary@gnu.org>
434 * tests/module.at: Comment typo.
436 2003-10-10 Gary V. Vaughan <gary@gnu.org>
438 * tests/modules.at (modules: importing): Apply some lateral
439 thinking, and use AT_CHECK to compare the output of a sed pass
440 over stderr against the canonical strerror string.
442 * tests/modules.at (modules: importing): Edit the generated stderr
443 output to canonicalize strerror output, before a comparison.
445 2003-10-10 Gary V. Vaughan <gary@gnu.org>
447 Tru64UNIX perl is sloppy with namespace pollution. This patch is
448 careful not to trip over the mess:
450 * modules/perl.c: Some builds of perl install headers that contain
451 `#define try __builtin_try'. Be sure to undefine that macro
452 before `m4/hash.h' gets included, which uses the `try' symbol.
453 * m4/system_.h: Similarly for `bool'. Undefine `bool', `true' and
454 `false' before including `stdbool.h'.
455 (DELETE): This symbol is not in m4's namespace, and is in any
456 case only used internally...
457 * m4/m4private.h (DELETE): ...so move it to here.
458 Reported by Martin MOKREJS <mmokrejs@natur.cuni.cz>
460 2003-10-08 Paul Eggert <eggert@twinsun.com>
462 Don't use XMALLOC and XCALLOC. Once we install the
463 corresponding patch into gnulib, this will fix some
464 address-calculation overflow bugs on hosts where calloc (A, B)
465 returns garbage when A*B overflows.
467 * m4/hash.c (m4_hash_new, node_new, m4_hash_resize,
468 maybe_grow, m4_get_hash_iterator_next): Replace XMALLOC with
469 xmalloc, XCALLOC with xcalloc.
470 * m4/m4.c (m4_create): Likewise.
471 * m4/m4private.h (m4_symbol_value_create): Likewise.
472 * m4/output.c (m4_output_init): Likewise.
473 * m4/symtab.c (symtab_fetch, m4_set_symbol_traced): Likewise.
474 * m4/syntax.c (remove_syntax_attribute): Likewise.
475 * src/freeze.c (reload_frozen_state): Likewise.
476 * src/main.c (main): Likewise.
478 2003-10-07 Gary V. Vaughan <gary@gnu.org>
480 * Makefile.am (ACLOCAL_AMFLAGS): Search in the new acm4 and
481 gnulib/acm4 directories for aclocal m4 macros.
482 * gnulib/Makefile.am (EXTRA_DIST): Removed.
483 (MAINTAINERCLEANFILES): Add Makefile.in.
484 * configure.ac (m4_GNULIB_MODULES): Use it to declare which gnulib
486 * acm4/m4-gnulib.m4 (m4_GNULIB_MODULES): New macro.
487 * gnulib/import: New file. Temporary script for updating gnulib
488 imported files, until gnulib-tool is working.
489 * gnulib/config/codeset.m4, gnulib/config/error.m4,
490 gnulib/config/exitfail.m4, gnulib/config/extensions.m4,
491 gnulib/config/getopt.m4, gnulib/config/gettext.m4,
492 gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
493 gnulib/config/intdiv0.m4, gnulib/config/inttypes-pri.m4,
494 gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
495 gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
496 gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
497 gnulib/config/lib-prefix.m4, gnulib/config/malloc.m4,
498 gnulib/config/nls.m4, gnulib/config/obstack.m4,
499 gnulib/config/onceonly_2_57.m4, gnulib/config/po.m4,
500 gnulib/config/progtest.m4, gnulib/config/realloc.m4,
501 gnulib/config/regex.m4, gnulib/config/restrict.m4.
502 gnulib/config/stdbool.m4, gnulib/config/stdint_h.m4,
503 gnulib/config/strerror_r.m4, gnulib/config/strndup.m4,
504 gnulib/config/strnlen.m4, gnulib/config/strtol.m4,
505 gnulib/config/uintmax_t.m4, gnulib/config/ulonglong.m4,
506 gnulib/config/unlocked-io.m4, gnulib/config/xalloc.m4,
507 gnulib/config/xstrndup.m4: Removed.
508 * gnulib/acm4/alloca.m4, gnulib/acm4/codeset.m4,
509 gnulib/acm4/error.m4, gnulib/acm4/exitfail.m4,
510 gnulib/acm4/extensions.m4, gnulib/acm4/free.m4,
511 gnulib/acm4/getopt.m4, gnulib/acm4/gettext.m4,
512 gnulib/acm4/glibc21.m4, gnulib/acm4/iconv.m4,
513 gnulib/acm4/intdiv0.m4, gnulib/acm4/inttypes-pri.m4,
514 gnulib/acm4/inttypes.m4, gnulib/acm4/inttypes_h.m4,
515 gnulib/acm4/isc-posix.m4, gnulib/acm4/lcmessage.m4,
516 gnulib/acm4/lib-ld.m4, gnulib/acm4/lib-link.m4,
517 gnulib/acm4/lib-prefix.m4, gnulib/acm4/malloc.m4,
518 gnulib/acm4/nls.m4, gnulib/acm4/obstack.m4,
519 gnulib/acm4/onceonly_2_57.m4, gnulib/acm4/po.m4,
520 gnulib/acm4/progtest.m4, gnulib/acm4/realloc.m4,
521 gnulib/acm4/regex.m4, gnulib/acm4/restrict.m4.
522 gnulib/acm4/stdbool.m4, gnulib/acm4/stdint_h.m4,
523 gnulib/acm4/strerror_r.m4, gnulib/acm4/strndup.m4,
524 gnulib/acm4/strnlen.m4, gnulib/acm4/strtol.m4,
525 gnulib/acm4/uintmax_t.m4, gnulib/acm4/ulonglong.m4,
526 gnulib/acm4/unlocked-io.m4, gnulib/acm4/xalloc.m4,
527 gnulib/acm4/xstrndup.m4: Reimported from CVS gnulib with
528 gnulib/import script.
529 * gnulib/m4/alloca.c, gnulib/m4/alloca_.h, gnulib/m4/error.c,
530 gnulib/m4/error.h, gnulib/m4/exitfail.c, gnulib/m4/free.c,
531 gnulib/m4/malloc.c, gnulib/m4/obstack.c, gnulib/m4/obstack.h,
532 gnulib/m4/realloc.c, gnulib/m4/regex.c, gnulib/m4/strtol.c,
533 gnulib/m4/version-etc.c, gnulib/m4/version-etc.h,
534 gnulib/m4/xalloc.h, gnulib/m4/xmalloc.c: Updated from CVS
535 gnulib with gnulib/import script.
536 * configure.ac, gnulib/m4/Makefile.am: Manually insert anticipated
537 guards ready for gnulib-tool to autoupdate on import.
538 * config/debug.m4, config/gmp.m4, config/m4-error.m4,
539 config/m4-gettext.m4, config/m4-obstack.m4, config/m4-regex.m4,
540 config/stackovf.m4: Moved from here...
541 * acm4/debug.m4, acm4/gmp.m4, acm4/m4-error.m4,
542 acm4/m4-gettext.m4, acm4/m4-obstack.m4, acm4/m4-regex.m4,
543 acm4/stackovf.m4: ...to here, to separate aclocal macros from
544 configure time helper scripts.
545 * config/error.m4: Removed; superceded by gnulib/acm4/error.m4.
546 * m4/hash.c, m4/m4.c, m4/macro.c, m4/module.c, m4/output.c,
547 m4/path.c, m4/symtab.c, m4/syntax, m4/system_.h, modules/m4.c,
548 src/main.c, src/stackovf.c: s/xfree/free/g to comply with new
550 * src/main.c (version_etc_copyright): Only output the current
552 (version_etc): Call with new variadic API.
554 2003-09-16 Gary V. Vaughan <gary@gnu.org>
556 * gnulib/m4/version-etc.c, gnulib/m4/version-etc.h: Import
557 version-etc module from CVS gnulib.
558 * po/POTFILES.in: Add gnulib/m4/version-etc.c.
559 * src/Makefile.am: Build it.
560 * src/main.c: Use it.
562 * gnulib/m4/exit.h: Import exit module from CVS gnulib.
563 * gnulib/m4/Makefile.am (pkginclude_HEADERS): Add exit.h.
564 * m4/system_.h: Don't define EXIT_SUCCESS and FAILURE, include
567 2003-09-15 Charles Wilson <cygwin@cwilson.fastmail.fm>,
568 Gary V. Vaughan <gary@gnu.org>
570 * bootstrap: Separate options.
571 * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
572 * gnulib/m4/Makefile.am (stdbool.h): Use srcdir, gnulib_srcdir is
574 * modules/Makefile.am (gnu_la_LIBADD, load_la_LIBADD)
575 (m4_la_LIBADD, mpeval_la_LIBADD, traditianal_la_LIBADD)
576 (modtest_la_LIBADD, import_la_LIBADD, perl_la_LIBADD)
577 (shadow_la_LIBADD, stdlib_la_LIBADD, time_la_LIBADD): Add
578 $(LTLIBINTL) for gettext support on cygwin.
579 * src/Makefile.am (m4_LDADD): Remove $(INTLLIBS), since we now
580 have $(LTLIBINTL) from the preloaded module la files.
581 * README: Remove the warning about using --disable-nls on Windows
584 2003-09-15 Gary V. Vaughan <gary@gnu.org>
586 * gnulib/m4/regex.c: s/<regex.h>/"regex.h"/ or else the compiler
587 picks up the system regex.h if gl_REGEX decides gnulib/m4/regex.c
590 2003-09-12 Gary V. Vaughan <gary@gnu.org>
592 * doc/STYLE: Document the gnulib header naming conventions, and
594 * gnulib/m4/error_.h, gnulib/m4/gettext_.h, gnulib/m4/obstack_.h,
595 gnulib/m4/regex_.h: Renamed to gnulib/m4/error.h,
596 gnulib/m4/gettext.h, gnulib/m4/obstack.h, gnulib/m4/regex.h
598 * gnulib/m4/Makefile.am: Remove the rules to build these headers.
600 * gnulib/m4/strtol.c, gnulib/config/strtol.m4: Import strtol
601 module from CVS gnulib.
602 * configure.ac (AC_REPLACE_FUNCS): Remove strtol.
603 (gl_FUNC_STRTOL): In favour of the module macro.
605 2003-09-12 Gary V. Vaughan <gary@gnu.org>
607 Replace the getopt code with CVS gnulib getopt. The source files
608 detect whether they are in a glibc environment and preprocess away
609 all of the code if there is a system getopt, so we can compile
610 them into the m4 executable unconditionally:
612 * gnulib/m4/getopt.c, gnulib/m4/getopt1.c, gnulib/m4/getopt.h,
613 gnulib/config/getopt.m4: Import getopt module from CVS gnulib.
614 * configure.ac (gl_GETOPT): Use this instead of homebrew inline
616 * src/getopt.c, src/getopt1.c, src/gnu-getopt.h: Removed old
618 * src/Makefile.am: Adjust.
619 * src/main.c: Always include our shipped getopt.h.
620 * po/POTFILES.in: Use new location of getopt.c.
622 2003-09-12 Gary V. Vaughan <gary@gnu.org>
624 * configure.ac (AC_CONFIG_FILES): Remove config/Makefile.
625 * config/Makefile.am: Removed. Automake 1.8 distributes the files
626 in this directory automatically.
627 * Makefile.am (EXTRA_DIST): Except config/mkstamp.
629 * configure.ac (pkglibexecdir): Don't try and set it here, PACKAGE
631 * m4/Makefile.am (MODULE_PATH): Removed. Calculate pkglibexecdir
633 * modules/Makefile.am (pkglibexecdir): Set it here.
634 (pkgmodincdir): Renamed to pkgmodincludedir). Changed all clients.
636 * gnulib/m4/regex.c, gnulib/m4/regex_.h, gnulib/config/regex.m4:
637 Import regex module from CVS gnulib.
638 * gnulib/config/restrict.m4: Ditto for dependee module restrict.
639 * config/m4-regex.m4 (m4_REGEX): Wrap gnulib/config/regex.m4, but
640 do extra substitutions for Makefile.
641 * configure.ac: Use it.
642 * gnulib/m4/Makefile.am: Maybe install regex.h after linking it
643 from regex_.h if necessary.
644 * m4/system_.h: Include the correct version of regex.h.
645 * m4/regex.c, m4/regex.h, config/regex.m4: Removed legacy
647 * po/POTFILES.in: Use new location of regex.c.
649 * gnulib/m4/Makefile.am (EXTRA_DIST): Removed malloc.c and
650 realloc.c: automake distributes these files already.
652 2003-09-12 Gary V. Vaughan <gary@gnu.org>
654 Replace the xstrzdup code by importing the xstrndup module from
655 CVS gnulib, along with its dependencies: strndup and strnlen:
657 * gnulib/m4/xstrndup.c, gnulib/m4/xstrndup.h,
658 gnulib/config/xstrndup.m4: Import xstrndup module from CVS
660 * gnulib/m4/strndup.c, gnulib/m4/strndup.h,
661 gnulib/config/strndup.m4: Ditto wrt strndup.
662 * gnulib/m4/strnlen.c, gnulib/config/strnlen.m4: Ditto wrt
664 * gnulib/m4/Makefile.am: Add rules from newly imported modules.
665 However, contrary to gnulib, we install xstrndup.h.
666 * configure.ac (AC_REPLACE_FUNCS): Remove xstrzdup.
667 * gnulib/lib/xstrzdup.c: Delete. This was never a gnulib file, it
668 is an artifact of the old m4 portability layer.
669 * configure.ac (gl_XSTRNDUP): This is the gnulib equivalent.
670 * m4/system_.h: Include xstrndup.h.
671 * m4/macro.c (process_macro): Call xstrndup, not xstrzdup.
673 2003-09-11 Gary V. Vaughan <gary@gnu.org>
675 Reimport the latest xalloc module from CVS gnulib, and adjust the
676 m4 sources to take advantage of xalloc xfree. Also create a new
677 macro DELETE with the same semantics as the old m4 XFREE macro,
678 and carefully tweak callers:
680 * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h: Updated from CVS
682 * m4/utility.c (xfree): Removed. This function is now supplied by
684 * m4/m4private.h (WITH_DMALLOC): Removed XFREE redefine.
685 * m4/path.c (search_path_add): Use NEW macro from xalloc.h.
686 * m4/symtab.c (m4_symtab_create): Ditto.
687 * m4/system_.h: Removed XFREE redefine.
688 (DELETE): New macro with same functionality as the original m4
689 XFREE macro, but based on xalloc.h now. Changed all callers.
690 * src/main.c (main): Use XMALLOC macro.
691 * m4/hash.c, m4/macro.c, m4/symtab.c, m4/syntax.c: Use xfree
693 * m4/output.c (m4_output_exit): Use DELETE instead of XFREE.
695 2003-09-10 Gary V. Vaughan <gary@gnu.org>
697 Import the xalloc module from CVS gnulib, along with its
698 dependencies: exitfail, malloc and realloc. We had different
699 semantics for our XFREE and a function xfree() not supplied by
700 gnulib, so also a bit of work to keep everything running
703 * configure.ac (AC_REPLACE_FUNCS): Removed xmalloc and xstrdup.
704 (gl_XALLOC): Use gnulib equivalents.
705 * gnulib/config/exitfail.m4, gnulib/m4/exitfail.h,
706 gnulib/m4/exitfail.c: Import exitfail module from CVS gnulib.
707 * gnulib/config/malloc.m4, gnulib/m4/malloc.c: Ditto wrt malloc.
708 * gnulib/config/realloc.m4, gnulib/m4/realloc.c: Ditto wrt
710 * gnulib/config/xalloc.m4, gnulib/m4/xalloc.h,
711 gnulib/m4/xmalloc.c, gnulib/m4/xstrdup.c: Ditto wrt xalloc.
712 * gnulib/m4/Makefile.am: Add fragment from gnulib for newly
714 (pkgincdir): Removed. Use pkgincludedir instead.
715 * m4/m4private.h (XFREE): xfree already checks for NULL.
716 * m4/system_.h: Use xalloc module, and remove macros already
717 supplied by xalloc.h.
718 * m4/utility.c (xfree): xalloc does not yet implement xfree, so
719 moved the old definition from m4/xmalloc.c to here for now.
721 2003-09-09 Gary V. Vaughan <gary@gnu.org>
723 Import the error and progname modules from CVS gnulib. Our old
724 error.c subsumed the functionality of both, so a little adjustment
725 was required to accomodate the split in sources. Also added more
726 wrapper macros to choose between a system installed error.h or our
727 shipped gnulib error module:
729 * m4/error.c, m4/error.h: Removed.
730 * m4/Makefile.am: Adjust.
731 (pkgincdir): Removed. Use pkgincludedir instead.
732 * m4/module.h, src/main.c: Don't include `m4/error.h'.
733 * m4/system_.h (INCLUDE_ERROR_H): Add a substitution for suitable
735 * gnulib/m4/progname.c: Imported from CVS gnulib.
736 * gnulib/m4/progname.h: Ditto.
737 * src/main.c: Adjust to use progname module.
738 * gnulib/m4/error.c: Imported from CVS gnulib.
739 * gnulib/m4/error_.h: Ditto.
740 * gnulib/m4/Makefile.am: Build the error module into our libgnu.la
741 if appropriate, and link a local error.h if the system version is
743 (libgnu_la_SOURCES) Add progname module sources.
744 * gnulib/config/error.m4: Imported from CVS gnulib.
745 * gnulib/config/strerror_r.m4: Ditto.
746 * config/m4-error.c: New file. Wrap gnulib error.m4 but arrange
747 to have ERROR_H for Makefile substitutions and tell system.h
748 whether the system error.h should be used, or a locally installed
750 * configure.ac (jm_PREREQ_ERROR): Replaced by a call to m4_ERROR.
752 2003-09-09 Gary V. Vaughan <gary@gnu.org>
754 * gnulib/m4/Makefile.am (MOSTLYCLEANFILES): Typo
755 s/gettext_.h/gettext.h/.
757 * bootstrap: Revert 2003-09-04 patch now that CVS autoconf and
758 automake have been fixed.
760 * config/m4-obstack.m4 (m4_FUNC_OBSTACK): D'oh! Now that we wrap
761 gl_OBSTACK, which in turn calls AC_FUNC_OBSTACK, don't rerun bits
762 of code originally snarfed from AC_FUNC_OBSTACK!!! While I'm here
763 rename to m4_OBSTACK in light of wrapping gl_OBSTACK.
765 2003-09-09 Gary V. Vaughan <gary@gnu.org>
767 The gnulib obstack module requires the gnulib gettext module for
768 systems that do not have GNU gettext installed. Because we use
769 -Ignulib/m4 in our Makefiles it is not safe to drop gettext.h in
770 that directory incase it clashes with the system gettext.h. This
771 delta uses gettext_.h and extra rules in the Makefile to make a
772 link to gettext.h when needed:
774 * Makefile.am (auxdir): Removed. No longer used.
775 * configure.ac (ac_aux_dir): Removed AC_SUBST. No longer used.
776 (TIMESTAMP): List path to `mkstamp' literally, as ac_aux_dir has
778 (AC_CONFIG_LIBOBJ_DIR): Declare this for possible future single
779 Makefile based build.
780 (AC_CONFIG_AUX_DIR): Now we use gnulib/config where the majority
781 of the macros are kept.
782 * Makefile.am (ACLOCAL_MFLAGS): Search gnulib/config first.
783 * configure.ac (AM_INIT_AUTOMAKE): Require 1.7a.
784 * config/Makefile (ACLOCAL_MACROS): Removed. Automake 1.7a
785 distributes these automatically.
786 * config/regex.m4 (jm_WITH_REGEX): Fixed underquoting to prevent
787 warning from automake-1.7a.
788 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Renamed to
789 m4_CHECK_DEBUGGING for consistency with gnulib prefixes. Changed
791 * config/m4-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto
792 wrt. m4_FUNC_OBSTACK.
793 * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto
794 wrt. m4_sys_STACKOVF.
795 * config/gmp.m4 (_M4_AC_LIB_GMP, M4_AC_LIB_GMP): Ditto
796 wrt. _m4_LIB_GMP, m4_LIB_GMP.
797 (ac_gmp_save_LIBS, ac_cv_using_lib_gmp): Don't use autoconf's
798 namespace. Renamed to m4_gmp_save_LIBS and m4_cv_using_lib_gmp
800 * config/m4-gettext.m4: New file to set GETTEXT_H appropriately.
801 * gnulib/m4/Makefile.am: Added a new block to make an appropriate
802 gettext.h link on deficient systems.
803 (pkginc_HEADERS): Mention $(GETTEXT_H).
804 (EXTRA_HEADERS): Mention gettext.h.
805 * gnulib/config/gettext_.h: New file from gnulib's gettext.h.
806 * gnulib/config/codeset.m4, gnulib/config/gettext.m4,
807 gnulib/config/glibc21.m4, gnulib/config/iconv.m4,
808 gnulib/config/intdiv.m4, gnulib/config/inttypes-pri.m4,
809 gnulib/config/inttypes.m4, gnulib/config/inttypes_h.m4,
810 gnulib/config/isc-posix.m4, gnulib/config/lcmessage.m4,
811 gnulib/config/lib-ld.m4, gnulib/config/lib-link.m4,
812 gnulib/config/lib-prefix.m4, gnulib/config/nls.m4,
813 gnulib/config/po.m4, gnulib/config/progtest.m4,
814 gnulib/config/stdint_h.m4, gnulib/config/uintmax_t.m4,
815 gnulib/config/ulonglong.m4: Imported from CVS gnulib.
817 2003-09-05 Gary V. Vaughan <gary@gnu.org>
819 We can't mirror the gnulib directory structure here, since we need
820 to be able to eg. `#include <m4/obstack.h>' from our source files,
821 which is much easier if the local obstack.h is created in a
822 directory named m4. Rather than trying to symlink everything into
823 the m4 directory, now we build a libtool convenience library from
824 the sources we get from gnulib and link that with libm4.la:
826 * gnulib/config/extensions.m4: Imported from CVS gnulib.
827 * gnulib/config/unlocked-io.m4: Ditto.
828 * gnulib/m4/unlocked-io.h: Ditto.
829 * gnulib/m4/obstack.m4, gnulib/m4/onceonly_2_57.m4,
830 gnulib/m4/stdbool.m4: All moved to gnulib/config directory.
831 * gnulib/lib/obstack.c, gnulib/lib/obstack_.h,
832 gnulib/lib/stdbool_.h: All moved to gnulib/m4 directory.
833 * m4/strtol.c, m4/xmalloc.c, m4/xstrdup.c, m4/xstrzdup.c: Ditto.
834 * m4/Makefile.am: Adjust.
835 * gnulib/Makefile.am (EXTRA_DIST): Name just the additional gnulib
836 macros we redistribute.
837 * gnulib/m4/Makefile.am: New file. Build libgnu.la convenience
838 library among others.
839 (GNULIB_SRCS, GNULIB_MACROS): Removed.
840 * Makefile.am (ACLOCAL_AMFLAGS): Adjust.
841 * config/m4-obstack.m4: Adjust.
842 * po/POTFILES.in: Adjust.
843 * configure.ac: Reformatting. Call newly imported gnulib macros.
844 * m4/builtin.c, m4/macro.c, m4/module.c, m4/utility.c: Removed
845 bogus calls of `#include "m4.h"'.
846 * Makefile.am: INCLUDES has been deprecated in favour of
848 * m4/Makefile.am: Ditto.
849 * modules/Makefile.am: Ditto.
850 * src/Makefile.am: Ditto.
852 2003-09-05 Gary V. Vaughan <gary@gnu.org>
854 * config/Makefile.am: Reverting yesterdays patch for VPATH builds.
856 2003-09-04 Gary V. Vaughan <gary@gnu.org>
858 Migrate the obstack support into the gnulib directories for easy
859 synchronisation with upstream files in gnulib:
861 * config/gnu-obstack.m4: Moved from here...
862 * config/m4-obstack.m4: ...to here.
863 * config/Makefile.am (SPECIFIC_MACROS): Adjust.
864 * m4/obstack.c, m4/obstack_.h: Moved from here...
865 * gnulib/obstack.c, gnulib/obstack.h: ...to here.
866 * po/POTFILES.in: Adjust.
867 * gnulib/Makefile.am (GNULIB_SRCS, GNULIB_MACROS): Adjust.
868 * m4/Makefile.am: Add a whole new section to link the obstack
869 sources from the gnulib tree if necessary.
870 * gnulib/m4/onceonly_2_57.m4, gnulib/m4/obstack.m4: New macros
872 * config/m4-obstack.m4: Rewrite as a wrapper for
873 gnulib/m4/obstack.m4.
875 2003-09-04 Gary V. Vaughan <gary@gnu.org>
877 GNU M4 currently builds with a number of files adapted from
878 upstream sources. Recently the gnulib project on savannah.gnu.org
879 has pulled together a great many of these externally maintained
880 files. This delta is the beginnings of isolating those files
881 maintained in gnulib to make it easy to synchronise M4 with the
882 upstream files prior to releases.
884 * Makefile.am (ACLOCAL_AMFLAGS): Mention gnulib/m4 macro
886 (SUBDIRS): Added new gnulib subdirectory.
887 * configure.ac (AC_CONFIG_FILES): Add new gnulib tree Makefiles.
888 * config/stdbool.m4: Moved from here...
889 * gnulib/m4/stdbool.m4: ...to here.
890 * m4/stdbool_.h: Moved from here...
891 * gnulib/lib/stdbool_.h: ...to here.
892 * gnulib/Makefile.am: New file. Make sure the gnulib tree is
894 * m4/Makefile.am: Adjust gnulib/modules/stdbool:Makefile.am based
895 code to work with new stdbool_.h location.
896 (gnulib_srcdir): New.
898 2003-09-04 Gary V. Vaughan <gary@gnu.org>
900 * config/Makefile.am (MAINTAINERCLEANFILES, ACLOCAL_MACROS)
901 (STANDARD_TOOLS, SPECIFIC_MACROS): Needed `$(srcdir)/' for VPATH
903 (SPECIFIC_TOOLS): New variable. Moved mkstamp to here.
904 (EXTRA_DIST): Use it.
906 * bootstrap: CVS autoreconf leaves file droppings. Remove
907 aclocal.m4t incase autoreconf doesn't.
909 2003-08-29 Gary V. Vaughan <gary@gnu.org>
911 * m4/gnu-obstack.h: Updated from CVS gnulib. For consistency with
912 the other gnulib imports, renamed to m4/obstack_.h.
913 * m4/obstack.c: Updated from CVS gnulib.
914 * m4/Makefile.am (EXTRA_HEADERS): Adjust.
915 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Merge in additional
916 header tests from gnulib obstack module. AC_CONFIG_LINKS knows
917 about vpath already, and $top_srcdir upsets CVS Automake, so the
918 $top_srcdir reference was removed.
920 * m4/system-h.in: For consistency with the gnulib imports, renamed
922 * m4/Makefile (EXTRA_HEADERS): Adjust.
923 * configure.ac (AC_CONFIG_FILES): Adjust.
925 * m4/stdbool_.h: New file from gnulib for systems without their
927 * m4/Makefile.am: Add snippets from gnulib for C99 bool support.
928 * config/stdbool.m4: New file. Macros from gnulib for same.
929 * configure.ac: Use it.
931 2003-08-27 Gary V. Vaughan <gary@gnu.org>
933 * config/debug.m4: `perl -pi.bak -e 's/(Copyright) (\d)/$1 (C) $2/g'`
934 * config/gmp.m4: Ditto.
935 * config/gnu-obstack.m4: Ditto.
936 * config/stackovf.m4: Ditto.
937 * m4/builtin.c: Ditto.
941 * m4/gnu-obstack.h: Ditto.
946 * m4/m4module.h: Ditto.
947 * m4/m4private.h: Ditto.
949 * m4/module.c: Ditto.
950 * m4/obstack.c: Ditto.
951 * m4/output.c: Ditto.
955 * m4/strtol.c: Ditto.
956 * m4/symtab.c: Ditto.
957 * m4/syntax.c: Ditto.
958 * m4/utility.c: Ditto.
959 * m4/xmalloc.c: Ditto.
960 * m4/xstrdup.c: Ditto.
961 * m4/xstrzdup.c: Ditto.
962 * modules/evalparse.c: Ditto.
963 * modules/format.c: Ditto.
964 * modules/gnu.c: Ditto.
965 * modules/import.c: Ditto.
966 * modules/load.c: Ditto.
967 * modules/m4.c: Ditto.
968 * modules/m4.h: Ditto.
969 * modules/modtest.c: Ditto.
970 * modules/mpeval.c: Ditto.
971 * modules/perl.c: Ditto.
972 * modules/shadow.c: Ditto.
973 * modules/stdlib.c: Ditto.
974 * modules/time.c: Ditto.
975 * modules/traditional.c: Ditto.
976 * src/freeze.c: Ditto.
977 * src/getopt.c: Ditto.
978 * src/getopt1.c: Ditto.
981 * src/stackovf.c: Ditto.
983 * config/gmp.m4 (M4_AC_LIB_GMP): Use AC_INCLUDES_DEFAULT:
984 ac_default_headers is an autoconf internal variable.
985 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
986 * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
988 * configure.ac (AC_CONFIG_FILES): Add tests/atlocal.
989 * tests/Makefile.am (TESTS_ENVIRONMENT): Revert the 2003-08-14
992 2003-08-15 Gary V. Vaughan <gary@gnu.org>
994 * configure.ac (AC_HEADER_STDBOOL, INCLUDE_STDBOOL_H): Check for
996 * system-h.in (m4_boolean): Removed in favour of using C99 bool if
997 possible or faking one with a typedef. Changed all callers.
999 2003-08-15 Gary V. Vaughan <gary@gnu.org>
1001 Still cleaning up the users' module API, by taking out the stuff
1002 that isn't used by any existing modules, and moving specialised
1003 functions out of libm4 and into the module they are used by.
1005 * m4/m4module.h (m4_skip_space): No need to export this. Moved...
1006 * m4/utility.c (m4_skip_space): ...to here the home of its only
1007 use, made static and renamed to `skip_space'. Changed all
1009 * m4/m4module.h (m4_expand_ranges): Removed prototype.
1010 * m4/utility.c (m4_expand_ranges): Moved definition from here...
1011 * modules/m4.c (m4_expand_ranges): ...to here, and exported using
1013 * modules/m4.h (m4_expand_ranges_func): For lt_dlsym import
1015 * modules/gnu.c (builtin_syntax): Import and use in this
1016 builtin implementation.
1017 * m4/m4module.h (M4_DEBUG_PRINT1, M4_DEBUG_PRINT2, M4_DEBUG_PRINT3):
1019 * m4/macro.c (trace_flush): Except here where the macro is now
1021 * m4/m4module.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
1022 (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): Only used internally, so
1024 * m4/m4private.h (M4_DEBUG_MESSAGE, M4_DEBUG_MESSAGE1)
1025 (M4_DEBUG_MESSAGE2, M4_DEBUG_MESSAGE3): ...to here.
1027 2003-08-14 Gary V. Vaughan <gary@gnu.org>
1029 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use the interrim new
1030 compiler based AC_CHECK_HEADER that was introduced in
1032 * config/stackovf.m4 (M4_AC_SYS_STACKOVF): Ditto.
1033 * config/gmp.m4 (AC_LIB_GMP): Ditto. And renamed to M4_AC_LIB_GMP.
1034 * configure.ac: Use renamed M4_AC_LIB_GMP.
1036 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Don't AC_REQUIRE a
1037 macro that requires arguments! This stops the shell's bad
1038 substitution error at configure time.
1040 * tests/Makefile.am (TESTS_ENVIRONMENT): Now we can pass make
1041 variables to the testsuite shell. Set the value of USE_GMP so
1042 that the gmp test will run!
1043 (check-local, clean-local): Use the TESTS_ENVIRONMENT variable.
1045 2003-08-11 Gary V. Vaughan <gary@gnu.org>
1047 Libltdl already has an excellent mechanism for accessing C symbols
1048 in modules. Lets use that! Remove all the exporting cruft and
1049 just use lt_dlsym in conjunction with a few conventions to
1050 simplify module writers' jobs. Also removed the table address
1051 caching code and otherwise simplified the module loader quite a
1052 bit. To access exported symbols in other modules, first the
1053 exporting module must name the symbols <modname>_LTX_<symname>,
1054 and the importing module must define a function type called
1055 <symname>_func. The importer then adds
1056 M4_MODULE_IMPORT(<modname>, <symname>) at the top of any function
1057 that wishes to call out to the exported functions. Care must be
1058 taken that <symname> is non-NULL in the importing module incase
1059 M4_MODULE_IMPORT fails, but otherwise it can be called as if the
1060 definition was in the importers source. Study
1061 `modules/{gnu.c,m4.{c,h}' for a model example. At the moment,
1062 m4_module_import will attempt to automatically load a module
1063 required for symbol access if it is not loaded already.
1065 * TODO: Removed the items fixed in this delta.
1066 * m4/ltdl.c (lt_dlhandle_find): New function to find a handle by
1068 * m4/ltdl.h (lt_dlhandle_find): Declare it.
1069 * m4/module.c (m4_module_unload): Use it.
1070 * src/freeze.c (reload_frozen_state): Ditto.
1071 * m4/m4module.h (m4_export): Deleted. Removed all references.
1072 (M4_MODULE_IMPORT): New user convenience macro for importing
1073 arbitrary symbols from other modules.
1074 * m4/module.c (m4_module_import): New function to service
1075 M4_MODULE_IMPORT macro.
1076 (module_data): Removed. Looking up the tables on demand with
1077 lt_dlsym, rather than caching their addresses here simplifies the
1079 (m4_get_module_builtin_table, m4_get_module_macro_table):
1080 Removed. Changed all callers.
1081 (set_module_macro_table, set_module_builtin_table): Renamed to
1082 install_macro_table and install_builtin_table respectively, and
1083 simplified now that the cache is no more.
1084 * modules/gnu.c (builtin_symbols): Use this new mechanism to
1085 import m4_dump_symbols from the m4 module.
1086 (builtin_esyscmd): Likewise for m4_set_sysval and
1088 * modules/m4.c (m4_export_table): Removed. Functions are
1089 addressed with the new mechanism which doesn't need this.
1090 (m4_set_sysval): New exported accessor function to prevent
1091 problems with variable access on inferior architectures.
1092 * modules/m4.h (m4_sysval_flush_func, m4_set_sysval_func)
1093 (m4_dump_symbols_func): Typedefs required by M4_MODULE_IMPORT so
1094 that we can have some type safety.
1095 * modules/modtest.c (export_test): C level exported function for
1096 testing the new import mechanism.
1097 * modules/import.c: New file for the import end of the test.
1098 * modules/Makefile.am (pkglibexec_LTLIBRARIES): Added import.la.
1099 * tests/modules.at: New test cases for intermodule symbol
1102 2003-08-07 Gary V. Vaughan <gary@gnu.org>
1104 * m4/m4module.c (m4_string): Moved from here...
1105 * m4/m4private.c (m4_string): ...to here.
1107 * m4/utility.c (dumpdef_cmp): Removed stale declaration.
1109 2003-07-29 Gary V. Vaughan <gary@gnu.org>
1111 * m4/m4module.h (M4_DEFAULT_NESTING_LIMIT): This value is
1112 already available to module writers through
1113 m4_{get,set}_nesting_limit_opt(), so moved from here...
1114 * m4/m4.c (DEFAULT_NESTING_LIMIT): ...to here and renamed.
1115 (m4_create): Use it.
1117 2003-07-28 Gary V. Vaughan <gary@gnu.org>
1119 Aside from auditing path.c for m4module.h api obfuscation, this
1120 delta introduces the concept of private struct members in opaque
1121 data types to GNU m4: See the STYLE file for details.
1123 * TODO: Remind ourselves that a rewrite of path.c is needed.
1124 * m4/m4module.h (m4_search_path, struct m4_search_path_info):
1126 * m4/m4private.h (m4__search_path, m4__search_path_info): ...to
1127 here and renamed. These type definitions are for internal api use
1128 only. Changed all callers.
1129 * m4/m4module.h (m4_search_path_env_init, m4_search_path_add):
1131 * m4/path.c (search_path_env_init, search_path_add): ...to here
1132 and renamed. These calls were never used outside this file.
1133 Changed all callers.
1134 (dirpath): Moved functionality of this static declaration...
1135 * m4/m4private.h (struct m4): ...to this new internal only
1136 search_path field. Changed all callers.
1137 (m4__get_search_path): Added new internal api accessor.
1138 * m4/path.c (m4_search_path_info_new): Removed. Not used.
1139 (m4_include_init): Removed...
1140 * m4/m4.c (m4_create): ...because the new m4 field is now
1142 (m4_delete): Recycle search_path memory.
1143 * src/main.c (main): Don't call m4_include_init now that it's
1145 * doc/STYLE: Document convention for private fields in opaque
1148 2003-07-24 Gary V. Vaughan <gary@gnu.org>
1150 Sometimes exporting the address of a symbol from a module isn't
1151 enough for other modules to call that symbol correctly. If
1152 custom data types are used for function parameters, they need to
1153 be known to the caller. This change introduces the concept of
1154 $(prefix)/include/modules/$(modulename).h to declare those
1155 structures. Also we move m4_dump_symbols from libm4 to the m4
1156 module to show this concept in action.
1158 * m4/m4module.h (m4_dump_symbol_data): Moved from here...
1159 * modules/m4.h (m4_dump_symbol_data): ...to this new file for
1160 exporting data structures from modules/m4.c.
1161 * modules/m4.c, modules/gnu.c: Include it.
1162 * modules/Makefile.am (pkgmodinc_HEADERS): Install it.
1163 * m4/m4module.h (m4_dump_symbol_CB, m4_dump_symbols): Removed
1165 * m4/utility.c (dumpdef_cmp, m4_dump_symbol_CB, m4_dump_symbols):
1167 * modules/m4.c (dumpdef_cmp_CB, dump_symbol_CB, m4_dump_symbols):
1168 ...to here, with slight renaming.
1169 (m4_export_table): Prototype and add m4_dump_symbols.
1170 * m4/symtab.c (m4_is_symbol_value_void): Needed for an external
1171 definition of m4_dump_symbols.
1172 * m4/m4module.h (m4_is_symbol_value_void): Prototype it.
1173 * m4/m4private.h (m4_is_symbol_value_void): Fast macro version.
1175 2003-07-24 Gary V. Vaughan <gary@gnu.org>
1177 Create an export table in modules/m4.c in readiness for beefing up
1178 the module loader to track module exports and imports.
1180 * m4/m4module.h (m4_debug_flush_files): Removed prototype.
1181 * m4/debug.c (m4_debug_flush_files): Moved...
1182 * modules/m4.c (m4_sysval_flush): ...to here and renamed.
1183 * modules/gnu.c (builtin_esysval): Use it.
1184 * m4/m4module.h (m4_export): New type for declaring module symbols
1186 * modules/m4.c (m4_export_table): List symbols exported from this
1187 module for use by other modules.
1189 2003-07-24 Gary V. Vaughan <gary@gnu.org>
1191 An experiment: There is loads of code in libm4 which should be in
1192 the m4 module, but is also used by another module. Just because
1193 some linkers won't cope with calls across dynamic runtime loaded
1194 objects I initially left the code in libm4. It will tidy the
1195 module api immensely if this code moves to the right place, I just
1196 need to remember to invent a suitable calling mechanism at some
1197 point. For now, only modules that are statically linked and
1198 preloaded will get this treatment, so the only platforms that will
1199 break are those that require all symbols to be resolved at link
1202 * TODO: Reminder that what I am doing could reduce portability
1203 unless I do something more robust later.
1204 * m4/m4module.h (m4_sysval): No longer exported from libm4.
1205 * m4/utility.c (m4_sysval): No longer declared in libm4.
1206 * modules/Makefile.am: Reformatting.
1207 * modules/m4.c (m4_sysval): Declare it at place of use.
1208 * modules/gnu.c (m4_sysval): Import it for use in esyscmd.
1210 2003-07-23 Gary V. Vaughan <gary@gnu.org>
1212 * m4/m4module.h: Reformatting and rearranging lines a bit.
1213 (m4_obstack): Save typing by typedefing `struct obstack'. Changed
1215 (m4_call_macro, m4_expand_input): Renamed...
1216 (m4_macro_call, m4_macro_expand_input): ...to these. Changed all
1218 (m4_expansion_level, m4_process_macro): Moved...
1219 * m4/macro.c (expansion_level, process_macro): ...to here, and
1222 * m4/m4module.h (program_name): Not used by modules at all, so
1224 * src/main.c (program_name): ...to here.
1225 (print_program_name): Renamed...
1226 (print_program_name_CB): ...to conform to the STYLE guide.
1228 2003-07-23 Gary V. Vaughan <gary@gnu.org>
1230 More refactoring of the m4module.h API. Replace #defines with an
1231 enum, and move non-public functions out of the public API.
1233 * m4/debug.c (stdarg.h, varargs.h): Remove variadic header
1235 * m4/macro.c (stdarg.h): Add ANSI C variadic header.
1236 * m4/debug.c (m4_debug, trace): Moved...
1237 * m4/m4private.h (struct m4): ...to fields of this struct.
1238 (m4_get_debug_file, m4_get_trace_messages): New fast access macros
1240 * m4/debug.c (m4_debug_init, m4_debug_exit): Removed functions...
1241 * src/main.c (m4_debug_init, m4_debug_exit): ...invocations...
1242 * m4/m4.c (m4_create, m4_delete): ...and handled here instead.
1243 * m4/m4module.h (m4_context_field_table): Add entries for new
1244 debug_file and trace_messages fields.
1245 (M4_DEBUG_TRACE_ARGS, M4_DEBUG_TRACE_EXPANSION)
1246 (M4_DEBUG_TRACE_QUOTE, M4_DEBUG_TRACE_ALL, M4_DEBUG_TRACE_LINE)
1247 (M4_DEBUG_TRACE_FILE, M4_DEBUG_TRACE_PATH, M4_DEBUG_TRACE_CALL)
1248 (M4_DEBUG_TRACE_INPUT, M4_DEBUG_TRACE_CALLID)
1249 (M4_DEBUG_TRACE_VERBOSE): Replaced #defines with an enum.
1250 (m4_is_debug_bit): New macro to simplfy checks against the debug
1252 (m4_trace_format, m4_trace_header, m4_trace_flush)
1253 (m4_trace_prepre, m4_trace_pre, m4_trace_post): Removed
1255 * m4/debug.c (m4_trace_format, m4_trace_header, m4_trace_flush)
1256 (m4_trace_prepre, m4_trace_pre, m4_trace_post): Moved...
1257 * m4/macro.c (trace_format, trace_header, trace_flush)
1258 (trace_prepre, trace_pre, trace_post): ...to these newly static
1259 functions, since they are only ever used from this file. Changed
1262 2003-07-17 Gary V. Vaughan <gary@gnu.org>
1264 Change the macros for checking syntax so that matching against
1265 multiple possible syntax classes can be done with a single
1266 comparison some of the time. The various classes are now bits of
1267 an int that can be checked with bitwise logic operators.
1269 * m4/m4module.h (M4_SYNTAX_IGNORE, M4_SYNTAX_OTHER)
1270 (M4_SYNTAX_SPACE, M4_SYNTAX_OPEN, M4_SYNTAX_CLOSE, M4_SYNTAX_COMMA)
1271 (M4_SYNTAX_DOLLAR, M4_SYNTAX_ACTIVE, M4_SYNTAX_ESCAPE)
1272 (M4_SYNTAX_ASSIGN, M4_SYNTAX_ALPHA, M4_SYNTAX_NUM)
1273 (M4_SYNTAX_LQUOTE, M4_SYNTAX_RQUOTE, M4_SYNTAX_BCOMM)
1274 (M4_SYNTAX_ECOMM): Replaced #defines with an enum.
1275 (M4_SYNTAX_ALNUM): Removed. Changed all callers.
1276 (M4_IS_IGNORE, M4_IS_OTHER, M4_IS_SPACE, M4_IS_OPEN, M4_IS_CLOSE)
1277 (M4_IS_COMMA, M4_IS_DOLLAR, M4_IS_ACTIVE, M4_IS_ESCAPE)
1278 (M4_IS_ASSIGN, M4_IS_ALPHA, M4_IS_NUM, M4_IS_LQUOTE, M4_IS_RQUOTE)
1279 (M4_IS_BCOMM, M4_IS_ECOMM, M4__IS_STRING, M4_IS_IDENT): Removed.
1280 Replace all calls with invocations of these...
1281 (m4_is_syntax, m4_has_syntax): ...New macros.
1282 * src/freeze.c (produce_syntax_dump): Remove mask argument, which
1283 is no longer required with new macros. Changed all callers.
1285 2003-07-15 Gary V. Vaughan <gary@gnu.org>
1287 * m4/input.c (CHAR_EOF, CHAR_BUILTIN, CHAR_RETRY): These token
1288 values are returned as part of the internal interface, so they
1290 * m4/private.h: ...to here.
1291 * m4/macro.c (expand_token): Check for out of range
1292 m4_peek_input() results before looking up in the syntax table.
1293 (collect_arguments): Ditto.
1295 * NEWS: Note `$' syntax class.
1297 2003-07-08 Paul Eggert <eggert@twinsun.com> and
1298 Gary V. Vaughan <gary@gnu.org>
1300 Conform to POSIX if the POSIXLY_CORRECT environment is set.
1301 --traditional `define' now smashes all the definitions.
1303 * NEWS: Explain this.
1304 * doc/m4.texinfo (Defn): `defn' takes any number of arguments.
1305 (Extensions): Explain that extensions that are incompatible with
1306 POSIX are disabled if POSIXLY_CORRECT is set.
1307 (Incompatibilities): Remove.
1308 (Define, Other Incompat): Explain difference
1309 between GNU and POSIX behavior of define, pushdef, popdef.
1310 * m4/m4.c (m4_get_posixly_correct_opt): New undef.
1311 * m4/m4module.h (m4_context_opt_bit_table): Add POSIXLY_CORRECT entry.
1312 * m4/m4private.h (M4_OPT_POSIXLY_CORRECT_BIT): New macro.
1313 (m4_get_posixly_correct_opt): New macro.
1314 * m4/m4macro.c (m4_process_macro): Disable $10, $abc etc. if
1316 * modules/m4.c (builtin_functions): defn now takes any number of args.
1317 (builtin_define): Smash all the definitions if
1319 (builtin_defn)): Allow any number of arguments.
1320 (builtin_undivert): Do not allow nonnumeric arguments
1322 * src/main.c (main): Set posixly-correct behavior if either
1323 POSIXLY_CORRECT is set, or if -G is given.
1324 * tests/builtins.at: New test for smashed definitions.
1326 2003-06-27 Gary V. Vaughan <gary@gnu.org>
1328 * doc/m4.texinfo (Changesyntax): Document Dollar syntax class.
1329 * m4/m4module.h (M4__SYNTAX_STRING): New syntax class. Be careful
1330 not to slow the parser down.
1331 (M4__IS_STRING): New macro to test string syntax class membership.
1332 * m4/syntax.c: Adjust docucomment.
1333 (m4_syntax_create): Add a default M4_SYNTAX_DOLLAR element.
1334 (m4_syntax_code): Translate `$' -> M4_SYNTAX_DOLLAR.
1335 * m4/input.c (init_builtin_token): Comment typo.
1336 (m4__next_token): Comment typo.
1337 Accept M4_SYNTAX_DOLLAR items into M4_TOKEN_STRING type tokens
1338 by using the new M4__IS_STRING macro.
1339 * m4/macro.c (m4_process_macro): Use M4_IS_DOLLAR to test for
1340 variable references in macro expansions.
1342 * doc/m4.texinfo (Eregexp and Regexp): Typo.
1343 (Epatsubst and Patsubst): Typo.
1346 2003-06-26 Gary V. Vaughan <gary@gnu.org>
1348 Move the global variables that pertain to syntax to a new `struct
1349 m4_syntax_table', and then add one of these to `struct m4'. The
1350 ripple effect through the code to both change formerly global
1351 references, and make sure a suitable context is available in
1352 lexical scope is disproportionately large compared to the size of
1353 the change proper. This change is a large part of decoupling
1354 syntax.c from the rest of the code that uses it.
1356 * m4/m4private.h (struct m4): Add a syntax field.
1357 * m4/m4.c (m4_create): Initialise it,
1358 (m4_delete): Recycle it.
1359 (m4_get_symtab): Remove hand coded version...
1360 (m4_get_symbol_table): ...and generate this with cpp. Changed all
1362 * m4/m4module.h (m4_context_field_table): Add an extra field so we
1363 can generate m4_get_symbol_table. Add a new row for
1364 m4_get_syntax_table.
1365 (M4SYNTAX): Syntactic sugar for module writers.
1366 (m4_symtab): Renamed to m4_symbol_table. Changed all callers.
1367 (m4_syntax_table): New home for syntax related formerly global
1369 * m4/m4private.h (struct m4_syntax_table): Define it.
1370 * m4/input.c (m4_input_init): Initialisation of these formerly
1371 global variables moved...
1372 * m4/syntax.c (m4_syntax_create): ...to here.
1373 * m4/input.c (m4_input_exit): And similarly, recycling of the
1374 memory used by those values moved...
1375 * m4/syntax.c (m4_syntax_delete): ...to here.
1376 * m4/m4module.h (DEF_LQUOTE, DEF_RQUOTE, DEF_BCOMM, DEF_ECOMM):
1377 Moved to m4/m4private.h.
1378 * m4/syntax.c (m4_get_syntax_lquote, m4_get_syntax_rquote)
1379 (m4_get_syntax_bcomm, m4_get_syntax_ecomm)
1380 (m4_is_syntax_single_quotes, m4_is_syntax_single_comments)
1381 (m4_is_syntax_macro_escaped): New accessors for m4_syntax_table
1382 objects. Changed all callers that used to directly access the
1384 (m4__single_quotes, m4__single_comments, m4__use_macro_escape):
1385 Removed and incorporated into m4_syntax_table structure.
1386 * m4/utility.c (lquote, rquote, bcomm, ecomm): Ditto.
1387 * m4/syntax.c (m4_set_syntax): Now returns an error status,
1388 instead of requiring a `struct m4' to generate its own errors.
1389 Changed all callers.
1390 * src/main.c (main): Now that the syntax table is initialised as
1391 part of m4_create, we have to manually wipe the syntax entries if
1392 we are about to read a frozen file.
1394 2003-06-26 Gary V. Vaughan <gary@gnu.org>
1396 * doc/STYLE: Added notes on callback naming schemes.
1398 * m4/module.c (m4_set_module_macro_table)
1399 (m4_set_module_builtin_table): Declarations weren't changed when
1400 definitions were renamed on 2003-06-19.
1402 * m4/hash.c (m4_hash_resize): ifdefed out. This function is
1403 neither used nor particularly appropriate since it exposes the
1404 internal workings of the hash module. I haven't yet decided
1405 whether to remove it entirely.
1407 2003-06-20 Gary V. Vaughan <gary@gnu.org>
1409 Two related changes, and a huge knockon effect throughout the
1410 source: Moved the option variables out of global space and into
1411 `struct m4'; made `m4_symtab' a real datatype, so that its api
1412 is not marred passing `struct m4' around just so it can decide
1413 whether to keep traced symbol names or not. Added setters and
1414 getters for the formerly global option variables, and obviously
1415 changed a vast number of functions to take a `struct m4' and use
1416 the getter funcs to find option values.
1418 * m4/utility.c (interactive, sync_output, debug_level)
1419 (no_gnu_extensions, prefix_all_builtins, suppress_warnings)
1420 (max_debug_argument_length, warning_status, nesting_limit)
1421 (discard_comments): Removed.
1422 * m4/m4module (warning_status, no_gnu_extensions, nesting_limit)
1423 (debug_level, max_debug_argument_length, prefix_all_builtins)
1424 (suppress_warnings, discard_comments, interactive, sync_output):
1425 Removed from here...
1426 * m4/m4private.h (struct m4): ...and equivalent fields added to
1428 (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1429 (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1430 (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1431 (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1432 (m4_get_interactive_opt, m4_get_sync_output_opt): Fast access
1433 macros for the new fields.
1434 * m4/m4module.h (m4_context_field_table)
1435 (m4_context_opt_bit_table): Helper macros used to generate
1436 prototypes, setters and getters for new option fields
1438 * m4/m4.c (m4_get_warning_status_opt, m4_get_no_gnu_extensions_opt)
1439 (m4_get_nesting_limit_opt, m4_get_debug_level_opt)
1440 (m4_get_max_debug_arg_length_opt, m4_get_prefix_builtins_opt)
1441 (m4_get_suppress_warnings_opt, m4_get_discard_comments_opt)
1442 (m4_get_interactive_opt, m4_get_sync_output_opt)
1443 (m4_set_warning_status_opt, m4_set_no_gnu_extensions_opt)
1444 (m4_set_nesting_limit_opt, m4_set_debug_level_opt)
1445 (m4_set_max_debug_arg_length_opt, m4_set_prefix_builtins_opt)
1446 (m4_set_suppress_warnings_opt, m4_set_discard_comments_opt)
1447 (m4_set_interactive_opt, m4_set_sync_output_opt): Addressable
1448 setter and getter functions generated by cpp from
1449 m4_context_field_table and m4_context_opt_bit_table, exported as
1450 part of the module api. Changed all callers.
1451 * m4/symtab (struct m4_symtab): Used as the concrete type for
1453 (m4_symtab_create): Allocate and initialise a new struct.
1454 (m4_symtab_apply): New function that works like m4_hash_apply, but
1455 with different callbacks specific to symbol tables. Changed all
1457 (symbol_destroy, arg_destroy, arg_copy): Renamed
1458 symbol_destroy_CB, arg_destroy_CB, arg_copy_CB to remind me that
1459 they have unused parameters for a reason!
1460 (dump_symbol_CB): New callback to dump the contents of a single
1462 (symtob_dump): Rewritten in terms of dump_symbol_CB.
1463 * m4/utility.c (m4_dump_symbol): Renamed to m4_dump_symbol_CB.
1464 Changed all callers.
1465 * m4/m4.c (m4_create): By default point the `nuke_trace_bit' field
1466 of the contained `m4_symtab' at the `no_gnu_extensions' field.
1467 Although I'm not convinced these semantics are correct, they are
1468 at least consistent with how things were before this delta. Also
1469 set the default nesting limit to M4_DEFAULT_NESTING_LIMIT.
1471 2003-06-19 Gary V. Vaughan <gary@gnu.org>
1473 Tie down the interface to libm4 some more. Make more structures
1474 opaque to modules by moving them to m4private.h, and writing
1475 setters and getters. To win back the speed penalty for doing this
1476 also wrote macroized versions that do know about structure layout
1477 in m4private.h and #include that file into modules when NDEBUG is
1478 defined at compile time. There are still some accessor macros in
1479 m4private.h that need to go, but that is not necessary to clean
1482 * m4/m4module.h (m4_symbol_type): Moved...
1483 * m4/m4private.h (m4__symbol_type): ...to here.
1484 * m4/symtab.c (m4_get_symbol_value, m4_get_symbol_traced)
1485 (m4_set_symbol_traced, m4_set_symbol_name_traced)
1486 (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1487 (m4_get_symbol_func, m4_symbol_value_create)
1488 (m4_symbol_value_delete, m4_set_symbol_value_text)
1489 (m4_set_symbol_value_func): New exported api to symbols.
1490 (m4_get_symbol_value_type): Replaced by m4_is_symbol_value_text
1491 and m4_is_symbol_value_func.
1492 * m4/m4module.h: Prototype these guys.
1493 * m4/module.c (m4_set_module_macro_table)
1494 (m4_set_module_builtin_table): Make these static, there is no
1495 reason to pollute the api with them.
1496 * m4/m4private.h: Reformatting.
1497 (m4_get_symtab): Only define when NDEBUG is defined.
1498 (m4_get_symbol_value, m4_get_symbol_traced)
1499 (m4_set_symbol_traced, m4_set_symbol_name_traced)
1500 (m4_is_symbol_text, m4_is_symbol_func, m4_get_symbol_text)
1501 (m4_get_symbol_func, m4_symbol_value_create)
1502 (m4_symbol_value_delete, m4_set_symbol_value_text)
1503 (m4_set_symbol_value_func): Macro implementations of the new
1504 functions when NDEBUG is defined.
1505 (SYMBOL_TRACED, SYMBOL_VALUE, SYMBOL_TYPE, SYMBOL_TEXT)
1506 (SYMBOL_FUNC, VALUE_TYPE, VALUE_TEXT, VALUE_FUNC): Removed.
1507 Superceded by the above. All callers changed.
1508 (M4ARG): Removed. This is no longer different to the
1509 m4/m4module.h definition.
1510 * modules/gnu.c, modules/m4.c: Only include m4private.h when
1511 NDEBUG is defined. That way we exercise the same (albeit slower)
1512 api that external modules must use.
1514 2003-06-18 Gary V. Vaughan <gary@gnu.org>
1516 Renamed some of the types and their accessors to make more sense.
1517 Now we have a SYMTAB in which we store SYMBOLs, and each SYMBOL
1518 has a stack of SYMBOL_VALUEs.
1520 * m4/m4module.h (m4_token, m4_get_token_type, m4_get_token_text)
1521 (m4_get_token_func, m4_token_copy): Renamed to m4_symbol_value,
1522 m4_get_symbol_value_type, m4_get_symbol_value_text,
1523 m4_get_symbol_value_func and m4_symbol_value_copy respectively.
1524 Changed all callers.
1525 (m4_symbol_type): s/M4_TOKEN_/M4_SYMBOL_/
1526 (m4_get_token_type): Renamed
1527 * m4/input.c (m4_next_token): Renamed to m4__next_token, and moved
1528 to the internal api.
1529 * m4/m4private.h: s/TOKEN_ARG_/SYMBOL_ARG_/
1531 (m4__symtab_init, m4__symtab_exit): Removed prototypes.
1532 (m4_token_arg): Renamed to m4_symbol_arg. Changed all callers.
1533 (m4__token_type): Moved here from m4module.h.
1534 (m4__next_token): Renamed from m4_next_token.
1535 * m4/symtab.c: Removed some of the parameterised macro support
1536 functions for modularisation later.
1537 (m4_token_copy): Renamed to m4_symbol_value_copy, and use new
1538 m4_hash_dup to perform a true deep copy of the SRC.
1539 (arg_copy): Callback for m4_symbol_value_copy.
1540 * utility.c (m4_token_get_type, m4_token_text, m4_token_func):
1541 Renamed to m4_get_symbol_value_type, m4_get_symbol_value_text and
1542 m4_get_symbol_value_func. Changed all callers.
1544 2003-06-18 Gary V. Vaughan <gary@gnu.org>
1546 Tidy up style of hash.[ch] in accordance with doc/STYLE.
1548 * m4/hash.c: Internal symbol renaming and formatting.
1549 (m4_hash_dup): New function to facilitate deep copies of hash
1551 (m4_hash_apply_func): Returns a void* now, which is a richer type
1552 for returning exceptions (NULL means keep going).
1553 (m4_hash_apply): Ditto.
1554 * m4/hash.h: Declare exported symbols with an explicit extern.
1557 2003-06-17 Gary V. Vaughan <gary@gnu.org>
1559 Still refactoring furiously. This delta represents a change in
1560 semantics to symtab.c. Instead of building temporary m4_tokens
1561 in the caller, and copying fields in the methods, we now create
1562 the actual m4_token for hashing in the caller so the methods just
1563 slot them in directly. Also, this means that we don't lookup a
1564 symbol and get back an allocated but VOID token to copy fields
1565 into, we create the token we want to push and pass that to
1566 m4_symbol_define or m4_symbol_pushdef. And that's it. There are
1567 a few other small changes to stop knowledge of the implementation
1568 of symtab.c leaking out into other files.
1570 * m4/macro.c (expand_argument): Comment typo corrected.
1571 * m4/symtab.c (symtab_fetch): New function to fetch the address of
1573 (m4_symbol_pushdef): Take an extra value parameter and use this
1574 directly as the new top of the value stack. All callers changed
1575 to build a token and pass responsibility for memory in, rather
1576 than copying as we used to.
1577 (m4_symbol_define): Also use the new value parameter directly as a
1578 replacement for the top of the value stack. All callers changed
1579 to build a token as above.
1580 (m4_set_symbol_traced): New function to set the traced bit on the
1581 named symbol, creating it if necessary.
1582 (symbol_popval): The guts of the old m4_symbol_popdef.
1583 (m4_symbol_popdef): Use it.
1584 * m4/builtin.c (m4_symbol_set_token): Removed,
1585 (m4__symbol_set_builtin, m4__symbol_set_macro): Removed and
1587 * m4/module.c (m4_set_module_builtin_table)
1588 (m4_set_module_macro_table): ...with these more orthogonal
1590 * m4/m4module.h (m4_macro_pushdef, m4_macro_define)
1591 (m4_builtin_pushdef, m4_builtin_define): Removed. No longer
1593 * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE)
1594 (m4_arg_signature_parse): Moved...
1595 * m4/symtab.c: ...to here.
1596 * m4/input.c (m4_token_copy): Arghh... I'm amazed this didn't
1597 screw something up. Moved...
1598 * m4/symtab.c (m4_token_copy): ...to here, and fixed so that it
1599 actually does a proper deep copy of source to dest.
1601 2003-06-16 Gary V. Vaughan <gary@gnu.org>
1603 Further refactoring to stabilise the module API. Renaming some
1604 functions for orthogonality, and judicious definition migration to
1605 move things out of the set of exported symbols.
1607 * doc/STYLE: New file. Notes on coding style.
1608 * m4/m4module.c: Updated bitrotted docucomment at the top of the
1610 (m4_module_name, m4_module_builtins, m4_module_macros): Renamed to
1611 m4_get_module_name, m4_get_module_builtin_table,
1612 m4_get_module_macro_table which are verb phrases. Changed all
1614 * m4/builtin.c (m4_builtin_table_install, m4_macro_table_install):
1616 * m4/module.c (m4_set_module_builtin_table)
1617 (m4_set_module_macro_table): ...here, and renamed. Changed all
1619 * m4/m4module.c (m4_module_data): This...
1620 * m4/m4private.c (struct m4_module_data): ...and this...
1621 * m4/module.c (module_data) ...consolidated here and no longer
1622 exported. Changed all callers.
1624 2003-06-16 Gary V. Vaughan <gary@gnu.org>
1626 Begin work on lifting the curse of the global variables. To start
1627 with create a `struct m4' context container, and replace
1628 `m4__symtab' with `context->symtab' throughout. This means
1629 initialising a context container in main, and adjusting many
1630 functions between main and the module entry points so that the
1631 container gets passed through. It would have been nice to
1632 defer this until after 1.5, but it has a major effect on the
1633 user's module writing ABI, so it needs to be addressed now - at
1634 least in the areas that impact the ABI. An interrelated change
1635 in the symtab API removes the dependency on a global symbol table,
1636 and instead focuses on a passed table (from the context
1639 * TODO: Reminders for finishing context functionality.
1640 * m4/Makefile.am (libm4_la_SOURCES): Add m4.c.
1641 * m4/m4.c: New file. Manage new struct m4 objects to eliminate
1642 global variables and eventually allow m4 to be reentrant.
1643 * m4/m4private.h (m4): Define the new structure here...
1644 (M4_SYMTAB, m4_get_symtab): ...so we can have fast accessors that
1645 don't carry the overhead of a function call.
1646 * m4/m4module.h: Prototype extern functions from m4/m4.c.
1647 (m4): Declare type for new struct m4 objects.
1648 (M4SYMTAB): User macro to ease finding the symbol table for the
1649 current context for module developers.
1650 (m4_symbol_token): Renamed to m4_symbol_set_token which contains a
1652 (M4_BUILTIN, m4_builtin_func, M4_BUILTIN_HANDLER)
1653 (m4_builtin_define, m4_builtin_pushdef, m4_builtin_table_install)
1654 (m4_call_macro, m4_dump_symbols, m4_expand_input)
1655 (M4_FINISH_HANDLER, M4_INIT_HANDLE, m4_macro_define)
1656 (m4_macro_pushdef, m4_macro_table_install, m4_module_load)
1657 (m4_module_unload, m4_process_macro, m4_symbol_set_token): Add an
1658 m4* context parameter. Changed definitions and all callers.
1659 (m4_symtab): Alias for m4_hash to decouple the
1660 m4_symtab api from m4_hash.
1661 (m4_symtab_apply, m4_symtab_apply_func): Use m4_symtab instead of
1663 (m4_symtab_create): New function to return an initialised
1665 (m4_symtab_delete): New function to delete an m4_symtab's memory.
1666 (m4_symbol_define, m4_symbol_delete, m4_symbol_lookup)
1667 (m4_symbol_popdef, m4_symbol_pushdef): Add an m4_symtab parameter
1668 instead of simply using the global m4__symtab. Changed
1669 definitions and all callers.
1670 * m4/m4private.h (m4__symtab_remove_module_references): Ditto.
1671 * m4/symtab.c (m4__symtab_init, m4__symtab_exit): Removed.
1672 * src/main.c (main): Create a context and use that instead of the
1673 former global m4__symtab.
1675 2003-06-13 Gary V. Vaughan <gary@gnu.org>
1677 * m4/hash.c (m4_hash_apply): Pass an initial hash table parameter
1678 to the callback. Callbacks should not need to hardcode the
1679 hashtable they are working from, nor should we have to waste the
1680 userdata parameter to pass the table in.
1681 * m4/hash.h (m4_hash_apply_func): Require the initial table
1683 * m4/symtab.c (symtab_destroy): Use the passed table instead
1684 of hardcoding m4__symtab.
1685 (m4_symbol_popdef): Don't use the userdata parameter to pass the
1686 table to arg_destroy.
1687 (arg_destroy): Use the hash parameter, ignore userdata.
1688 * modules/m4.c (set_trace): Make it fit the m4_hash_apply_func
1690 (traceon, traceoff): Call set_trace with the extra initial
1693 2003-06-13 Gary V. Vaughan <gary@gnu.org>
1695 More refactoring to stabilise the module api, this time for
1696 symtab.c. Additionally, start to pay attention to function names
1697 that don't contain a verb like they should.
1699 * m4/m4module.h (m4_symtab_apply): Reintroduced this function as a
1700 wrapper for m4_hash_apply to decouple the symtab module from the
1702 (m4_symbol_builtin, m4_symbol_macro): Renamed to
1703 m4__symbol_set_builtin and m4__symbol_set_macro. Changed all
1705 (m4_symbol_delete): Create a macro version to save a function
1707 (m4_token_t, m4_data_t): These violate the POSIX reserved
1708 namespace. Renamed to m4_token_type and m4_symbol_type. Changed
1710 (m4_token_type): Renamed to m4_token_get_type.
1711 (m4_symtab, m4_symtab_init, m4_symtab_remove_module_references)
1712 (m4_symtab_exit): Removed from the exported module
1714 * m4/m4private.h (m4__symtab, m4__symtab_init)
1715 (m4__symtab_remove_module_references, m4__symtab_exit): ...and
1716 renamed and added to the internal api. Changed all callers.
1717 (m4_symtab_apply): A faster macro version of the function for
1718 users of the internal api.
1719 * m4/symtab.c (m4_symbol_destroy, m4_arg_destroy): Renamed to
1720 symbol_destroy and arg_destroy.
1721 (symtab_debug): Added a prototype.
1722 (m4_symtab_apply, m4_symbol_delete): Moved to the end of the file
1723 so that callers in this file get the faster macro versions from
1726 2003-06-12 Gary V. Vaughan <gary@gnu.org>
1728 Refactoring modules to rationalise the API into an external
1729 documented (eventually!) API for use by modules in the `m4_'
1730 namespace declared in m4/m4module.h, an internal API between the
1731 source files we ship (including our shipped modules) in the `m4__'
1732 namespace declared in m4/m4private.h and making the rest as
1733 cohesive as possible with liberal use of the `static' keyword.
1734 This change represents an audit to m4/module.c along these
1737 * m4/m4module.h (m4_module_close_all, m4_module_find_by_builtin):
1738 Removed. No longer used.
1739 (m4_module_close): Removed prototypes.
1740 (m4_module_init, m4_module_open, m4_module_unload_all): Removed
1741 from the exported module api...
1742 * m4/m4private.h (m4__module_init, m4__module_open)
1743 (m4__module_exit): ...and renamed and added to the internal api.
1744 Changed all callers.
1745 (BUILTIN_SYMBOL, MACRO_SYMBOL, INIT_SYMBOL, FINISH_SYMBOL):
1746 Centralised definitions after renaming...
1747 * m4/module.c (M4_BUILTIN_SYMBOL, M4_MACRO_SYMBOL, M4_INIT_SYMBOL)
1748 (M4_FINISH_SYMBOL): ...and removing from here.
1749 (m4_module_dlerror, m4_module_remove, m4_module_close)
1750 (m4_caller_id): Not exported at all, so renamed to module_dlerror,
1751 module_remove, module_close and caller_id.
1752 (MODULE_SELF_NAME): New macro to make reporting self errors
1754 (m4_module_load, module_close, module_remove): Use it.
1755 * m4/m4private.h (USER_MODULE_PATH_ENV): Macro to hold "M4MODPATH"
1757 * src/main.c (main): Use it.
1759 2003-06-12 Gary V. Vaughan <gary@gnu.org>
1761 * README: Remove references to --enable-changeword, which has been
1762 removed from the code.
1764 2003-06-11 Gary V. Vaughan <gary@gnu.org>
1766 Getting rid of the annoying bug with configure --enable-debug,
1767 which spewed -e: command not found errors. This was an interaction
1768 between libtool-1.5's LT_AC_COMPILER_OPTION, and config/debug.m4.
1769 You'll need to re-bootstrap the m4 tree with cvs libtool (HEAD or
1770 branch-1-5) to get the full fix.
1772 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Require libtools version
1773 of AC_LIBTOOL_COMPILER_OPTION (which now requires LT_AC_PROG_SED),
1774 and then use the probed value of $SED.
1775 (AC_LIBTOOL_COMPILER_OPTION): Removed. Don't conditionally define
1776 this, it messes up the AC_REQUIRE stack.
1778 2003-06-10 Gary V. Vaughan <gary@gnu.org>
1780 * m4/symtab.c (m4_symbol_popdef): Need to pass the hash address to
1781 the destroy callback.
1782 (m4_arg_destroy): Use the hash address to free the hash node key
1785 2003-06-06 Gary V. Vaughan <gary@gnu.org>
1787 First cut at formal parameters in macros.
1789 * configure.ac (AC_REPLACE_FUNCS): Add xstrzdup.
1790 * m4/xstrzdup.c: New file.
1791 * m4/builtin.c (M4_ARG_SIGNATURE_DEFAULT_SIZE): Start size for
1792 associative array of parameter names to details.
1793 (m4_symbol_token): Capture macro names with parameter lists.
1794 (m4_arg_signature_parse): And build an associative array to hang
1795 from the symbol structure to map names to details.
1796 * m4/hash.c (m4_hash_new): Break the m4_hash_new followed by
1797 m4_hash_resize idiom. Now that we potentially add a little hash
1798 table to many of the entries in the symbol table, added an extra
1799 arg to set the initial size. Changed all callers.
1800 (m4_hash_apply): New function that is basically a generalised
1802 * m4/symtab.c (m4_symbol_apply): ...this. Now deleted. Adjusted
1803 all callers to call m4_hash_apply instead.
1804 (m4_arg_destroy): Recycle memory used by an m4_token_arg.
1805 (m4_symbol_popdef): Use m4_arg_destroy to help recycle the
1806 m4_arg_signature association that might be attached to the symbol,
1807 * m4/hash.h (m4_hash_apply_func): Replacement type for...
1808 * m4/m4module.h (m4_symtab_apply_func): ...this. Now deleted.
1809 (M4_SYNTAX_ASSIGN): Placeholder for assigning default values in
1811 (M4_IS_ASSIGN): Detect characters with M4_SYNTAX_ASSIGN syntax.
1812 (M4_IS_IDENT): Detect characters that can be safely used in
1814 * m4/syntax.c (m4_syntax_init): Add an M4_SYNTAX_ASSIGN character.
1815 * m4/macro.c: Corrected grammar in some comments. Use `token'
1816 rather than `td' for m4_token variables.
1817 (m4_process_macro): If we find a dollar followed by some
1818 M4_IS_IDENT characters, replace that with the contents of the argv
1819 entry with offset stored in the m4_token_arg associated with the
1820 collected identifier.
1822 2003-06-05 Gary V. Vaughan <gary@gnu.org>
1824 Begin preparations for supporting formal parameters in m4 macros.
1826 * m4/m4private.h (struct m4_token_arg): Placeholder for holding
1827 the details of a formal parameter.
1828 (m4_token): Add an arg_signature member to hold a hash table for
1829 looking up formal parameters.
1830 * m4/input.c: Update more bitrotted comments.
1831 (m4_push_builtin): Initialise arg_signature member.
1832 (init_builtin_token): Copy arg_signature member.
1833 * m4/m4module.h (m4_builtin_pushdef, m4_builtin_define)
1834 (m4_macro_pushdef, m4_macro_define): Rewritten as macros to
1836 * m4/builtin.c (m4_builtin_pushdef, m4_builtin_define)
1837 (m4_macro_pushdef, m4_macro_define): ...these, And...
1838 (m4_symbol_token): ...wrapped around this new function, which
1839 vastly simplifies the arguments required by the functions it
1841 Changed all callers.
1843 2003-06-05 Gary V. Vaughan <gary@gnu.org>
1845 * m4/macro.c: Format changes.
1847 2003-06-04 Gary V. Vaughan <gary@gnu.org>
1849 * m4/input.c: Updated various bitrotted comments.
1850 (m4_push_builtin): Just pass the whole m4_token, rather than
1851 extracting all the fields in the caller. This also allows us to
1852 check the token type for consistency.
1853 (macro_funcs, macro_peek, macro_read, m4_push_macro, CHAR_MACRO):
1854 Renamed to builtin_funcs, builtin_peek, builtin_read,
1855 m4_push_builtin and CHAR_BUILTIN for consistency with the rest of
1856 the code. Changed all callers.
1857 (struct input_block): Similarly renamed u_m member to u_b, and
1858 changed all callers.
1859 (m4_next_token): Use bzero to initialise the data fields.
1860 * m4/m4module (m4_push_macro): Renamed to m4_push_builtin.
1862 2003-05-29 Gary V. Vaughan <gary@gnu.org>
1864 These changes were necessary to get m4 to build on my iBook
1865 running "powerpc-apple-darwin6.6" using Apples build of gcc "gcc
1866 (GCC) 3.1 20020420 (prerelease)":
1868 * src/main.c: Don't include dlfcn.h, ltdl.h handles correct
1869 inclusion of module loader headers.
1870 * modules/Makefile.am: Use AM_LDFLAGS, not LDFLAGS.
1871 * m4/Makefile.am: Ditto.
1872 (libm4_la_LIBADD): Added $(LTLIBINTL).
1873 * m4/utility.c (program_name): Removed declaration in favour of
1874 the one already in error.c!
1875 * m4/m4module.h (program_name): Define to program_invocation_name
1876 when using GNU C library. Use an explicit extern declaration.
1877 (interactive, sync_output, debug_level, hash_table_size)
1878 (no_gnu_extensions, prefix_all_builtins, max_debug_argument_length)
1879 (suppress_warnings, warning_status, nesting_limit, discard_comments)
1880 (lquote, rquote, bcomm, ecomm, m4_bad_argc, m4_skip_space)
1881 (m4_numeric_arg, m4_shipout_int, m4_shipout_string, m4_dump_args)
1882 (m4_debug, m4_debug_init, m4_debug_exit, m4_debug_decode)
1883 (m4_debug_flush_files, m4_debug_set_output, m4_debug_message_prefix)
1884 (m4_trace_prepre, m4_trace_pre, m4_trace_post, m4_sysval)
1885 (m4_expansion_level, m4_expand_ranges, m4_expand_input)
1886 (m4_call_macro, m4_process_macro, m4_syntax_table, m4_current_file)
1887 (m4_current_line, m4_current_diversion, m4_output_current_line):
1888 Don't rely on default, use an explicit extern.
1889 * m4/error.h (error, error_at_line, error_print_progname)
1890 (error_message_count, error_one_per_line): Ditto.
1891 * m4/ltdl.c: Update from CVS libtool.
1893 * commit: Update from CVS cvs-utils.
1895 2002-11-04 Akim Demaille <akim@epita.fr>
1897 * doc/m4.texinfo (Esyscmd): Don't grep, use something easier:
1899 * tests/others.at (iso8859): Use abs_srcdir, not srcdir.
1901 2002-11-04 Akim Demaille <akim@epita.fr>
1903 * config/Makefile.am (ACLOCAL_MACROS): Ship the Gettext macros.
1905 2002-11-04 Akim Demaille <akim@epita.fr>
1907 * configure.ac: Automake 1.7.1, Autoconf 2.54, Gettext 0.11.5,
1908 used as `external', and Libtool 1.4.3.
1910 (LTLIBOBJS): Don't play with it.
1912 * Makefile.am (SUBDIRS): Remove intl.
1913 (ACLOCAL_AMFLAGS): Add -I config.
1914 (EXTRA_DIST): Add config/config.rpath.
1917 * modules/perl.c (M4INIT_HANDLER): Don't prototype xs_init.
1919 2002-05-29 Gary V. Vaughan <gary@gnu.org>
1921 Preparations for refactoring syntax tables to allow reverse
1922 lookups [fetch me a M4_SYNTAX_OPEN], without compromising the
1923 speed of normal lookups in an array of unsigned short.
1925 * m4/input.c (single_quotes, single_comments, use_macro_escape):
1927 * m4/m4private.h (m4__single_quotes, m4__single_comments,
1928 m4__use_macro_escape): ...to here, and renamed. The `m4__' prefix
1929 is for internal symbols which unavoidably pollute the global
1930 namespace, but are not published APIs.
1931 Adjusted all callers.
1932 * m4/input.c (m4_syntax_init, m4_syntax_code, m4_set_quotes,
1933 m4_set_comment, m4_set_syntax, set_syntax_internal,
1934 unset_syntax_attribute): Moved from this file...
1935 * m4/syntax.c: New. ...to this file.
1936 Also added an m4_syntax_exit stub for orthogonality.
1937 * src/main.c (main): Use it.
1938 * m4/Makefile.am (libm4_la_SOURCES): Add syntax.c.
1939 * m4/m4module.h: Reformatting. New prototypes.
1941 2002-05-29 Gary V. Vaughan <gary@gnu.org>
1943 * bootstrap (aclocal_apiversion): The aclocal apiversion is
1944 distinct from the automake release number (in that the apiversion
1945 apparently has no micro-version-component).
1946 (aclocal_apilibdir): Use it.
1948 2002-05-28 Gary V. Vaughan <gary@gnu.org>
1950 * m4/hash.c (m4_hash_resize): New function.
1951 * m4/hash.h: Add prototype.
1952 * m4/symtab.c (m4_symtab_init): Use it. This could do with some
1953 benchmarking to find a good value for, say, autoconf. This is
1954 already a little quicker than before for me.
1956 * m4/symtab.c (m4_symtab_hash, m4_symtab_cmp): Moved from here...
1957 * m4/hash.c (m4_hash_string_hash, m4_hash_string_cmp): .. to here,
1959 * m4/hash.h: Adjust prototypes.
1961 2002-01-22 Akim Demaille <akim@epita.fr>
1963 * bootstrap (aclocal_apilibdir): New, to cope with Automake's new
1965 * tests/Makefile.am (package.m4): New.
1966 * tests/atlocal.in: Adjust to CVS Autotest.
1967 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Use AC_LIBOBJ.
1968 * configure.ac: LIBOBJ is a forbidden string.
1969 Simplify AM_INIT_AUTOMAKE invocation.
1970 * config/Makefile.am (ACLOCAL_MACROS): Add amversion.m4 and
1973 2001-10-19 Akim Demaille <akim@epita.fr>
1975 * m4/module.c, m4/output.c, src/main.c: Normalize error messages.
1977 2001-10-19 Akim Demaille <akim@epita.fr>
1979 * m4/input.c (m4_next_token): Display where was opened what is
1982 2001-10-19 Akim Demaille <akim@epita.fr>
1984 * m4/macro.c (expand_argument): Display where was opened what is
1987 2001-10-18 Akim Demaille <akim@epita.fr>
1989 * m4/input.c, modules/m4.c: Formatting changes.
1991 2001-10-17 Gary V. Vaughan <gary@gnu.org>
1993 * bootstrap: s/configure.in/configure.ac/
1995 2001-10-16 Gary V. Vaughan <gary@gnu.org>
1997 * m4/symtab.c (m4_symbol_destroy): This function calls
1998 m4_symbol_popdef, which recycles a symbols memory when the last
1999 definition is popped. Since we were passing the address of the
2000 symbol name found in the symbol table, and it was being removed
2001 partway through m4_symbol_destroy() we were referencing freed
2002 memory for the balance of the function. Now we take a copy of the
2003 symbol name tring and use that as a key into the symbol
2004 table... that way if the original symbol name is freed, the copy
2007 2001-10-13 Akim Demaille <akim@epita.fr>
2009 * m4/ltdl.c: Update.
2011 2001-10-13 Akim Demaille <akim@epita.fr>
2013 * src/main.c, src/freeze.c, m4/debug.c, m4/input.c, m4/macro.c:
2014 Don't gettextize internal error messages.
2016 2001-10-13 Akim Demaille <akim@epita.fr>
2018 * tests/macros.at (Arity and defn): New failing test.
2019 (Arity, defn, and freeze): New.
2021 Fix `Arity and defn'.
2023 * m4/input.c (m4_push_macro): Don't forget the arity.
2024 * modules/m4.c (defn): Likewise.
2026 2001-10-13 Akim Demaille <akim@epita.fr>
2028 * tests/builtins.at (pushdef/popdef, trace, trace2, trace3): Move
2030 * tests/macros.at (pushdef/popdef, Tracing Hanoi Towers)
2031 (Propagation of traceon, Propagation of --trace): this new file.
2033 2001-10-13 Akim Demaille <akim@epita.fr>
2035 * m4/utility.c (m4_numeric_arg): Use the usual (argc, argv, ...)
2036 interface instead of (name, argc...).
2037 Upon failure, specify which argument was guilty.
2040 2001-10-13 Akim Demaille <akim@epita.fr>
2042 * modules/evalparse.c: Save translators' time: don't translate
2043 internal error messages.
2044 (m4_evaluate): Simplify/normalize error messages.
2045 * doc/m4.texinfo (Eval): Adjust.
2047 2001-10-13 Akim Demaille <akim@epita.fr>
2049 * m4/macro.c (expand_macro): Let m4_bad_argc handle the cases
2050 where no checking is needed.
2051 * m4/utility.c (m4_bad_argc): Use the usual (argc, argv, ...)
2052 interface instead of (name, argc...).
2054 * modules/gnu.c (m4_patsubst_do): Don't check argc, done
2057 2001-10-13 Akim Demaille <akim@epita.fr>
2059 * m4/utility.c (m4_bad_argc): Display user argument counts, i.e.,
2060 exclude the builtin name from the count.
2061 * modules/m4.c (ifelse): Do not use the regular argc mechanism, as
2062 calling ifelse with a single argument is valid.
2063 * doc/m4.texinfo (Ifelse): Add an example where ifelse is invoked
2064 with 1 and 2 args, mostly to strengthen the test suite.
2066 2001-10-13 Akim Demaille <akim@epita.fr>
2068 * m4/output.c (m4_make_diversion, m4_insert_file)
2069 (m4_insert_diversion, +m4_freeze_diversions): Ansify.
2071 2001-10-12 Gary V. Vaughan <gary@gnu.org>
2073 * m4/input.c (init_builtin_token): Renamed from init_macro_token,
2074 since we call these things builtins in the rest of the code!
2076 * modules/gnu.c (m4_regexp_compile): s/%0/%s/
2078 2001-10-12 Gary V. Vaughan <gary@gnu.org>
2080 Rather than forcing each builtin definition to manage its own
2081 argument range checking, tabulate the maxima and minima for all
2082 builtins in each module. This forces us to consider what the
2083 valid ranges for each builtin should be, and moves the checking
2084 code out of each builtin implementation and into the builtin
2085 caller infrastructure.
2087 * m4/m4module.h (struct m4_builtin): Add argument minima and
2089 * m4/m4private.h (struct m4_token): Reflect them here too.
2090 * m4/input.c (struct input_block): ...and here.
2091 (m4_token_copy): New function for token copying.
2092 (init_macro_token): Copy them from a token to the input stack.
2093 (m4_next_token): Don't forget to initialise them for text
2095 * m4/macro.c (expand_argument): Use m4_token_copy, and also
2096 check argument counts before calling the builtin handler.
2097 * m4/symtab.c (m4_symbol_builtin): Take minima and maxima params.
2098 (m4_symbol_macro): Likewise.
2099 * m4/builtin.c (m4_builtin_pushdef): Add min_args and max_args
2100 parameters. Updated all callers.
2101 (m4_builtin_define): Ditto.
2102 (m4_macro_pushdef, m4_macro_define): Ditto.
2103 * m4/symtab.c (m4_symbol_builtin, m4_symbol_define): Ditto.
2104 * modules/evalparse.c: Declare argument counts for defined
2105 builtins and remove explicit calls to m4_bad_argc().
2106 * modules/gnu.c: Ditto.
2107 * modules/load.c: Ditto.
2108 * modules/m4.c: Ditto.
2109 * modules/modtest.c: Ditto.
2110 * modules/mpeval.c: Ditto.
2111 * modules/perl.c: Ditto.
2112 * modules/shadow.c: Ditto.
2113 * modules/stdlib.c: Ditto.
2114 * modules/time.c: Ditto.
2117 2001-10-10 Gary V. Vaughan <gary@gnu.org>
2119 The trace semantics now attach the trace bit to a symbol name.
2120 For as long as a traceon(`foo') is active, calls to foo will be
2121 traced regardless of intervening undefines or module unloads.
2122 Fixed the flag propogation issues differently to the fixes
2123 reverted with the last attempt at nailing down trace:
2125 * m4/m4private.h: This file is not visible outside of the m4
2126 source tree, so I removed all the `M4_' and `m4_' prefixes to save
2127 on typing. Updated all clients.
2128 (m4_token): New typedef contains the fields that need to be passed
2129 around with the low level tokeniser.
2130 (m4_token_data): Removed.
2131 (m4_symbol): Now contains the traced flag again.
2132 * m4/symtab.c: Rewritten again. Now we don't remove symbols with
2133 the trace bit set. This change is contained entirely within this
2134 module and doesn't leak out into the callers. Updated all
2136 (m4_symbol_builtin, m4_symbol_macro): Adjusted to make use of the
2137 new fields in m4_token. Updated all clients.
2138 * m4/builtin.c (m4_builtin_pushdef): Needs a flags argument so
2139 that `groks_macro_args' and `blind_if_no_args' flags are retained
2140 when defn() results are passed around in m4 code. Updated all
2142 (m4_builtin_define): Ditto.
2143 (m4_macro_pushdef, m4_macro_define): Ditto.
2144 * m4/input.c (struct input_block): Add a flags field to facilitate
2146 (m4_push_macro): ...use it.
2147 (init_macro_token): Retrieve it.
2148 (m4_next_token): Initialise it.
2149 * m4/macro.c (expand_argument): Copy it.
2150 * m4/m4module.h: Adjust.
2151 * tests/builtins.at: Adjust the expected output of the trace
2152 tests to reflect the change in semantics.
2153 * tests/modules.at (modules: trace): Check that unloading a
2154 module which supplies a traced symbol definition doesn't lose te
2157 2001-10-07 Gary V. Vaughan <gary@gnu.org>
2159 * modules/gnu.c (m4_macro_table): Display the timetamp when
2160 expanding __m4_version__.
2162 * configure.ac (--with-modules): Forgot a comma in the
2163 AC_HELP_STRING parameter list.
2165 2001-10-05 Gary V. Vaughan <gary@gnu.org>
2167 * bootstrap: Remove aclocal.m4t when it is no longer required.
2169 2001-10-05 Akim Demaille <akim@epita.fr>
2171 * tests/Makefile.am: Adjust for gnuprog2.
2172 * tests/m4.in: There can be a leading path.
2173 * tests/modules.at (AT_CHECK_M4_MODTEST): No need for $4 and $5.
2174 * tests/testsuite.at: Adjust to the most recent Autotest.
2175 (AT_CHECK_M4_FILTER): Fix and rename as...
2177 * tests/others.at: Use it.
2179 * config/gmp.m4 (_AC_LIB_GMP): In order to read the content of a
2180 variable in shell scripts, one uses `$'...
2182 2001-10-04 Gary V. Vaughan <gary@gnu.org>
2184 * configure.ac: `rm -f $m4_getopt_h' was lost.
2186 2001-10-04 Gary V. Vaughan <gary@gnu.org>
2188 * configure.ac (TIMESTAMP): Display with AS_BOX at configure
2189 time. Define it for config.h in order to...
2190 * src/main.c (main): ...display the timestamp for --version.
2192 2001-10-04 Akim Demaille <akim@epita.fr>
2194 * modules/gnu.c (m4_regexp_do, m4_patsubst_do): Extracted from
2195 previous builtins `regexp' and `patsubst'.
2196 (regexp, patsubst): Use them.
2197 (eregexp, epatsubst): New builtins.
2198 * doc/m4.texinfo (Patsubst, Regexp): Rename and complete as...
2199 (Epatsubst and Patsubst, Eregexp and Regexp): these.
2200 (Extensions): More info on REs.
2202 2001-10-04 Akim Demaille <akim@epita.fr>
2204 * modules/modtest.c (init_handler): Consistently output to stderr.
2205 (finish_handler): New.
2206 (test): The `if' is an `assert'.
2207 * tests/modules.at: Adjust.
2209 2001-10-04 Akim Demaille <akim@epita.fr>
2211 * m4/utility.c (m4_bad_argc): Detail the mismatches.
2213 2001-10-01 Akim Demaille <akim@epita.fr>
2215 * tests/generate.awk: Tag the tests with `documentation'.
2216 * tests/modules.at (AT_CHECK_M4_MODTEST): New.
2217 Use the make the existing modtest tests more uniform, and complete
2218 the set of possibilities.
2220 2001-10-01 Akim Demaille <akim@epita.fr>
2222 * config/gmp.m4: Consult the user before using GMP: use
2224 * configure.ac: Adjust.
2225 * modules/gmp.c: No protection needed as the module is not built
2228 2001-10-01 Akim Demaille <akim@epita.fr>
2230 * tests/generate.awk: Remove debugging code.
2231 (fatal): Specify the current location.
2233 * m4/debug.c, m4/macro.c, m4/utility.c, modules/format.c,
2234 * modules/gnu.c, modules/m4.c: Use M4ARG.
2236 2001-10-01 Akim Demaille <akim@epita.fr>
2238 * modules/gnu.c (RE_SYNTAX_BRE, RE_SYNTAX_ERE): New.
2239 (m4_regexp_compile): New.
2240 (regexp, patsubst): Use it.
2242 2001-09-30 Gary V. Vaughan <gary@gnu.org>
2244 Reinstate the memory handling improvements from the patch I just
2245 reverted. Relevant ChangeLog entries repeated here:
2247 * m4/module.c (m4_module_remove): New function that holds the core
2248 of the old m4_module_unload.
2249 (m4_module_unload): Use it.
2250 (m4_module_unload_all): When we know the modules will never be
2251 used again (i.e. on exit), free up as much module memory as
2252 possible. There are still some artifacts from resident modules
2253 living inside ltdl.c, but everything else is freed.
2254 * m4/debug.c (m4_debug_exit): Free memory allocated in
2256 * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2257 * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2258 * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2259 * m4/m4module.h: Updated prototypes.
2260 * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2261 * m4/hash.h: Updated prototypes.
2262 * src/main.c (main): Use all these new functions to clean up as
2263 much memory as possible before exit.
2265 2001-09-30 Gary V. Vaughan <gary@gnu.org>
2267 Reverted my large patch for removing the old m4_symbol
2268 structure on 2001-09-20. We are still not happy about the way
2269 trace works in conjunction with defn and undefine, and leaving
2270 the reverted patch active prevents us from moving the traced
2271 bit from the definition back to the symbol.
2273 2001-09-30 Gary V. Vaughan <gary@gnu.org>
2275 * configure.in: Moved to...
2276 * configure.ac: ...here. Added a libtool like timestamped
2277 banner, and tidied up the libltdl cruft.
2278 * config/mkstamp: Script to extract a timestamp from ChangeLog.
2279 * modules/Makefile.am (INCLTDL): Removed. This is required
2280 only when libltdl is configured in a subdirectory.
2281 * src/Makefile.am: Ditto.
2282 (LIBADD_DL): No need to add this again, libtool already knows
2283 that libm4.la depends on it.
2284 * m4/Makefile.am: Automake sets variables from AC_SUBST. Use
2287 * TODO: stackovf.c is basically broken.
2288 Reported by Marc Espie <espie@schutzenberger.liafa.jussieu.fr>
2290 2001-09-28 Akim Demaille <akim@epita.fr>
2292 * tests/Makefile.am (EXTRA_DIST): `m4' is not to be shipped.
2294 2001-09-27 Akim Demaille <akim@epita.fr>
2296 * tests/m4.in: Don't use short options.
2297 Simplify the stderr signature normalization.
2299 2001-09-27 Akim Demaille <akim@epita.fr>
2301 tests/m4 shall be position independent.
2305 * tests/testsuite.at: No args to AT_INIT.
2306 * configure.in, tests/Makefile.am: Adjust.
2308 2001-09-22 Akim Demaille <akim@epita.fr>
2310 Autotest has changed again.
2312 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2313 (package.m4): Remove.
2314 * configure.in: Adjust to LIBADD_GMP.
2316 2001-09-21 Gary V. Vaughan <gary@gnu.org>
2318 * config/gmp.m4 (AC_ARG_WITH): Removed.
2319 (GMP_LIB): Renamed to LIBADD_GMP for consistency.
2320 (AC_LIB_GMP): When performing a test compile against libgmp,
2321 include the header gmp.h if possible, and link against -lgmp. If
2322 they both work define USE_GMP.
2323 * modules/Makefile.am (mpeval_la_LIBADD): Add LIBADD_GMP.
2324 (mpeval_LTX_init_func): Complain on load that there was no libgmp
2327 2001-09-20 Gary V. Vaughan <gary@gnu.org>
2329 * m4/evalparse.c: Moved to...
2330 * modules/evalparse.c: ...here. This code is shared between
2331 modules/mpeval.c and modules/m4.c, so there is no need to pollute
2332 the libm4 API with its details. Moderately rewritten to interface
2333 into its clients more simply.
2334 * m4/eval.c: Deleted. Migrated functionality to...
2335 * modules/m4.c: ...here.
2336 (builtin_eval): Implemented in terms of the new interface style.
2337 * modules/mpeval.c (builtin_mpeval): Ditto.
2338 * m4/m4module.h: Removed references to the former m4/eval.c.
2339 * m4/Makefile.am (libm4_la_SOURCES): Removed eval.c.
2340 (EXTRA_libm4_la_SOURCES): Deleted.
2341 * modules/Makefile.am (EXTRA_m4_la_SOURCES): Reference evalparse.c.
2342 (EXTRA_mpeval_la_SOURCES): Reference evalparse.c.
2344 2001-09-20 Akim Demaille <akim@epita.fr>
2346 * config/gmp.m4 (AM_WITH_GMP): Rename as...
2348 By default, use gmp.
2350 * configure.in: Adjust.
2351 Use Automake conditionals for USE_GMP.
2352 Always compute sizeof (long long int).
2353 This was a bug BTW, as `eval' (not `mpeval') depends on it:
2354 before, it was used _only_ if mpeval was not activated.
2355 * modules/Makefile.am (pkglibexec2dir, +pkglibexec2_LTLIBRARIES)
2356 (mpeval_la_LIBADD): New macros.
2357 * modules/mpeval.c: No longer be conditioned by WITH_GMP.
2359 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Create package.m4.
2360 * tests/atlocal.in, tests/builtins.at: Depend upon USE_GMP, not
2363 2001-09-20 Akim Demaille <akim@epita.fr>
2365 * tests/Makefile.am (package.m4): New.
2366 * tests/testsuite.at: Adjust AT_INIT and AT_VICTIMS.
2368 2001-09-20 Gary V. Vaughan <gary@gnu.org>
2370 More cleanup. After the last patch, m4_symbol holds nothing but
2371 the head of a chain of m4_token_data. So I have removed the old
2372 m4_symbol, so that m4_token_data chains are stored directly in the
2373 value cell of a hash table node. But there's more... m4_symbol
2374 was a more natural name for the symbol value cell, and now that it
2375 is gone I have renamed the former m4_token_data structure to
2376 m4_symbol. This change turned out to be a pig to get right, since
2377 the original code didn't need to modify the value cell itself,
2378 since changing the chain happened inside the m4_symbol that used
2379 to be returned -- I had to pass the address of the value cell
2380 across various function calls, incase the head value changed. I
2381 also tightened up the memory management to help me find a nasty
2382 memory corruption bug that took me all night to track down...
2384 * m4/m4private.h (struct m4_symbol): Removed.
2385 (struct m4_token_data): Renamed to `struct m4_symbol'. Updated
2387 * m4/hash.c (m4_hash_iterator_value): Return the address of the
2388 value cell. Updated all callers.
2389 * m4/symtab.c: Took advantage of the simplification in the data
2390 structures to rewrite a lot of this file more simply. There is
2391 still some room for optimisation here, but we should tackle that
2392 systematically closer to the release.
2394 * m4/ltdl.c: Added dmalloc support, and fixed some memory leaks it
2395 revealed. This version is ahead of CVS libtool until I get chance
2396 to flush my changes.
2397 * m4/module.c (m4_module_remove): New function that holds the core
2398 of the old m4_module_unload.
2399 (m4_module_unload): Use it.
2400 (m4_module_unload_all): When we know the modules will never be
2401 used again (i.e. on exit), free up as much module memory as
2402 possible. There are still some artifacts from resident modules
2403 living inside ltdl.c, but everything else is freed.
2404 * m4/debug.c (m4_debug_exit): Free memory allocated in
2406 * m4/input.c (m4_input_exit): Ditto wrt m4_input_init().
2407 * m4/output.c (m4_output_exit): Ditto wrt m4_output_init ().
2408 * src/stackovf.c (stackovf_exit): Ditto wrt setup_stackovf_trap ().
2409 * m4/m4module.h: Updated prototypes.
2410 * m4/hash.c (m4_hash_exit): Free the nodes on the free list.
2411 * m4/hash.h: Updated prototypes.
2412 * src/main.c (main): Use all these new functions to clean up as
2413 much memory as possible before exit.
2415 2001-09-18 Gary V. Vaughan <gary@gnu.org>
2417 The `traced' flag needs to be attached to the definition of a
2418 symbol rather than the current symbol containing the definition.
2419 Implementing this showed up some long standing post 1.4 bugs in
2420 flag propogation which I also fixed.
2422 * m4/m4private.h (struct m4_symbol): Remove the traced flag.
2423 (struct m4_token_data): And add it back in here.
2424 * m4/input.c (init_macro_token): Propogate the traced flag
2426 * m4/macro.c (expand_argument): Ditto.
2427 * tests/builtins.at (trace2, trace3): New tests based on Akim's
2430 2001-09-08 Gary V. Vaughan <gary@gnu.org>
2432 * m4/m4private.h (struct m4_token_data): Simplified by removing
2433 the redundant `traced' flag, and one level of structure nesting.
2434 (M4_TOKEN_DATA_FUNC_TRACED): Removed.
2435 * m4/input.c (init_macro_token): No need to initialise removed
2437 * m4/macro.c (expand_argument): No need to copy it either.
2438 * m4/utility.c (m4_token_data_func_traced): Or provide an access
2441 * m4/hash.c (m4_hash_bucket_insert): Symbol shadowing is no longer
2442 dependant on multiple symbols with the same key, so preserving
2443 relative symbol order in each bucket during resizing is no longer
2444 required. The resize function is considerably faster as a result.
2446 * m4/m4module.h, m4/builtin.c, m4/symtab.c:
2447 s/m4_symbol_insert/m4_symbol_define/g;
2448 s/m4_builtin_insert/m4_builtin_define/g;
2449 s/m4_macro_insert/m4_macro_define/g. Updated all callers.
2451 2001-09-08 Gary V. Vaughan <gary@gnu.org>
2453 Get rid of m4_symbol_lookup_t entirely. With Akim's earlier
2454 commits, the m4_lookup_symbol dispatch function is split into
2455 specialised functions that must be called directly.
2457 * m4/m4module.h (m4_symbol_lookup_t): Removed.
2458 * m4/symtab.c (m4_lookup_symbol): Removed.
2459 (m4_symbol_builtin, m4_symbol_macro): New functions.
2460 * m4/builtin.c (m4_builtin_define): Split into...
2461 (m4_builtin_pushdef, m4_builtin_insert): ...these.
2462 (m4_macro_define): Split into...
2463 (m4_macro_pushdef, m4_macro_insert): ...these.
2464 * src/main.c (main): Set command line macros from `-D' parameters
2465 using `m4_macro_define'.
2467 2001-09-08 Gary V. Vaughan <gary@gnu.org>
2469 * m4/symtab.c (m4_symtab_remove_module_references): Renamed as
2470 this from m4_remove_table_reference_symbols().
2471 * m4/m4module.h, m4/module.c: Updated all references.
2473 2001-09-07 Akim Demaille <akim@epita.fr>
2475 * modules/stdlib.c, modules/times.c: Misc cleanups.
2477 2001-09-07 Akim Demaille <akim@epita.fr>
2479 * configure.in: We now need Autoconf 2.52e.
2480 * m4/m4module.h (m4_symbol_lookup_t): Remove `M4_SYMBOL_POPDEF'
2481 and `M4_SYMBOL_DELETE'.
2482 * m4/symtab.c (m4_lookup_symbol, symtab_debug): Adjust.
2483 * src/main.c (main): Adjust.
2485 2001-09-06 Gary V. Vaughan <gary@gnu.org>
2487 Fix the obstack.h problem once and for all! At configure time we
2488 can test for a system supplied obstack.h: depending on the
2489 result, we now generate system.h with an #include of the correct
2490 header. As a bonus, I've also added a --with-included-obstack,
2491 incase the user doesn't like the system obstack for some
2492 reason... and also we can test the shipped obstack on a system
2493 that has oe of its own. We also now need to be careful to add
2494 build directories to the include search path, since the generated
2495 system.h will be in the build tree.
2497 * configure.in (AC_CONFIG_FILES): Generate system.h from
2499 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Determine whether to
2500 include the system obstack header or the copy shipped with M4.
2501 Allow the user to override configure and force the build to use
2502 the shipped version.
2503 * m4/system-h.in: New file, template for...
2504 * m4/system.h: ...this. Now deleted.
2505 * m4/m4module.h: Include system.h before everything else.
2506 * src/freeze.c: Ditto.
2507 * m4/Makefile.am (dist-hook): Remove generated system.h.
2508 (INCLUDES): Check builddir for generated headers before checking
2510 * modules/Makefile.am (INCLUDES): Ditto.
2511 * src/Makefile.am (INCLUDES): Ditto.
2513 2001-09-05 Gary V. Vaughan <gary@gnu.org>
2515 * TODO: Remove the items that have been addressed already.
2517 2001-09-05 Akim Demaille <akim@epita.fr>
2519 * src/main.c (main): Standardize --version.
2521 2001-09-05 Akim Demaille <akim@epita.fr>
2523 * modules/format.c (format): Have a bigger `str'.
2525 2001-09-05 Akim Demaille <akim@epita.fr>
2527 Rationalize warnings, reporting the macro name as if it were a
2528 program name, and assertions.
2530 * m4/m4module.h (m4_lookup_symbol): Prototype, it is still used.
2532 * m4/symtab.c (m4_lookup_symbol, m4_symbol_popdef)
2534 Use assert for internal errors.
2535 * m4/utility.c (m4_bad_argc, m4_numeric_arg, m4_dump_symbols): Use
2537 * modules/m4.c (undefine, defn, traceon, traceoff, dumpdef): use
2539 * tests/builtins.at (pushpop): Adjust.
2541 2001-09-05 Akim Demaille <akim@epita.fr>
2543 * m4/symtab.c (m4_symbol_insert): Don't use `foo () || bar ()'
2546 2001-09-05 Akim Demaille <akim@epita.fr>
2548 * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_LOOKUP.
2549 * m4/macro.c, m4/symtab.c: Adjust.
2551 2001-09-05 Akim Demaille <akim@epita.fr>
2553 * m4/symtab.c (m4_symbol_popdef, m4_symbol_delete): Rename as...
2554 (m4_symbol_pop, m4_symbol_del): this.
2555 (m4_symbol_lookup, m4_symbol_pushdef, m4_symbol_insert)
2556 (m4_symbol_popdef, m4_symbol_delete): New.
2557 (m4_lookup_symbol): Adjust.
2558 * m4/m4module.h, src/main.c, modules/gnu.c, modules/m4.c: Adjust.
2560 2001-09-05 Akim Demaille <akim@epita.fr>
2562 * m4/m4module.h (m4_symbol_lookup): Rename as...
2563 (m4_symbol_lookup_t): this.
2565 2001-09-05 Akim Demaille <akim@epita.fr>
2567 * m4/m4module.h (m4_symbol_lookup): Remove M4_SYMBOL_IGNORE,
2569 * m4/symtab.c (m4_lookup_symbol): Adjust.
2571 2001-09-03 Gary V. Vaughan <gary@gnu.org>
2573 Bootstrap will now work with Libtool 1.4.1 or higher:
2574 * bootstrap: Remove stale autom4te.cache files when
2576 * config/Makefile.am (ACLOCAL_MACROS): Add ltdl.m4 and
2578 * bootstrap: Ignore acinclude.m4 now the we include ltdl.m4 and
2579 libtool.m4 directly.
2580 Run libtoolize to refresh ltmain.sh.
2581 * config/ltmain.sh: Deleted.
2582 * acinclude.m4: Deleted.
2583 * m4/ltdl.c, m4/ltdl.h: Updated from libtool-1.4.1.
2585 * config/debug.m4 (AC_LIBTOOL_COMPILER_OPTION): Provide a fallback
2586 implementation for the cvs impaired libtool user.
2588 2001-09-03 Akim Demaille <akim@epita.fr>
2590 * m4/symtab.c (m4_lookup_symbol): Give more details when reporting
2592 Avoid using `default' in switch, as it hides useful compiler
2593 warnings when a case is forgotten.
2595 2001-09-03 Akim Demaille <akim@epita.fr>
2597 * src/main.c (MODULE_SHORTOPT, MODULEPATH_SHORTOPT): Remove, there
2598 is no such thing as `WITH_MODULES'.
2600 2001-09-03 Akim Demaille <akim@epita.fr>
2602 Improve the test suite's selfcontainedness.
2604 * doc/m4.texinfo: Let `input.m4' be the input file, not `in'.
2605 (Include, Undivert): Tag the other input files.
2606 * tests/generate.awk: Catch `@comment file:'.
2607 `-I $src' is no longer needed.
2608 `next' is really like `return': the rest is skipped.
2609 Adjust to `input.m4'.
2610 (fatal): New function.
2611 * tests/foo, tests/incl.m4: Remove.
2613 2001-09-01 Gary V. Vaughan <gary@gnu.org>
2615 The shadowing mechanism and, infact, the whole symbol table
2616 implementation was creaking under the weight of the features piled
2617 on top of it. We now have a separate hash table module which will
2618 dynamically resize to keep symbol density withing good performace
2619 limits, and a new symtab module layered above it. Symbol lookups
2620 are now marginally more efficient (since the shadowed flag is no
2621 longer required) and symbol removal, such as on module unload, is
2622 considerably faster due to a reorganisation of the data structures
2625 * src/main.c (main): Don't mention `-H'.
2626 * doc/m4.texinfo (Invoking m4): Document that -H no longer has any
2629 * m4/hash.c: New generalised dynamic hash table data structure
2631 * m4/hash.h: Public interface.
2632 * m4/Makefile.am (pkginc_HEADERS): Add hash.h.
2633 (libm4_la_SOURCES): Add hash.c.
2634 * m4/symtab.c: More or less rewritten from scratch, within the
2635 bounds of the previous API.
2636 (m4_symtab_apply): A cleaner version of the old hack_all_symbols
2637 call. Updated all callers.
2638 * m4/m4module.c: #include <m4/hash.h>, and changed all affected
2639 declarations to reflect API changes.
2640 (M4INIT): Generate a declaration too, to avoid the warning with
2641 --enable-debug builds.
2644 * m4/utility.c (hash_table_size): Removed.
2645 (m4_dump_symbols): Rewritten to build and qsort an array of symbol
2646 names, which are then looked up by builtin_dumpdef() as necessary.
2647 This implies a small speedup in builtin_symbols(), which discarded
2648 all of the symbol info under the old call.
2649 * m4/m4private.h (m4_symbol): Removed shadowed flag -- symbol
2650 shadowing is implicit in respect to the new data structures.
2651 symbol names are no longer duplicated here, they are stored in the
2652 key field of the hash table.
2653 Moved macro_args and blind_no_args...
2654 (m4_token_data): ...to here.
2655 m4/macro.c (expand_macro): Added a name argument since the symbol
2656 name is no longer copied into each struct m4_symbol. Modified all
2658 (collect_arguments): Ditto.
2659 * modules/m4.c (set_trace): Ditto.
2660 * modules/gnu.c (builtin_symbols): Updated.
2661 * src/freeze.c (produce_symbol_dump): Much improved in light of
2662 the improved symbol table layout.
2664 2001-09-01 Gary V. Vaughan <gary@gnu.org>
2666 * m4/m4private.h (SYMBOL_NEXT): Move into m4's name space; renamed
2668 (SYMBOL_TRACED): Similarly renamed by prefixing with `M4_'.
2669 (SYMBOL_SHADOWED, SYMBOL_MACRO_ARGS, SYMBOL_BLIND_NO_ARGS,
2670 SYMBOL_NAME, SYMBOL_TYPE, SYMBOL_TEXT, SYMBOL_FUNC,
2671 SYMBOL_HANDLE): Ditto.
2672 * m4/builtin.c, m4/macro.c, m4/symtab.c, m4/utility.c,
2673 modules/gnu.c, modules/m4.c, src/freeze.c,
2674 src/main.c: Updated all references.
2676 * src/Makefile.am (m4_SOURCES): Don't list $(M4OBJS) here, since
2677 Automake 1.5 chokes on dynamic source file lists, Besides, it is
2678 already listed in m4_LDADD... how did that ever used to work?
2679 * configure.in (getopt.h): Use AC_CONFIG_LINKS instead of a manual
2681 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Ditto.
2682 Suggested by Tim Van Holder <tim.van.holder@pandora.be>
2684 * tests/m4: Don't call the m4 wrapper script with libtool, it
2685 works fine all by itself.
2687 2001-08-30 Gary V. Vaughan <gary@gnu.org>
2689 The experimental `changeword' feature never took off, and has
2690 no obvious advantages over `changesyntax' to compensate the
2691 enormous speed penalty it carries:
2692 * configure.in (ENABLE_CHANGEWORD): Removed.
2693 * m4/m4module.h (m4_set_word_regexp): Removed.
2694 * m4/m4private.h (m4_token_data): Removed original_text field.
2695 * m4/utility.c (m4_token_data_orig_text): Removed.
2696 * m4/input,c: Removed all conditional ENABLE_CHANGEWORD code.
2697 * m4/macro.c: Ditto.
2698 * src/main.c: Ditto.
2699 * modules/Makefile.am (changeword.la): Removed.
2700 * modules/changeword.c: File removed.
2701 * doc/m4.texinfo: References to changeword and --word-regexp
2703 * po/POTFILES.in: modules/changeword.c removed.
2704 * tests/atlocal.in (ENABLE_CHANGEWORD): Removed.
2705 * tests/builtins.at (changeword): Test removed.
2707 2001-08-30 Akim Demaille <akim@epita.fr>
2709 * bootstrap.sh: Create aclocal.m4 instead of modifying it.
2710 This also help having a single list of m4 files: in
2712 * config/Makefile.am (STANDARD_MACROS): Rename as...
2713 (ACLOCAL_MACROS): this.
2714 (list-standard-macros): Remove.
2717 2001-08-29 Gary V. Vaughan <gary@gnu.org>
2719 In an attempt to moderate my egomania...
2720 * tests/modules.at: Remove attributions.
2722 * tests/generate.awk: When making substitutions to "@&t@", either
2723 "&" or "\&" in the substitution string argument to gsub refer back
2724 to the matched text. "@\\&t@" seems to work though, Tests 43 and
2727 2001-08-29 Akim Demaille <akim@epita.fr>
2729 * tests/others.at (changeword, ddivert, debug, esyscmd, exp, gmp)
2730 (include, indir, multiquotes, patsubst, pushdef/popdef, regexp)
2731 (sync-lines, trace, translit, undivert, wrap): Move to...
2732 * tests/builtins.at: this new file.
2733 * tests/others.at (Discard comments, import-environment): Move to...
2734 * tests/options.at: this new file.
2736 2001-08-29 Akim Demaille <akim@epita.fr>
2738 * tests/others.at (Freezing modules)
2739 (--module-directory: absolute path, modpath2, modpath3)
2740 (M4MODPATH: absolute path, modtest, shadow, unload): Move to...
2741 * tests/modules.at: here, new file.
2742 * tests/others.at, tests/generate.awk: Add a banner.
2743 * tests/testsuite.at: Adjust.
2744 (AT_CHECK_M4_FILTER): New, but unused.
2746 2001-08-29 Akim Demaille <akim@epita.fr>
2748 * tests/testsuite.at (AT_CHECK_M4): Don't pass -I, let the tests
2750 * tests/others.at (wrap): Inline wrap.m4.
2751 (shadow): Inline shadow.m4.
2752 (iso8859): Don't specify the path from top_srcdir, but from srcdir.
2753 * tests/m4: Simplify.
2755 2001-08-29 Akim Demaille <akim@epita.fr>
2757 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): Use autom4te's
2760 2001-08-29 Akim Demaille <akim@epita.fr>
2762 * tests/generate.awk (normalize): s/@__@/@&t@/.
2764 2001-08-28 Akim Demaille <akim@epita.fr>
2766 * examples/indir.m4, tests/others.at (indir): s/nonsens/nonsense/.
2768 2001-08-28 Gary V. Vaughan <gary@gnu.org>
2770 * bootstrap (generate.awk): Generate test cases with new script.
2772 2001-08-27 Akim Demaille <akim@epita.fr>
2774 * tests/Makefile.am (installcheck-local): Don't use
2775 `dc_install_base' which is not visible here, but `exec_prefix'
2776 which is clearly the RT anyway.
2777 * tests/testsuite.at (AT_CHECK_M4): Don't pass -M here since it is
2778 related to testing a now installed m4.
2779 * tests/m4: Do it here.
2781 2001-08-27 Akim Demaille <akim@epita.fr>
2783 * tests/others.at (indir): Formatting change.
2785 2001-08-27 Akim Demaille <akim@epita.fr>
2787 * tests/Makefile.am (installcheck-local): New.
2788 * tests/testsuite.at (AT_CHECK_M4): Pass `-b' so that C-c works on
2790 Prefer options over envvars.
2791 * src/main.c (main): First bug caught by the test suite (yeah!):
2792 --batch lacked a `break' which resulted in an accidental
2793 invocation of --discard-comments.
2795 2001-08-27 Akim Demaille <akim@epita.fr>
2797 * tests/others.at (capitalize, changeword, comments, ddivert)
2798 (debug, esyscmd, exp, foreach, forloop, fstab, hanoi, include)
2799 (misc, multiquotes, patsubst, pushdef/popdef, regexp, reverse)
2800 (sysv-args, trace, translit, undivert): Don't rely on files in
2801 examples/: AT_DATA them.
2803 2001-08-27 Akim Demaille <akim@epita.fr>
2805 Let the test suite use a wrapper around the not installed m4 to
2806 pretend it is (installed).
2808 * bootstrap (aclocal.m4): Output AC_SUBST's and AM_CONDITIONAL's in
2809 such a way that m4 does not process them.
2810 * configure.in: The package name seems to be `m4', not `M4'.
2812 * tests/atlocal.in (at_package, M4): Remove.
2813 * tests/testsuite.at, tests/others.at: Use m4, not $M4.
2815 2001-08-27 Akim Demaille <akim@epita.fr>
2817 * tests/Makefile.am (CLEANFILES): Remove.
2818 (DISTCLEANFILES, clean-local): New.
2819 * examples/mktests.sh: Remove.
2821 2001-08-27 Akim Demaille <akim@epita.fr>
2823 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2824 Don't use aclocal: it's written by hand.
2825 * aclocal.m4: m4_include all the files instead of being built by
2827 * bootstrap: Help automake find the AC_SUBSTs and AM_CONDITIONALs
2828 until it reads the traces by itself.
2829 * configure.in: Require Autoconf 2.42c as we are now using
2830 AC_CONFIG_TESTDIR instead of AT_CONFIG.
2831 Catch unexpanded `jm_' macros.
2832 * config/atconfig.m4: Remove.
2833 * config/error.m4: new.
2834 * config/Makefile.am: Ship the files included by aclocal.m4.
2835 * tests/Makefile.am (TESTSUITE_SOURCES): Rename as...
2836 (TESTSUITE_AT): this, to please Automake.
2837 (TESTSUITE): This target uses autotest/autotest.m4, not
2838 autotest/general.m4.
2839 * tests/testsuite.at: Prereq Autotest 2.52c.
2840 * examples/Makefile.am (pkgdata_DATA): Rename as...
2841 (dist_pkgdata_DATA): this.
2842 * doc/Makefile.am (man_MANS): Rename as...
2843 (dist_man_mans): this.
2845 2001-08-20 Gary V. Vaughan <gary@gnu.org>
2847 * m4/system.h [cygwin*]: Thanks to Paul Sokolovsky and
2848 Robert Collins, building on Cygwin no longer requires Windows
2849 import and export symbol decorations.
2850 * m4/m4module.h (M4_SCOPE) [cygwin*]: Deleted all occurences.
2851 * m4/error.h (M4_SCOPE) [cygwin*]: Ditto.
2852 * m4/debug.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2853 * m4/error.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2854 * m4/input.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2855 * m4/macro.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2856 * m4/output.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2857 * m4/utilty.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2858 * m4/xmalloc.c (M4_GLOBAL_DATA) [cygwin*]: Ditto.
2859 * configure.in (LIBM4_DLL_IMPORT) [cygwin*]: Don't set this
2861 * src/Makefile.am (AM_CPPFLAGS) [cygwin*]: Don't use it either!
2862 * modules/Makefile.am (AM_CPPFLAGS) [cygwin*]: Ditto.
2864 2001-08-20 Gary V. Vaughan <gary@gnu.org>
2866 Ansify the source. Previously we had a mix, where my code was
2867 in a K&R compatible style, and the preexisting code was in ANSI
2868 style. Nothing is lost wrt release 1.4 by reverting to ANSI,
2869 and now the code base is much cleaner.
2871 * m4/system.h: Remove M4_PARAMS macro and all users. Remove
2872 VOID macro and all users.
2873 * m4/m4module.h: Ansify function prototypes and headers.
2874 * m4/builtin.c: Ditto.
2875 * m4/evalparse.c: Ditto.
2876 * m4/input.c: Ditto.
2877 * m4/macro.c: Ditto.
2878 * m4/module.c: Ditto.
2879 * m4/output.c: Ditto.
2881 * m4/symtab.c: Ditto.
2882 * m4/utility.c: Ditto.
2883 * modules/format.c: Ditto.
2884 * modules/gnu.c: Ditto.
2885 * modules/m4.c: Ditto.
2886 * modules/mpeval.c: Ditto.
2887 * src/freeze.c: Ditto.
2889 * src/main.c: Ditto.
2891 2001-08-20 Akim Demaille <akim@epita.fr>
2893 * config/atconfig.m4: s/EOF/ATEOF/, so that configure can be
2894 generated with stock 2.52.
2896 2001-08-20 Akim Demaille <akim@epita.fr>
2898 * config/atconfig.m4: New, until part of Autoconf per se.
2899 * configure.in (AT_CONFIG): Use it.
2901 * tests/mkconfig.sh, tests/atconfig.in, tests/defs: Remove.
2902 * tests/atlocal.in: New.
2903 * tests/generate.awk: For the time being, the empty quadrigraph is
2905 * tests/others.at (changeword, gmp): Check the configuration
2906 variable against `yes'.
2907 * tests/testsuite.at (dnl): Allow it, as it's used all over the
2910 2001-08-20 Akim Demaille <akim@epita.fr>
2912 * m4/utility.c (m4_numeric_arg): Spell out the culprit.
2913 * modules/m4.c (undivert): Disable the possibility of undiverting
2914 several files at once: it is not documented, it is inconsistent
2915 with the other macros, it can be straightforwardly mocked by
2916 several invocations, and most importantly, it prevents the
2917 possibility of other kinds of extension.
2918 Use `m4_numeric_arg'.
2920 2001-08-20 Akim Demaille <akim@epita.fr>
2922 * examples/include.m4: Typo.
2923 * tests/generate.awk: Really add it.
2924 * tests/Makefile.am: Adjust.
2925 * tests/others.at (Discard comments): It sure fails without `-c'.
2926 (include, undivert): Add -I examples/.
2928 2001-08-20 Akim Demaille <akim@epita.fr>
2930 Use sprintf, not ecft and friends since it is standard, portable,
2931 simplifies the code, and since the latter is even deprecated
2932 according to the GNU libc documentation.
2934 * modules/format.c: Drop evct support.
2936 2001-08-19 Gary V. Vaughan <gary@gnu.org>
2938 * config/debug.m4 (M4_AC_CHECK_DEBUGGING): Cleaned up. Don't test
2940 * configure.in: ...do it here instead.
2942 * c-boxes.el: Deleted.
2943 * m4/builtin.c: Reformat box comments to be closer to GNU
2945 * m4/debug.c: Ditto.
2947 * m4/evalparse.c: Ditto.
2948 * m4/input.c: Ditto.
2949 * m4/m4module.h: Ditto.
2950 * m4/macro.c: Ditto.
2951 * m4/output.c: Ditto.
2952 * m4/symtab.c: Ditto.
2953 * m4/utility.c: Ditto.
2954 * modules/changeword.c: Ditto.
2955 * modules/format.c: Ditto.
2956 * modules/gnu.c: Ditto.
2957 * modules/load.c: Ditto.
2958 * modules/m4.c: Ditto.
2959 * modules/modtest.c: Ditto.
2960 * modules/mpeval.c: Ditto.
2961 * modules/perl.c: Ditto.
2962 * modules/shadow.c: Ditto.
2963 * modules/stdlib.c: Ditto.
2964 * modules/time.c: Ditto.
2965 * src/freeze.c: Ditto.
2966 * src/main.c: Ditto.
2968 2001-08-17 Gary V. Vaughan <gary@gnu.org>
2970 * m4/module.c: Fixup some errors in the description comment.
2972 2001-08-17 Akim Demaille <akim@epita.fr>
2974 * tests/others.at (iso8859): Specify the path to the M4 test file.
2975 * tests/testsuite.at (AT_CHECK_M4): Normalize the path of input
2976 files in error messages.
2978 2001-08-17 Akim Demaille <akim@epita.fr>
2980 * tests/testsuite.at (AT_CHECK_M4): Anchor M4PATH in $top_srcdir.
2981 * tests/others.at: Adjust input files paths.
2982 * tests/atconfig.in: Set top_builddir.
2983 * tests/Makefile.am: Adjust.
2984 `testsuite' is in src, not build.
2986 2001-08-17 Akim Demaille <akim@epita.fr>
2988 * tests/Makefile.am (EXTRA_DIST): Ship generate.awk.
2989 (generate.at): Install a temporary hack until the actual
2990 generate.awk is added to the repository.
2991 * tests/atconfig.in: New.
2993 2001-08-17 Akim Demaille <akim@epita.fr>
2995 Really apply the patch ``Drop Autoconf 2.13 compatibility.''
2997 2001-08-17 Akim Demaille <akim@epita.fr>
2999 * doc/m4.texinfo: Promote proper quotation.
3001 2001-08-17 Akim Demaille <akim@epita.fr>
3003 Remove the non Autotest tests.
3005 * tests/other-tests/capitalize.test,
3006 * tests/other-tests/changeword.test,
3007 * tests/other-tests/comments.test, tests/other-tests/ddivert.test,
3008 * tests/other-tests/debug.test,
3009 * tests/other-tests/discard-comments.m4,
3010 * tests/other-tests/discard-comments.test,
3011 * tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
3012 * tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3013 * tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3014 * tests/other-tests/gmp.m4, tests/other-tests/gmp.test,
3015 * tests/other-tests/hanoi.test,
3016 * tests/other-tests/import-environment.m4,
3017 * tests/other-tests/import-environment.test,
3018 * tests/other-tests/include.test, tests/other-tests/indir.test,
3019 * tests/other-tests/iso8859.m4, tests/other-tests/iso8859.test,
3020 * tests/other-tests/misc.test, tests/other-tests/modfreeze.test,
3021 * tests/other-tests/modpath1.test, tests/other-tests/modpath2.test,
3022 * tests/other-tests/modpath3.test, tests/other-tests/modpath4.test,
3023 * tests/other-tests/modtest.test,
3024 * tests/other-tests/multiquotes.test,
3025 * tests/other-tests/patsubst.test, tests/other-tests/pushpop.test,
3026 * tests/other-tests/regexp.test, tests/other-tests/reverse.test,
3027 * tests/other-tests/shadow.test, tests/other-tests/stackovf.test,
3028 * tests/other-tests/sync-lines.m4,
3029 * tests/other-tests/sync-lines.test,
3030 * tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3031 * tests/other-tests/translit.test, tests/other-tests/undivert.test,
3032 * tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3033 * tests/other-tests/wrap.test: Remove.
3035 * tests/run-test, tests/get-them: Remove.
3036 * tests/Makefile.am: Adjust.
3038 2001-08-17 Akim Demaille <akim@epita.fr>
3040 others.at no longer depends on other-tests/.
3042 * tests/others.at (stackovf): You're actually...
3044 (modfreeze, modpath1, modpath2, modpath3, modpath4, modtest, shadow)
3045 (unload.test): Keep their authorship.
3046 (discard-comments, gmp, import-environment, modfreeze)
3047 (sync-lines): Embed the input files.
3048 * tests/stackovf.test: Copy from other-tests/stackovf.test.
3049 * tests/iso8850.m4: Copy from other-tests/iso8859.m4.
3051 2001-08-17 Akim Demaille <akim@epita.fr>
3053 * doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
3054 (M4exit): Tag the exit status of the example.
3055 * tests/get-them: Adjust.
3056 * tests/generate.awk: New, based on get-them.
3057 * tests/Makefile.am: Adjust to generate `generated.at'.
3058 * tests/testsuite.at: Adjust.
3059 (AT_CHECK_M4): Don't overquote. Blush...
3061 2001-08-17 Akim Demaille <akim@epita.fr>
3063 Start using Autotest. atconfig creation is still lacking.
3065 * examples/patsubst.m4, modules/modtest.m4, modules/shadow.m4,
3066 * examples/reverse.m4, tests/other-tests/import-environment.m4,
3067 * tests/other-tests/iso8859.m4: Don't produce trailing blanks.
3068 * tests/other-tests/import-environment.test: Don't check LANGUAGE
3069 as it might be `unset', or set to `C'.
3070 * tests/other-tests/iso8859.test, tests/other-tests/modpath1.test,
3071 * tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3072 * tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3073 * tests/other-tests/patsubst.test, tests/other-tests/reverse.test,
3074 * tests/other-tests/shadow.test: Adjust.
3075 * tests/testsuite.at, tests/others.at: New.
3076 * tests/Makefile.am: Adjust.
3078 2001-08-17 Akim Demaille <akim@epita.fr>
3080 Drop Autoconf 2.13 compatibility.
3082 * configure.in (changeword): No need to undefine it, as anyway if
3083 it's defined, M4sugar moved it as m4_changeword.
3084 And anyway, proper quotation is enough.
3085 (m4_pattern_allow): As it exists in 2.50, just use it.
3086 (AC_OUTPUT): Split in AC_CONFIG_FILES and AC_CONFIG_COMMANDS.
3087 Don't handle Gettext's duties, let it handle them.
3088 * config/gnu-obstack.m4: Use m4_pattern_allow directly.
3090 2001-08-17 Akim Demaille <akim@epita.fr>
3092 * modules/m4.c (m4_dumpdef): Output to stderr, not m4_debug.
3093 (m4_errprint): Use fputs.
3094 * doc/m4.texinfo (Invoking m4) <--error-output>: errprint and
3095 dumpdef are not concerned.
3096 (Dumpdef, Errprint): Emphasize their insensitivity to
3098 * doc/Makefile.am: Add `TAGS' support.
3099 (MAINTAINERCLEANFILES): Remove texinfo.tex and mdate-sh which are
3101 * config/Makefile.am (MAINTAINERCLEANFILES): New.
3103 2001-08-17 Akim Demaille <akim@epita.fr>
3105 * modules/Makefile.am (ETAGS_ARGS): New.
3107 2001-08-17 Akim Demaille <akim@epita.fr>
3109 * m4/symtab.c (m4_hack_all_symbols, m4_lookup_symbol): Formatting
3112 2001-08-17 Akim Demaille <akim@epita.fr>
3114 * m4/builtin.c (m4_macro_define): Do not reset SYMBOL_TRACED.
3116 2001-08-17 Akim Demaille <akim@epita.fr>
3118 * m4/m4module.h (m4/list.h): Don't include it.
3120 2001-08-16 Gary V. Vaughan <gary@gnu.org>
3122 m4_modules are no more, we use lt_dlhandles directly and let
3123 latest libltdl features manage the list of loaded modules.
3124 * acinclude.m4: Regenerated.
3125 * m4/ltdl.c: Updated from master copy.
3126 * m4/module.c: Reimplemented to take advantage of advances in
3128 * m4/builtin.c (m4_builtin_find_by_name): Traverse loaded module
3129 list with lt_dlhandle_next.
3130 (m4_builtin_find_by_func): Ditto.
3131 (m4_builtin_table_install): Use lt_dlhandle.
3132 (m4_macro_define): Ditto.
3133 (m4_macro_table_install): Ditto.
3134 m4/module.h: Prototype new module management API.
3135 (m4_modules): No longer required.
3136 (m4_module_init_t, m4_module_finish_t): POSIX namespace
3137 violations, renamed to...
3138 (m4_module_init_func, m4_module_finish_func): ...these,
3140 (M4INIT_HANDLER): Clean way to declare init functions in modules.
3141 (M4FINISH_HANDLER): And similarly for finish functions.
3142 * m4/system.h (_CONC): Used by M4INIT_HANDLER and M4FINISH_HANDLER
3143 -- Add indirection to the CONC macro so that arguments are
3145 * modules/modtest.c (m4_init_module): Replaced with M4INIT_HANDLER.
3146 * modules/shadow.c (m4_init_module): Ditto.
3147 Due to new init function semantics, be careful to perform the
3148 initialisation only on first load.
3149 * modules/perl.c (m4_init_module): Ditto. And Ditto.
3150 (m4_finish_module): Replaced with M4FINISH_HANDLER.
3151 Due to new finish function semantics, be careful to perform the
3152 finalisation only on first load.
3153 * m4/m4private.h (m4_module): Removed in favour of...
3154 (m4_module_data): ...structure without all the wrapper fields.
3155 Instances of this new structure are stored associated lt_dlhandles
3156 with lt_dlcaller_data_set().
3157 * m4/builtin.c (m4_builtin_define): Takes a handle argument
3158 instead of the old module argument.
3159 (m4_builtin_table_install): Ditto.
3160 * modules/load.c (m4_resident_module): Removed. This is no
3161 longer implemented as a magic symbol...
3162 * modules/m4.c (m4_resident_module): Ditto.
3163 * modules/load.c (M4INIT_HANDLER): ...the module init function now
3164 uses the ltdl api to make the module resident.
3165 * modules/m4.c (M4INIT_HANDLER): Ditto.
3166 * modules/load.c (builtin_modules): Traverse the loaded module
3167 list with lt_dlhandle_next.
3168 (builtin_load): Much simplified in light of the reimplemented
3170 * src/freeze.c (produce_module_dump): Cleaned up and optimised in
3171 light of the m4/module.c rewrite.
3172 (produce_symbol_dump): Ditto.
3173 (reload_frozen_state): Ditto.
3174 * m4/list.c, m4/list.h: Files deleted. No longer required.
3175 * m4/Makefile.am (pkginc_HEADERS): Delete list.h reference.
3176 (libm4_la_SOURCES): Delete list.c reference.
3177 * m4/m4private.h (m4_token_data): Add a handle field. This
3178 eliminates many of the searches to find the handle associated with
3179 various tokens that are passed between functions.
3180 (struct m4_symbol): Removed the module field. The
3181 module association does not belong with the symbol...
3182 * m4/input.c (struct m4_builtin): ...it belongs with the builtin
3183 that the module implementation code is from. Added a handle
3185 (m4_push_macro): Add a `handle' argument. Changed all callers.
3186 (init_macro_token): Set the `handle' field for the
3188 * m4/macro.c (expand_argument): Copy the new handle field during
3190 * modules/m4.c (macro_install): Use the new handle field to
3191 optimise the search for the correct builtin structure, and pass
3192 the handle details to m4_builtin_define.
3194 2001-08-15 Akim Demaille <akim@epita.fr>
3196 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Be sure `m4/' exists
3197 when creating `m4/obstack.h'.
3198 * tests/Makefile.am (TESTS_ENVIRONMENT): Pass top_srcdir and
3200 * tests/defs: Make them absolute.
3201 (CDPATH) Neutralize.
3202 * tests/gethem: Use them.
3204 2001-08-14 Gary V. Vaughan <gary@gnu.org>
3206 * config/ltmain.sh: Doh! Import again for a quoting fix that
3207 prevented any regression test from passing.
3209 * m4/m4module.h (obstack.h): Choose between installed version
3210 and shipped version based on configure tests.
3211 * src/freeze.c (obstack.h): Ditto.
3213 * acconfig.h: Removed. No longer required.
3215 * bootstrap: Rewritten to play nicely with Autoconf 2.5x.
3216 * configure.in (MY_NAME, MY_VERSION): Define these once, and feed
3217 them to AC_INIT and AM_INIT_AUTOMAKE.
3218 * Makefile.am (AUTOMAKE_OPTIONS): Remove `gnits' which would
3219 disallow MY_NAME and MY_VERSION arguments to AM_INIT_AUTOMAKE.
3220 * config/gnu-obstack.m4 (M4_AC_FUNC_OBSTACK): Don't choke on
3221 shell variable m4_cv_func_obstack_h.
3222 * tests/defs (M4): Be more careful about relative path to libtool
3223 script and m4 binary by using $srcdir.
3225 * src/main.c (main): Use lt_dlinsertsearchdir to prepend -M
3226 optargs to the existing libltdl search path.
3227 * acinclude.m4: Regenerate from latest libtool,m4 and ltdl.m4.
3228 * m4/ltdl.c: Updated.
3230 * config/ltmain.sh: Ditto.
3232 2001-08-11 Gary V. Vaughan <gary@gnu.org>
3234 * src/main.c (main): Add `-b' (for `batch') mode switch to force
3235 interactive mode off.
3237 2001-08-10 Akim Demaille <akim@epita.fr>
3239 * configure.in: Require Autoconf 2.52.
3240 (AC_ARG_PROGRAM): Remove, handled by Automake.
3241 (m4_getopt): Rename as...
3242 (m4_getopt_h): this.
3243 Allow the tokens `m4_cv_*', `m4_top_srcdir', and `m4_getopt_h'.
3244 Undefine `changeword' only if defined.
3245 * config/gnu-obstack.m4: Require Autoconf 2.52.
3246 (M4_AC_FUNC_OBSTACK): Rename `m4_obstack' and `m4_obstack_h'.
3249 2001-08-09 Yuji Minejima <ggb01164@nifty.ne.jp>
3251 * doc/m4.texinfo: Fix some typos, and apply some small
3254 2001-08-09 Andreas Schwab <schwab@suse.de>
3256 * src/main.c (main): Fix improper uses of error (missing format
3259 2001-08-07 Akim Demaille <akim@epita.fr>
3261 Improve `make distcheck'.
3263 * configure.in: Be sure to be able to run `mkconfig.sh' when src
3265 * Makefile.am (dist-hook): Remove, as it is no longer needed.
3266 * doc/m4.texinfo (Include): Add missing blank.
3267 * m4/Makefile.am (EXTRA_DIST): Distribute gnu-obstack.h and
3270 2001-08-07 Akim Demaille <akim@epita.fr>
3272 * m4/evalparse.c: A better introductory comment.
3273 * m4/m4module.h (M4_DEBUG_PRINT2): s/M4_debug/m4_debug/.
3274 * m4/macro.c: Adjust old comments.
3275 * modules/README: Typo.
3277 2001-08-07 Akim Demaille <akim@epita.fr>
3279 * config/gnu-obstack.m4: New.
3281 2001-08-07 Akim Demaille <akim@epita.fr>
3283 * config/Makefile.am, config/stackovf.m4: New.
3284 * configure.in, Makefile.am: Adjust.
3286 2001-04-08 Roderick Koehle <Roderick.Koehle@infineon.com>
3288 * modules/format.c (format): Formatting for %f was not
3289 interpreting the position of the decimal point correctly for
3292 2000-12-01 Gary V. Vaughan <gary@gnu.org>
3294 * TODO: Removed m4exit bug.
3295 * modules/load.c (m4_resident_module): Make this module resident.
3296 * module/m4.c (m4_resident_module): Ditto.
3297 * m4/modules.c (m4_module_load): Use new ltdl resident modules
3298 feature to mark modules as resident if they export
3299 `m4_resident_module' as TRUE.
3300 (m4_module_unload): Do not remove resident modules, and take care
3301 with symbol insertion and deletion with resident modules.
3302 * m4/ltdl.c, m4/ltdl.h: Update to latest unreleased versions to
3303 use resident modules feature.
3305 2000-11-30 Gary V. Vaughan <gary@gnu.org>
3307 * TODO: Updated. Removed some cruft that has since been fixed
3308 or implemented. Added some more entries.
3311 * modules/README: Updated.
3312 * doc/m4.texinfo: Updated.
3314 * modules/gnu.c (builtin_functions): Make indir orthogonal to
3315 builtin, in that each is recognised as a macro only with parameters
3316 (builtin_indir): Passing 0 arguments is now an error, as with
3319 * src/main.c (usage): Added missing description of `-c' option.
3321 2000-11-29 Gary V. Vaughan <gary@gnu.org>
3323 Consolidate the myriad of dispersed test scripts into the
3324 tests subdirectory. I think I now have all the file where I
3325 want them, so there shouldn't be anymore upheaval =)O|
3327 * tests/Makefile.am: Updated to run the new tests added below.
3328 * tests/other-tests/capitalize.test, tests/other-tests/comments.test,
3329 tests/other-tests/ddivert.test, tests/other-tests/debug.test,
3330 tests/other-tests/esyscmd.test, tests/other-tests/exp.test,
3331 tests/other-tests/foreach.test, tests/other-tests/forloop.test,
3332 tests/other-tests/frozen.m4, tests/other-tests/fstab.test,
3333 tests/other-tests/hanoi.test, tests/other-tests/include.test,
3334 tests/other-tests/indir.test, tests/other-tests/misc.test,
3335 tests/other-tests/modfreeze.test, tests/other-tests/modpath1.test,
3336 tests/other-tests/modpath2.test, tests/other-tests/modpath3.test,
3337 tests/other-tests/modpath4.test, tests/other-tests/modtest.test,
3338 tests/other-tests/multiquotes.test, tests/other-tests/patsubst.test,
3339 tests/other-tests/pushpop.test, tests/other-tests/regexp.test,
3340 tests/other-tests/reverse.test, tests/other-tests/shadow.test,
3341 tests/other-tests/sysv-args.test, tests/other-tests/trace.test,
3342 tests/other-tests/translit.test, tests/other-tests/undivert.test,
3343 tests/other-tests/unfrozen.m4, tests/other-tests/unload.test,
3344 tests/other-tests/wrap.test: New tests based on the contents
3345 of the tests removed below.
3346 * examples/Makefile.am, modules/Makefile.am: Updated to
3347 reflect removed tests.
3348 * examples/defs,modules/defs: Removed.
3349 * examples/capitalize.test, examples/comments.test,
3350 examples/ddivert.test, examples/debug.test,
3351 examples/esyscmd.test, examples/exp.test,
3352 examples/foreach.test, examples/forloop.test,
3353 examples/fstab.test, examples/hanoi.test,
3354 examples/include.test, examples/indir.test,
3355 examples/misc.test, examples/multiquotes.test,
3356 examples/patsubst.test, examples/pushpop.test,
3357 examples/regexp.test, examples/reverse.test,
3358 examples/sysv-args.test, examples/trace.test,
3359 examples/translit.test, examples/undivert.test,
3360 examples/wrap.test, modules/frozen.m4, modules/modfreeze.test,
3361 modules/modpath1.test, modules/modpath2.test,
3362 modules/modpath3.test, modules/modpath4.test,
3363 modules/modtest.test, modules/shadow.test,
3364 modules/unfrozen.m4, modules/unload.test: Removed.
3366 Move the implementation of GMP support for the mpeval() builtin
3367 into a loadable module that depends on libgmp. mpeval() and
3368 eval() share a common parser, now in m4/evalparser.c; the code
3369 in m4/numb.c and m4/numb.h is now physically split between
3370 m4/eval.c (the eval() backend) and modules/mpeval.c (the
3371 mpeval() backend), rather than being differentiated by cpp
3372 macros and multiple inclusion. The mpeval module is always
3373 built but will generate an diagnostic if it is used from an
3374 installation that didn't link in the gmp library.
3375 * modules/Makefile.am: build and install the new mpeval module.
3376 * modules/mpeval.c: Now contains the former parts of m4/numb.c
3377 and m4/numb.h that are required for gmp support in mpeval().
3378 * m4/Makefile.am (libm4_la_SOURCES): Removed evalmp.c.
3379 * m4/evalmp.c: Removed.
3380 * m4/m4module.h: Removed conditional prototype for
3382 * m4/eval.c: Rewritten. Contains the former parts of m4/numb.c
3383 and m4/numb.h that do not rely on gmp.
3384 * m4/evalparse.c: New file, contains the shared parts of the
3385 eval() and evalmp() parser implementations, and is no longer
3386 unencumbered by cpp magic to uncover the right parts.
3387 * m4/numb.h: Removed. It's former contents are split between
3388 m4/eval.c and modules/mpeval.c.
3391 * tests/other-tests/changeword.test: New test. Rudimentary
3392 testing of changeword builtin runs only if --wnable-changeword
3393 was used at configure time.
3394 * tests/mkconfig.sh: Solaris sed (at least) does not parse nested
3395 alternation correctly. Split into two expressions to compensate.
3396 * m4/input.c (m4_input_init): Use m4_ prefix on m4_set_word_regexp.
3397 * modules/Makefile.am: Build changeword module.
3398 * modules/changeword.c (m4_macro_table): Define __m4_changeword__
3399 only when --enable-changeword was passed to configure.
3400 (builtin_changeword): If --enable-changeword was not used, then
3401 report that changeword() builtin has no support in m4 binary.
3403 2000-11-28 Gary V. Vaughan <gary@gnu.org>
3405 * src/main.c (main): Fixed a particularly nasty bug is
3406 user_search_path setting -- the -M flag processing must be
3407 extremely careful with search path ordering, or else the default
3408 installed module directory (possibly containing modules from a
3409 previous release) is placed earlier in the search path than any -M
3410 arguments (which are relied upon to load uninstalled modules with
3411 most of the tests in the regresion suite).
3413 * modules/load.c (builtin_load): Nasty hack to prevent adding
3414 symbols to symtab again if a module is loaded more than once.
3415 * modules/m4.c (builtin_ifelse): removed unused variable argv0.
3417 * m4/symtab.c (m4_remove_table_reference_symbols): Fixed a
3418 possible NULL pointer dereference.
3420 * m4/module.c (m4_module_find_by_modname): Renamed from
3421 m4_module_modname_find. Fixed all references.
3422 (m4_module_find_by_builtin): New function.
3424 * modules/modfreeze.test: load the `load' module with each
3426 * src/freeze.c (produce_frozen_state): Simplified in light of
3427 module field in m4_symbol. Allow a third argument for text macros
3428 to name the originating module.
3429 (reload_frozen_state): ditto.
3430 * m4/m4module.h: Fixup prototypes.
3431 * m4/builtin.h (m4_builtin_define): Add a module argument so
3432 that symbols can be registered against the defining module.
3433 (m4_macro_define): ditto.
3434 * m4/m4private.h (m4_symbol): Make the module field const to save
3435 on casting in the rest of the code.
3436 (SYMBOL_MODULE): New macro.
3438 * m4/symtab.c (m4_remove_table_reference_symbols): Fixed stupid
3439 symbol reference maintenance bugs when removing a symbol from the
3442 * src/stackovf.c (setup_stackovf_trap): Fixed some memory leaks.
3444 2000-11-27 Gary V. Vaughan <gary@gnu.org>
3446 * configure.in (m4_cv_func_obstack): A better check for whether
3447 libc has an obstack implementation.
3448 * m4/Makefile.am (EXTRA_libm4_la_SOURCES): add gnu-obstack.h.
3450 * configure.in (--with-modules): Changed semantics. This
3451 option is now used to list modules to be preopened.
3452 * src/m4.h: #include "ltdl.h" unconditionally.
3453 * src/main.c: Removed all dependencies on WITH_MODULES.
3454 * src/freeze.c: ditto.
3455 * modules/Makefile.am: ditto.
3456 * m4/m4.c (builtin_m4exit): ditto.
3457 * modules/modpath1.test: ditto.
3458 * modules/modpath2.test: ditto.
3459 * modules/modpath3.test: ditto.
3460 * modules/modpath4.test: ditto.
3461 * modules/modtest.test: ditto.
3462 * modules/shadow.test: ditto.
3463 * modules/unload.test: ditto.
3465 * m4/Makefile.am (libm4_la_SOURCES): Removed obstack.c, since it
3466 comes up on demand in LTLIBOBJS now.
3467 * configure.in (getopt_long): Creating and relying on a link for
3468 getopt.h on hosts with no getopt_long() of thier own works
3469 correctly now. This is necessary so that callers of getopt_long()
3470 can simply `#include <getopt.h>': the naive way of doing this
3471 would end up using our own getopt.h and the installed
3472 getopt_long(), which is asking for trouble!
3473 (obstack_init): A similar argument applies to obstack.h and
3476 * m4/ltdl.c: Upgraded to latest bleeding edge version again.
3477 On Solaris-2.5 (at least) the native dlopen implementation
3478 gets confused about m4.o when looking for module "m4". This
3479 version always looks for .la an .$lib_ext suffixed names first
3480 to work around the problem. Sigh.
3482 * po/POTFILES.in: Take account of these file movements.
3483 * src/Makefile.am (m4_SOURCES): removed eval.c.
3484 (EXTRA_m4_SOURCES): removed numb.c and numb.h.
3485 * m4/Makefile.am (libm4_la_SOURCES): added eval.c.
3486 (EXTRA_libm4_la_SOURCES): added numb.c and numb.h.
3487 * modules/m4.c (builtin_eval): Use m4_evaluate().
3488 * m4/eval.c: Moved here from src/eval.c to facilitate
3489 implementation of eval() builtin as part of the `m4' loadable
3491 (m4_evaluate): renamed from evaluate for namespace cleanliness.
3492 * m4/numb.c: Moved here from src/numb.c, since it is #included
3493 into eval.c at compile time.
3494 * m4/m4module.h (m4_evaluate): Added prototype.
3495 * src/m4.h (evaluate): Removed prototype.
3497 2000-11-25 Gary V. Vaughan <gary@gnu.org>
3499 * modules/perl.c (builtin_perleval): Use PL_na for
3500 compatibility with perl-5.6.
3502 * src/main.c (main): It is now safe to
3503 ``m4_module_install("m4")'', without tripping over the m4
3505 * m4/ltdl.h, m4/ltdl.c: Upgraded to latest bleeding edge
3506 versions having fixed the insidious module search order bug.
3508 * m4/Makefile.am (libm4_la_LIBADD): New magic -- we are
3509 supposed to be using @LIBADD_DL@; @DLLDFLAGS@ is dead.
3511 * configure.in: Figure out whether to use the installed
3512 getopt.h or the supplied one.
3513 * src/Makefile.am: ditto.
3515 * po/POTFILES.in: List files in their new positions.
3517 * config/ltmain.sh: This needs to be checked in to match the
3518 libtool macros copied to acinclude.m4 (until a released
3519 libtool copes with m4's needs).
3520 * bootstrap: Run gettextize.
3522 2000-11-24 Gary V. Vaughan <gary@gnu.org>
3524 * AUTHORS: Added my details.
3527 * bootstrap: temporary update until released libtool catches up.
3529 * All files: Use new GNU GPL copyright blurb with current contact
3532 * configure.in (LTLIBOBJS): Use canonical code for calculation of
3535 * config: renamed acm4 directory to config to be more like
3536 other autoconfiscated packages.
3538 * configure.in (M4_AC_CHECK_DEBUGGING): Use it.
3539 * config/debug.m4: New file implementing configure macros to add
3540 suitable debug flags to the compiler invocation.
3542 * modules/load.c: New file implementing the ``load'' and
3543 ``unload'' builtins.
3544 * tests/get-them: Set the module search directory to the modules
3545 build directory in generated tests.
3546 * modules/shadow.test: ditto.
3547 * modules/modtest.test: ditto.
3548 * modules/modpath1.test: ditto.
3549 * modules/modpath2.test: ditto.
3550 * modules/modpath3.test: ditto.
3551 * modules/modpath4.test: ditto.
3552 * modules/modtest.test: ditto.
3553 * modules/modfreeze.test: ditto.
3554 * modules/unload.test: ditto.
3556 * modules/changeword.c: New file implementing the ``changeword''
3557 builtin as a loadable module.
3558 * modules/mpeval.c: New file implementing the ``mpeval'' builtin
3559 as a loadable module.
3561 * src/main.c (main): Load the gnu module if m4 was started
3562 normally -- i.e. without the -G option.
3563 * modules/gnu.c: New file implementing a new loadable module wuth
3564 definitions for all the gnu extension builtins.
3565 * modules/format.c: Moved here from src/format.c. Now included
3568 * src/main.c (main): Load the traditional module if m4 was
3569 started in `no_gnu_extensions' mode.
3570 * modules/traditional.c: New file implementing the ``unix'' macro,
3571 required when m4 is executed in traditional mode, as a loadable
3574 * src/main.c: Renamed from m4.c to avoid confusion with
3576 (main): Always load the m4 module.
3577 * modules/m4.c: New file implementing a new loadable module with
3578 definitions for all m4 builtins that are not gnu extensions.
3580 * m4/Makefile.am: Adjusted to take new files below into account.
3581 * m4/m4module.h: Prototypes for exported functions and types moved
3582 to this directory from the src directory.
3583 * m4/m4private.h: Moved here from src/m4private.h to facilitate
3584 the migration of all builtin implementations to loadable modules.
3585 * m4/macro.c: Moved this file here from the src directory,
3586 renaming all exported symbols to use the prefix ``m4_''.
3587 * m4/builtin.c: ditto.
3588 * m4/module.c: ditto.
3589 * m4/symtab.c: ditto.
3590 * m4/debug.c: ditto.
3591 * m4/input.c: ditto.
3592 * m4/output.c: ditto.
3594 * m4/ltdl.h, m4/ltdl.c: ditto.
3595 * m4/utility.c: Odd functions moved here from files in the src
3596 directory to facilitate builtin migration.
3598 2000-08-12 Gary V. Vaughan <gary@gnu.org>
3600 * src/builtin.c (dump_symbols): Use "Undefined name `%s'" for
3601 error message, to make translators' jobs a little easier.
3602 (builtin_builtin): ditto.
3603 (builtin_traceon): ditto.
3604 (builtin_traceoff): ditto.
3605 Reported by Akim Demaille <akim@epita.fr>
3607 * m4/Makefile.am (pkgincdir): Deleted. Use automake's built in
3608 pkgincludedir instead.
3610 * m4/m4module.h (rquote): Renamed with a prefix of `m4_' since
3611 it is exported globally. Fixed all references.
3615 (DEF_RQUOTE): Renamed with a prefix of `M4_' since it is exported
3616 globally. Fixed all references.
3617 (DEF_LQUOTE): ditto.
3621 2000-07-28 Gary V. Vaughan <gary@gnu.org>
3626 * configure.in (AC_CHECK_FUNCS): added bzero and calloc.
3627 (AC_OUTPUT): touch stamp-h.in, not stamp-h.
3629 * doc/m4.texinfo: Fixed to work with --html option of makeinfo.
3630 Removed `Prev', `Next' and `Up' fields of all @nodes now that
3631 makeinfo calculates them for us, and to make any future
3632 reorganisation easier.
3633 (Frozen files): Document format version 2.
3634 `V' now takes argument `2'.
3635 `F' can take a single argument if symbol and builtin names
3636 are the same, or 3 arguments if the builtin is from a module.
3637 New `S' specification for saving syntax table contents.
3638 New `M' specification for saving loaded module names.
3639 * src/freeze.c: Implement them.
3640 * src/input.c (syntax_code): For interpreting frozen syntax
3643 * examples/Makefile.am: Add the contents of the WWW directory to
3645 * examples/WWW/Makefile: ditto,
3646 (%.htm): Compares file contents (not just sizes) to determine
3647 whether a change has occured.
3648 * examples/WWW/_header.htm: Bumped version number.
3649 * examples/WWW: Regenerated content.
3651 * m4/Makefile.am (AUTOMAKE_OPTIONS): Support for non-ANSI
3652 compilers comes much easier without ansi2knr.
3653 * src/Makefile.am (AUTOMAKE_OPTIONS): ditto.
3655 * m4/list.c: New generic list container type.
3656 * m4/list.h: Interface to new container type.
3657 * m4/Makefile.am (pkginc_HEADERS): Install list.h.
3658 (libm4_la_SOURCES): compile and link list.c.
3659 * src/builtin.c (builtin_tables): Use list container.
3660 * src/module.c (symtab): ditto.
3661 * src/symtab.c (symtab): ditto.
3663 * m4/system.h: New file for common preprocessor definitions.
3664 * m4/Makefile.am (pkginc_HEADERS): install system.h.
3665 * m4/error.c: Use system.h in place of inline preprocessor.
3666 * m4/error.h: ditto.
3667 * m4/module.c: ditto.
3668 * m4/module.h: ditto.
3669 * m4/xmalloc.c: ditto.
3671 * m4/error.h (error_one_per_line): Make M4_GLOBAL_DATA for WIN32
3673 * m4/xmalloc.c (xmalloc_exit_failure): ditto.
3675 * m4module.h (syntax_table): Renamed with a prefix of `m4_' since
3676 it is exported globally. Fixed all references.
3678 (module_init_t): ditto.
3679 (module_finish_t): ditto.
3680 (token_data): ditto.
3681 (SYNTAX_OTHER): Renamed with a prefix of `M4_' since
3682 it is exported globally. Fixed all references.
3683 (SYNTAX_IGNORE): ditto.
3684 (SYNTAX_SPACE): ditto.
3685 (SYNTAX_OPEN): ditto.
3686 (SYNTAX_CLOSE): ditto.
3687 (SYNTAX_COMMA): ditto.
3688 (SYNTAX_DOLLAR): ditto.
3689 (SYNTAX_ACTIVE): ditto.
3690 (SYNTAX_ESCAPE): ditto.
3691 (SYNTAX_ALPHA): ditto.
3692 (SYNTAX_NUM): ditto.
3693 (SYNTAX_ALNUM): ditto.
3694 (SYNTAX_LQUOTE): ditto.
3695 (SYNTAX_RQUOTE): ditto.
3696 (SYNTAX_BCOMM): ditto.
3697 (SYNTAX_ECOMM): ditto.
3698 (SYNTAX_VALUE): ditto.
3699 (SYNTAX_MASKS): ditto.
3717 (TOKEN_NONE): ditto.
3718 (TOKEN_STRING): ditto.
3719 (TOKEN_SPACE): ditto.
3720 (TOKEN_WORD): ditto.
3721 (TOKEN_SIMPLE): ditto.
3722 (TOKEN_MACDEF): ditto.
3724 * m4/m4module.h (voidstar): Removed in favour of `VOID' for
3725 consistency. Fixed all references.
3726 (STRING): Renamed to `m4_string' for consistency, and because if
3727 is exported globally. Fixed all references.
3728 (token_type): Renamed to `m4_token_t' for the same reasons.
3729 (token_data_type): Renamed to `m4_token_data_t' for the same
3732 * m4/m4module.h (XCALLOC): Wrapper macro which handles type
3736 (XFREE): Wrapper macro which avoids freeing NULL pointers.
3738 * m4/m4module.h (m4_macro): New type for module defined user
3740 * modules/modtest.c (m4_macro_table): Define module user macros.
3741 * modules/shadow.c (m4_macro_table): ditto.
3743 * m4/m4module.h (M4BUILTIN_HANDLER): For defining handlers
3744 declared with M4BUILTIN.
3746 * m4/xmalloc.c: Use memset if bzero is not available when
3747 emulating calloc with malloc.
3748 (xcalloc): Fallback to malloc/bzero if calloc is not available.
3749 (xfree): Added for consistency. Will not try to free NULL
3751 * src/m4.c (xfree): Deleted in favour of the above.
3752 * m4/xmalloc.c (WITH_DMALLOC): preprocess away the entire file if
3753 linking with libdmalloc.
3754 * m4/xstrdup.c (WITH_DMALLOC): ditto.
3756 * modules/frozen.m4: New test case.
3757 * modules/unfrozen.m4: ditto.
3758 * modules/modfreeze.test: New test.
3759 * modules/unload.test: ditto.
3760 * modules/Makefile.am (EXTRA_DIST): Distribute them.
3762 * modules/modpath1.test: Don't try this test if module support is
3764 * modules/modpath2.test: ditto.
3765 * modules/modpath3.test: ditto.
3766 * modules/modpath4.test: ditto.
3767 * modules/modtest.test: ditto.
3768 * modules/shadow.test: ditto.
3770 * modules/perl.c: New module.
3771 * modules/perl.m4: Example of using it.
3772 * modules/Makefile.am (perl_la_SOURCES): Build new perl module.
3774 * src/m4.c (main): Assume interactive mode if STDIN is connected
3776 Changed startup sequence slightly so that syntax is not
3777 initialised from here when loading a frozen file.
3779 * src/builtin.c: Much improved macro definition style.
3780 * src/m4private.h: Internal structures for m4_builtin and
3781 m4_macro instances. These are not exposed to module writers.
3782 * src/module.c (module_modname_find): Find a module structure
3784 (make_macro_table): Build an internal macro table from a external
3786 (make_builtin_table): Build an internal builtin table from an
3787 external definition.
3789 * src/module.c (module_unload): Be extremely careful to remove
3790 builtins and macros that match the module being unloaded -- no
3791 longer assume that the top element can be removed incase another
3792 odule defines an identical name.
3793 * src/symtab.c (remove_table_reference_symbols): remove all symbol
3794 table entries which refer to a given builtin table.
3795 * src/builtin.c (remove_tables): Use it!
3797 2000-07-13 Thomas Tanner <tanner@ffii.org>
3799 * Makefile.am (SUBDIRS): we need modules/ for "make dist"
3800 * acm4/modules.m4: deleted
3801 * bootstrap: don't libtoolize libltdl!
3802 * configure.in: AC_SUBST INCLTDL and LIBLTDL, -with-modules flag:
3803 if set, enable WITH_MODULES and add modules to DLPREOPEN
3804 * examples/misc.test: redirect standard output
3805 * lib/Makefile.am: don't use DLLDFLAGS
3806 * lib/m4module.c: include necessary headers to silence GCC -Wall
3807 * lib/m4regex.c: fixes to silence GCC -Wall
3808 * modules/Makefile.am: don't use DLLDFLAGS, add INCLTDL to INCLUDES,
3809 build modules conditionally
3810 * modules/shadow.c: define symbol aliases before using them
3811 * modules/test.c: define symbol aliases before using them
3812 * po/de.po: update translation
3813 * src/Makefile.am: delete pathconf.h, set MODULE_PATH to
3814 pkglibexecdir, don't use DLLDFLAGS, add INCLTDL to INCLUDES and
3816 * src/m4.c: initialize libltdl's preloaded symbols via
3817 LTDL_SET_PRELOADED_SYMBOLS
3818 * src/module.c: libltdl's memory management must be initialized
3819 before calling lt_dlinit!, fix warnings
3821 2000-01-18 Gary V. Vaughan <gary@gnu.org>
3823 * README: Caveat about nls not supported by dll architecture on
3826 * TODO (MODULE SPECIFIC ISSUES): more ideas for the future.
3828 * tests/Makefile.am (stamp-TESTS): now works with VPATH.
3829 * src/Makefile.am (m4_LDADD): use $(builddir) for VPATH.
3830 * modules/Makefile.am (LIBS): ditto.
3831 (INCLUDES): search $(top_srcdir) (for eg. <m4/error.h>) and then
3832 $(top_srcdir)/m4 (for only <m4module.h>).
3833 * modules/shadow.test: fixed for VPATH.
3834 * modules/modtest.test: ditto.
3835 * modules/modpath4.test: ditto.
3836 * modules/modpath3.test: ditto.
3837 * modules/modpath2.test: ditto.
3838 * modules/modpath1.test: ditto.
3840 * modules/time.test: Removed due to timezone dependence,
3841 * modules/Makefile.am (TESTS): Removed time.test.
3843 * configure.in: Use $3 of AC_DEFINE so that we can,,,
3844 * acconfig.h: Remove everything except the gettext parameters.
3845 * acm4/gmp.m4: Add a serial number, and take advantage of $3 of
3847 * acm4/ltdl.m4: Updated to latest from libtool cvs.
3848 * acm4/modules.m4: Remove code which duplicates ltdl.m4 and
3849 increment serial number.
3851 * Makefile.am (SUBDIRS): Moved @MODULES_DIR@ to compile before
3852 src dir and immediately after libm4 is built for confidence that
3853 it doesn't rely on the src directory.
3854 (SUBDIRS): Moved doc dir to the end since helptoman.pl and
3855 makeinfo stop the build on cygwin (because they don't work).
3857 * src/m4.h: use GNU standard #if HAVE_CONFIG_H ideom.
3859 * m4/m4private.h: ...is not a public header, so moved to src.
3860 Add `#include <config.h>', `#define _COMPILING_M4' and
3862 * m4/Makefile.am (noinst_HEADERS): remove m4private.h.
3863 * src/Makefile.am (noinst_HEADERS): add m4private.h.
3864 * src/builtin.c: `#include "m4private.h"' now takes care of the
3865 above. Duplicates removed.
3866 * src/debug.c: ditto.
3867 * src/eval.c: ditto.
3868 * src/evalmp.c: ditto.
3869 * src/format.c: ditto.
3870 * src/freeze.c: ditto.
3871 * src/input.c: ditto.
3873 * src/macro.c: ditto.
3874 * src/module.c: ditto.
3875 * src/numb.h: ditto.
3876 * src/output.c: ditto.
3877 * src/path.c: ditto.
3878 * stackovf.c: ditto.
3881 * po/POTFILES.in: compensate for renaming of lib/*.
3882 * m4/Makefile.am (CLEANFILES): @EXEEXT@ left libtool wrapper behind.
3883 (INCLUDES): Look first in $(top_srcdir) (for eg. <m4/error.h>),
3884 and then in $(top_srcdir)/lib (for eg. "m4private.h").
3885 * src/Makefile.am (m4_LDADD): replace libi/libm4.la with
3887 * m4/m4error.h: Renamed error.h, for installation to
3888 $prefix/include/m4..
3889 * m4/m4obstack.h: Renamed obstack.h, for same reason.
3890 * m4/m4regex.h: Renamed regex.h, for same reason.
3891 * m4/m4error.c: Renamed error.c, and use #include "error.h".
3892 * m4/m4obstack.c: Renamed obstack.c, and fix #includes.
3893 * m4/m4regex.c: Renamed regex.c, and fix #includes.
3895 * lib: moved to m4 to easily support header installation to
3897 * Makefile.am (SUBDIRS): renamed lib dir to m4.
3898 * configure.in (AC_OUTPUT): reference m4/Makefile.in.
3899 * acm4/regex.m4: Point to m4/regex.c.
3901 * examples/foreach.m4: Sanitise quoting.
3902 * examples/foreach.test: New torture test.
3903 From Akim Demaille <akim@epita.fr>
3905 2000-01-17 Gary V. Vaughan <gary@gnu.org>
3907 * src/ltdl.c: Use access() to abort doomed module load attempts
3908 if module file does not exist.
3910 * src/Makefile.am (m4_SOURCES, EXTRA_SOURCES): getopt.o and
3911 getopt1.o will already be used if appropriate, so I moved getopt.c
3912 and getopt1.c from m4_SOURCES to EXTRA_SOURCES.
3914 * modules/modpath1.test: Use correct filename in header line.
3915 * modules/modpath2.test: ditto.
3916 * modules/modpath3.test: ditto.
3917 * modules/modpath4.test: ditto.
3919 Without these changes lt_dlopen("test") attempts to
3920 LoadLibrary("/bin/test") on Windows, which although harmless
3921 generates a spurious error message which spoils most of the tests:
3922 * modules/Makefile.am (EXTRA_DIST): s/test.m4 /modtest.m4 /
3923 (TESTS): s/test.test /modtest.test /
3924 (pkglibexec_LTLIBRARIES): s/test.la /modtest.la /
3925 (test_la_SOURCES, test_la_LDFLAGS): renamed to use modtest.
3926 * modules/modpath1.test: s/test.m4 /modtest.m4 /
3927 * modules/modpath2.test: ditto.
3928 * modules/modpath4.test: ditto.
3929 * modules/modpath3.test: s/-m test /-m modtest /
3930 * modules/shadow.m4: use {un,}loadmodule(`modtest').
3932 2000-01-16 Gary V. Vaughan <gary@gnu.org>
3934 * src/ltdl.c (find_file): Updated to new version with fixed memory
3935 allocation bug in `next'.
3936 * src/ltdl.h: updated to match.
3938 * modules/Makefile.am: Cleaned up and reordered.
3940 2000-01-16 Rene' Seindal <rene@seindal.dk>
3942 * modules/Makefile.am (TESTS): New tests for the module system.
3944 * modules/*.test: New files.
3946 * src/m4.c (main): Added call to module_init().
3947 Treats -M and -m as the arguments -D -U and -t, ie deferred.
3949 * src/m4.h: Added declaration of module_init().
3951 * src/module.c (module_init): No longer static
3953 * modules/Makefile.am ({test,shadow,time,stdlib}_la_LDFLAGS):
3954 Added to shut up automake about non standard libtool library
3957 * src/module.c: Disabled DEBUG by default.
3959 * modules/README: Changed example from unload.m4 to shadow.m4
3961 * modules/shadow.m4: Renamed from unload.m4
3963 * modules/Makefile.am (EXTRA_DIST): Removed unload.m4.
3965 * src/m4.c (main): Functionality for -m and -M were reversed.
3968 2000-01-12 Gary V. Vaughan <gary@gnu.org>
3970 * doc/help2man.pl: updated to version 1.020.
3972 * lib/COPYING.LIB: updated to version 2.1.
3974 * lib/m4module.h: restructure the M4_SCOPE code to work when
3975 creating a dll which links with libm4.la and both DLL_EXPORT
3976 (for the new dll) and LIBM4_DLL_IMPORT (for m4module.h) are
3979 2000-01-11 Gary V. Vaughan <gary@gnu.org>
3981 Merged the following changes from my tree:
3983 1999-06-15 Gary V. Vaughan <gary@gnu.org>
3985 * configure.in (AC_LIBTOOL_WIN32_DLL): Declare that m4 has been
3986 ported to compile shared libs.
3988 * configure.in (LIBM4_DLL_IMPORT): Discover whether we need to
3989 use `__declspec(dllimport)' when linking libm4.la on win32.
3990 * src/Makefile.am (m4_LDFLAGS): Use dllimport if necessary.
3992 * configure.in (M4OBJS): Discover whether we need the shipped
3993 implementation of getopt_long.
3994 * src/Makefile.am (m4_LDADD): Link the getopt objects into the
3995 main binary here, as opposed to the module library in lib/libm4.la.
3997 1999-06-14 Gary V. Vaughan <gary@gnu.org>
3999 * modules/README: Updated to describe the improved libltdl based
4001 * README (cygwin): Added some compilation notes for building m4
4002 correctly under cygwin.
4003 * TODO: Cleaned out the entries for the module system since they
4004 are now implemented.
4006 * *.[ch]: __P is in the compiler's reserved namespace, so replaced
4007 all instances of __P with M4_PARAMS.
4009 * lib/getdate.h: removed unreferenced file.
4011 * lib/m4private.h: New file to define the private interface to the
4012 token_data struct, which must be shared between m4module.c, and
4013 builtin.c but not exported to modules built from the installed
4014 m4module.h since it's size changes depending on compile time
4017 * src/m4.h: Lots of stuff moved to lib/m4module.h.
4019 * lib/m4module.h: New file to define the interface available when
4020 compiling m4 modules.
4021 * lib/m4module.c: Moved parts of builtin.c, and m4.c which are
4022 necessary for module compilation into this new file.
4024 * lib/Makefile.am (include_HEADERS): install headers (renamed to
4025 avoid nameclash with other system headers) necessary for compiling
4027 (libm4_la_SOURCES): always include error.c, obstack.c and regex.c
4028 so that modules can include the (renamed) installed headers and
4029 be guaranteed a matching implementation.
4030 * lib/m4error.h: renamed from error.h.
4031 * lib/m4obstack.h: renamed from obstack.h.
4032 * lib/m4regex.h: renamed from regex.h.
4033 * configure.in (AC_REPLACE_FUNCS): Don't look for a system
4034 implementation, simply include the shipped version
4035 unconditionally, otherwise it is hard for a module to know
4036 whether the m4obstack.h header it is using matches the
4037 implementation it ends up linking against.
4038 (jm_WITH_REGEX): Include regex into libm4 unconditionally for
4041 1999-05-18 Gary V. Vaughan <gary@gnu.org>
4043 * examples/misc.test: Don't run this test on machines which don't
4044 have a root user in /etc/passwd (e.g. cygwin).
4046 * tests/get-them (/^@example$/): Error messages might have a
4047 ``.exe'' suffix to the program name, or else use the libtool
4048 ``.libs/lt-m4'' binary, or generally have an unexpected path. All
4049 of these cases are now catered for when comparing error messages
4051 * tests/other-tests/*.test: ditto.
4052 * examples/*.test: ditto.
4054 * tests/defs (M4): use libtool execute mode.
4055 * examples/defs (M4): ditto.
4057 * tests/get-them (END): explicitly close any open file.
4058 (printthem): In a regular expression, '{' is the start of a repeat
4059 count! Use `[{]' for a literal open brace.
4060 (/^@node /): Don't use substr on a string shorter than the trim
4063 1999-05-17 Gary V. Vaughan <gary@gnu.org>
4065 * configure.in (LTLIBOBJS): calculated from LIBOBJS, and
4067 (AC_LIBTOOL_DLOPEN): declare that this package will use dlopen.
4069 2000-01-10 Andreas Schwab <schwab@suse.de>
4071 * tests/other-tests/gmp.test: Find config.sh in build directory.
4073 * configure.in: Find tests/mkconfig.sh in $srcdir.
4075 * configure.in: Define HAVE_SIGINFO_T if siginfo_t is defined in
4076 <signal.h> (for SUS2 compliant systems).
4078 * src/stackovf.c: Check for HAVE_SIGINFO_T in addition to
4081 2000-01-10 Rene' Seindal <rene@seindal.dk>
4085 * TODO, NEWS: Cleaned up and updated.
4087 * src/m4.c (main): New variable exit_status for exit status in
4088 case of unreadable files. Now m4 will exit with EXIT_FAILURE if a
4089 file cannot be read instead of EXIT_SUCCESS.
4091 * src/builtin.c (m4_indir): Changed error message to help
4092 translators (from Akim Demaille <demaille@inf.enst.fr>).
4094 * lib/obstack.[hc], getopt*.[ch]: Updated to newest version from
4097 * lib/error.[hc], lib/regex.[hc], lib/strtol.c: Updated to version
4100 * src/input.c (match_input): Reordering of code, to avoid multiple
4101 calls to push_string_init() from obstack_grow(), which can happen
4102 with some compilers (found and fixed by James Bonfield
4103 <jkb@mrc-lmb.cam.ac.uk>).
4105 * src/stackovf.c: Added prototypes for ultrix.
4106 (setup_stackovf_trap): Added __P to cast.
4107 (Both reported by John David Anglin <dave@hiauly1.hia.nrc.ca>)
4109 2000-01-09 Rene' Seindal <rene@seindal.dk>
4111 * doc/m4.texinfo (Changequote): Added comment about changing
4112 quotes when the old quote is a part of the new.
4114 * src/builtin.c (expand_ranges): Added break after trailing dash.
4115 This caused misbehavious on some systems (found and fixed by Akim
4116 Demaille <demaille@inf.enst.fr>).
4118 * AUTHORS: Thomas Tanner included
4120 * acconfig.h: Added entry for ss_sp (see below).
4122 * configure.in (use_stackovf): Added check for stack_t with member
4123 ss_base instead of ss_sp (BSDI notably). (Reported by Paul Eggert
4124 <eggert@twinsun.com>).
4126 * doc/m4.texinfo (Frozen files): Added a simpler example for
4127 generating frozen files from several input files.
4129 1999-11-14 Paul Eggert <eggert@twinsun.com>
4131 * po/POTFILES.in: Add lib/getopt.c, lib/obstack.c,
4132 lib/regex.c, lib/xmalloc.c.
4134 1999-11-10 Rene' Seindal <rene@seindal.dk>
4136 * Makefile.am (ACLOCAL_AMFLAGS): Passes -I acm4 to aclocal.
4138 * src/module.c: reindented.
4139 (module_load): return if this is a repeated load of same module.
4140 (module_init): slight change of logic to avoid repeated
4141 initialisation debug messages.
4143 * Makefile.am (DIST_SUBDIRS): Added to ensure modules/ is included
4144 in the distribution.
4146 * modules/Makefile.am (test_la_LDFLAGS): set to -module to silence
4147 automake warnings about missing lib prefix.
4148 (time_la_LDFLAGS): ditto
4149 (stdlib_la_LDFLAGS): ditto
4151 1999-11-10 Paul Eggert <eggert@twinsun.com>
4153 * src/m4.h: Include error.h, since our macros use error.
4154 * src/m4.c: Don't need to include error.h.
4156 1999-11-09 Paul Eggert <eggert@twinsun.com>
4158 * src/m4.h (voidstar): Define to void * if __STDC__ is defined
4159 and zero, as Solaris 7 cc does.
4160 (bcopy): Remove macro; no longer needed with new obstack.h.
4162 * src/output.c (freeze_diversions): Don't assume that a
4163 diversion size can fit in `int'. Check for diversion file
4164 size too large to be printed with `unsigned long'.
4166 * src/Makefile.am (CFLAGS): Omit -Wall.
4168 * src/stackovf.c (setup_stackovf_trap): Remove cast to unsigned.
4170 * src/debug.c (trace_format):
4171 Use ANSI C if (defined __STDC__ && __STDC__) || defined PROTOTYPES.
4173 * src/freeze.c (produce_frozen_state):
4174 Don't assume string lengths fit in int.
4176 1999-10-13 Rene' Seindal <rene@seindal.dk>
4178 * configure.in (ALL_LINGUAS): Added Greek translation (el).
4179 (ALL_LINGUAS): Added Czech translation (cs).
4181 1999-03-30 Gary V. Vaughan <gary@gnu.org>
4183 * src/builtin.c: moved module loading functions into...
4184 * src/module.c: entirely new implementation using libltdl.
4185 * po/POTFILES.in: added src/module.c.
4186 * modules/Makefile.am (LTLIBRARIES): Removed lib prefix as these
4187 are modules, not linktime libraries.
4188 (LDFLAGS): added -no-undefined -module and -avoid-version flags.
4189 * modules/stdlib.c (m4_macro_table): use <name>_LTX collision
4190 avoidance on exported symbols.
4191 * modules/test.c (m4_macro_table, m4_init_module,
4192 m4_finish_module): ditto.
4193 * modules/time.c (m4_macro_table): ditto.
4195 * modules/time2.m4: new file which requires command line loading
4197 * src/m4.c (--load-module): dynamically load named runtime module
4198 into running executable before reading the source.
4199 (--module-directory): prepend a directory to the module search
4201 (module_init()): Do this the first time we load a module instead;
4202 if the module subsystem is broken normal m4 scripts can still run.
4203 * src/m4.h (install_builtin_table): is now exported.
4205 1999-03-26 Gary V. Vaughan <gary@gnu.org>
4207 * src/module.c: removed. No longer required.
4208 * po/POTFILES.in: removed src/module.c.
4210 * Makefile.am (MAINTAINERCLEANFILES): Remove all the files that
4211 the bootstrap script can recreate.
4212 * acm4/Makefile.am (MAINTAINERCLEANFILES): ditto.
4213 * doc/Makefile.am (MAINTAINERCLEANFILES): ditto.
4214 * examples/Makefile.am (MAINTAINERCLEANFILES): ditto.
4215 * lib/Makefile.am (MAINTAINERCLEANFILES): ditto.
4216 (AUTOMAKE_OPTIONS): reduced strictness to allow COPYING.LIB.
4217 * modules/Makefile.am (MAINTAINERCLEANFILES): ditto.
4218 * src/Makefile.am (MAINTAINERCLEANFILES): ditto.
4219 * tests/Makefile.am (MAINTAINERCLEANFILES): ditto.
4221 * acinclude.m4: removed. `aclocal -I acm4' handles this much
4223 * acm4/Makefile.am (ACINCLUDE_M4): ditto.
4224 * acm4/gettext.m4: removed. It causes a multiple definition vs.
4225 the installed gettext.m4 file when running aclocal.
4227 1999-03-25 Gary V. Vaughan <gary@gnu.org>
4229 * configure.in (AM_INIT_AUTOMAKE): bumped version number to
4230 distinguish this from the last prerelease.
4231 (AC_LIBLTDL_CONVENIENCE): build libltdl as a convenience library
4232 in its own subdirectory.
4234 * modules/Makefile.am (*_SOURCES): renamed to use libtool's "no
4235 lib prefix on a module" feature.
4236 (LDFLAGS): Added `-module -avoid-version' flags to build
4237 versionless module libraries.
4238 * src/builtin.c (m4_load_module): use libltdl.
4239 (module_unload_all): use libltdl.
4240 * src/m4.c (module_init): initialise module loading on demand for
4241 better diagnostics, and so that m4 will still work even if
4242 the module code is broken.
4243 * src/m4.h (module_init): removed. No longer relevant.
4244 * modules/stdlib.c (m4_macro_table): use stdlib_LTX_ prefix on
4245 exported symbols for compatibility with dlpreopening.
4246 * modules/test.c (m4_macro_table, m4_init_module,
4247 m4_finish_module): ditto.
4248 * modules/time.c (m4_macro_table): ditto.
4250 * bootstrap: New file. Runs all the autoutils in the right order
4251 after a fresh checkout, or a make maintainer-clean.
4253 1999-02-18 Akim Demaille <demaille@inf.enst.fr>
4255 * src/builtin.c (dump_symbols): New function, factoring common
4256 content of m4_dumpdef and m4_symbols.
4257 (m4_dumpdef): Use it.
4258 (m4_symbols): New function, implementing `symbols'. Use it.
4259 * doc/m4.texinfo: Fixed missing commas after @xref, so that the
4260 file compile with modern makeinfo.
4261 (Symbols): New node, documenting symbols.
4262 (direntry): Modernize.
4264 1998-12-11 Rene' Seindal <rene@seindal.dk>
4266 * src/builtin.c (predefined_tab): New predefined macros
4267 __m4_changeword__, __m4_gmp__ and __m4_modules__ for testing for
4268 configure time options.
4270 1998-12-01 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4272 * src/module.c (module_try_load): Don't try to be clever and
4273 overwrite argument string. Instead allocate all constructed
4274 strings locally, since they can have arbitrary lengths. Make
4275 arguments pointers to const.
4276 (module_search): Simplify due to above change.
4278 1998-11-29 Rene' Seindal <rene@seindal.dk>
4282 * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): New tests.
4284 * tests/other-tests/import-environment.{m4,test}: New test.
4286 * tests/other-tests/discard-comments.{m4,test}: New test.
4288 * doc/m4.texinfo (Invoking m4): Updated for --discard-comments.
4290 * src/m4.c (main): New option -c --discard-comments.
4291 New global variable discard_comments.
4293 * src/m4.h (token_type): New TOKEN_NONE for tokens to be
4294 discarded, ie never returned from next_token().
4295 Added declaration of discard_comments.
4297 * src/input.c (next_token): Now loops until token type is not
4298 TOKEN_NONE. Comments are now given this type when comments should
4301 * doc/m4.texinfo (Invoking m4): Updated for --import-environment
4304 1998-11-28 Rene' Seindal <rene@seindal.dk>
4306 * src/m4.c (main): New option --import-environment (no single
4309 * When configured with --with-gmp both the normal (fast) eval()
4310 and the gmp aware mpeval() are defined. To restore previous
4311 bahaviour use "define(`eval', defn(`mpeval'))".
4313 * tests/other-tests/gmp.m4: Changed to use mpeval().
4315 * src/evalmp.c: New file for compiling eval.c as gmp aware.
4316 Just defines USE_GMP if WITH_GMP is defined and includes eval.c.
4318 * src/eval.c: Now includes "numb.c" directly. Everything in this
4319 file must by static, except evaluate(), which is changed to
4320 mp_evaluate() if USE_GMP in force.
4322 * src/numb.c: Changed to be included by eval.c instead of being
4323 compiled separately. Everything is declared static.
4325 * src/numb.h: Removed declarations of functions, as numb.c is now
4328 * src/builtin.c: Declaration of m4_mpeval() added.
4329 Inserted `mpeval' in builtin table.
4330 (do_eval): New function with common code for m4_eval and m4_mpeval.
4331 (m4_mpeval): New function for gmp version of eval.
4333 * src/m4.h: Declaration of mp_evaluate().
4335 * src/Makefile.am (m4_SOUCES): Includes mpeval.c.
4336 (EXTRA_m4_SOURCES): Now has numb.c and numb.h
4338 * src/m4.c (main): m4 --version also shows which options were used
4339 for compilation, such as: "GNU m4 1.4n (options: modules gmp)"
4341 1998-11-27 Rene' Seindal <rene@seindal.dk>
4343 * Error messages now always print program name before input file
4344 name as specified by GNU coding standards. Reported by Akim
4345 Demaille <demaille@inf.enst.fr>.
4347 * doc/m4.texinfo (Include): Change due to changed error message
4351 * tests/get-them: Minor change to sed script due to changed error
4354 * src/m4.c (print_program_name): New func used to print program
4355 name, input file and line number in error (). Used as an
4356 error_print_progname handler.
4357 (reference_error): Removed.
4358 (main): Assigns error_print_progname.
4360 * src/m4.h (M4ERROR): Removed reference_error ().
4362 1998-11-25 Rene' Seindal <rene@seindal.dk>
4364 * Updated to libtool 1.2b.
4366 * src/builtin.c (install_builtin_table): Added braces to avoid
4367 warning of ambiguous 'else'.
4369 * src/module.c: Inserted search path code from path.c modified to
4371 (module_init): Configured default path used only if M4MODPATH is
4373 (module_try_load): Now reads libMODULE.la as generated by libtool
4374 for actual module name.
4375 (module_load): Gives better error messages on failure.
4377 * src/m4.h: Added declarations of structures and functions for
4378 generic search path handling.
4380 * src/path.c: Removed all module specific code and introduced new
4381 functions of more generic search path handling.
4383 1998-11-24 Rene' Seindal <rene@seindal.dk>
4385 * configure.in: Defines INTLINCL to -I$(top_srcdir)/intl if using
4386 included gettext, as <libintl.h> might not be found
4387 otherwise. Reported by Andrew Bettison <andrewb@zip.com.au>.
4389 1998-11-22 Rene' Seindal <rene@seindal.dk>
4391 * src/output.c (insert_diversion): Fixed bug that might cause m4
4392 to read from standard output! Triggered by input
4393 'divert(1)undivert(0)'. Test for divnum>0 changed to divnum>=0,
4394 so now 'undivert(0)' does nothing.
4396 1998-11-18 Rene' Seindal <rene@seindal.dk>
4400 * src/input.c (set_word_regexp): Fixed a bug, where word_regexp
4401 could be changed when compiling a illegal regexp, causing later
4402 use of the regexp to dump core.
4404 * src/module.c (module_load): Changed error message to conform to
4407 * src/m4.c (usage): Added message about reporting bugs.
4409 * doc/m4.texinfo (Changeword): Corrected a wrong example.
4410 (Changeword): Added note about the type of regexps used.
4412 * ltconfig, ltmain.sh: New files from Libtool 1.2.
4414 * configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
4415 and AM_PROG_LIBTOOL.
4417 * acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
4420 * modules/Makefile.am: Changed completely to compile modules using
4421 libtool. The modules are compiled as shared libraries, and are
4422 renamed when installed.
4424 * src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
4425 USE_SHL_LOAD to HAVE_SHL_LOAD
4427 * src/builtin.c (shipout_string): Now tests for a NULL string.
4429 * src/module.c: New level of indirection around non-portable
4430 functions to load shared objects. Intended to encapsulate the non
4431 portable parts better and to reduce the number of #ifdefs in the
4434 * Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
4435 directory modules/ to the distribution.
4437 1998-11-15 Rene' Seindal <rene@seindal.dk>
4441 * modules/stdlib.c: New module `stdlib' defining some standard
4442 functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
4443 getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.
4445 * src/builtin.c (shipout_string): New convenience function for
4446 builtins and modules.
4448 * src/module.c (module_load): Tentative support for
4449 shl_load/shl_findsym, but I cannot test it. Copied from MetaHTML.
4451 * Makefile.am (SUBDIRS): Directory modules added if configured.
4453 * modules/Makefile.am: Now correctly compiles and installs
4454 modules in pkglibexecdir.
4456 * src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
4457 These two are now initialised by autoconf macros.
4459 * src/path.c (module_env_init): MODULE_PATH is always on the
4462 * src/Makefile.am: Now generated pathconf.h which defined the
4463 default MODULE_PATH.
4465 * configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
4466 where modules are installed.
4468 * acm4/modules.m4: Enhanced with code from MetaHTML, contributed
4469 by Brian J. Fox <bfox@datawave.net>. This change allow modules to
4470 build and install automatically, and it is prepared for other
4471 interfacec than dlopen().
4473 * src/builtin.c (predefined_tab): Added __m4_version__ for the
4474 current version of GNU m4. It is a GNU extension.
4476 1998-11-14 Rene' Seindal <rene@seindal.dk>
4478 * tests/Makefile.am (GENERATED_TESTS): Added new
4479 generated-tests/changesy.8.test
4481 * doc/m4.texinfo (Changesyntax): Documentation for escape
4484 * src/macro.c (expand_token): Check for escaped macro call before
4485 symbol table lookup.
4487 * src/builtin.c (m4_changesyntax): Added `@' flag to define escape
4490 * src/input.c: New static variable use_macro_escape, which is TRUE
4491 iff some character has code SYNTAX_ESCAPE
4492 (input_init): Added initialisation of use_macro_escape.
4493 (check_use_macro_escape): New function to synchronise
4494 use_macro_escape with the syntax table.
4495 (set_quotes): Added call to check_use_macro_escape()
4498 (next_token): Added new case for IS_ESCAPE.
4500 * src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.
4502 1998-10-13 René Seindal <rene@seindal.dk>
4506 * tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
4509 * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
4510 maintained tests in tests/other-tests. These currently tests for
4511 8-bit transparency, multiple precision arithmetic and sync-line
4512 output. Test for stackoverflow detection does not work.
4514 * examples/Makefile.am (TESTS): Added tests for all example files.
4516 * examples/mktests.sh: New file. Help program for creating test
4519 * tests/mkconfig.sh: New file to generate tests/config.m4 and
4520 tests/config.sh. This is for tests of configure selectable
4521 features. Picks up all set WITH_ and ENABLE_ veriables from
4524 * src/path.c (path_search): Added argument 'char **expanded_name'
4525 to return the expanded name.
4527 * src/m4.h: Added 2nd argument to declaration of path_search().
4529 * src/m4.c (main): Added 2nd argument to path_search().
4531 * src/freeze.c (reload_frozen_state): Do.
4533 * src/builtin.c (m4_undivert): Do.
4536 1998-10-11 René Seindal <rene@seindal.dk>
4538 * acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4
4540 * acm4/modules.m4: New file. Defines AM_WITH_MODULES.
4542 * acm4/gmp.m4: New file. Defines AM_WITH_GMP.
4544 * configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.
4546 * AUTHORS, ChangeLog: Changed all dates to ISO 8601.
4548 * intl/: Updated to GNU gettext 0.10.35.
4550 * doc/m4.texinfo (Format): Documented that format is blind.
4552 * src/builtin.c (builtin_tab): Builtin format marked as blind.
4554 1998-10-07 René Seindal <rene@seindal.dk>
4558 * tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
4559 .test, as the files are no longer just m4 input.
4561 * tests/get-them (FILE): Changed .m4 extension to .test.
4563 * src/m4.h (token_type): New token type TOKEN_SPACE introduced.
4564 Otherwise quoted strings with leading whitespace first in a macro
4565 argument would be eliminated.
4567 * src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
4568 (expand_argument): Do.
4570 * src/input.c (next_token): SPACE and NUM/OTHER characters are only
4571 grouped together iff both quote and comment strings are single
4572 character. Otherwise they might include a comment/quote leader.
4573 (next_token): Returns new token type TOKEN_SPACE.
4575 * src/builtin.c (push_builtin_table): New function to push a
4576 builtin_table on the stack without installing its contents.
4577 (find_builtin_by_name): Added call to push_builtin_table() if
4578 reading frozen files. Otherwise the builtins named in the frozen
4579 files could not be found.
4580 (install_builtin_table): Changed to use push_builtin_table()
4582 1998-10-04 René Seindal <rene@seindal.dk>
4586 * configure.in (ALL_LINGUAS): Added Polish pl.po
4588 1998-10-03 René Seindal <rene@seindal.dk>
4590 * Many files: Incorporated changes to implement dynamic modules.
4591 Detailed comments in src/modules.c and modules/README
4593 * src/module.c: New file, implements the OS dependant parts of
4594 dynamic module loading.
4596 * src/Makefile.am (m4_SOURCES): Added module.c
4598 * src/builtin.h: New file, declares some functions from builtin.c
4599 that are of use for other modules (shipout_int, numeric_arg,
4600 skip_space, bad_argc), and the macros ARG() and DECLARE().
4602 * src/builtin.c (install_builtin_table): New function. Each
4603 module brings in a builtin_table, which is pushed on a stack.
4604 (struct builtin_table): New struct for list of builtin_tables.
4605 (m4_loadmodule): New function to implement builtin "loadmodule".
4606 (shipout_int): No longer static, to be used by modules.
4610 (builtin_init): changed to call install_builtin_table()
4611 (find_builtin_by_name): Now searches all builtin_tables
4612 (find_builtin_by_addr): do.
4614 * src/path.c: Reorganised to allow for two search paths, one for
4615 include files and one for modules.
4617 * src/m4.h: Added declarations for new functions in module.c and
4620 * src/m4.c (main): Added call to module_init().
4622 * modules: New directory with a few demo modules.
4624 * Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
4627 * configure.in: Added modules/Makefile to AC_OUTPUT.
4629 * configure.in: Added code to implement --with-modules. Tests for
4632 * acconfig.h: Added WITH_MODULES
4634 1998-10-02 René Seindal <rene@seindal.dk>
4636 * examples/Makefile.am (pkgdata_DATA): Removed special target for
4637 check and variables TESTS. These tests are now run from the
4640 * tests/Makefile.am (OTHER_TESTS): Added tests from the example/
4641 directory. The files stay there but the tests are run from the
4644 * tests/Makefile.am (EXTRA_DIST): Added run-test.
4646 * tests/run-test: New file. Run a test manually
4648 * tests/Makefile.am, tests/get_them: Moved automatically generated
4649 tests (from the manual) to sub directory tests/gentest/. The
4650 tests/ directory had gotten a bit messy.
4652 1998-09-06 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4654 * examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
4655 wrap}.test: Added a few testcases.
4657 1998-08-21 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4661 * lib/Makefile.am (noinst_HEADERS): regex.h added
4663 * configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
4664 acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
4666 * acm4/Makefile.am: created providing rules to create
4667 $(top_srcdir)/acinclude.m4 to be used by aclocal.
4669 * tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
4670 `C'. Reported by Ulrich Drepper.
4672 * Makefile.am (SUBDIRS): Removed checks directory
4673 * configure.in (AC_OUTPUT): Removed checks/Makefile
4675 * doc/m4.texinfo (Patsubst,example): @comment added to preserve
4676 the space when m4.texinfo is edited and whitespace.el is active.
4677 (Defn,example): idem.
4679 1998-08-20 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4681 * doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
4682 ../COPYING. ../Makefile is a file which is certainly present when
4683 test is executed in testSubDir. One can't be sure that the COPYING
4684 file is in .. or ../.. in all situations, the ../Makefile is
4687 * doc/m4.texinfo (Include): adjusted expected test output
4688 according to new tests, i.e. the input will always come from the
4689 file `in' created by the test.
4691 * tests/Makefile.am: Added three lines at the top to get
4692 esyscmd.1.test working.
4694 * tests/get-them: modified to generate clearer tests who will need
4695 less maintenance when new test examples are created in
4696 `doc/m4.texinfo'. All tests are small (nearly stand-alone, they
4697 need the generic file `defs') shell scripts creating `in', `ok',
4698 `out' and when apropriate `okerr' and `err' in the directory
4699 `testSubDir' when executed. The compare of `ok' and `out'
4700 (and of `okerr' and `err') will be the exit status of the test.
4701 `out' must match `ok' (and `okerr' must match `err') for the test
4704 * tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
4705 the tests generated by tests/get-them getting it input normally
4706 from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
4707 (dot) before the numeric part) is reserved for all other (hand
4708 written) tests. The `+' means one or more times.
4710 1998-08-12 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4712 * doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
4713 supported short man page to refer to info documentation
4714 * helptoman.pl: added
4715 * configure.in: AC_PATH_PROG(PERL,perl)
4716 * Makefile.am (SUBDIRS): doc after src
4718 * libitized with libit 0.5 from
4719 ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
4721 * configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
4722 * lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
4723 replacement functions, (libm4_a_LIBADD): @LIBOBJS@
4724 * configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
4726 * configure.in (AC_CHECK_FUNC): getopt_long
4728 * src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
4730 * TODO: added entry about dependencies
4732 1998-08-10 René Seindal <rene@seindal.dk>
4736 * doc/m4.texinfo (Changesyntax): Added documentation for the macro
4739 * src/builtin.c (m4_changesyntax): Added builtin macro
4740 "changesyntax" to modify the syntax table.
4742 * src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
4743 table. All categories are assigned a syntax code and tokens are
4744 read according to this table.
4746 1998-08-09 René Seindal <rene@seindal.dk>
4748 * src/numb.{c,h}: New files, implements multiple precision eval
4749 using GNU gmp. Originally submitted by John Gerard Makecki
4750 (johnm@vlibs.com), later modified. Tested with GNU gmp 2.0.2.
4752 * doc/m4.texinfo (Eval): Added documentation for multiple
4753 precision arithmetic library support.
4755 * src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
4756 to accommodate multiple precision eval.
4758 1998-08-07 René Seindal <rene@seindal.dk>
4760 * src/input.c (MATCH, match_input), src/m4.h: changed definition
4761 of comment and quote strings to `unsigned int' to allow eight bit
4762 chars (reported by andrewb@zip.com.au (Andrew Bettison)).
4764 * src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
4765 patch from Mike Howard <mike@clove.com>
4767 1998-08-06 René Seindal <rene@seindal.dk>
4769 * gettext.m4: corrected AM_WITH_NLS to handle use of installed
4772 1998-08-03 René Seindal <rene@seindal.dk>
4776 * src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
4777 and _ macro. M4 now builds with --disable-nls.
4779 * src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
4780 to look for right message catalogs. Call indef'ed by ENABLE_NLS.
4782 * configure.in (ALL_LINGUAS): Added complete list of translations:
4783 de fr it ja nl ru sv.
4785 1998-05-22 Erick Branderhorst <Erick.Branderhorst@asml.nl>
4789 * src/m4.c: #include <signal.h> not <sys/signal.h>.
4791 * src/Makefile.am: CFLAGS = -Wall @CFLAGS@.
4793 * checks/Makefile.am: explicit list tests in CHECKS.
4795 * configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
4796 src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
4797 mkinstalldirs, install-sh: Added automake (1.3) support.
4799 * lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
4800 obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
4801 Used libitize (0.4) to update.
4803 * configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
4804 (0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
4807 * src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
4808 stack overflow functionality.
4810 1994-12-03 François Pinard <pinard@iro.umontreal.ca>
4814 * Makefile.in (realclean-local): Delete stamp-h.in.
4816 * configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
4817 Localize, adapting from how it is done in sharutils.
4819 * fr.tt: New file, for French.
4821 * configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
4822 src/freeze.c: Rename PRODUCT to PACKAGE.
4824 1994-11-26 François Pinard <pinard@iro.umontreal.ca>
4826 * configure.in: Check for <libintl.h> and <locale.h>.
4827 * src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
4828 src/stackovf.c: Rename _ to __P.
4829 * src/m4.h: Declare _ as a macro returning its argument, or else,
4830 include <libintl.h> and declare _ as gettext.
4831 * src/m4.c: Possibly include <locale.h> and call setlocale.
4832 * src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
4833 src/input.c, src/macro.c, src/output.c, src/path.c,
4834 src/stackovf.c, src/symtab.c: Use _ macro over all localizable
4837 1994-11-07 François Pinard <pinard@iro.umontreal.ca>
4839 * doc/Makefile.in (stamp-vti): Use new -r option to date.
4841 * configure.in: Put --with-gmp in place, in prevision for John
4843 * acconfig.h: Document WITH_GMP.
4845 1994-11-05 François Pinard <pinard@iro.umontreal.ca>
4849 * doc/Makefile.in (realclean): Also remove stamp-vti.
4850 Reported by Eric Backus.
4852 1994-11-02 François Pinard <pinard@iro.umontreal.ca>
4854 * src/freeze.c (produce_frozen_state): If the frozen file cannot
4855 be opened, return immediately after producing the error message.
4856 Reported by Andreas Schwab.
4858 * configure.in: Check for const only after having found possible
4859 ANSIfying compiler flags, this is of no use to check it before.
4860 Reported by Alexander Lehmann.
4862 1994-11-01 François Pinard <pinard@iro.umontreal.ca>
4864 * src/macro.c (collect_arguments): Cast obstack arguments to
4865 (voidstar), so avoiding compiler warnings.
4866 Reported by Joseph E. Sacco.
4868 * src/freeze.c (produce_frozen_state): Cast printed lengths to
4869 (int) so they correspond to %d format items.
4870 Reported by Joseph E. Sacco.
4872 * src/m4.c (main): Cast the argument to xfree to (voidstar).
4873 * src/symtab.c (free_symbol): Idem.
4874 Reported by Karl Vogel.
4876 1994-10-31 François Pinard <pinard@iro.umontreal.ca>
4878 * Makefile.in (DISTFILES): Distribute BACKLOG.
4880 * configure.in: Define PRODUCT and VERSION.
4881 * acconfig.h: Document PRODUCT and VERSION.
4882 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
4883 constant string m4 and variable or parameter named version.
4885 1994-10-30 François Pinard <pinard@iro.umontreal.ca>
4887 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
4888 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
4889 defines __STDC__ to 0, for indicating it is *not* ANSI!
4890 Reported by Kaveh R. Ghazi.
4892 * configure.in: Added obsolescent tests for AIX and Minix.
4894 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
4895 which texclean does not exist anymore.
4896 Reported by Eric Backus, Jim Meyering, John David Anglin and
4899 1994-10-29 François Pinard <pinard@iro.umontreal.ca>
4901 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
4902 Reported by John David Anglin.
4904 * src/ansi2knr.c: New version, sent by Peter Deutsch.
4905 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
4906 ANSI2KNR, depending on the fact the compiler is ANSI or not.
4907 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
4908 Remove the sed filter after ansi2knr for debug.c. Use $O instead
4909 of $U, put underline in extensions rather than in basenames. Use
4910 implicit rules, now that regularity makes this possible.
4911 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
4912 of ansi2knr whenever it is needed.
4913 * configure.in: Adjusted for correct STACKOVF substitution.
4914 * src/debug.c (trace_format): When not __STDC__, use (...) as a
4915 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
4916 Reported by David MacKenzie.
4918 * Makefile.in: Remove binprefix. Use transform_name instead.
4919 Reported by David MacKenzie.
4921 * doc/Makefile.in: Create version.texi, use it, clean it.
4922 Reported by Jim Meyering.
4924 1994-10-28 François Pinard <pinard@iro.umontreal.ca>
4926 * Makefile.in (all, install, uninstall): Depend on Makefile.
4928 * Makefile.in: For actions invoking $(MAKE) from within compound
4929 sh statements, exit non-zero if the sub-make fails. Otherwise,
4930 the top-level make may exit successfully when it should fail.
4931 Reported by Jim Kingdon.
4933 * {,/*}Makefile.in: Use && after all cd, in case they fail.
4935 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
4936 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
4937 * configure.in: Substitute PRODUCT and VERSION.
4939 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
4941 1994-10-27 François Pinard <pinard@iro.umontreal.ca>
4943 * Makefile.in (mostlyclean-local): Do not remove *~.
4944 * */Makefile.in (mostlyclean): Idem.
4945 Reported by Robert E. Brown and Richard Stallman.
4947 1994-10-09 François Pinard <pinard@iro.umontreal.ca>
4949 * src/m4.h: Get rid of CONFIG_BROKETS.
4951 1994-10-02 François Pinard <pinard@iro.umontreal.ca>
4953 * configure.in: Use AC_ARG_PROGRAM.
4954 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
4955 Reported by David MacKenzie.
4957 1994-10-01 François Pinard <pinard@iro.umontreal.ca>
4959 * configure.in: Do not add -O to CFLAGS for GNU C, now that
4960 configure does it automatically.
4961 Reported by Jim Meyering.
4963 1994-09-23 François Pinard <pinard@iro.umontreal.ca>
4965 * src/stackovf.c: Declare the handler_t typedef earlier in the
4966 code, use it for stackovf_handler.
4967 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
4968 casting sigsegv_handler.
4969 Reported by Robert Bernstein.
4971 * src/m4.c (main): Initialize program_name to argv[0] without
4973 Reported by Karl Berry.
4975 1994-09-18 François Pinard <pinard@iro.umontreal.ca>
4977 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
4978 Reported by Karl Berry.
4980 1994-09-14 François Pinard <pinard@iro.umontreal.ca>
4982 * lib/Makefile.in (mostlyclean): Added.
4983 (TAGS): Make in $(srcdir).
4985 * configure.in: Use `choke me' in test, like everywhere!
4987 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
4988 unreacheable and useless.
4990 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
4992 * lib/Makefile.in (DISTFILES): Distribute TAGS.
4993 (distclean): Do not remove TAGS.
4994 (realclean): Remove it.
4995 * Makefile.in: Make TAGS in lib also, not just in src.
4996 Reported by Karl Berry.
4998 * Makefile.in (distclean, realclean): Instead of recursively
4999 calling $(MAKE) for the -local part, allow parallel execution of
5000 -recursive and -local, only delay the removal of config.status,
5001 which is repeated in both goals.
5003 1994-09-13 François Pinard <pinard@iro.umontreal.ca>
5007 * Makefile.in: Group all *clean-recursive goals in one, using sed
5008 to remove `-recursive' while calling make recursively. Also, use
5009 a subshell for each recursive $(MAKE).
5010 Reported by Jim Meyering.
5012 * src/m4.h (memcpy): Define with bcopy for BSD systems.
5013 Reported by Kaveh R. Ghazi.
5015 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
5016 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
5019 * configure.in: Use date instead of touch for stamp-h.
5020 * Makefile.in (stamp-h.in): Idem.
5022 * Makefile.in (distclean, realclean): Force serial execution of
5023 both goals, in case parallel makes are being used.
5024 Reported by Jim Meyering.
5026 * src/Makefile.in (DISTFILES): Distribute TAGS.
5027 (distclean): Do not remove TAGS.
5028 (realclean): Remove it.
5029 Reported by Karl Berry.
5031 1994-09-10 François Pinard <pinard@iro.umontreal.ca>
5033 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
5034 to old names, for following Autoconf.
5036 1994-09-08 François Pinard <pinard@iro.umontreal.ca>
5038 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
5039 ./install.sh will not be correctly referred to in sub-Makefiles.
5040 Reported by John David Anglin.
5042 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
5043 Reported by Eric Backus.
5045 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
5046 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
5047 config.status into remaking this directory's Makefile only.
5048 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
5049 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
5050 Reported by Jim Meyering.
5052 1994-09-06 François Pinard <pinard@iro.umontreal.ca>
5054 * configure.in: Correct stack overflow detection logic, taking
5055 care of systems having only incomplete implementations (like for
5056 Pyramid 9820 OSx 5.0d).
5057 Reported by Kaveh R. Ghazi.
5059 * src/Makefile.in (TAGS): Remote -t from etags call.
5061 1994-09-02 François Pinard <pinard@iro.umontreal.ca>
5063 * lib/Makefile.in (install): Depend on all.
5065 1994-08-31 François Pinard <pinard@iro.umontreal.ca>
5067 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
5068 Reported by Jim Meyering and John David Anglin.
5070 * Makefile.in (distclean-local): Delete config.log.
5071 Reported by Jim Meyering.
5073 Solidify frozen files with respect to -P:
5074 * src/m4.c: Have -P set prefix_all_buitins variable instead of
5075 calling a function by that name. Declare the variable.
5076 * src/m4.h: Adjust declaration for prefix_all_buitins.
5077 * src/builtin.c (builtin_init): Merge in functionality from
5078 previous prefix_all_buitins function, while making entries in the
5079 symbol table, but not modifying the builtin description itself.
5081 * src/freeze.c (reload_frozen_state): Add a useless `break;',
5082 because *many* compilers do not accept an empty `default:'.
5083 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
5084 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
5086 * configure.in: Use AC_TYPE_SIGNAL.
5087 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
5088 Reported by Robert Bernstein.
5090 * checks/Makefile.in (check): Modify PATH so check-them will find
5091 m4 in the src directory.
5092 * Makefile.in (check): Don't.
5093 Reported by Akiko Matsushita and Jim Meyering.
5095 * src/output.c (make_room_for, output_character_helper): New
5096 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
5097 a per buffer MAXIMUM_BUFFER_SIZE.
5099 * src/output.c (output_text): New function, for optimizing the
5100 output of strings of characters. Use it.
5102 1994-08-30 François Pinard <pinard@iro.umontreal.ca>
5104 * doc, src: New directories reorganizing the distribution.
5105 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
5107 * Makefile.in: Adjusted.
5108 * configure.in: Configure new Makefiles.
5110 * m4.h: Declare STRING typedef. Use it for comment and quote
5111 strings, adjusting all references. (This is the rudiments of a
5112 beginning for the eventual withdrawal of NUL terminated strings.)
5113 * output.c (shipout_text): Accept a length parameter, and use it.
5114 All callers adjusted.
5116 1994-08-29 François Pinard <pinard@iro.umontreal.ca>
5118 * m4.h: Include <unistd.h> if it exists.
5119 * stackovf.c: Don't.
5121 Clean up for current_diversion variable:
5122 * output.c: Move current_diversion from builtin.c.
5123 * m4.h: Declare current_diversion so builtin.c can access it.
5124 * output.c (output_init, make_diversion): Initialize or update
5126 * builtin.c (builtin_init, m4_divert): Leave current_diversion
5129 Remove limit on number of diversions:
5130 * output.c: Replace ndiversion by diversions, declare it.
5131 (output_init): Allocate only diversion 0.
5132 (make_diversion): Allocate new diversions as needed.
5133 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
5134 * m4.c: Still accept -N, but do nothing with it.
5135 Reported by David MacKenzie.
5138 * output.c (freeze_diversions): New function.
5139 * m4.h: Declare freeze_diversions.
5140 * freeze.c: Document frozen file format, revise it, call
5141 freeze_diversions to add diversions to frozen format, and code to
5142 reload them properly.
5143 * m4.c: Do not undivert automatically at end when status being
5144 frozen. Do not call builtin_init when reloading frozen state.
5146 Speed up diversion processing:
5147 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
5148 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
5149 structure and variables, cached variables out of output_diversion,
5150 reallocate_diversion_for and OUTPUT_CHARACTER.
5151 (shipout_text, make_diversion, insert_diversion): Adapted to new
5153 (insert_file): Use better buffering.
5154 Reported by David MacKenzie.
5156 1994-08-28 François Pinard <pinard@iro.umontreal.ca>
5158 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
5159 dist works from another build directory.
5161 1994-08-27 François Pinard <pinard@iro.umontreal.ca>
5163 * symtab.c (hack_all_symbols): Use hash_table_size instead of
5164 constant HASHMAX, for -H option to work better.
5166 * builtin.c (DECLARE): Simplify by using _ ().
5168 * freeze.c: New file.
5169 * Makefile.in: Compile it, distribute it.
5170 * m4.c: Recognize, document and process --freeze-state (-F) and
5171 --reload-state (-R) options. Pass a true flag to builtin_init
5172 only if no reloading some state.
5173 * builtin.c (define_builtin): Remove static specifier.
5174 (find_builtin_by_name): Remove static specifier.
5175 (builtin_init): Accept and obey a flag argument.
5176 * m4.h: Add declarations for freeze.c, changes for builtin.c.
5178 1994-08-24 François Pinard <pinard@iro.umontreal.ca>
5180 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
5183 * configure.in: Implement --with-dmalloc.
5184 * acconfig.h: Document WITH_DMALLOC.
5185 * m4.h: Add code for when WITH_DMALLOC.
5187 1994-08-15 François Pinard <pinard@iro.umontreal.ca>
5189 * m4.c (long_options): Use "error-output", the dash was missing.
5190 Reported by Akiko Matsushita.
5192 1994-08-12 François Pinard <pinard@iro.umontreal.ca>
5194 * m4.h: Include <sys/types.h>.
5195 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
5196 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
5198 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
5200 * builtin.c (dump_args): Declare len as size_t, not int.
5202 * debug.c: Prototype the forward declaration of debug_set_file.
5204 * builtin.c (m4_undivert): Replace div by file, for avoiding the
5205 shadowing of this variable.
5206 * output.c (insert_diversion): Idem.
5208 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
5209 (input_init): Duplicate default quote and comment strings.
5210 (set_quotes): Free previous quote strings in all cases. Duplicate
5211 even default quote strings.
5212 (set_comment): Free previous comment strings in all cases.
5213 Duplicate even default comment strings.
5215 * configure.in: Updated for Autoconf 2.0.
5216 * Makefile.in (distclean-local): Also delete config.cache.
5218 * m4.c (usage): Reorganize the --help output by topic. Include a
5219 description for debugging flags.
5221 1994-07-29 François Pinard <pinard@iro.umontreal.ca>
5223 * configure.in: If sigaction is available and SA_ONSTACK defined,
5224 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
5225 defined, use sigvec. Else don't compile stackovf.c.
5226 * stackovf.c (setup_stackovf_trap): Idem.
5227 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
5230 1994-07-21 François Pinard <pinard@iro.umontreal.ca>
5232 * m4.c (usage): Replace printf par fputs.
5234 1994-07-18 François Pinard <pinard@iro.umontreal.ca>
5238 1994-07-17 François Pinard <pinard@iro.umontreal.ca>
5240 * configure.in: Check for sigaction and sigvec. Add a new delayed
5241 check for RLIMIT_STACK, combine in the checking for getrlimit.
5242 All those things are not universally available.
5243 * stackovf.c: Split setting up the trap handler and catching
5244 signals, for better taking care of various configure outcomes.
5245 * examples/stackovf.sh: Correct a typo.
5246 Reported by Eric Backus, Jim Avera and Jim Meyering.
5248 1994-07-16 François Pinard <pinard@iro.umontreal.ca>
5250 * ansi2knr.c: New version sent by its author, Peter Deutsch.
5252 1994-07-15 François Pinard <pinard@iro.umontreal.ca>
5254 * Makefile.in: Modify so parallel make will not try making
5255 lib/libm4.a twice simultaneously.
5256 Reported by Jim Meyering.
5258 1994-07-14 François Pinard <pinard@iro.umontreal.ca>
5260 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
5261 error message, for when no code possibility exists. Even if this
5262 line is completely #ifdef'ed out, it brings a syntax error.
5263 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
5265 * Makefile.in (install): Have install depend on all too, for lib
5266 to be remade as needed.
5268 * examples/stackovf.sh: Try ksh, bsh and bash for shells
5269 providing ulimit, instead of using only ksh.
5270 Reported by Jim Avera and Joseph E. Sacco.
5272 1994-07-12 François Pinard <pinard@iro.umontreal.ca>
5274 * Makefile.in (check): Have it depend on all instead of m4. In
5275 this way, a change in lib will be detected and processed.
5277 * builtin.c (numeric_arg): Use strtol and verify the conversion,
5278 instead of using sscanf which stops as soon as there is a
5279 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
5280 and divert(1xyzzy) were all accepted without any warning or error
5282 * m4.h: Declare strtol as long if not including stdlib.h.
5283 * configure.in: Check for limits.h, and replace strtol if missing.
5284 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
5285 * lib/strtol.c: New file, from elsewhere.
5286 Reported by Andreas Schwab.
5288 1994-07-07 François Pinard <pinard@iro.umontreal.ca>
5290 * macro.c (expand_macro): Cast value to (boolean) prior to
5291 assigning it to traced.
5292 Reported by Tom McConnell.
5294 * Makefile.in (m4): Always make all in lib first.
5295 Reported by Jim Meyering.
5297 1994-07-06 Jim Avera <jima@netcom.com>
5299 * stackovf.c: Isolated OS-dependent sections; Improved portability,
5300 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
5301 handlers), and a default error message if the fault address is not
5302 available (when neither siginfo.h nor BSD sigcontext are supported).
5303 * configure.in: Changes for stackovf.h: Check for sigcontext,
5304 sigaction, sigstack, and define rlim_t as int if necessary.
5305 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
5306 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
5307 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
5309 1994-07-05 François Pinard <pinard@iro.umontreal.ca>
5311 * configure.in: Use AC_SET_MAKE.
5312 * Makefile.in: Use @SET_MAKE@.
5313 Reported by Jim Meyering.
5315 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
5316 Reported by Ian Taylor.
5318 1994-07-02 François Pinard <pinard@iro.umontreal.ca>
5320 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
5321 because siginfo.h is unrelated to standard headers, and siginfo.h
5322 is already checked for.
5323 Reported by Joseph E. Sacco.
5325 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
5327 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
5330 1994-06-29 François Pinard <pinard@iro.umontreal.ca>
5332 * builtin.c (substitute): Use \& to represent this part of the
5333 string which was matched by the whole regexp, instead of
5334 representing the whole string. Any usage of \0 issues a warning
5335 and acts like \&, it will disappear in some subsequent release.
5337 1994-06-27 François Pinard <pinard@iro.umontreal.ca>
5339 * m4.c: Complete prototype for forwarded declaration of usage.
5341 * input.c (init_macro_token): Correct own reference in error
5342 message. Previous name get_macro_func was referred to instead.
5343 (next_char): Correct own reference in error message. Previous
5344 name advance_input was referred to instead.
5346 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
5347 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
5348 and_term, not_term, logical_not_term, cmp_term, shift_term,
5349 add_term, mult_term, exp_term, unary_term, simple_term): Add
5350 prototype to forwarded declarations. Declare parameter v1 as
5351 eval_t * instead of int *. Same for local variable v2 in dyadic
5352 functions. Same for result in exp_term.
5353 * builtin.c (m4_eval): Declare value as eval_t instead of int.
5354 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
5355 unsigned_eval_t instead of unsigned int. Change casts accordingly.
5356 (shipout_int): Cast first argument of ntoa to eval_t.
5357 Reported by Thorsten Ohl.
5359 * macro.c: Complete the prototypes of forwarded expand_macro and
5361 Reported by Thorsten Ohl.
5363 * m4.h: Define voidstar as void * or char * depending on __STDC__.
5364 The Ultrix 3.1 compiler cannot do much with void pointers.
5366 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
5367 * m4.c (xfree): Replace void * by voidstar.
5368 Reported by Tom McConnell.
5370 * ansi2knr.1: New, from elsewhere.
5371 * Makefile.in (DISTFILES): Distribute ansi2knr.1
5373 * Makefile.in (stamp-h.in): Avoid running ./config.status if
5374 stamp-h does not exist yet. This avoids running it a second time
5375 just after the initial ./configure.
5376 Reported by David MacKenzie and Tom McConnell.
5378 * m4.h: Replace the enum debug_info declaration with a series of
5379 #define's. The Ultrix 3.1 compiler would otherwise need casting
5380 (int) to most references, when used in expressions.
5381 Reported by Tom McConnell.
5383 1994-06-25 François Pinard <pinard@iro.umontreal.ca>
5385 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
5386 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
5387 calls the compiler. Previously, FP_PROTOTYPES was only calling
5388 the preprocessor; by not being subject to CFLAGS, this was
5389 discouraging those flags asking for ANSI compilation.
5390 * acconfig.h: Document HAVE_PROTOTYPES.
5391 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
5392 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
5393 Reported by Eric Backus.
5395 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
5396 from the environment. Default CFLAGS to -g if not set.
5397 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
5398 * lib/Makefile.in: Have CFLAGS substituted from configure.
5399 Reported by Eric Backus and Tom McConnell.
5401 * configure.in: m4_undefine changeword before using AC_ENABLE.
5403 * m4.h: Declare prototypes for error (for ANSI compilers only),
5404 prefix_all_builtins and reference_error.
5405 Reported by Tom McConnell.
5407 * input.c (set_word_regexp): Do not try to initialize the array
5408 test from a string, this does not work with non-ANSI compilers.
5409 Reported by Eric Backus.
5411 * Makefile.in (dist): Clean examples/ before saving it.
5412 (distclean-local): Also remove stamp-h.
5413 Reported by Eric Backus.
5415 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
5417 Reported by Tom McConnell.
5419 * checks/Makefile.in (clean): Depends on mostlyclean.
5420 (mostlyclean): New goal.
5422 1994-06-24 François Pinard <pinard@iro.umontreal.ca>
5424 * Makefile.in (DISTFILES): Distribute install.sh.
5425 * install.sh: New file, copied from elsewhere.
5426 Reported by Assar Westerlund and Kaveh R. Ghazi.
5428 1994-06-23 François Pinard <pinard@iro.umontreal.ca>
5430 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
5431 * acconfig.h: Explain ENABLE_CHANGEWORD.
5433 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
5434 from code provided by Pete Chown]
5435 * m4.h: Add original_text field to u_t variant of union u.
5436 Declare TOKEN_DATA_FUNC macro.
5437 * builtin.c: Declare changeword.
5438 (m4_changeword): New function.
5439 * input.c: Include "regex.h", define variables with word regexps.
5440 (input_init): Initialize the word regexp.
5441 (set_word_regexp): New.
5442 (next_token): Declare local variables, use the previous code if
5443 default_word_regexp is true. Else, match using a new code. Save
5445 * macro.c (expand_token): Ship out original text if not a macro
5447 Reported by Krste Asanovic and Pete Chown.
5449 [These modifs all depend upon ENABLE_CHANGEWORD]
5450 * m4.h: Declare external user_word_regexp.
5451 * m4.c: Declare user_word_regexp, and initialize it from
5452 --word-regexp or -W, or NULL if not specified.
5453 * input.c: Use user_word_regexp if specified, instead of
5454 DEFAULT_WORD_REGEXP.
5456 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
5459 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
5460 * checks/Makefile.in: Empty the suffix list.
5461 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
5463 * m4.c: Declare nesting_limit and initialize it to 250.
5464 Implement -LNUMBER or --nesting-limit=NUMBER to change its
5466 * m4.h: Declare nesting_limit as external.
5467 * macro.c (expand_macro): Stop execution whenever nesting limit
5469 Reported by Bengt Mertensson.
5471 * eval.c (evaluate): Diagnose excess characters in eval input.
5472 Things like `eval(08)' used to return 0 with no diagnostic.
5474 * m4.h: Capitalize first letter of all macro arguments in
5477 * m4.c: Declare warning_status, initialize it to 0. Add new
5478 option -E, or --fatal-warnings, which sets warning_status to
5479 EXIT_FAILURE instead.
5480 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
5481 EXIT_FAILURE if not otherwise done by header files.
5482 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
5483 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
5484 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
5485 argument of all M4ERROR calls.
5486 Reported by Noah Friedman.
5488 * examples/incl-test.m4: Renamed from incl_test.m4.
5489 * examples/include.m4: Include incl-test.m4 instead of
5491 * examples/multiquotes.m4: Renamed from multi-quotes.m.
5493 1994-06-22 François Pinard <pinard@iro.umontreal.ca>
5495 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
5496 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
5497 also tested it on a Sun Sparc workstation running SunOS 4.x.
5499 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
5500 49.format check, abusing a `union values' argument with sprintf
5501 without selecting the proper field. Now, save the formatting type
5502 first, delaying the fetch of the corresponding argument.
5503 Reported by Joseph E. Sacco and Tom Quinn.
5505 * format.c (format): Remove const from char *fmt declaration when
5506 not HAVE_EFGCVT, because a NUL may be forced into it.
5508 * m4.h: Declare atof() when not STDC_HEADERS.
5509 Reported by Joseph E. Sacco.
5511 * Regenerate configure using Autoconf 1.11, this corrects a
5512 problem about an incorrect cpp seting on NeXT 3.1.
5513 Reported by Alexander Lehmann.
5515 1994-06-05 François Pinard <pinard@iro.umontreal.ca>
5517 * m4.h (_): Change argument from `x' to `Args'.
5519 1994-04-22 François Pinard <pinard@iro.umontreal.ca>
5521 * m4.h: Rename Args() to _().
5522 * m4.h: Remove extern specifier from all function declarations.
5524 1994-04-22 Jim Avera <jima@netcom.com>
5526 * stackovf.c: New file implementing stack-overflow detection.
5527 * configure.in: Check for getrlimit, sigaction. If all of
5528 standard headers, getrlimit and sigaction, define USE_STACKOVF and
5529 substitute ${U}stackovf.o for STACKOVF.
5530 * acconfig.h: Declare USE_STACKOVF.
5531 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
5532 * m4.h: Declare setup_stackovf_trap().
5533 * m4.c: Call setup_stackovf_trap().
5534 * tests/stackovf_test.sh: New file.
5536 1994-04-13 François Pinard <pinard@iro.umontreal.ca>
5538 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
5540 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
5542 1994-01-30 <pinard@iro.umontreal.ca>
5544 * m4.h: Remove definition of volatile, not used anymore.
5545 Reported by Jim Meyering and Joseph E. Sacco.
5547 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
5548 of `if ... else /* nothing */' for if macros.
5549 Reported by Jim Meyering.
5551 * builtin.c (m4_regexp): Reorganize the code for avoiding a
5552 warning from gcc about `repl' possibly used before defined.
5553 Reported by Jim Meyering.
5555 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
5556 Reported by Jim Meyering.
5558 1994-01-25 François Pinard <pinard@iro.umontreal.ca>
5560 * m4.h: Move the conditional definition of volatile after the
5561 inclusion of system files, because they may define it first.
5563 1994-01-04 François Pinard <pinard@iro.umontreal.ca>
5565 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
5566 get around a problem with Alpha make seeing a syntax error, there.
5567 Reported by Vern Paxson.
5569 1994-01-03 François Pinard <pinard@iro.umontreal.ca>
5571 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
5572 Reported by Richard Stallman.
5574 1993-12-25 François Pinard <pinard@iro.umontreal.ca>
5576 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
5577 instead of AC_HAVE_FUNCS.
5578 Reported by Noah Friedman.
5580 1993-12-01 François Pinard <pinard@iro.umontreal.ca>
5582 * m4.c: Initialize show_help and show_version to zero.
5584 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
5585 Use them in exit() and usage() calls.
5587 1993-11-27 François Pinard <pinard@iro.umontreal.ca>
5589 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
5590 syserr() macro. Delete errref, add reference_error and M4ERROR.
5591 * m4.c: Replace errref, which was returning an input reference
5592 string, with reference_error, which prints it on standard error.
5593 * builtin.c, output.c: Use errno as second parameter to error,
5594 instead of using syserr() with %s.
5595 * *.c: Use M4ERROR instead of error: no more errref() with %s.
5596 Doing so, the program name appears after the input reference
5597 instead of before, which eases M-x next-error processing.
5599 1993-11-24 François Pinard <pinard@iro.umontreal.ca>
5601 * checks/get-them: Escape braces with backslashes in patterns,
5602 because HPUX-9.01 awk needs this.
5603 Reported by Jim Meyering.
5605 1993-11-22 François Pinard <pinard@iro.umontreal.ca>
5607 * builtin.c: Declare "FILE *popen ();".
5609 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
5610 macros, replace error_message_prefix() declaration by errref()'s.
5611 Declare xrealloc, for use in errref().
5612 * m4.c: Delete error_message_prefix() function, add errref().
5613 * *.c: Use error() systematically in place of all error macros,
5614 now that error() flushes stdout first. Make needed adjustments.
5616 * m4.h: Remove const in sys_errlist[] declaration, it creates
5617 conflicts on SGI and Alpha.
5618 Reported by Kaveh R. Ghazi.
5620 1993-11-20 François Pinard <pinard@iro.umontreal.ca>
5622 * m4.c: Include <getopt.h> instead of "getopt.h".
5624 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
5625 * acconfig.h: New, for documenting HAVE_EFGCVT.
5626 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
5627 use them wherever appropriate. Also use -I. for compilations.
5628 * lib/Makefile.in: Use -I.. for compilations.
5629 * *.c: Include <config.h> or "config.h".
5631 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
5632 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
5634 1993-11-17 François Pinard <pinard@iro.umontreal.ca>
5636 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
5638 * input.c (input_init): Initialize quote and comment strings
5639 explicitely instead of calling set_quotes and set_comment: by
5640 doing so, we ensure we do not free uninitialized variables.
5642 * checks/check-them: Reverse arguments to both diff, so the
5643 expected is on the left and the obtained on the right.
5645 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
5646 macros. Delete declarations for m4error, warning, fatal and
5647 internal_error, add declaration for error_message_prefix.
5648 * m4.c: Delete m4error, warning, fatal and internal_error
5649 routines, add error_message_prefix routine.
5650 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
5651 warning with WARNING*, fatal with FATAL* and internal_error with
5653 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
5654 this is not needed anymore.
5656 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
5657 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
5658 and debug_message, add declaration for debug_message_prefix.
5659 * debug.c: Remove static specifier for FILE *debug declaration.
5660 Delete debug_print and debug_message routines, add
5661 debug_message_prefix routine.
5662 * builtin.c, debug.c: Replace debug_print routine calls with
5663 DEBUG_PRINT* macro calls.
5664 * input.c, path.c: Replace debug_message routine calls with
5665 DEBUG_MESSAGE* macro calls.
5667 * m4.h: Remove inclusion of <varargs.h>.
5668 * debug.c: Include <stdarg.h> or <varargs.h>.
5669 (trace_format): Use stdarg instead of varargs if __STDC__.
5671 * configure.in: Remove checks for vfprintf and _doprnt. These
5672 implementations use varargs tricks which are not portable enough.
5673 * lib/vfprintf.c: Deleted.
5674 * lib/_doprnt.c: Deleted.
5675 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
5676 Reported by Joel Sherrill.
5678 * path.c (add_include_directory): Use xstrdup.
5680 * builtin.c (find_builtin_by_name): Declare static.
5682 * *.[ch]: Add const to a few "char *" declarations.
5684 * configure.in: Remove commented tests for fileno() and fstat().
5685 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
5687 * debug.c (debug_flush_files): New.
5688 * m4.h: Declares it.
5689 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
5690 Reported by Nicolas Pioch.
5692 1993-11-12 François Pinard <pinard@iro.umontreal.ca>
5694 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
5695 Reported by Joel Sherrill.
5697 * builtin.c (prefix_all_builtins): Instead of the table size, use
5698 the null entry at end for stopping the loop. It was overwritten.
5699 Reported by Andreas Schwab and Jim Meyering.
5701 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
5702 Reported by Kaveh R. Ghazi.
5704 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
5705 Reported by Karl Vogel.
5707 1993-11-09 François Pinard <pinard@iro.umontreal.ca>
5709 * m4.h: Do not define volatile if already defined.
5710 Reported by René Seindal.
5712 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
5714 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
5715 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
5717 1993-11-08 François Pinard <pinard@iro.umontreal.ca>
5719 * m4.h: Define strchr and strrchr in terms of index and rindex,
5720 instead of the other way around.
5721 * builtin.c, m4.c, path.c: Use strchr instead of index.
5723 * input.c (next_char): Remove a "break;" after a "return ...;".
5724 Reported by Tom McConnell.
5726 1993-11-08 François Pinard <pinard@iro.umontreal.ca>
5730 * configure.in: Do not copy check files in the build hierarchy.
5731 * checks/check-them: Identify the m4 version being checked. For
5732 finding m4, look in $PATH instead of in the parent directory.
5733 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
5734 * checks/Makefile.in (.all-stamp): Always create check files in
5735 the source hierarchy, not anymore in the build hierarchy.
5736 (check): cd to the source hierarchy before performing checks.
5737 Do not copy nor clean COPYING anymore, take it from `..'.
5738 Reported by Tom McConnell.
5740 * Makefile.in (Makefile): Use $(SHELL).
5741 (config.status): Use $(SHELL). Use "config.status --recheck"
5742 instead of "configure --no-create", which is obsolete.
5743 Reported by Tom McConnell.
5745 1993-11-05 François Pinard <pinard@iro.umontreal.ca>
5747 * m4.c (usage): Use "%s" instead of "m4" in format string.
5748 Reported by Jim Meyering.
5750 * Makefile.in: Distribute mkinstalldirs.
5751 Reported by Pierre Gaumond.
5752 Reported by Jim Meyering.
5753 Reported by Tom McConnell.
5754 Reported by Andreas Gustafsson.
5756 * checks/check-them: Renamed from checks/check_them.
5757 * checks/get-them: Renamed from checks/get_them.
5758 * checks/.all-stamp: Renamed from checks/.all_stamp.
5759 * checks/Makefile.in: Changed accordingly.
5760 Reported by Jim Meyering.
5762 1993-11-04 François Pinard <pinard@iro.umontreal.ca>
5764 * lib/Makefile.in (dist): Correct permissions on files.
5766 * output.c: Declare tmpfile, some systems don't.
5768 1993-11-03 François Pinard <pinard@iro.umontreal.ca>
5770 * checks/Makefile.in (dist): Correct permissions on files.
5772 * Makefile.in (dist): Ensure recursive linking for subdirectory
5773 `examples', also set read/write permissions on all its files.
5775 * mkinstalldirs: New, from elsewhere.
5776 * Makefile.in: Use it.
5778 * debug.c: Synchronize debug messages and regular output when
5779 the debug file and stdout are redirected to the same file.
5780 * configure.in: Add (commented) checks for fileno and fstat.
5781 Reported by Jim Avera.
5783 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
5784 etc., arguments, then ignore the superfluous one. m4 used to
5785 diagnose missing arguments and return the empty string.
5786 Reported by Nick S. Kanakakorn.
5788 1993-11-02 François Pinard <pinard@iro.umontreal.ca>
5790 * m4.c (main): At end of all input, ensure all undiverted text
5791 goes to the main output stream.
5792 Reported by Andreas Gustafsson.
5794 * m4.c (main): exit (0), instead of return 0.
5796 * m4.c: Implement -P and --prefix-builtins.
5797 * builtin.c: Delete const specifier on builtin_tab.
5798 (prefix_all_builtins): New.
5799 Reported by Noah Friedman.
5800 Reported by Scott Bartram.
5802 * c-boxes.el: New, from elsewhere.
5803 * Makefile.in: Distribute it.
5805 * m4.h: Do not define bcopy if <string.h> defines it.
5806 Reported by Stephen Perkins.
5808 * builtin.c (define_macro): Allow a missing second argument, in
5809 which case it is implied empty. Affects define and pushdef.
5810 Reported by Eric Allman.
5812 1993-11-01 François Pinard <pinard@iro.umontreal.ca>
5814 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
5815 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
5816 * builtin.c: Initialize all the blindness fields in builtin_tab.
5817 (define_builtin): Copy the blindness of a builtin into its symbol.
5818 * macro.c (expand_token): Avoid processing a blind builtin if the
5819 next character is not an opening parenthesis.
5820 Reported by David MacKenzie.
5821 Reported by Noah Friedman.
5823 * configure.in: Ensure an exit status of 0 on completion.
5824 Reported by Vivek P. Singhal.
5826 * eval.c (eval_lex): Admit both lower and upper case letters for
5827 bases greater than 10. Only lower case letters were accepted.
5829 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
5830 Reported by Krste Asanovic.
5832 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
5833 * eval.c (logical_not_term): New name for not_term.
5834 * eval.c (xor_term): New, between or_term and and_term.
5835 * eval.c (not_term): New, between and_term and logical_not_term.
5836 * eval.c (shift_term): New, between cmp_term and add_term.
5837 Reported by Krste Asanovic: ~, ^, <<, >>.
5838 Reported by Ben A. Mesander: ** vs ^.
5840 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
5841 * m4.h: Delete xrealloc.c.
5842 * lib/xmalloc.c: New, from elsewhere.
5843 * lib/xstrdup.c: New, from elsewhere.
5844 * lib/Makefile.in: Distribute and compile them.
5846 * m4.c: Change progname to program_name.
5847 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
5848 * lib/error.c: New, from elsewhere.
5849 * lib/Makefile.in: Distribute and compile error.c.
5850 * configure.in: Check AC_VPRINTF and for strerror.
5851 * m4.c: Delete cmd_error. Use error instead.
5852 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
5854 * m4.h: Delete #define const, let Autoconf takes care of this.
5856 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
5857 Merge parse_args into main. Declare argv to be `char *const *',
5858 then remove superfluous casts.
5860 * m4.c: Rename --no-gnu-extensions to --traditional.
5861 Reported by Ben A. Mesander.
5863 * m4.c (usage): Add a status parameter. Supply one in various
5864 calls. Add --help processing. Remove -V for --version.
5866 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
5868 * lib/Makefile.in: Have an AR=ar declaration.
5869 Reported by Eric Backus.
5870 Reported by Bjorn R. Bjornsson.
5871 Reported by Tom Tromey.
5872 Reported by Kristine Lund.
5873 Reported by Marion Hakanson.
5875 1993-10-30 François Pinard <pinard@iro.umontreal.ca>
5877 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
5878 Reported by Noah Friedman.
5880 1993-10-25 François Pinard <pinard@iro.umontreal.ca>
5882 * Makefile.in: Remove MDEFINES and cleanup.
5884 1993-06-09 François Pinard <pinard@iro.umontreal.ca>
5886 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
5889 1993-02-06 François Pinard <pinard@iro.umontreal.ca>
5891 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
5892 ensure 777 mode for directories, so older tar's will restore file
5895 1993-01-17 François Pinard <pinard@iro.umontreal.ca>
5897 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
5898 so the installer can override automatically configured choices.
5899 Reported by Karl Berry.
5901 1993-01-15 François Pinard <pinard@iro.umontreal.ca>
5903 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
5904 previous version was not working properly on m68k-hp-bsd4.3.
5905 Reported by Roland McGrath.
5907 * lib/_doprnt.c: Stolen from Oleo distribution.
5908 * configure.in: Check for _doprnt.c if vfprintf.c selected.
5909 * lib/Makefile.in: Distribute _doprnt.c.
5910 Do not distribute regex.[ch].old anymore.
5912 1993-01-01 François Pinard <pinard@iro.umontreal.ca>
5914 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
5915 Richard wants it there.
5917 1992-12-27 François Pinard <pinard@iro.umontreal.ca>
5919 * Makefile.in: Add DEFS to MDEFINES.
5920 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
5921 (libm4.a): Remove the library before creating it.
5922 (distclean): Remove tags and TAGS too.
5924 1992-12-23 François Pinard <pinard@iro.umontreal.ca>
5926 * Makefile.in (dvi, m4.dvi): New goals.
5928 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
5929 macro.c, output.c, path.c, symtab.c: Change Copyright from
5930 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
5932 * examples/divert.m4: Deleted, this bug has been corrected.
5934 * Makefile.in (texclean, mostlyclean): New goals.
5936 * Makefile.in (clean): Remove clutter from ansi2knr.
5937 Reported by Pierre Gaumond.
5939 1992-12-20 François Pinard <pinard@iro.umontreal.ca>
5941 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
5942 might well use CFLAGS is s/he needs it.
5944 * Makefile.in: Allow installation of info files from a separate
5946 Reported by Jason Merrill.
5947 Reported by David MacKenzie.
5948 Reported by Skip Montanaro.
5949 Reported by Erez Zadok.
5950 Reported by Assar Westerlund.
5952 1992-12-19 François Pinard <pinard@iro.umontreal.ca>
5955 This is still a beta release for the future GNU m4 version 1.1.
5957 * lib/alloca.c: New, from elsewhere.
5958 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
5960 * m4.h: Do not define index/rindex if already defined. If
5961 FALSE/TRUE are already defined, do not redefine them, but merely
5962 define boolean typedef to int.
5964 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
5965 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
5966 because some C compilers do not like connectives with #ifdef.
5967 * m4.h: Define `volatile' only if __GNUC__, instead of once for
5968 __GNUC__ and once for __STDC__.
5969 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
5971 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
5972 Makefile dependencies. Without it, make keeps destroying and
5973 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
5975 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
5976 to diversion/DIVERSION, this was a spelling error.
5978 * m4.c: Declare version[], remove #include "version.h".
5979 * version.h: Deleted.
5980 * Makefile.in: Remove references to version.h.
5982 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
5983 production, by using a simpler and more robust algorithm. This
5984 solves the problem of synclines sometimes written in the middle of
5985 an output line. Delete sync_line() and output_lines variable.
5986 * m4.h: Remove sync_line prototype and output_lines declaration.
5987 * input.c (next_char), output.c (shipout_text): Remove references
5989 * input.c (push_file, pop_file): Merely put the value -1 in
5990 output_current_line instead of calling sync_line, for delaying a
5991 single `#line NUM FILE' before next output line. Do not test
5992 for sync_output, because this is unnecessary clutter.
5993 * output.c (make_divertion, insert_divertion): Idem.
5994 * input.c: Rename must_advance_line to start_of_input_line, for
5997 * debug.c (trace_header): Select a new debug line format, which
5998 better complies with GNU standards for formatting error messages.
5999 With option `-dfl', M-x next-error might be used on the output.
6000 * m4.c (vmesg): Adjust format of error output to GNU standards.
6001 * m4.texinfo: Adjust examples for `make check' to work.
6003 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
6004 case for enum debug_info constants, which were all lower case.
6006 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
6008 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
6009 collected patches. I tried a few times using newer regex.[ch], it
6010 mysteriously stopped aborting with this one. Insecure feeling...
6011 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
6013 1992-12-18 François Pinard <pinard@iro.umontreal.ca>
6015 * m4.c: Change `--no-warnings' to `--silent'.
6016 Reported by David MacKenzie.
6018 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
6019 leave it off for now. See comment in m4.c for justification.
6020 Reported by David MacKenzie.
6022 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
6023 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
6025 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
6027 * Makefile.in: Ensure recursive cleaning is done before local
6028 cleaning for all clean goals.
6030 * builtin.c (ntoa): Ensure the value is always interpreted as a
6031 signed quantity, whatever the radix is.
6033 1992-11-18 Jim Meyering <meyering@idefix>
6035 * builtin.c, format.c, input.c: Split long lines.
6036 * m4.c: Use typedef macro_definition instead of struct
6038 * symtab.c: Use typedef symbol instead of struct symbol.
6040 1992-11-17 François Pinard <pinard@iro.umontreal.ca>
6042 * *.[ch]: Remove all trailing whitespace, in code and comments.
6044 * configure.in: Find some awk.
6045 * Makefile.in: Add $(AWK) to MDEFINES.
6046 * checks/Makefile.in: Transmit $(AWK) to get_them.
6047 * checks/get_them: Use $AWK instead of gawk. Add a close in the
6048 awk script when switching files, because without this, mawk runs
6049 out of file descriptors.
6051 1992-11-16 François Pinard <pinard@iro.umontreal.ca>
6053 * Makefile.in (realclean): Delete m4.info*.
6054 Reported by Jim Meyering.
6056 * Makefile.in: Adjust and link with checks/Makefile.
6057 * checks/Makefile.in: New.
6058 * configure.in: Output checks/Makefile.
6060 * checks/get_them: Have the dnl header of each test more
6061 recognizable by next-error, also use a better message.
6063 1992-11-16 Jim Meyering <meyering@idefix>
6065 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
6066 And use that only if __GNUC__ since we're using it's GCC-specific
6067 semantics that tell the compiler the associated function doesn't
6070 * builtin.c (substitute): Don't use character as an array index.
6071 (dumpdef_cmp): Make formal arguments `const void *' to avoid
6072 warnings with gcc -W -Wall on systems with qsort prototype.
6073 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
6076 * eval.c (most functions): Add parentheses to assignments used
6077 as truth values go avoid warnings from gcc -Wall.
6079 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
6080 any functions that don't need external scope.
6082 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
6083 (many functions and arrays): Declare `const'.
6085 1992-11-15 François Pinard <pinard@iro.umontreal.ca>
6087 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
6088 removing the declaration from m4.h. Also rename false to FALSE
6091 * lib/Makefile.in (Makefile): New goal.
6093 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
6094 so heavily loaded. It gets more easily overridable, calling make.
6095 Reported by Jim Meyering.
6097 * Makefile.in (dist): Get .fname from the current directory name,
6098 instead of from version.h. I need updating many files manually,
6099 when the version changes, version.h is just one of them.
6101 1992-11-14 François Pinard <pinard@iro.umontreal.ca>
6103 * m4.h: Remove the tag `boolean' on the enum introducing typedef
6104 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
6105 Reported by Tom McConnell.
6107 1992-11-13 François Pinard <pinard@iro.umontreal.ca>
6109 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
6110 39.cleardiv, which were describing missing or spurious newlines.
6111 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
6112 do not depend on machine word size, `/bin/false' implementation,
6113 or `wc' output format. `make check' is more dependable, now.
6115 * checks/check_them: Summarize the failed tests by listing their
6116 name, at end. If none, issue `All checks successful'. Output
6117 `Checking' instead of `Input file:'.
6119 * checks/get_them, checks/check_them: Reindented.
6121 * Makefile.in (dist): chmod a+r before making the tar file.
6123 1992-11-12 François Pinard <pinard@iro.umontreal.ca>
6125 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
6127 * input.c (next_token): Reinitialize token_buttom just after using
6128 it as a watermark with obstack_free. Or else, a future token, big
6129 enough for triggering reallocation of the obstack chunk, could
6130 void the initialized value of token_buttom, later causing panic in
6131 obstack_free. Rename token_buttom to token_bottom everywhere.
6133 * m4.h: Before declaring errno, first include <errno.h> and
6134 ensure that it does not define errno.
6135 Reported by Richard Stallman.
6137 1992-11-11 François Pinard <pinard@iro.umontreal.ca>
6139 * builtin.c: Define and use DECLARE macro for builtins.
6141 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
6142 argument, this is a common idiom for introducing long comments.
6144 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
6145 arguments. The last argument was silently ignored.
6147 * m4.c (cmd_error): Add a missing semicolon before va_end().
6149 1992-11-10 François Pinard <pinard@iro.umontreal.ca>
6151 * Makefile.in: Now handle protoized sources. Define and use U.
6152 Compile and use ansi2knr with old compilers. Update DISTFILES.
6153 Add `aclocal.m4' to `configure' dependencies.
6154 * ansi2knr.c: New, from Ghostscript distribution.
6155 * configure.in: Define U through FP_PROTOTYPES for old compilers.
6156 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
6157 * aclocal.m4: New, provide FP_PROTOTYPES.
6158 * m4.h: Conditionnaly protoized through Args, save for varags.
6159 * builtin.c: Protoized. Then:
6160 Include <sys/types.h> if size_t is not defined, before "regex.h".
6161 (m4_ifelse): Fetch built-in name properly for diagnostic.
6162 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
6163 (m4_regexp): Add const to `msg' declaration.
6164 (m4_patsubst): Add const to `msg' declaration.
6165 * debug.c: Protoized, save for varargs.
6166 * eval.c: Protoized.
6167 * format.c: Protoized.
6168 * input.c: Protoized.
6169 * m4.c: Protoized, save for varargs. Then:
6170 (xfree): Accept void * instead of char *.
6171 (xmalloc): Return void * instead of char *.
6172 (xrealloc): Accept and return void * instead of char *.
6173 * macro.c: Protoized.
6174 * output.c: Protoized.
6175 * path.c: Protoized. Then cast some (char *) over xmalloc's.
6176 * symtab.c: Protoized.
6178 1992-11-06 François Pinard <pinard@iro.umontreal.ca>
6180 * m4.texinfo: Remove directory from diagnostics in 30.include,
6181 51.eval, 56.errprint and 57.m4exit tests.
6183 * m4.h: Remove declarations for int or void system functions, they
6184 cause more conflicting trouble than they make good.
6186 * configure.in: Avoid configuration header file. Add some tests.
6187 * m4.h: Remove #include "config.h".
6188 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
6189 Then, rewritten for better compliance with GNU standards.
6191 1992-11-05 François Pinard <pinard@iro.umontreal.ca>
6193 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
6194 because of a misplaced #endif.
6196 * Many *.[hc] files: Correct intra-line spacing here and there,
6197 according to GNU indent 1.6 advice.
6199 * configure.in: New, using Autoconf 1.2.
6200 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
6201 * Delete old configure.in, configure, etc/configure.in,
6202 etc/configure, lib/configure.in, lib/configure and config/*.
6203 Reported by Jason Merrill.
6205 * symtab.c (hash): Change (char) NULL to '\0'.
6206 Reported by Jason Merrill.
6208 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
6209 etc/nextvers.sh. Release numbers will be edited `by hand'.
6210 * version.h: De-automatize, force value in.
6212 * m4.c: Changes in order to use a newer getopt.h.
6213 Reported by David MacKenzie.
6215 * checks/: New name for examples/.
6216 * checks/get_them: New location for etc/get_examples.
6217 * checks/check_them: New location for etc/check_examples.
6218 * Makefile.in, checks/get_them, checks/check_them: Adjust.
6219 * lib/vfprintf.c: New location for etc/vfprintf.c.
6220 * Delete empty etc/.
6221 * examples/: New name for test/.
6223 1992-03-10 François Pinard <pinard@iro.umontreal.ca>
6225 * Makefile.in (check): Add m4 as dependency.
6227 * m4.c: Accept --no-warnings instead of --no_warnings, and
6228 --no-gnu-extensions instead of --no_gnu_extensions. Make the
6229 usage message more informative.
6230 Reported by David MacKenzie.
6232 1992-03-09 François Pinard <pinard@iro.umontreal.ca>
6234 * etc/check_examples: New name for check_examples.sh.
6235 * etc/get_examples: New name for get_examples.sh.
6236 * Makefile.in, etc/Makefile.in: Use new names.
6238 * Makefile.in: Transmit $(CC) while making in lib.
6240 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
6241 code disposition by hand.
6243 1992-03-08 François Pinard <pinard@iro.umontreal.ca>
6245 * m4.h: Delete definitions for abort() and exit().
6246 Reported by Richard Stallman.
6248 * config/hmake-unicos, config/s-unicos.h: New files.
6249 Reported by Hal Peterson.
6251 * eval.c (exp_term): Have N^0 return 1.
6252 Reported by Michael Fetterman.
6254 * eval.c, input.c, m4.h: Remove last comma in enums.
6255 Reported by Mike Lijewski.
6257 * Transfer of maintenance duties from René to François.
6259 1991-10-24 René Seindal <seindal@diku.dk>
6261 * Release 1.0. Many thanks to those, who provided me with bug
6262 reports and feedback.
6264 * Uses GNU configure, taken from the gdb distribution.
6266 * Uses GNU getopt(), with long option names.
6268 * The -Q/+quiet option is added, which suppresses warnings about
6269 missing or superflous arguments to built-in macros.
6271 * Added default options via the M4OPTS environment variable.
6273 * The built-in format can now be configured to use sprintf as
6274 the formatting engine, for systems without [efg]cvt(3).
6276 * GNU library code is moved to the ./lib subdirectory; other
6277 utility files are now in ./etc.
6279 * Several minor bugs have been fixed.
6281 1991-07-26 René Seindal <seindal@diku.dk>
6283 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
6284 Francois Pinard and Roland H. Pesch for providing me with reports.
6286 * The builtins incr and decr are now implemented without use of
6289 * The builtin indir is added, to allow for indirect macro calls
6290 (allows use of "illegal" macro names).
6292 * The debugging and tracing facilities has been enhanced
6293 considerably. See the manual for details.
6295 * The -tMACRO option is added, marks MACRO for tracing as soon
6298 * Builtins are traced after renaming iff they were before.
6300 * Named files can now be undiverted.
6302 * The -Nnum option can be used to increase the number of
6303 divertions available.
6305 * Calling changecom without arguments now disables all comment
6308 * The function m4_patsubst() is now consistently declared
6311 * A bug in dnl is fixed.
6313 * A bug in the multi-character quoting code is fixed.
6315 * Several typos in the manual has been corrected. More probably
6318 * The m4.info file is now installed along with the program.
6320 1990-11-15 René Seindal <seindal@diku.dk>
6322 * Updated and enhanced version. Release 0.75, manual 0.07.
6324 * Implemented search path for include files (-I option and
6325 M4PATH envronment variable).
6327 * Implemented builtin "format" for printf-like formatting.
6329 * Implemented builtin "regexp" for searching for regular
6332 * Implemented builtin "patsubst" for substitution with regular
6335 * Implemented builtin "esyscmd", which expands to a shell
6338 * Implemented "__file__" and "__line__" for use in error
6341 * Implemented character ranges in "translit".
6343 * Implemented control over debugging output.
6345 * Implemented multi-character quotes.
6347 * Implemented multi-character comment delimiters.
6349 * Changed predefined macro "gnu" to "__gnu__".
6351 * Changed predefined macro "unix" to "__unix__", when the -G
6352 option is not used. With -G, "unix" is still defined.
6354 * Changed "shift", "$@" and "$*" to not insert spaces afters
6357 * Added program name to error messages.
6359 * Fixed two missing null bytes bugs.
6361 1990-01-22 René Seindal <seindal@diku.dk>
6363 * Initial beta release. Release 0.50, manual 0.05.