* src/m4.h (_): Remove K&R cruft.
[m4/ericb.git] / ChangeLog
blob397c8e06216c290825b3dbb84d02e442b46cb6a9
1 2006-07-27  Eric Blake  <ebb9@byu.net>
3         * src/m4.h (_): Remove K&R cruft.
4         * src/builtin.c: Likewise.
5         * src/debug.c: Likewise.
6         * src/eval.c: Likewise.
7         * src/macro.c: Likewise.
8         * src/stackovf.c: Likewise.
10         * doc/Makefile.am (m4.1): Improve man page.
11         * src/m4.c (usage): Improve --help output, including adding the
12         bug reporting address.
13         (main): Follow GNU Coding Standards for --version output.
15 2006-07-26  Eric Blake  <ebb9@byu.net>
17         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
18         end-comment consistently, to match POSIX.
20         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
21         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
22         (Incompatibilities): Document incompatibility of changecom
23         vs. macro names, and of EOF in include.
24         * src/input.c (next_token): Reject unterminated comments at EOF.
25         (skip_line): Warn on unterminated dnl at EOF.
26         * NEWS: Document these changes.
28 2006-07-25  Eric Blake  <ebb9@byu.net>
30         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
31         stdio-safer into fopen-safer and tmpfile-safer.
32         * src/m4.c: Remove redundant include.
34 2006-07-24  Eric Blake  <ebb9@byu.net>
36         Fix bugs related to stream handling.
37         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
38         unlocked-io stdio-safer stdlib-safer close-stream.
39         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
40         provided by gnulib if needed.
41         * src/output.c [! HAVE_TMPFILE]: Likewise.
42         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
43         their safer counterparts.
44         (retcode): New global variable.
45         * src/input.c (pop_input): Check for read failure.
46         * src/freeze.c (reload_frozen_state): Likewise.
47         (produce_frozen_state): Check for write failure.
48         * src/debug.c (debug_set_file): Likewise.
49         * src/m4.c (usage, main): Likewise.
50         (retcode): Make global.
51         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
52         status is non-zero except when everything succeeds.
53         * doc/m4.texinfo (M4exit): Document these changes.
54         (Incompatibilities): Remove documentation of bug now fixed.
55         * NEWS: Document these fixes.
57 2006-07-22  Eric Blake  <ebb9@byu.net>
59         * src/format.c (format): Avoid compiler warning that str may be
60         used uninitialized.
62 2006-07-21  Eric Blake  <ebb9@byu.net>
64         * src/m4.h [UNIX]: Add more platforms that are close enough to
65         categorize as UNIX, but which don't predefine __unix__.
66         Reported by Nelson H. F. Beebe.
68 2006-07-20  Eric Blake  <ebb9@byu.net>
70         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
71         to explicitly ask for --assume-autoconf=2.60.
73 2006-07-19  Eric Blake  <ebb9@byu.net>
75         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
76         and exits normally with 129.
77         Reported by Nelson H. F. Beebe.
78         * THANKS: Update.
80         * src/m4.h (EXIT_MISMATCH): Define.
81         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
82         exiting with status 63.
83         * src/m4.c (usage): Document this.
84         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
85         * NEWS: Likewise.
87         * doc/m4.texinfo (copying): Relax restriction on front-cover and
88         back-cover texts.
90 2006-07-17  Eric Blake  <ebb9@byu.net>
92         * src/format.c (format): Support F, g, and G specifiers.
93         * doc/m4.texinfo (Format): Document this.
94         * NEWS: Document this addition.
96         * doc/m4.texinfo (Builtin): Delete redundant text.
98         * configure.ac (AC_INIT): Bump version number.
99         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
100         * NEWS: Document this fix.
102 2006-07-15  Eric Blake  <ebb9@byu.net>
104         Release 1.4.5:
106         * configure.ac (AC_INIT): Bump version number.
107         * NEWS: Describe changes since 1.4.4.
109         * src/m4.c (usage): Document exit status.
110         * doc/m4.texinfo: Use `exit status', not `exit code'.
111         (Invoking m4): Document exit status.
113         * bootstrap: Backport --help, --version from head.
114         (func_update): New function, for easily grabbing up-to-date files
115         from gnulib.
116         * Makefile.maint (web-manual): Fix for VPATH builds.
118 2006-07-14  Eric Blake  <ebb9@byu.net>
120         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
121         looks bad in info.  Use @deffn rather than @example for
122         describing prototypes.  Fix awkward wording and grammar.
124         * src/builtin.c (substitute): Warn on bad escape sequences.
125         Ignore trailing backslash.
126         * doc/m4.texinfo (Regexp): Add documentation for this.
127         * NEWS: Document this change.
129         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
130         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
131         more examples.
132         (Dnl): Update example to show side effects.
133         * checks/get-them: Generate three digit test names.
134         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
136 2006-07-13  Eric Blake  <ebb9@byu.net>
138         * src/input.c (input_init): Simplify.
139         (set_word_regexp): Treat empty string as default, since empty
140         regexp would disable word parsing.
141         * src/m4.c (user_word_regexp): Default to empty string.
142         * src/builtin.c (builtin_tab): Make changeword blind.
143         * doc/m4.texinfo (Changeword): Document this.
144         * NEWS: Document this.
145         * TODO: Knock off completed items.
147         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
148         just the first.
149         * doc/m4.texinfo (Undefine, Pushdef): Test this.
150         * NEWS: Document this change.
152         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
153         warning.  Detect quoted leading space and overflow as warnings.
154         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
155         Treat width as minimum number of digits, as required by POSIX.
156         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
157         arguments.
158         (m4_substr): Likewise.  Silently treat empty start as 0.
159         (m4_undivert): Treat ` 1a' as file, not diversion 1.
160         * src/eval.c (eval_lex): Parse radix 1 numbers.
161         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
162         one type of warning.
163         (Manual): Document behavior of numeric parsing of empty string.
164         (Divert, Incr): Document error handling.
165         (Eval): Document radices better.
166         (Incompatibilities): Document translit incompatibility.
167         * NEWS: Document these changes.
169         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
170         (web-manual): Simplify.
171         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
172         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
173         (MAINTAINERCLEANFILES): Clean it as well.
174         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
175         (MAINTAINERCLEANFILES): Clean it as well.
177 2006-07-12  Eric Blake  <ebb9@byu.net>
179         * doc/m4.texinfo (Extensions): Document how to overcome
180         implementation difference in > 9 positional parameters.
182         * src/m4.c (usage): Sort within sections.
183         (nesting_limit): Raise default from 250 to 1024.
184         * doc/m4.texinfo: Use file name, not filename, per GNU coding
185         standard.  Use @option where appropriate.
186         (Invoking m4): Sort to match --help output.
187         (Debug Levels): Sort.
188         (Frozen files): Sort and break into two nodes.
190         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
191         * NEWS: Document raised -L limit.
193 2006-07-11  Eric Blake  <ebb9@byu.net>
195         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
196         stress-test changeword before a release.
197         * doc/m4.texinfo: More doc cleanups.
198         (Copying This Manual): New node; actually include the FDL in the
199         documentation.
200         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
201         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
202         * NEWS: Mention documentation improvements.
204         * src/m4.h (OS2): New platform macro.
205         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
206         platform macro.
207         * doc/m4.texinfo (Platform macros): Document it.
208         (Sysval): Remove non-portable test of system("").
209         * NEWS: Document this change.
210         Reported by Andreas Buening.
212 2006-07-09  Eric Blake  <ebb9@byu.net>
214         * doc/m4.texinfo (Undivert): Fix typo in last commit.
215         * src/m4.c (usage): Document M4PATH.
216         * src/path.c (path_search): Reject empty string.
217         * src/output.c (insert_diversion): Ignore diversion 0.
218         * src/builtin.c (m4_undivert): Ignore empty string.
219         * NEWS: Document this fix.
221 2006-07-08  Eric Blake  <ebb9@byu.net>
223         * checks/get-them: Make filtering easier.
224         * checks/check-them: Filter non-input lines, so line counts are
225         more realistic in the documentation, and so changeword tests work
226         even when dnl is disabled.
227         * doc/m4.texinfo: Adjust example line numbers.  Clean up
228         front-matter, following autoconf's example.
229         (Changeword): Enable tests, skipping if changeword not supported.
230         (Define, Defn, Ifelse): Backport more examples from head.
231         (Input processing, Answers): New nodes, backported from head.
232         (Include): Expand test to cover empty filename.
233         (Undivert): Add test of undivert(0).
235 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
237         * doc/m4.texinfo: Fix spelling errors.
239 2006-07-07  Eric Blake  <ebb9@byu.net>
241         * THANKS: Update.
243         * doc/Makefile.am (m4.1): No need to go through a temporary file;
244         this also ensures timestamps are updated.
245         * src/m4.h (includes): Require config.h.  Assume string.h,
246         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
247         than prototyping ourselves.
248         (builtin_func): Add parameter type-checking.
249         (voidstar): Delete, now that we assume C89.
250         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
251         voidstar changed.
252         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
253         xfree.
255 2006-07-06  Eric Blake  <ebb9@byu.net>
257         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
258         binary-io.
259         * src/m4.h (includes): Add binary-io.h for O_BINARY.
260         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
261         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
262         * NEWS: Mention this fix.
264         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
265         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
267         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
268         runs first when needed.
269         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
270         once in srcdir rather than multiple times in VPATH builds.
272 2006-07-03  Eric Blake  <ebb9@byu.net>
274         * checks/check-them: Use portable = in test.
275         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
276         directory, as required by Solaris cc.  Include built headers, as
277         required by Solaris make in VPATH build.
278         * checks/Makefile.in: Use $(srcdir) where needed.
279         (CHECKS): Factor $(srcdir) into macro.
280         (DISTFILES): Likewise.  Automake takes care of distributing
281         Makefile.in.
282         (dist): Simplify.
283         (Makefile): Use modern syntax of config.status.
284         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
285         Avoid overfull and underfull hboxes in dvi.
287         Fix 'make check' in VPATH build.  All files included by testsuite
288         now live in a single directory.  Use forloop.m4 in testsuite.
289         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
290         here...
291         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
292         here.
293         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
294         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
295         * checks/check-them: Avoid s/// when filename is in pattern.
296         * examples/forloop.m4: Fix to match documentation.
297         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
298         new locations.
299         (Loops, Format): Actually use forloop.m4 in tests.
301 2006-07-02  Eric Blake  <ebb9@byu.net>
303         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
304         $(bindir) works in installcheck.
305         (check, installcheck): No longer change directory, so that
306         distcheck works with a read-only builddir.
307         * checks/check-them: Work when pwd is no longer builddir.
309 2006-07-01  Eric Blake  <ebb9@byu.net>
311         * GNUmakefile: New file, borrowed from coreutils.
312         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
313         * Makefile.maint (Makefile): Delete this rule, now that
314         GNUmakefile includes Makefile.
316 2006-06-30  Eric Blake  <ebb9@byu.net>
318         For compatibility with other m4 implementations, sysval returns
319         signal<<8 rather than 0 if syscmd is terminated by a signal.
320         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
321         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
322         not provide wait macros.
323         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
324         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
325         (m4_esyscmd): Set sysval to -1 on failure.
326         (m4_sysval): Print 127 on failure, and accomodate signals if they
327         are detectable.
328         * NEWS: Document this change.
329         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
330         last commit.
331         * checks/check-them: Likewise.
332         * src/debug.c (debug_set_file): Work around mingw fstat bug.
334         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
335         * src/freeze.c (produce_frozen_state): Use new spelling of
336         platform macro.
337         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
338         platforms.
339         (m4_syscmd, m4_esyscmd): The empty command is successful.
340         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
341         Document platform-dependence of system().
342         (Syscmd): Add example.
343         (Esyscmd): Make example more robust, and actually demonstrate
344         rescanning.
345         (Sysval): Expand test to cover esyscmd code path, and to check
346         that empty command is successful.  Add conditional check for
347         signal behavior.
348         (Other Incompatibilities): Move platform macros from here...
349         (Platform macros): ...to this new node.  Add windows macro.
350         Check that exactly one platform macro is provided.
351         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
352         .exe in error messages.  Allow for skipping checks.
353         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
354         * NEWS: Document platform macros.
356 2006-06-29  Eric Blake  <ebb9@byu.net>
358         Fix buffer overrun bug.
359         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
360         xvasprintf.
361         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
362         variant instead, since [efg]cvt are obsolete and our use of them
363         was buggy (savannah sr #104303).
364         (format): Fix buffer overflow by using xasprintf.
365         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
366         * NEWS: Document this fix.
368         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
369         cross-compilation.
370         (AC_CACHE_CHECK): Cache search for ecvt.
372 2006-06-27  Eric Blake  <ebb9@byu.net>
374         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
375         required by POSIX, and add example that exposed core dump on x86
376         architectures.
377         (Incompatibilities): Document incompatibility in eval precedence.
378         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
379         behavior.
380         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
381         * NEWS: Document this change.
383         * doc/m4.texinfo: Use @noindent consistently.
384         (Quoting Arguments): Document that unquoted parentheses group
385         arguments.
386         (Pseudo Arguments): Expand tests to show this.
387         (Incompatibilities): Contrast traditional behavior of
388         changequote.
390 2006-06-24  Eric Blake  <ebb9@byu.net>
392         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
393         (AC_CHECK_HEADERS_ONCE): Use this new feature.
394         (AC_CHECK_FUNCS_ONCE): Likewise.
396 2006-06-23  Eric Blake  <ebb9@byu.net>
398         * doc/m4.texinfo: Quoting cleanup throughout - follow
399         autoconf-recommended style of one level of quote per parenthesis
400         in the normal case.  Adjust error messages to match GNU coding
401         standards (and to allow 'make check' to pass again).
402         (Quoted strings, Inhibiting Invocation): Turn more examples into
403         tests.
404         (Comments): Resolve FIXME by adding example.
405         (Define): Add example about underquoting.
406         (Defn): Add example about use of $0.
407         (Indir, Format): Resolve FIXME done in last commit.
408         (Ifelse): Add example about creating blind macro.
409         (Debugging): Fix grammar.
410         (Dnl): Add example about dnl with arguments.
411         (M4wrap): Be explicit that LIFO order is non compliant, and will
412         change in m4 2.0.
413         (Undivert): Resolve FIXME by adding example.
414         (Frozen files): Document that m4wrap and sysval will not work
415         consistently until m4 2.0.
416         (Incompatibilities): Document another POSIX compliance bug, this
417         time with changequote.  Document a traditional incompatibility
418         with partial input spanning file boundaries.
420         Make error messages more consistent with GNU coding standards -
421         start with lower case, and don't end sentence with punctuation.
422         * src/debug.c (trace_pre): Update message wording.
423         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
424         Likewise.
425         * src/freeze.c (produce_frozen_state, issue_expect_message),
426         (reload_frozen_state): Likewise.
427         * src/input.c (push_string_init, pop_init, init_macro_token),
428         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
429         * src/m4.c (stackovf_handler, main): Likewise.
430         * src/macro.c (expand_token, expand_argument, call_macro),
431         (expand_macro): Likewise.
432         * src/output.c (make_room_for, output_text, insert_file),
433         (freeze_diversions): Likewise.
434         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
436         * src/builtin.c (builtin_tab): Make format and indir blind.
437         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
438         * NEWS: Mention the change to builtins.
440 2006-06-22  Eric Blake  <ebb9@byu.net>
442         Robustify frozen file format.
443         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
444         macro.  Require V first, and only accept it once.  For F, use
445         placeholder if builtin is not found, rather than warning.
446         * src/m4.h (m4_placeholder): New prototype.
447         * src/builtin.c: Unify error message style.
448         (m4_placeholder): New function, warn if invoked.
449         (builtin_tab): Add m4_placeholder.
450         (m4_defn): Warn if placeholder is encountered.
451         (find_builtin_by_addr): Handle placeholder.
452         (find_builtin_by_name): Return placeholder on failure.
453         (m4_builtin): Treat placeholder as undefined.
454         * doc/m4.texinfo (Frozen files): Document changes in V and F.
455         * NEWS: Document this change.
456         Reported by Bruno Haible.
458         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
459         (tabchar): New macro, so that 'make check' still works.
460         (Invoking m4): Document that ignored compatibility options -B, -S,
461         and -T each consume an argument.
462         * checks/get-them: Honor @tabchar{}.
464         Avoid compiler warnings during -DDEBUG.
465         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
466         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
467         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
468         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
469         (next_token) [DEBUG_INPUT]: Print before returning.
470         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
471         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
473         Avoid mkstemp bugs on various platforms.
474         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
475         * src/output.c [! HAVE_MKSTEMP]: Delete.
476         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
477         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
478         * NEWS: Document this.
480         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
481         Reported by Bruno Haible.
483 2006-06-21  Eric Blake  <ebb9@byu.net>
485         Avoid obsolete sigstack when POSIX sigaltstack is available.
486         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
487         do likewise.
488         * configure.ac (AC_CHECK_HEADERS): Likewise.
489         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
490         obsolete and most hosts now have it in signal.h.
491         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
492         (AC_CACHE_CHECK): Cache decision to use stackovf.
493         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
494         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
495         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
496         simplify later code.
497         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
498         in case of dereferencing a member of a NULL pointer.
499         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
500         POSIX handler.
501         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
502         EXIT_FAILURE in error, indent preprocessor directives.
503         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
504         siginfo.h.
505         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
506         Reported by Santiago Vila.
508 2006-06-19  Eric Blake  <ebb9@byu.net>
510         * THANKS: Update.
512 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
514         * checks/Makefile.in (PATH_SEPARATOR): New macro.
515         (check, installcheck): Use it, for OS/2.
517 2006-06-18  Eric Blake  <ebb9@byu.net>
519         Consistently use "GNU M4" as package name, "m4" as executable
520         name.
521         * NEWS: Document previous fix.
522         * THANKS: Update.
523         * README: Fix grammar.  Document that --enable-changeword is on
524         its last leg.
525         * doc/m4.texinfo (Top, Changeword): Likewise.
526         (Sysval): Enhance this test.
527         (History): Backport this section from CVS head, and update.
529 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
530             Eric Blake  <ebb9@byu.net>
532         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
533         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
534         big-endian and little-endian wait status definitions.
535         (m4_sysval): Use WEXITSTATUS.
536         Reported by Andreas Buening.
538 2006-06-18  Eric Blake  <ebb9@byu.net>
540         * configure.ac (AC_INIT): Bump version number.
541         * NEWS: Describe changes in 1.4.4c.
543 2006-06-17  Eric Blake  <ebb9@byu.net>
545         Release 1.4.4b:
547         * configure.ac (AC_INIT): Bump version number.
548         * NEWS: Describe changes since 1.4.4.
549         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
551         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
552         bootstrap.
553         * checks/Makefile.in (maintainer-clean): Add missing target.
554         * COPYING: Remove generated file from CVS.
556 2006-06-16  Eric Blake  <ebb9@byu.net>
558         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
560 2006-06-15  Eric Blake  <ebb9@byu.net>
562         * checks/wrapfifo.m4: New file.  Use it...
563         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
564         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
566         * src/m4.h (to_uchar): New function.
567         * src/eval.c (eval_lex): Use it to avoid passing signed char to
568         isdigit, isalpha, isupper, islower, isspace, isalnum.
569         * src/builtin.c (expand_user_macro): Likewise.
570         * src/format.c (format): Likewise.
571         * src/macro.c (expand_argument): Likewise.
572         * NEWS: Document this security fix.
574         Message cleanup.
575         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
576         * src/freeze.c (reload_frozen_state): Fix typo in message.
577         (produce_frozen_state): Standardize on builtin, not built-in.
578         * src/builtin.c (numeric_arg, bad_argc): Likewise.
580         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
581         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
582         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
583         gnulib.
584         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
585         * m4/gnulib-cache.m4: New file, from gnulib.
586         * bootstrap: Invoke gnulib-tool --update.
587         * src/m4.c (main): Cast away const.
588         * NEWS: Document that regex is updated.
589         * THANKS: Update.
591 2006-06-08  Eric Blake  <ebb9@byu.net>
593         * configure.ac (changeword): Work even when changeword is not a
594         macro.
595         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
596         Delete; now done by automake.
597         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
599 2006-06-07  Eric Blake  <ebb9@byu.net>
601         * lib/regex.c (bcmp_translate): Canonicalize type name.
602         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
603         * configure.ac (changeword): Disable changeword for the creation
604         of configure, in case of bootstrapping with an m4 configured with
605         --enable-changeword.
607         Distribute a rudimentary man page.
608         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
609         can feed help2man.
610         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
611         (SUFFIXES, m4.1): New macros and rules to build m4.1.
613 2006-06-06  Eric Blake  <ebb9@byu.net>
615         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
616         compiler warnings at -O2.
617         * lib/getopt.c (_getopt_internal): Likewise.
619         Cleanup of previous patches.
620         * src/input.c (struct input_block): Remove traced member.
621         (push_macro, init_macro_token): Don't pass trace status around.
622         * src/m4.h (struct token_data): Remove traced member.
623         (struct symbol, struct builtin): Reduce unused space.
624         (TOKEN_DATA_FUNC): Simplify.
625         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
626         (push_macro, define_builtin): Remove unused parameter.
627         * src/builtin.c (define_builtin, builtin_init, define_macro),
628         (m4_defn): Don't pass trace status around.
629         * src/macro.c (expand_argument): Likewise.
630         * src/freeze.c (reload_frozen_state): Likewise.
631         * src/symtab.c: Whitespace cleanup.
632         * NEWS: Clean up wording.
633         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
634         ensure tests actually expose bugs prior to today's patches.
636         Trace status of builtins is no longer inherited across
637         define(...,defn(...)).  Fixes bug that autom4te had been working
638         around.
639         * src/builtin.c (define_builtin): Don't override trace status.
640         * doc/m4.texinfo (Trace): Add test for this.
641         * NEWS: Document this.
643         When changing macro definitions inside the arguments to the macro,
644         consistently preserve the old definition that was in effect before
645         argument collection, similar to the C pre-processor.
646         Reported by John Brzustowski.
647         * NEWS: Document this change.
648         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
649         this policy, and add tests that expose core dumps prior to this
650         patch.
651         * src/m4.h (struct symbol): New members to track when a symbol is
652         still in use after removal from the symbol table.
653         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
654         (free_symbol): Prototype.
655         * src/macro.c (expand_macro): Track pending expansions of a
656         symbol.  On completion, if a symbol is deleted and no longer
657         pending, free its memory.
658         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
659         is still in use.
660         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
661         is still in use.
662         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
663         in use as deleted and remove from the table without freeing
664         memory.
665         (symtab_print_list) [DEBUG_SYM]: More debug output.
667         * src/symtab.c (hack_all_symbols): Allow certain modifications of
668         the symbol table during traversal.
669         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
670         SYMBOL_POPDEF, since only the latter is safe with
671         hack_all_symbols.
673         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
674         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
675         Preserve placeholder when macro is being traced.
676         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
677         symbol is not defined.
678         (set_trace): Remove placeholder when no longer traced.
679         (m4_traceon): On named traces, always reserve a slot in the
680         symbol table.
681         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
682         * NEWS: Document new trace behavior.
683         * doc/m4.texinfo (Trace): Tracing by name now consistently works
684         no matter whether that macro is currently defined.
685         (Incompatibilities): Document differences between traditional and
686         GNU trace.
688 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
689             Eric Blake  <ebb9@byu.net>
691         * src/m4.h (hash_table_size): Now size_t instead of int.
692         * src/m4.c (hash_table_size): Likewise.
693         (main): Adjust to this; use atol rather than atoi.
694         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
695         (symtab_init, lookup_symbol, hack_all_symbols):
696         Use size_t for sizes and indexes, not int.
697         (symtab_print_list) [DEBUG_SYM]: Likewise.
698         (hash): Likewise.  Don't case-fold in the hash function.
699         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
700         Don't assume hash word is 32 bits.
701         NEWS: Document this change.
703 2006-06-04  Eric Blake  <ebb9@byu.net>
705         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
706         to allow compilation, for use in debugger.
707         (profiles, current_mode) [DEBUG_SYM]: New variables.
708         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
709         determining hash table performance.
711 2006-05-31  Eric Blake  <ebb9@byu.net>
712             John Brzustowski  <jbrzusto@fastmail.fm>
714         * src/input.c (input_stack): Delete; use current_input instead.
715         (wrapup_stack): Dynamically allocate, so that recursion is handled
716         properly.
717         (push_wrapup): Use current wrapup stack.
718         (pop_wrapup): Rotate wrapup stack to current, and create new
719         wrapup stack.
720         (input_init): Dynamically allocate stacks.
721         * NEWS: Update, now that recursive m4wrap can no longer cause
722         core dump.
724 2006-05-31  Eric Blake  <ebb9@byu.net>
726         * lib/getopt.c: Fix copyright year.
727         * lib/obstack.c: Ditto.
728         * src/builtin.c: Ditto.
730 2006-05-30  Eric Blake  <ebb9@byu.net>
732         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
733         Reported by John Brzustowski.
734         (Incompatibilities): Document known POSIX incompatibilities.
735         * THANKS: Update.
737 2006-05-29  Eric Blake  <ebb9@byu.net>
739         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
740         in read-only dir.
742         Use automake.
743         * Makefile.am: New file.
744         * doc/Makefile.am: Ditto.
745         * examples/Makefile.am: Ditto.
746         * lib/Makefile.am: Ditto.
747         * src/Makefile.am: Ditto.
748         * acinclude.m4: New file, renamed from aclocal.m4.
749         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
750         (AC_ARG_PROGRAM): Now redundant.
751         (STACKOVF): Turn into automake conditional.
752         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
753         * checks/Makefile.in: Converting this dir to automake was not
754         trivial; for now, just add missing targets demanded by top-level.
755         * INSTALL: Remove files that are now generated from CVS.
756         * Makefile.in: Ditto.
757         * aclocal.m4: Ditto.
758         * install-sh: Ditto.
759         * mkinstalldirs: Ditto.
760         * doc/Makefile.in: Ditto.
761         * doc/texinfo.tex: Ditto.
762         * examples/Makefile.in: Ditto.
763         * lib/Makefile.in: Ditto.
764         * src/Makefile.in: Ditto.
766         * AUTHORS: Backport from CVS head, and update.
767         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
769 2006-05-27  Eric Blake  <ebb9@byu.net>
771         * lib/regex.c (regex_compile): Kill compiler warnings.
772         * lib/getopt.c: Likewise.
773         * lib/obstack.c: Likewise.
774         * src/builtin.c (builtin_init): Likewise.
775         * src/path.c (path_search): Likewise.
777         * doc/m4.texinfo: Fix usage of a vs. an.
778         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
779         overfull hbox warnings.
780         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
782         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
783         quoting.
784         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
785         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
786         assume C89.
787         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
788         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
789         * src/Makefile.in: Delete remains of ansi2knr.
790         * src/ansi2knr.1: Delete.
791         * src/ansi2knr.c: Delete.
793 2006-05-25  Eric Blake  <ebb9@byu.net>
795         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
796         `illegal'.
798         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
799         Reported by Karl Berry.
801 2006-05-24  Eric Blake  <ebb9@byu.net>
803         * Makefile.in (html): New target.
804         * doc/Makefile.in (html, m4.html): Likewise.
805         (MAKEINFOHTML): New macro.
806         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
807         rendering.
808         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
809         absolute URL.
810         Reported by Bob Badour.
812         * THANKS: Update.  Move reporter's email addresses here, instead
813         of in ChangeLog.
815 2006-05-11  Eric Blake  <ebb9@byu.net>
817         * THANKS: Update.
818         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
819         patched on 2005-12-04.
820         Reported by Ilya N. Golubev.
822         * bootstrap: New file, so that generated files need not be stored
823         in CVS.
824         * Makefile.in (DISTFILES): Add bootstrap.
826         Make testsuite less sensitive to doc changes.
827         * doc/m4.texinfo: Use m4.input instead of filename.
828         * checks/check-them (xerr): Turn m4.input into filename.
829         * checks/Makefile.in (dist): Depend on stamp-checks.
831         Portability updates for OS/2.
832         * src/Makefile.in (EXEEXT, OBJEXT): Define.
833         (LINK): Use CFLAGS.
834         (.c.obj): Define.
835         * lib/Makefile.in (OBJEXT): Define.
836         (.c.obj): Define.
837         * doc/Makefile.in (install, uninstall): Install info files into
838         the dir listing.
839         Reported by Andreas Buening.
841 2006-05-09  Eric Blake  <ebb9@byu.net>
843         * install-sh: Update to newer upstream version.
844         * mkinstalldirs: Likewise.
845         Reported by Andreas Buening.
847         * src/m4.c (main): Bump copyright year.
848         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
849         * doc/Makefile.in (datarootdir): Likewise.
851 2006-05-08  Eric Blake  <ebb9@byu.net>
853         * THANKS: Update.
854         * doc/m4.texinfo (Bugs): Backport bug email address from head.
855         Reported by Stepan Kasal.
857 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
859         * input.c (match_input): Do not pass expression with side effect
860         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
861         * NEWS: Updated.
863 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
865         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
866         Reported by Damian Menscher.
868 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
870         * configure.ac (AC_INIT): Bump to 1.4.4a.
872 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
874         Release 1.4.4:
876         * configure.ac (AC_INIT): Bump to 1.4.4.
877         * NEWS: Describe 1.4.4's changes.
878         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
880 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
882         * src/m4.c: fix return code when non-existent files are processed
884 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
886         * README: update email address for bug reports.
888 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
890         * doc/m4.info: Generated files are not kept in the repository.
892 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
894         The FSF are moving offices today.  Changed their contact address
895         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
896         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
898         Also, some of the files here were never updated from the previous
899         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
900         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
902 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
904         * Makefile.in (bindir, infodir): Substitute from configure rather
905         than hardcode.
906         * doc/Makefile.in (infodir): Ditto.
907         * src/Makefile.in (bindir): Ditto.
908         * NEWS: Updated.
910 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
912         Changes needed to automate the release process for 1.4.3:
914         * Makefile.in (dist): Make .tar.bz2 tarball too.
915         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
916         (cvs-news): Look 1 line further down for NEWS release number.
917         (cvs-dist): We don't use automake, so make dist is fine.
918         Remove double . before suffixes.
919         (cvs-release): Don't mention manual.html.
920         (fetch): Get latest gendocs files.
921         (web-manual): Rewritten to use gendoc for multiformat manuals.
922         * doc/gendocs.sh: Don't save an old version in m4 CVS!
923         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
924         preserving, but case insensitive, so generating html docs per node
925         clashes between Index.html, the node file, and index.html, the
926         top-level of the document tree...
927         (Index macro): ...so renamed to this.  Changed all references.
929 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
931         * configure.ac (AC_INIT): Bump to 1.4.3a.
933 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
935         Release 1.4.3:
937         * configure.in (AC_INIT): Bump to 1.4.3.
938         * NEWS: Describe 1.4.3's changes.
940 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
942         * Makefile.maint: New file with release rules, from CVS libtool.
943         * Makefile.in (DISTFILES): Add Makefile.maint.
944         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
945         canonical versions.
947 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
949         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
950         checks/47.patsubst, with a redundant @comment to prevent emacs
951         from removing it accidentally again.
952         * checks/get-them: Allow for trailing spaces tucked behind
953         @comment marks.
955 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
957         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
958         * src/Makefile.in (install, uninstall): Likewise.
960 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
962         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
963         on Cygwin.
964         Reported by Eric Blake.
966 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
968         * lib/regex.c, lib/regex.h: Updated from gnulib.
969         * src/input.c (set_word_regexp):  Don't change the word_regexp
970         unless it compiles correctly.
971         * NEWS: Updated.
972         Reported by Frank Schwidom.
974         * Makefile.in (stamp-h): Regenerate config.h properly.
976 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
978         * configure.ac (AC_DEFINE): Fix overquoting of description
979         argument.
981         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
982         recognition macros.
983         * src/freeze.c (produce_frozen_state): Use \n line-endings even
984         on Windows, so that the frozen file reader will work.
985         Reported by Josef T. Burger.
987         * src/m4.c (main): Modernise the --version output.
989 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
991         Modernise the configury a little to prevent spurious errors from
992         Autoconf-2.59's autoreconf:
994         * config.h.in: Renamed to...
995         * config-h.in: ...this to better support DOS 8.3 file systems.
996         * acconfig.h: Removed.
997         * configure.in: Renamed to...
998         * configure.ac: ...this, and AC_DEFINE used to declare config.h
999         entry comments.  Slight reorganisation and reformatting.
1000         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
1001         entry comments.
1002         (AC_INIT): Use a modern 3 argument call.
1003         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1004         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
1005         s/PRODUCT/PACKAGE/g.
1006         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
1007         config.h.in.  Added configure.ac, config-h.in.
1008         (stamp-h.in): Removed acconfig.h from dependencies.
1009         (configure): Depends on configure.ac, not configure.in.
1010         * doc/Makefile.in (stamp-vti): Ditto.
1011         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
1012         difference between PRODUCT="m4" and PACKAGE="GNU M4".
1013         * configure: Regenerated.
1015 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
1017         * src/output.c (mkstemp): Make non-static, and build regardless of
1018         HAVE_TMPFILE; src/builtin.c also needs this replacement.
1019         * NEWS: Update.
1021 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
1023         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
1024         changes from your editor buffer first.
1026         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
1027         * src/m4.c: And include them as appropriate.
1028         * NEWS: Updated.
1030 2004-09-09  Andreas Schwab  <schwab@suse.de>
1032         Refactoring of the string read case in next_char provides about a
1033         20% speedup of M4 as typically used by autoconf:
1035         * src/input.c (next_char_1): Renamed from next_char.
1036         (next_char): New macro.
1037         * NEWS: Updated.
1039 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
1041         * configure.in (VERSION): Bump to 1.4.2a.
1043 2004-08-19  Paul Eggert  <eggert@twinsun.com>
1045         * Release 1.4.2.
1047         * configure.in (VERSION): Bump to 1.4.2.
1048         * News: Describe 1.4.2's changes.
1050         * src/m4.c (reference_error): Preserve errno, since M4ERROR
1051         relies on this.
1052         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
1053         (m4_maketemp): Clear errno before calling mkstemp.
1054         * src/path.c (path_search): Don't let "free" trash errno when
1055         returning NULL.
1056         * src/output.c (insert_file): Don't assume errno has a valid
1057         value simply because fread returns zero.  This fixes a
1058         portability bug reported by Marion Hakanson in
1059         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
1061 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
1063         * configure.in (VERSION): Bump to 1.4.1a.
1064         * NEWS: Place holder for next stable release.
1066 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
1068         * Release 1.4.1.
1070         * configure.in (VERSION): Bump to 1.4.1.
1071         * NEWS: Describe 1.4.1's changes.
1073         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
1074         pacify Autoconf 2.59.
1076         * doc/m4.texinfo: Insert commas after @xref's that lack them,
1077         to pacify Texinfo 4.7.
1078         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
1080         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
1081         pacify Sun C compilers.
1083 2003-09-28  Akim Demaille  <akim@epita.fr>
1085         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
1086         botch.
1088 2003-09-03  Santiago Vila  <sanvila@debian.org>
1090         * examples/stackovf.sh: Use tempfile if available.
1092 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
1094         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
1095         * src/output.c (m4_insert_file): Do not mix buffered and
1096         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
1098 2001-02-01  Santiago Vila  <sanvila@debian.org>
1100         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
1101         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
1103 2001-02-01  Matt Kraai  <kraai@debian.org>
1105         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
1106         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
1107         empty file rather than to a nonexistent file.  This closes a common
1108         security hole.
1109         * src/builtin.c (m4_maketemp): Implement the above, by using
1110         mkstemp rather than mktemp.  (trivial change)
1112 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
1114         * src/builtin.c (expand_ranges): Added break after trailing dash.
1115         This caused misbehaviors on some systems.
1117 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
1119         * Release 1.4.
1121         * doc/Makefile.in (realclean): Also remove stamp-vti.
1122         Reported by Eric Backus.
1124 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
1126         * src/freeze.c (produce_frozen_state): If the frozen file cannot
1127         be opened, return immediately after producing the error message.
1128         Reported by Andreas Schwab.
1130         * configure.in: Check for const only after having found possible
1131         ANSIfying compiler flags, this is of no use to check it before.
1132         Reported by Alexander Lehmann.
1134 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
1136         * src/macro.c (collect_arguments): Cast obstack arguments to
1137         (voidstar), so avoiding compiler warnings.
1138         Reported by Joseph E. Sacco.
1140         * src/freeze.c (produce_frozen_state): Cast printed lengths to
1141         (int) so they correspond to %d format items.
1142         Reported by Joseph E. Sacco.
1144         * src/m4.c (main): Cast the argument to xfree to (voidstar).
1145         * src/symtab.c (free_symbol): Idem.
1146         Reported by Karl Vogel.
1148 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
1150         * Makefile.in (DISTFILES): Distribute BACKLOG.
1152         * configure.in: Define PRODUCT and VERSION.
1153         * acconfig.h: Document PRODUCT and VERSION.
1154         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
1155         constant string m4 and variable or parameter named version.
1157 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
1159         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
1160         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
1161         defines __STDC__ to 0, for indicating it is *not* ANSI!
1162         Reported by Kaveh R. Ghazi.
1164         * configure.in: Added obsolescent tests for AIX and Minix.
1166         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
1167         which texclean does not exist anymore.
1168         Reported by Eric Backus, Jim Meyering, John David Anglin and
1169         Joseph E. Sacco.
1171 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
1173         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
1174         Reported by John David Anglin.
1176         * src/ansi2knr.c: New version, sent by Peter Deutsch.
1177         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
1178         ANSI2KNR, depending on the fact the compiler is ANSI or not.
1179         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
1180         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
1181         of $U, put underline in extensions rather than in basenames.  Use
1182         implicit rules, now that regularity makes this possible.
1183         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
1184         of ansi2knr whenever it is needed.
1185         * configure.in: Adjusted for correct STACKOVF substitution.
1186         * src/debug.c (trace_format): When not __STDC__, use (...) as a
1187         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
1188         Reported by David MacKenzie.
1190         * Makefile.in: Remove binprefix.  Use transform_name instead.
1191         Reported by David MacKenzie.
1193         * doc/Makefile.in: Create version.texi, use it, clean it.
1194         Reported by Jim Meyering.
1196 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
1198         * Makefile.in (all, install, uninstall): Depend on Makefile.
1200         * Makefile.in: For actions invoking $(MAKE) from within compound
1201         sh statements, exit non-zero if the sub-make fails.  Otherwise,
1202         the top-level make may exit successfully when it should fail.
1203         Reported by Jim Kingdon.
1205         * {,/*}Makefile.in: Use && after all cd, in case they fail.
1207         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
1208         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
1209         * configure.in: Substitute PRODUCT and VERSION.
1211         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
1213 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
1215         * Makefile.in (mostlyclean-local): Do not remove *~.
1216         * */Makefile.in (mostlyclean): Idem.
1217         Reported by Robert E. Brown and Richard Stallman.
1219 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
1221         * src/m4.h: Get rid of CONFIG_BROKETS.
1223 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
1225         * configure.in: Use AC_ARG_PROGRAM.
1226         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
1227         Reported by David MacKenzie.
1229 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
1231         * configure.in: Do not add -O to CFLAGS for GNU C, now that
1232         configure does it automatically.
1233         Reported by Jim Meyering.
1235 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
1237         * src/stackovf.c: Declare the handler_t typedef earlier in the
1238         code, use it for stackovf_handler.
1239         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
1240         casting sigsegv_handler.
1241         Reported by Robert Bernstein.
1243         * src/m4.c (main): Initialize program_name to argv[0] without
1244         basename'ing it.
1245         Reported by Karl Berry.
1247 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
1249         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
1250         Reported by Karl Berry.
1252 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
1254         * lib/Makefile.in (mostlyclean): Added.
1255         (TAGS): Make in $(srcdir).
1257         * configure.in: Use `choke me' in test, like everywhere!
1259         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
1260         unreacheable and useless.
1262         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
1264         * lib/Makefile.in (DISTFILES): Distribute TAGS.
1265         (distclean): Do not remove TAGS.
1266         (realclean): Remove it.
1267         * Makefile.in: Make TAGS in lib also, not just in src.
1268         Reported by Karl Berry.
1270         * Makefile.in (distclean, realclean): Instead of recursively
1271         calling $(MAKE) for the -local part, allow parallel execution of
1272         -recursive and -local, only delay the removal of config.status,
1273         which is repeated in both goals.
1275 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
1277         * Release 1.3.
1279         * Makefile.in: Group all *clean-recursive goals in one, using sed
1280         to remove `-recursive' while calling make recursively.  Also, use
1281         a subshell for each recursive $(MAKE).
1282         Reported by Jim Meyering.
1284         * src/m4.h (memcpy): Define with bcopy for BSD systems.
1285         Reported by Kaveh R. Ghazi.
1287         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
1288         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
1289         specify it.
1291         * configure.in: Use date instead of touch for stamp-h.
1292         * Makefile.in (stamp-h.in): Idem.
1294         * Makefile.in (distclean, realclean): Force serial execution of
1295         both goals, in case parallel makes are being used.
1296         Reported by Jim Meyering.
1298         * src/Makefile.in (DISTFILES): Distribute TAGS.
1299         (distclean): Do not remove TAGS.
1300         (realclean): Remove it.
1301         Reported by Karl Berry.
1303 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
1305         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
1306         to old names, for following Autoconf.
1308 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
1310         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
1311         ./install.sh will not be correctly referred to in sub-Makefiles.
1312         Reported by John David Anglin.
1314         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
1315         Reported by Eric Backus.
1317         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1318         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
1319         config.status into remaking this directory's Makefile only.
1320         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
1321         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
1322         Reported by Jim Meyering.
1324 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
1326         * configure.in: Correct stack overflow detection logic, taking
1327         care of systems having only incomplete implementations (like for
1328         Pyramid 9820 OSx 5.0d).
1329         Reported by Kaveh R. Ghazi.
1331         * src/Makefile.in (TAGS): Remote -t from etags call.
1333 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
1335         * lib/Makefile.in (install): Depend on all.
1337 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
1339         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
1340         Reported by Jim Meyering and John David Anglin.
1342         * Makefile.in (distclean-local): Delete config.log.
1343         Reported by Jim Meyering.
1345         Solidify frozen files with respect to -P:
1346         * src/m4.c: Have -P set prefix_all_buitins variable instead of
1347         calling a function by that name.  Declare the variable.
1348         * src/m4.h: Adjust declaration for prefix_all_buitins.
1349         * src/builtin.c (builtin_init): Merge in functionality from
1350         previous prefix_all_buitins function, while making entries in the
1351         symbol table, but not modifying the builtin description itself.
1353         * src/freeze.c (reload_frozen_state): Add a useless `break;',
1354         because *many* compilers do not accept an empty `default:'.
1355         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
1356         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
1358         * configure.in: Use AC_TYPE_SIGNAL.
1359         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
1360         Reported by Robert Bernstein.
1362         * checks/Makefile.in (check): Modify PATH so check-them will find
1363         m4 in the src directory.
1364         * Makefile.in (check): Don't.
1365         Reported by Akiko Matsushita and Jim Meyering.
1367         * src/output.c (make_room_for, output_character_helper): New
1368         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
1369         a per buffer MAXIMUM_BUFFER_SIZE.
1371         * src/output.c (output_text): New function, for optimizing the
1372         output of strings of characters.  Use it.
1374 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
1376         * doc, src: New directories reorganizing the distribution.
1377         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
1378         files.
1379         * Makefile.in: Adjusted.
1380         * configure.in: Configure new Makefiles.
1382         * m4.h: Declare STRING typedef.  Use it for comment and quote
1383         strings, adjusting all references.  (This is the rudiments of a
1384         beginning for the eventual withdrawal of NUL terminated strings.)
1385         * output.c (shipout_text): Accept a length parameter, and use it.
1386         All callers adjusted.
1388 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
1390         * m4.h: Include <unistd.h> if it exists.
1391         * stackovf.c: Don't.
1393         Clean up for current_diversion variable:
1394         * output.c: Move current_diversion from builtin.c.
1395         * m4.h: Declare current_diversion so builtin.c can access it.
1396         * output.c (output_init, make_diversion): Initialize or update
1397         current_diversion.
1398         * builtin.c (builtin_init, m4_divert): Leave current_diversion
1399         alone.
1401         Remove limit on number of diversions:
1402         * output.c: Replace ndiversion by diversions, declare it.
1403         (output_init): Allocate only diversion 0.
1404         (make_diversion): Allocate new diversions as needed.
1405         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
1406         * m4.c: Still accept -N, but do nothing with it.
1407         Reported by David MacKenzie.
1409         Freeze diversions:
1410         * output.c (freeze_diversions): New function.
1411         * m4.h: Declare freeze_diversions.
1412         * freeze.c: Document frozen file format, revise it, call
1413         freeze_diversions to add diversions to frozen format, and code to
1414         reload them properly.
1415         * m4.c: Do not undivert automatically at end when status being
1416         frozen.  Do not call builtin_init when reloading frozen state.
1418         Speed up diversion processing:
1419         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
1420         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
1421         structure and variables, cached variables out of output_diversion,
1422         reallocate_diversion_for and OUTPUT_CHARACTER.
1423         (shipout_text, make_diversion, insert_diversion): Adapted to new
1424         structures.
1425         (insert_file): Use better buffering.
1426         Reported by David MacKenzie.
1428 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
1430         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
1431         dist works from another build directory.
1433 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
1435         * symtab.c (hack_all_symbols): Use hash_table_size instead of
1436         constant HASHMAX, for -H option to work better.
1438         * builtin.c (DECLARE): Simplify by using _ ().
1440         * freeze.c: New file.
1441         * Makefile.in: Compile it, distribute it.
1442         * m4.c: Recognize, document and process --freeze-state (-F) and
1443         --reload-state (-R) options.  Pass a true flag to builtin_init
1444         only if no reloading some state.
1445         * builtin.c (define_builtin): Remove static specifier.
1446         (find_builtin_by_name): Remove static specifier.
1447         (builtin_init): Accept and obey a flag argument.
1448         * m4.h: Add declarations for freeze.c, changes for builtin.c.
1450 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
1452         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
1453         specifier.
1455         * configure.in: Implement --with-dmalloc.
1456         * acconfig.h: Document WITH_DMALLOC.
1457         * m4.h: Add code for when WITH_DMALLOC.
1459 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
1461         * m4.c (long_options): Use "error-output", the dash was missing.
1462         Reported by Akiko Matsushita.
1464 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
1466         * m4.h: Include <sys/types.h>.
1467         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
1468         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
1469         int.
1470         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
1471         as size_t, not int.
1472         * builtin.c (dump_args): Declare len as size_t, not int.
1474         * debug.c: Prototype the forward declaration of debug_set_file.
1476         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
1477         shadowing of this variable.
1478         * output.c (insert_diversion): Idem.
1480         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
1481         (input_init): Duplicate default quote and comment strings.
1482         (set_quotes): Free previous quote strings in all cases.  Duplicate
1483         even default quote strings.
1484         (set_comment): Free previous comment strings in all cases.
1485         Duplicate even default comment strings.
1487         * configure.in: Updated for Autoconf 2.0.
1488         * Makefile.in (distclean-local): Also delete config.cache.
1490         * m4.c (usage): Reorganize the --help output by topic.  Include a
1491         description for debugging flags.
1493 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
1495         * configure.in: If sigaction is available and SA_ONSTACK defined,
1496         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
1497         defined, use sigvec.  Else don't compile stackovf.c.
1498         * stackovf.c (setup_stackovf_trap): Idem.
1499         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
1500         and Simon Leinen.
1502 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
1504         * m4.c (usage): Replace printf par fputs.
1506 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
1508         * Release 1.2
1510 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
1512         * configure.in: Check for sigaction and sigvec.  Add a new delayed
1513         check for RLIMIT_STACK, combine in the checking for getrlimit.
1514         All those things are not universally available.
1515         * stackovf.c: Split setting up the trap handler and catching
1516         signals, for better taking care of various configure outcomes.
1517         * examples/stackovf.sh: Correct a typo.
1518         Reported by Eric Backus, Jim Avera and Jim Meyering.
1520 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
1522         * ansi2knr.c: New version sent by its author, Peter Deutsch.
1524 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
1526         * Makefile.in: Modify so parallel make will not try making
1527         lib/libm4.a twice simultaneously.
1528         Reported by Jim Meyering.
1530 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
1532         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
1533         error message, for when no code possibility exists.  Even if this
1534         line is completely #ifdef'ed out, it brings a syntax error.
1535         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
1537         * Makefile.in (install): Have install depend on all too, for lib
1538         to be remade as needed.
1540         * examples/stackovf.sh: Try ksh, bsh and bash for shells
1541         providing ulimit, instead of using only ksh.
1542         Reported by Jim Avera and Joseph E. Sacco.
1544 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
1546         * Makefile.in (check): Have it depend on all instead of m4.  In
1547         this way, a change in lib will be detected and processed.
1549         * builtin.c (numeric_arg): Use strtol and verify the conversion,
1550         instead of using sscanf which stops as soon as there is a
1551         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
1552         and divert(1xyzzy) were all accepted without any warning or error
1553         messages.
1554         * m4.h: Declare strtol as long if not including stdlib.h.
1555         * configure.in: Check for limits.h, and replace strtol if missing.
1556         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
1557         * lib/strtol.c: New file, from elsewhere.
1558         Reported by Andreas Schwab.
1560 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
1562         * macro.c (expand_macro): Cast value to (boolean) prior to
1563         assigning it to traced.
1564         Reported by Tom McConnell.
1566         * Makefile.in (m4): Always make all in lib first.
1567         Reported by Jim Meyering.
1569 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
1571         * stackovf.c: Isolated OS-dependent sections; Improved portability,
1572         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
1573         handlers), and a default error message if the fault address is not
1574         available (when neither siginfo.h nor BSD sigcontext are supported).
1575         * configure.in: Changes for stackovf.h: Check for sigcontext,
1576         sigaction, sigstack, and define rlim_t as int if necessary.
1577         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
1578         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
1579         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
1581 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
1583         * configure.in: Use AC_SET_MAKE.
1584         * Makefile.in: Use @SET_MAKE@.
1585         Reported by Jim Meyering.
1587         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
1588         Reported by Ian Taylor.
1590 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
1592         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
1593         because siginfo.h is unrelated to standard headers, and siginfo.h
1594         is already checked for.
1595         Reported by Joseph E. Sacco.
1597         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
1598         PROTOTYPES.
1599         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
1600         AC_PROTOTYPES.
1602 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
1604         * builtin.c (substitute): Use \& to represent this part of the
1605         string which was matched by the whole regexp, instead of
1606         representing the whole string.  Any usage of \0 issues a warning
1607         and acts like \&, it will disappear in some subsequent release.
1609 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
1611         * m4.c: Complete prototype for forwarded declaration of usage.
1613         * input.c (init_macro_token): Correct own reference in error
1614         message.  Previous name get_macro_func was referred to instead.
1615         (next_char):  Correct own reference in error message.  Previous
1616         name advance_input was referred to instead.
1618         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
1619         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
1620         and_term, not_term, logical_not_term, cmp_term, shift_term,
1621         add_term, mult_term, exp_term, unary_term, simple_term): Add
1622         prototype to forwarded declarations.  Declare parameter v1 as
1623         eval_t * instead of int *.  Same for local variable v2 in dyadic
1624         functions.  Same for result in exp_term.
1625         * builtin.c (m4_eval): Declare value as eval_t instead of int.
1626         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
1627         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
1628         (shipout_int): Cast first argument of ntoa to eval_t.
1629         Reported by Thorsten Ohl.
1631         * macro.c: Complete the prototypes of forwarded expand_macro and
1632         expand_token.
1633         Reported by Thorsten Ohl.
1635         * m4.h: Define voidstar as void * or char * depending on __STDC__.
1636         The Ultrix 3.1 compiler cannot do much with void pointers.
1638         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
1639         * m4.c (xfree):  Replace void * by voidstar.
1640         Reported by Tom McConnell.
1642         * ansi2knr.1: New, from elsewhere.
1643         * Makefile.in (DISTFILES): Distribute ansi2knr.1
1645         * Makefile.in (stamp-h.in): Avoid running ./config.status if
1646         stamp-h does not exist yet.  This avoids running it a second time
1647         just after the initial ./configure.
1648         Reported by David MacKenzie and Tom McConnell.
1650         * m4.h: Replace the enum debug_info declaration with a series of
1651         #define's.  The Ultrix 3.1 compiler would otherwise need casting
1652         (int) to most references, when used in expressions.
1653         Reported by Tom McConnell.
1655 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
1657         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
1658         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
1659         calls the compiler.  Previously, FP_PROTOTYPES was only calling
1660         the preprocessor; by not being subject to CFLAGS, this was
1661         discouraging those flags asking for ANSI compilation.
1662         * acconfig.h: Document HAVE_PROTOTYPES.
1663         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
1664         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
1665         Reported by Eric Backus.
1667         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
1668         from the environment.  Default CFLAGS to -g if not set.
1669         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
1670         * lib/Makefile.in: Have CFLAGS substituted from configure.
1671         Reported by Eric Backus and Tom McConnell.
1673         * configure.in: m4_undefine changeword before using AC_ENABLE.
1675         * m4.h: Declare prototypes for error (for ANSI compilers only),
1676         prefix_all_builtins and reference_error.
1677         Reported by Tom McConnell.
1679         * input.c (set_word_regexp): Do not try to initialize the array
1680         test from a string, this does not work with non-ANSI compilers.
1681         Reported by Eric Backus.
1683         * Makefile.in (dist): Clean examples/ before saving it.
1684         (distclean-local): Also remove stamp-h.
1685         Reported by Eric Backus.
1687         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
1688         non ANSI compilers.
1689         Reported by Tom McConnell.
1691         * checks/Makefile.in (clean): Depends on mostlyclean.
1692         (mostlyclean): New goal.
1694 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
1696         * Makefile.in (DISTFILES): Distribute install.sh.
1697         * install.sh: New file, copied from elsewhere.
1698         Reported by Assar Westerlund and Kaveh R. Ghazi.
1700 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
1702         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
1703         * acconfig.h: Explain ENABLE_CHANGEWORD.
1705         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
1706         from code provided by Pete Chown]
1707         * m4.h: Add original_text field to u_t variant of union u.
1708         Declare TOKEN_DATA_FUNC macro.
1709         * builtin.c: Declare changeword.
1710         (m4_changeword): New function.
1711         * input.c: Include "regex.h", define variables with word regexps.
1712         (input_init): Initialize the word regexp.
1713         (set_word_regexp): New.
1714         (next_token): Declare local variables, use the previous code if
1715         default_word_regexp is true.  Else, match using a new code.  Save
1716         the original text.
1717         * macro.c (expand_token): Ship out original text if not a macro
1718         name.
1719         Reported by Krste Asanovic and Pete Chown.
1721         [These modifs all depend upon ENABLE_CHANGEWORD]
1722         * m4.h: Declare external user_word_regexp.
1723         * m4.c: Declare user_word_regexp, and initialize it from
1724         --word-regexp or -W, or NULL if not specified.
1725         * input.c: Use user_word_regexp if specified, instead of
1726         DEFAULT_WORD_REGEXP.
1728         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
1729         agree with it.
1731         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
1732         * checks/Makefile.in: Empty the suffix list.
1733         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
1735         * m4.c: Declare nesting_limit and initialize it to 250.
1736         Implement -LNUMBER or --nesting-limit=NUMBER to change its
1737         value.
1738         * m4.h: Declare nesting_limit as external.
1739         * macro.c (expand_macro): Stop execution whenever nesting limit
1740         is exceeded.
1741         Reported by Bengt Mertensson.
1743         * eval.c (evaluate): Diagnose excess characters in eval input.
1744         Things like `eval(08)' used to return 0 with no diagnostic.
1746         * m4.h: Capitalize first letter of all macro arguments in
1747         definitions.
1749         * m4.c: Declare warning_status, initialize it to 0.  Add new
1750         option -E, or --fatal-warnings, which sets warning_status to
1751         EXIT_FAILURE instead.
1752         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
1753         EXIT_FAILURE if not otherwise done by header files.
1754         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
1755         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
1756         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
1757         argument of all M4ERROR calls.
1758         Reported by Noah Friedman.
1760         * examples/incl-test.m4: Renamed from incl_test.m4.
1761         * examples/include.m4: Include incl-test.m4 instead of
1762         incl_test.m4.
1763         * examples/multiquotes.m4: Renamed from multi-quotes.m.
1765 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
1767         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
1768         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
1769         also tested it on a Sun Sparc workstation running SunOS 4.x.
1771         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
1772         49.format check, abusing a `union values' argument with sprintf
1773         without selecting the proper field.  Now, save the formatting type
1774         first, delaying the fetch of the corresponding argument.
1775         Reported by Joseph E. Sacco and Tom Quinn.
1777         * format.c (format): Remove const from char *fmt declaration when
1778         not HAVE_EFGCVT, because a NUL may be forced into it.
1780         * m4.h: Declare atof() when not STDC_HEADERS.
1781         Reported by Joseph E. Sacco.
1783         * Regenerate configure using Autoconf 1.11, this corrects a
1784         problem about an incorrect cpp seting on NeXT 3.1.
1785         Reported by Alexander Lehmann.
1787 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
1789         * m4.h (_): Change argument from `x' to `Args'.
1791 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
1793         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
1794         bringing more evil than good on a few systems.
1795         Reported by Greg A. Woods.
1797 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
1799         * m4.h: Rename Args() to _().
1800         * m4.h: Remove extern specifier from all function declarations.
1802 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
1804         * stackovf.c: New file implementing stack-overflow detection.
1805         * configure.in: Check for getrlimit, sigaction.  If all of
1806         standard headers, getrlimit and sigaction, define USE_STACKOVF and
1807         substitute ${U}stackovf.o for STACKOVF.
1808         * acconfig.h: Declare USE_STACKOVF.
1809         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
1810         * m4.h: Declare setup_stackovf_trap().
1811         * m4.c: Call setup_stackovf_trap().
1812         * tests/stackovf_test.sh: New file.
1814 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
1816         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
1818         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
1820 Sun Jan 30 14:24:19 1994    (pinard at icule)
1822         * m4.h: Remove definition of volatile, not used anymore.
1823         Reported by Jim Meyering and Joseph E. Sacco.
1825         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
1826         of `if ... else /* nothing */' for if macros.
1827         Reported by Jim Meyering.
1829         * builtin.c (m4_regexp): Reorganize the code for avoiding a
1830         warning from gcc about `repl' possibly used before defined.
1831         Reported by Jim Meyering.
1833         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
1834         Reported by Jim Meyering.
1836 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
1838         * m4.h: Move the conditional definition of volatile after the
1839         inclusion of system files, because they may define it first.
1841 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
1843         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
1844         get around a problem with Alpha make seeing a syntax error, there.
1845         Reported by Vern Paxson.
1847 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
1849         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
1850         Reported by Richard Stallman.
1852 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
1854         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
1855         instead of AC_HAVE_FUNCS.
1856         Reported by Noah Friedman.
1858 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
1860         * m4.c: Initialize show_help and show_version to zero.
1862         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
1863         Use them in exit() and usage() calls.
1865 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
1867         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
1868         syserr() macro.  Delete errref, add reference_error and M4ERROR.
1869         * m4.c: Replace errref, which was returning an input reference
1870         string, with reference_error, which prints it on standard error.
1871         * builtin.c, output.c: Use errno as second parameter to error,
1872         instead of using syserr() with %s.
1873         * *.c: Use M4ERROR instead of error: no more errref() with %s.
1874         Doing so, the program name appears after the input reference
1875         instead of before, which eases M-x next-error processing.
1877 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
1879         * checks/get-them: Escape braces with backslashes in patterns,
1880         because HPUX-9.01 awk needs this.
1881         Reported by Jim Meyering.
1883 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
1885         * builtin.c: Declare "FILE *popen ();".
1887         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
1888         macros, replace error_message_prefix() declaration by errref()'s.
1889         Declare xrealloc, for use in errref().
1890         * m4.c: Delete error_message_prefix() function, add errref().
1891         * *.c: Use error() systematically in place of all error macros,
1892         now that error() flushes stdout first.  Make needed adjustments.
1894         * m4.h: Remove const in sys_errlist[] declaration, it creates
1895         conflicts on SGI and Alpha.
1896         Reported by Kaveh R. Ghazi.
1898 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
1900         * m4.c: Include <getopt.h> instead of "getopt.h".
1902         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
1903         * acconfig.h: New, for documenting HAVE_EFGCVT.
1904         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
1905         use them wherever appropriate.  Also use -I. for compilations.
1906         * lib/Makefile.in: Use -I.. for compilations.
1907         * *.c: Include <config.h> or "config.h".
1909         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
1910         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
1912 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
1914         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
1916         * input.c (input_init): Initialize quote and comment strings
1917         explicitely instead of calling set_quotes and set_comment: by
1918         doing so, we ensure we do not free uninitialized variables.
1920         * checks/check-them: Reverse arguments to both diff, so the
1921         expected is on the left and the obtained on the right.
1923         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
1924         macros. Delete declarations for m4error, warning, fatal and
1925         internal_error, add declaration for error_message_prefix.
1926         * m4.c:  Delete m4error, warning, fatal and internal_error
1927         routines, add error_message_prefix routine.
1928         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
1929         warning with WARNING*, fatal with FATAL* and internal_error with
1930         INTERNAL_ERROR*.
1931         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
1932         this is not needed anymore.
1934         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
1935         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
1936         and debug_message, add declaration for debug_message_prefix.
1937         * debug.c: Remove static specifier for FILE *debug declaration.
1938         Delete debug_print and debug_message routines, add
1939         debug_message_prefix routine.
1940         * builtin.c, debug.c: Replace debug_print routine calls with
1941         DEBUG_PRINT* macro calls.
1942         * input.c, path.c: Replace debug_message routine calls with
1943         DEBUG_MESSAGE* macro calls.
1945         * m4.h: Remove inclusion of <varargs.h>.
1946         * debug.c: Include <stdarg.h> or <varargs.h>.
1947         (trace_format): Use stdarg instead of varargs if __STDC__.
1949         * configure.in: Remove checks for vfprintf and _doprnt.  These
1950         implementations use varargs tricks which are not portable enough.
1951         * lib/vfprintf.c: Deleted.
1952         * lib/_doprnt.c: Deleted.
1953         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
1954         Reported by Joel Sherrill.
1956         * path.c (add_include_directory): Use xstrdup.
1958         * builtin.c (find_builtin_by_name): Declare static.
1960         * *.[ch]: Add const to a few "char *" declarations.
1962         * configure.in: Remove commented tests for fileno() and fstat().
1963         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
1965         * debug.c (debug_flush_files): New.
1966         * m4.h: Declares it.
1967         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
1968         Reported by Nicolas Pioch.
1970 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
1972         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
1973         Reported by Joel Sherrill.
1975         * builtin.c (prefix_all_builtins): Instead of the table size, use
1976         the null entry at end for stopping the loop.  It was overwritten.
1977         Reported by Andreas Schwab and Jim Meyering.
1979         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
1980         Reported by Kaveh R. Ghazi.
1982         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
1983         Reported by Karl Vogel.
1985 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
1987         * m4.h: Do not define volatile if already defined.
1988         Reported by Rene' Seindal.
1990         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
1992         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
1993         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
1995 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
1997         * m4.h: Define strchr and strrchr in terms of index and rindex,
1998         instead of the other way around.
1999         * builtin.c, m4.c, path.c: Use strchr instead of index.
2001         * input.c (next_char): Remove a "break;" after a "return ...;".
2002         Reported by Tom McConnell.
2004 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
2006         * Release 1.1
2008         * configure.in: Do not copy check files in the build hierarchy.
2009         * checks/check-them: Identify the m4 version being checked.  For
2010         finding m4, look in $PATH instead of in the parent directory.
2011         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
2012         * checks/Makefile.in (.all-stamp): Always create check files in
2013         the source hierarchy, not anymore in the build hierarchy.
2014         (check): cd to the source hierarchy before performing checks.
2015         Do not copy nor clean COPYING anymore, take it from `..'.
2016         Reported by Tom McConnell.
2018         * Makefile.in (Makefile): Use $(SHELL).
2019         (config.status): Use $(SHELL).  Use "config.status --recheck"
2020         instead of "configure --no-create", which is obsolete.
2021         Reported by Tom McConnell.
2023 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
2025         * m4.c (usage): Use "%s" instead of "m4" in format string.
2026         Reported by Jim Meyering.
2028         * Makefile.in: Distribute mkinstalldirs.
2029         Reported by Pierre Gaumond.
2030         Reported by Jim Meyering.
2031         Reported by Tom McConnell.
2032         Reported by Andreas Gustafsson.
2034         * checks/check-them: Renamed from checks/check_them.
2035         * checks/get-them: Renamed from checks/get_them.
2036         * checks/.all-stamp: Renamed from checks/.all_stamp.
2037         * checks/Makefile.in: Changed accordingly.
2038         Reported by Jim Meyering.
2040 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
2042         * lib/Makefile.in (dist): Correct permissions on files.
2044         * output.c: Declare tmpfile, some systems don't.
2046 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
2048         * checks/Makefile.in (dist): Correct permissions on files.
2050         * Makefile.in (dist): Ensure recursive linking for subdirectory
2051         `examples', also set read/write permissions on all its files.
2053         * mkinstalldirs: New, from elsewhere.
2054         * Makefile.in: Use it.
2056         * debug.c: Synchronize debug messages and regular output when
2057         the debug file and stdout are redirected to the same file.
2058         * configure.in: Add (commented) checks for fileno and fstat.
2059         Reported by Jim Avera.
2061         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
2062         etc., arguments, then ignore the superfluous one.  m4 used to
2063         diagnose missing arguments and return the empty string.
2064         Reported by Nick S. Kanakakorn.
2066 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
2068         * m4.c (main): At end of all input, ensure all undiverted text
2069         goes to the main output stream.
2070         Reported by Andreas Gustafsson.
2072         * m4.c (main): exit (0), instead of return 0.
2074         * m4.c: Implement -P and --prefix-builtins.
2075         * builtin.c: Delete const specifier on builtin_tab.
2076         (prefix_all_builtins): New.
2077         Reported by Noah Friedman.
2078         Reported by Scott Bartram.
2080         * c-boxes.el: New, from elsewhere.
2081         * Makefile.in: Distribute it.
2083         * m4.h: Do not define bcopy if <string.h> defines it.
2084         Reported by Stephen Perkins.
2086         * builtin.c (define_macro): Allow a missing second argument, in
2087         which case it is implied empty.  Affects define and pushdef.
2088         Reported by Eric Allman.
2090 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
2092         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
2093         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
2094         * builtin.c: Initialize all the blindness fields in builtin_tab.
2095         (define_builtin): Copy the blindness of a builtin into its symbol.
2096         * macro.c (expand_token): Avoid processing a blind builtin if the
2097         next character is not an opening parenthesis.
2098         Reported by David MacKenzie.
2099         Reported by Noah Friedman.
2101         * configure.in: Ensure an exit status of 0 on completion.
2102         Reported by Vivek P. Singhal.
2104         * eval.c (eval_lex): Admit both lower and upper case letters for
2105         bases greater than 10.  Only lower case letters were accepted.
2107         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
2108         Reported by Krste Asanovic.
2110         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
2111         * eval.c (logical_not_term): New name for not_term.
2112         * eval.c (xor_term): New, between or_term and and_term.
2113         * eval.c (not_term): New, between and_term and logical_not_term.
2114         * eval.c (shift_term): New, between cmp_term and add_term.
2115         Reported by Krste Asanovic: ~, ^, <<, >>.
2116         Reported by Ben A. Mesander: ** vs ^.
2118         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
2119         * m4.h: Delete xrealloc.c.
2120         * lib/xmalloc.c: New, from elsewhere.
2121         * lib/xstrdup.c: New, from elsewhere.
2122         * lib/Makefile.in: Distribute and compile them.
2124         * m4.c: Change progname to program_name.
2125         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
2126         * lib/error.c: New, from elsewhere.
2127         * lib/Makefile.in: Distribute and compile error.c.
2128         * configure.in: Check AC_VPRINTF and for strerror.
2129         * m4.c: Delete cmd_error.  Use error instead.
2130         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
2132         * m4.h: Delete #define const, let Autoconf takes care of this.
2134         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
2135         Merge parse_args into main.  Declare argv to be `char *const *',
2136         then remove superfluous casts.
2138         * m4.c: Rename --no-gnu-extensions to --traditional.
2139         Reported by Ben A. Mesander.
2141         * m4.c (usage): Add a status parameter.  Supply one in various
2142         calls.  Add --help processing.  Remove -V for --version.
2144         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
2146         * lib/Makefile.in: Have an AR=ar declaration.
2147         Reported by Eric Backus.
2148         Reported by Bjorn R. Bjornsson.
2149         Reported by Tom Tromey.
2150         Reported by Kristine Lund.
2151         Reported by Marion Hakanson.
2153 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
2155         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
2156         Reported by Noah Friedman.
2158 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
2160         * Makefile.in: Remove MDEFINES and cleanup.
2162 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
2164         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
2165         Create a gzip file.
2167 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
2169         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
2170         ensure 777 mode for directories, so older tar's will restore file
2171         modes properly.
2173 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
2175         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
2176         so the installer can override automatically configured choices.
2177         Reported by Karl Berry.
2179 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
2181         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
2182         previous version was not working properly on m68k-hp-bsd4.3.
2183         Reported by Roland McGrath.
2185         * lib/_doprnt.c: Stolen from Oleo distribution.
2186         * configure.in: Check for _doprnt.c if vfprintf.c selected.
2187         * lib/Makefile.in: Distribute _doprnt.c.
2188         Do not distribute regex.[ch].old anymore.
2190 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
2192         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
2193         Richard wants it there.
2195 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
2197         * Makefile.in: Add DEFS to MDEFINES.
2198         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
2199         (libm4.a): Remove the library before creating it.
2200         (distclean): Remove tags and TAGS too.
2202 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
2204         * Makefile.in (dvi, m4.dvi): New goals.
2206         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
2207         macro.c, output.c, path.c, symtab.c: Change Copyright from
2208         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
2210         * examples/divert.m4: Deleted, this bug has been corrected.
2212         * Makefile.in (texclean, mostlyclean): New goals.
2214         * Makefile.in (clean): Remove clutter from ansi2knr.
2215         Reported by Pierre Gaumond.
2216         Reported by Greg A. Woods.
2218 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
2220         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
2221         might well use CFLAGS is s/he needs it.
2223         * Makefile.in: Allow installation of info files from a separate
2224         build directory.
2225         Reported by Jason Merrill.
2226         Reported by David MacKenzie.
2227         Reported by Skip Montanaro.
2228         Reported by Erez Zadok.
2229         Reported by Assar Westerlund.
2231 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
2233         * Release 1.0.3
2234         This is still a beta release for the future GNU m4 version 1.1.
2236         * lib/alloca.c: New, from elsewhere.
2237         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
2239         * m4.h: Do not define index/rindex if already defined.  If
2240         FALSE/TRUE are already defined, do not redefine them, but merely
2241         define boolean typedef to int.
2243         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
2244         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
2245         because some C compilers do not like connectives with #ifdef.
2246         * m4.h: Define `volatile' only if __GNUC__, instead of once for
2247         __GNUC__ and once for __STDC__.
2248         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
2250         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
2251         Makefile dependencies.  Without it, make keeps destroying and
2252         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
2254         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
2255         to diversion/DIVERSION, this was a spelling error.
2257         * m4.c: Declare version[], remove #include "version.h".
2258         * version.h: Deleted.
2259         * Makefile.in: Remove references to version.h.
2261         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
2262         production, by using a simpler and more robust algorithm.  This
2263         solves the problem of synclines sometimes written in the middle of
2264         an output line.  Delete sync_line() and output_lines variable.
2265         * m4.h: Remove sync_line prototype and output_lines declaration.
2266         * input.c (next_char), output.c (shipout_text): Remove references
2267         to output_lines.
2268         * input.c (push_file, pop_file): Merely put the value -1 in
2269         output_current_line instead of calling sync_line, for delaying a
2270         single `#line NUM FILE' before next output line.  Do not test
2271         for sync_output, because this is unnecessary clutter.
2272         * output.c (make_divertion, insert_divertion): Idem.
2273         * input.c: Rename must_advance_line to start_of_input_line, for
2274         consistency.
2276         * debug.c (trace_header): Select a new debug line format, which
2277         better complies with GNU standards for formatting error messages.
2278         With option `-dfl', M-x next-error might be used on the output.
2279         * m4.c (vmesg): Adjust format of error output to GNU standards.
2280         * m4.texinfo: Adjust examples for `make check' to work.
2282         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
2283         case for enum debug_info constants, which were all lower case.
2285         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
2286         re_search_2.
2287         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
2288         collected patches.  I tried a few times using newer regex.[ch], it
2289         mysteriously stopped aborting with this one.  Insecure feeling...
2290         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
2292 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
2294         * m4.c: Change `--no-warnings' to `--silent'.
2295         Reported by David MacKenzie.
2297         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
2298         leave it off for now.  See comment in m4.c for justification.
2299         Reported by David MacKenzie.
2301         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
2302         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
2304         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
2306         * Makefile.in: Ensure recursive cleaning is done before local
2307         cleaning for all clean goals.
2309         * builtin.c (ntoa): Ensure the value is always interpreted as a
2310         signed quantity, whatever the radix is.
2312 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
2314         * builtin.c, format.c, input.c: Split long lines.
2315         * m4.c: Use typedef macro_definition instead of struct
2316         macro_definition.
2317         * symtab.c: Use typedef symbol instead of struct symbol.
2319 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
2321         * *.[ch]: Remove all trailing whitespace, in code and comments.
2323         * configure.in: Find some awk.
2324         * Makefile.in: Add $(AWK) to MDEFINES.
2325         * checks/Makefile.in: Transmit $(AWK) to get_them.
2326         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
2327         awk script when switching files, because without this, mawk runs
2328         out of file descriptors.
2330 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
2332         * Makefile.in (realclean): Delete m4.info*.
2333         Reported by Jim Meyering.
2335         * Makefile.in: Adjust and link with checks/Makefile.
2336         * checks/Makefile.in: New.
2337         * configure.in: Output checks/Makefile.
2339         * checks/get_them: Have the dnl header of each test more
2340         recognizable by next-error, also use a better message.
2342 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
2344         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
2345         And use that only if __GNUC__ since we're using it's GCC-specific
2346         semantics that tell the compiler the associated function doesn't
2347         return.
2349         * builtin.c (substitute): Don't use character as an array index.
2350         (dumpdef_cmp): Make formal arguments `const void *' to avoid
2351         warnings with gcc -W -Wall on systems with qsort prototype.
2352         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
2353         from gcc -W -Wall.
2355         * eval.c (most functions): Add parentheses to assignments used
2356         as truth values go avoid warnings from gcc -Wall.
2358         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
2359         any functions that don't need external scope.
2361         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
2362         (many functions and arrays): Declare `const'.
2364 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
2366         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
2367         removing the declaration from m4.h.  Also rename false to FALSE
2368         and true to TRUE.
2370         * lib/Makefile.in (Makefile): New goal.
2372         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
2373         so heavily loaded.  It gets more easily overridable, calling make.
2374         Reported by Jim Meyering.
2376         * Makefile.in (dist): Get .fname from the current directory name,
2377         instead of from version.h.  I need updating many files manually,
2378         when the version changes, version.h is just one of them.
2380 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
2382         * m4.h: Remove the tag `boolean' on the enum introducing typedef
2383         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
2384         Reported by Tom McConnell.
2386 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
2388         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
2389         39.cleardiv, which were describing missing or spurious newlines.
2390         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
2391         do not depend on machine word size, `/bin/false' implementation,
2392         or `wc' output format.  `make check' is more dependable, now.
2394         * checks/check_them: Summarize the failed tests by listing their
2395         name, at end.  If none, issue `All checks successful'.  Output
2396         `Checking' instead of `Input file:'.
2398         * checks/get_them, checks/check_them: Reindented.
2400         * Makefile.in (dist): chmod a+r before making the tar file.
2402 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
2404         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
2406         * input.c (next_token): Reinitialize token_buttom just after using
2407         it as a watermark with obstack_free.  Or else, a future token, big
2408         enough for triggering reallocation of the obstack chunk, could
2409         void the initialized value of token_buttom, later causing panic in
2410         obstack_free.  Rename token_buttom to token_bottom everywhere.
2412         * m4.h: Before declaring errno, first include <errno.h> and
2413         ensure that it does not define errno.
2414         Reported by Richard Stallman.
2416 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
2418         * builtin.c: Define and use DECLARE macro for builtins.
2420         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
2421         argument, this is a common idiom for introducing long comments.
2423         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
2424         arguments.  The last argument was silently ignored.
2426         * m4.c (cmd_error): Add a missing semicolon before va_end().
2428 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
2430         * Makefile.in: Now handle protoized sources.  Define and use U.
2431         Compile and use ansi2knr with old compilers.  Update DISTFILES.
2432         Add `aclocal.m4' to `configure' dependencies.
2433         * ansi2knr.c: New, from Ghostscript distribution.
2434         * configure.in: Define U through FP_PROTOTYPES for old compilers.
2435         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
2436         * aclocal.m4: New, provide FP_PROTOTYPES.
2437         * m4.h: Conditionnaly protoized through Args, save for varags.
2438         * builtin.c: Protoized.  Then:
2439         Include <sys/types.h> if size_t is not defined, before "regex.h".
2440         (m4_ifelse): Fetch built-in name properly for diagnostic.
2441         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
2442         (m4_regexp): Add const to `msg' declaration.
2443         (m4_patsubst): Add const to `msg' declaration.
2444         * debug.c: Protoized, save for varargs.
2445         * eval.c: Protoized.
2446         * format.c: Protoized.
2447         * input.c: Protoized.
2448         * m4.c: Protoized, save for varargs.  Then:
2449         (xfree): Accept void * instead of char *.
2450         (xmalloc): Return void * instead of char *.
2451         (xrealloc): Accept and return void * instead of char *.
2452         * macro.c: Protoized.
2453         * output.c: Protoized.
2454         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
2455         * symtab.c: Protoized.
2457 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
2459         * m4.texinfo: Remove directory from diagnostics in 30.include,
2460         51.eval, 56.errprint and 57.m4exit tests.
2462         * m4.h: Remove declarations for int or void system functions, they
2463         cause more conflicting trouble than they make good.
2465         * configure.in: Avoid configuration header file.  Add some tests.
2466         * m4.h: Remove #include "config.h".
2467         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
2468         Then, rewritten for better compliance with GNU standards.
2470 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
2472         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
2473         because of a misplaced #endif.
2475         * Many *.[hc] files: Correct intra-line spacing here and there,
2476         according to GNU indent 1.6 advice.
2478         * configure.in: New, using Autoconf 1.2.
2479         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
2480         * Delete old configure.in, configure, etc/configure.in,
2481         etc/configure, lib/configure.in, lib/configure and config/*.
2482         Reported by Jason Merrill.
2484         * symtab.c (hash): Change (char) NULL to '\0'.
2485         Reported by Jason Merrill.
2487         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
2488         etc/nextvers.sh.  Release numbers will be edited `by hand'.
2489         * version.h: De-automatize, force value in.
2491         * m4.c: Changes in order to use a newer getopt.h.
2492         Reported by David MacKenzie.
2494         * checks/: New name for examples/.
2495         * checks/get_them: New location for etc/get_examples.
2496         * checks/check_them: New location for etc/check_examples.
2497         * Makefile.in, checks/get_them, checks/check_them: Adjust.
2498         * lib/vfprintf.c: New location for etc/vfprintf.c.
2499         * Delete empty etc/.
2500         * examples/: New name for test/.
2502 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
2504         * Makefile.in (check): Add m4 as dependency.
2506         * m4.c: Accept --no-warnings instead of --no_warnings, and
2507         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
2508         usage message more informative.
2509         Reported by David MacKenzie.
2511 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
2513         * etc/check_examples: New name for check_examples.sh.
2514         * etc/get_examples: New name for get_examples.sh.
2515         * Makefile.in, etc/Makefile.in: Use new names.
2517         * Makefile.in: Transmit $(CC) while making in lib.
2519         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
2520         code disposition by hand.
2522 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
2524         * m4.h: Delete definitions for abort() and exit().
2525         Reported by Richard Stallman.
2527         * config/hmake-unicos, config/s-unicos.h: New files.
2528         Reported by Hal Peterson.
2530         * eval.c (exp_term): Have N^0 return 1.
2531         Reported by Michael Fetterman.
2533         * eval.c, input.c, m4.h: Remove last comma in enums.
2534         Reported by Mike Lijewski.
2536         * Transfer of maintenance duties from Rene' to Franc,ois.
2538 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
2540         * Release 1.0.  Many thanks to those, who provided me with bug
2541         reports and feedback.
2543         * Uses GNU configure, taken from the gdb distribution.
2545         * Uses GNU getopt(), with long option names.
2547         * The -Q/+quiet option is added, which suppresses warnings about
2548         missing or superflous arguments to built-in macros.
2550         * Added default options via the M4OPTS environment variable.
2552         * The built-in format can now be configured to use sprintf as
2553         the formatting engine, for systems without [efg]cvt(3).
2555         * GNU library code is moved to the ./lib subdirectory; other
2556         utility files are now in ./etc.
2558         * Several minor bugs have been fixed.
2560 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
2562         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
2563         Francois Pinard and Roland H. Pesch for providing me with reports.
2565         * The builtins incr and decr are now implemented without use of
2566         eval.
2568         * The builtin indir is added, to allow for indirect macro calls
2569         (allows use of "illegal" macro names).
2571         * The debugging and tracing facilities has been enhanced
2572         considerably.  See the manual for details.
2574         * The -tMACRO option is added, marks MACRO for tracing as soon
2575         as it is defined.
2577         * Builtins are traced after renaming iff they were before.
2579         * Named files can now be undiverted.
2581         * The -Nnum option can be used to increase the number of
2582         divertions available.
2584         * Calling changecom without arguments now disables all comment
2585         handling.
2587         * The function m4_patsubst() is now consistently declared
2588         static.
2590         * A bug in dnl is fixed.
2592         * A bug in the multi-character quoting code is fixed.
2594         * Several typos in the manual has been corrected.  More probably
2595         persist.
2597         * The m4.info file is now installed along with the program.
2599 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
2601         * Updated and enhanced version.  Release 0.75, manual 0.07.
2603         * Implemented search path for include files (-I option and
2604         M4PATH envronment variable).
2606         * Implemented builtin "format" for printf-like formatting.
2608         * Implemented builtin "regexp" for searching for regular
2609         expressions.
2611         * Implemented builtin "patsubst" for substitution with regular
2612         expressions.
2614         * Implemented builtin "esyscmd", which expands to a shell
2615         commands output.
2617         * Implemented "__file__" and "__line__" for use in error
2618         messages.
2620         * Implemented character ranges in "translit".
2622         * Implemented control over debugging output.
2624         * Implemented multi-character quotes.
2626         * Implemented multi-character comment delimiters.
2628         * Changed predefined macro "gnu" to "__gnu__".
2630         * Changed predefined macro "unix" to "__unix__", when the -G
2631         option is not used.  With -G, "unix" is still defined.
2633         * Changed "shift", "$@" and "$*" to not insert spaces afters
2634         commas.
2636         * Added program name to error messages.
2638         * Fixed two missing null bytes bugs.
2640 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
2642         * Initial beta release.  Release 0.50, manual 0.05.
2644         $Revision$ $Date$