* src/builtin.c (m4_translit): Slight optimization.
[m4.git] / ChangeLog
blob47a1abf81ca068b45a58f0ffb79a9d8954d5a134
1 2006-11-11  Eric Blake  <ebb9@byu.net>
3         * src/builtin.c (m4_translit): Slight optimization.
5         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
7         * src/builtin.c: Remove unnecessary casts.
8         (expand_ranges): Make 8-bit clean.
9         * doc/m4.texinfo (Translit): Add tests and wording.
10         * NEWS: Document this fix.
12 2006-11-07  Eric Blake  <ebb9@byu.net>
14         * src/m4.h (output_exit): New prototype.
15         * src/m4.c (main): Use it.
16         * src/output.c (cleanup_tmpfile): Close files before removing
17         directory.
18         (insert_diversion): Check for failure.
19         (output_exit): Avoid memory leak.
20         * doc/m4.texinfo (Diversions): Test this bug.
22         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
24 2006-11-01  Eric Blake  <ebb9@byu.net>
26         Allow C++ compilation on Linux, as a safety measure in type
27         checking.
28         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
29         stdbool'.
30         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
31         (boolean): Kill this, and use stdbool.h instead.
32         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
33         * src/output.c, src/symtab.c: All users changed.
34         * src/symtab.c (hack_all_symbols): Update prototype.
35         * src/builtin.c (dump_symbol, set_trace): Update signature.
36         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
37         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
38         C++ compilation.
39         * src/debug.c (trace_flush): Likewise.
40         * src/freeze.c (reload_frozen_state): Likewise.
41         * src/input.c (push_file, push_string_finish, push_wrapup):
42         (token_bottom, next_token): Likewise.
43         * src/m4.c (main): Likewise.
45         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
46         draft wording.
47         * src/m4.h (m4_path_search): Tweak signature.
48         * src/path.c (m4_path_search): Likewise.
49         * src/builtin.c (include): Update caller.
50         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
51         with file names.  Don't write to **argv.
52         (process_file): New helper method.
53         * NEWS: Document this fix.
55 2006-10-31  Eric Blake  <ebb9@byu.net>
57         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
58         * doc/m4.texinfo (Translit): Improve the documentation.
59         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
60         algorithm.
61         (m4_index): Simplify, and speed up slightly.
62         * NEWS: Document this fix.
64 2006-10-28  Eric Blake  <ebb9@byu.net>
66         * src/input.c (set_quotes): Don't allow empty end-quote with
67         non-empty start-quote.
68         (set_comment): Likewise for end-comment.
69         * src/builtin.c (m4_changecom): Adjust caller.
70         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
71         match behavior.
72         (Incompatibilities): Document another POSIX bug.
73         * NEWS: Mention this change.
75 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
77         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
78         files.
80 2006-10-26  Eric Blake  <ebb9@byu.net>
82         Silence -Wwrite-strings -Wpointer-arith warnings.
83         * src/builtin.c (define_user_macro): Allow NULL argument.
84         (m4_builtin, m4_indir): Cast away const of "".
85         * src/format.c (format): Likewise.
86         * src/macro.c (collect_arguments): Likewise.
87         (expand_macro): Avoid math on void*.
88         * src/m4.c (main): Adjust caller.
89         * src/output.c (freeze_diversions): Detect off_t overflow.
91         * src/input.c (pop_input): Remove unnecessary code.
93 2006-10-25  Eric Blake  <ebb9@byu.net>
95         * src/symtab.c (symtab_init): Avoid size_t overflow.
96         * src/output.c (make_diversion): Avoid size_t overflow.
97         * doc/m4.texinfo (Diversions): Test this fix.
98         * src/input.c (input_block): Remove unused member.  Reduce size
99         of struct.
100         (push_file, pop_input): Avoid useless assignment.
101         * NEWS: Document the bug fix.
103         Redo location tracking.  Instead of having just files track the
104         line to return to when popping input, now all input blocks track
105         their current line.
106         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
107         needed.
108         (input_block): Have line and file storage for all input types, and
109         rename some members.
110         (input_change): New global flag.
111         (push_file, push_macro, push_string_init, push_wrapup): Store
112         location.
113         (push_string_finish, pop_input, pop_wrapup): Notice changes in
114         input blocks.
115         (peek_input): Adjust to new member names.
116         (next_char, next_char1): Adjust location if needed.
117         (skip_line): Simplify restoring location.
118         * doc/m4.texinfo (Location): Augment the test to catch line
119         location of expansion of multi-line arguments.
120         Reported by Stepan Kasal.
122 2006-10-23  Eric Blake  <ebb9@byu.net>
124         * doc/m4.texinfo (Macro Arguments): Document that leading space
125         in argument collection stops at macro expansion.
126         (Incompatibilities): Document POSIX whitespace wording issue.
128 2006-10-20  Eric Blake  <ebb9@byu.net>
130         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
131         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
132         end of a TeX line splits incorrectly.
133         (Foreach, Improved foreach): Write these sections, borrowing ideas
134         from CVS head and from m4sugar.
135         * checks/get-them: Accomodate new way to show trailing space in
136         examples.
137         * examples/foreach.m4: Make usable in documentation.
138         * examples/foreachq.m4: New file.
139         * examples/foreachq2.m4: New file.
140         * examples/foreach2.m4: New file.
141         * NEWS: Document the documentation updates.
143 2006-10-19  Eric Blake  <ebb9@byu.net>
145         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
146         (m4_maketemp): Provide traditional behavior.
147         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
148         new `mkstemp' macro and the flaws of the old `maketemp'.
149         (Incompatibilities): Move maketemp discussion to...
150         (Extensions): ...here, since -G now supresses the GNU extension.
151         * NEWS: Document this.
153         * examples/forloop.m4: Simplify.
154         * examples/forloop2.m4: New file.
155         * examples/quote.m4: New file.
156         * doc/m4.texinfo (Loops): Rename to...
157         (Shift): ...this node.
158         (Forloop, Foreach, Improved forloop, Improved foreach): New
159         nodes.
161 2006-10-17  Eric Blake  <ebb9@byu.net>
163         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
164         config-h'.
165         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
166         gnulib headers, rather than in top directory.
167         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
168         output clutter.
170 2006-10-16  Eric Blake  <ebb9@byu.net>
172         * doc/m4.texinfo: Backport some minor cleanups from head.
173         (Cleardivert): Rename from cleardiv.
175         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
176         a section of Preliminaries.
177         (Operation modes, Preprocessor features, Limits control)
178         (Frozen state, Debugging options, Command line files): Subdivide
179         into new sections.
180         (Input processing, Quoting Arguments, Define, Arguments)
181         (Cleardiv, Format, M4exit): Fix grammar of references.
182         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
183         (Debug Levels, Debug Output, Include, Search Path, Divert)
184         (Platform macros, Syscmd, Location, Extensions): Point to new
185         sections.
186         (Top, Loops, Include, Undivert, Location, Incompatibilities):
187         Improve file references.
189 2006-10-14  Eric Blake  <ebb9@byu.net>
191         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
192         is not portable.
193         Reported by Ralf Wildenhues.
195         * src/builtin.c (m4_undivert): Check for read error.
197 2006-10-13  Eric Blake  <ebb9@byu.net>
199         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
200         header files are included, since <unistd.h> can affect the tests.
201         * THANKS: Updated.
202         Reported by Martin Koeppe.
204         Backport head's usage of clean-temp module, as it is cleaner than
205         using tmpfile-safer.
206         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
207         clean-temp closeout', and remove tmpfile-safer.
208         * src/m4.h (includes): Adjust.
209         (m4_path_search): Rename from path_search, to avoid collision
210         with gnulib.
211         * src/m4.c (main): Install closeout handler.  Adjust caller.
212         (usage): Now done by closeout module.
213         * src/builtin.c (m4_m4exit): Likewise.
214         (m4_undivert, include): Adjust callers.
215         * src/freeze.c (reload_frozen_state): Likewise.
216         * src/path.c (m4_path_search): Rename from path_search.
217         * src/output.c (output_temp_dir): New variable.
218         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
219         (insert_diversion, make_room_for): Use them.
220         * doc/m4.texinfo (Diversions): Document this, and add a test.
221         (Improved fatal_error): Fix typo.
222         (Maketemp): Port test to mingw, and no longer hide from
223         documentation.
224         * NEWS: Document the change in TMPDIR behavior.
226         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
227         macros, to work with recent gnulib-tool update.
229         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
230         handling of defn results.
231         * doc/m4.texinfo (Builtin, Indir): Add test cases.
232         * NEWS: Document this.
234 2006-10-12  Eric Blake  <ebb9@byu.net>
236         * doc/m4.texinfo (Location): Fix typo in previous commit.
237         (Changeword): Catch one more case.
238         * src/input.c (skip_line): Fix case when outer file used macro to
239         supply the \n.
241 2006-10-11  Eric Blake  <ebb9@byu.net>
243         * src/input.c (enum input_type): Add additional types, to shave
244         time off the common case.
245         (push_wrapup): Wrapped strings remember location.
246         (push_string_finish): Normal strings carry no location.
247         (push_file): Start new files uninitialized.
248         (peek_input, next_char_1): Optimize common cases by updating
249         location only on new input types.
250         (pop_input): Update to honor new input types.
251         (skip_line, push_string_finish): Fix regression in previous patch
252         when dnl is not followed by newline in included file.
253         (push_string_init): Initialize all fields of INPUT_STRING sooner.
254         (peek_token): Simplify.
255         (peek_input): Don't pop input files on peek, so that __file__ and
256         __line__ as last token of include file work correctly.
257         * doc/m4.texinfo (History): Mention 1.4.8.
258         (Answers): Split into sections, one per answer.
259         (Improved exch, Improved cleardivert, Improved fatal_error): New
260         nodes.
261         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
262         new m4wrap location semantics.
263         (Changeword): Add test that caught the regression.
264         * NEWS: Document this.
266         * src/macro.c (expand_macro): In macro expansion errors, report
267         line number at open parenthesis.
268         * src/input.c (next_token): Fix off-by-one bug in reporting end
269         of file in unterminated comment and string.
270         (file_names): New obstack, necessary since expand_macro now hangs
271         on to file names longer than the files remain open.
272         (input_init): Initialize new obstack.
273         (push_file): Use new obstack.  Delay updates to current_file
274         until after expand_macro has restored state.
275         (peek_input, next_char_1): Update current_file if necessary.
276         (pop_wrapup): Release memory.
277         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
278         the off-by-one bug.
279         (Dnl): Update to the new location reporting rules.
280         * NEWS: Document these changes.
282 2006-10-10  Eric Blake  <ebb9@byu.net>
284         * src/macro.c (argc_stack, argv_stack): New variables for sharing
285         obstacks across multiple macro calls.
286         (expand_input): Initialize and tear down stack once per input
287         file, instead of once per macro.
288         (expand_macro): Reuse existing stacks when possible.
289         (collect_arguments): Simplify slightly.
291         * src/path.c (include_env_init): Fix botched patch application.
292         Reported by Ralf Wildenhues.
294 2006-10-09  Eric Blake  <ebb9@byu.net>
296         * src/m4.c (usage, main): Detect write failures to stderr.
297         * src/builtin.c (m4_m4exit): Likewise.
298         * NEWS: Document this.
300         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
301         the limit.
302         * NEWS: Document this.
303         * doc/m4.texinfo (Invoking m4): Likewise.
305 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
307         * src/path.c (include_env_init): Copy the string returned
308         by getenv before overwriting it; POSIX disallows this.
310 2006-10-09  Eric Blake  <ebb9@byu.net>
312         * src/m4.c (main): Defer debugfile until after --help.
313         * configure.ac (AC_INIT): Bump version number.
314         * NEWS: Start changes of 1.4.7a.
316 2006-09-25  Eric Blake  <ebb9@byu.net>
318         Release 1.4.7:
320         * configure.ac (AC_INIT): Bump version number.
321         * NEWS: Describe changes since 1.4.6.
323 2006-09-21  Eric Blake  <ebb9@byu.net>
325         * doc/m4.texinfo (Invoking m4): Add clarification on option
326         processing behavior.
327         * THANKS: Update.
328         Reported by Mikhail Teterin.
330         * bootstrap: Add --force option, based on idea from coreutils.
331         * README: Document that ./bootstrap and autoreconf are for
332         developers, and not lightly done in tarballs.
334 2006-09-20  Eric Blake  <ebb9@byu.net>
336         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
337         deprecation warning on -e.
338         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
339         * NEWS: Document this.
341 2006-09-19  Eric Blake  <ebb9@byu.net>
343         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
344         -o/--error-output to --debugfile, and deprecate the former.  This
345         will allow a future release to be more consistent with other GNU
346         tools, with -o/--output affecting stdout, not debug.
347         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
348         * NEWS: Document this.
350 2006-09-14  Eric Blake  <ebb9@byu.net>
352         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
353         --diversions. `m4 --help --version' now displays help, not
354         version.
355         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
356         smaller scope.
357         (show_help, show_version): No longer needed.
358         (long_options, DIVERSIONS_OPTION): Backport patch from head to
359         distinguish between -N and --diversions in warning.
360         * doc/m4.texinfo (Invoking m4): Document this.
361         * NEWS: Likewise.
363 2006-09-11  Eric Blake  <ebb9@byu.net>
365         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
366         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
367         seekable.
368         (debug_set_file): Use STDOUT_FILENO.
369         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
370         with POSIX in regards to unread input.
371         * NEWS: Document this fix.
372         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
374 2006-09-07  Eric Blake  <ebb9@byu.net>
376         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
377         * src/m4.h (push_file): Change prototype.
378         * src/input.c (push_file, peek_input, next_char_1): Only call getc
379         once at EOF, to avoid double ^D on terminal stdin; regression from
380         2006-09-04.
381         (push_file, pop_file): Allow reading stdin twice.
382         * src/m4.c (main): Likewise.
383         * src/builtin.c (include): Update caller.
384         * NEWS: Document this change.
385         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
386         (Syscmd): Add a test that failed before this patch.
388 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
390         * checks/check-them: Quote $pwd.
392 2006-09-05  Eric Blake  <ebb9@byu.net>
394         * src/builtin.c (define_macro): Warn on invalid macro name.
395         * NEWS: Document this change.
396         * doc/m4.texinfo: Fix typos.
397         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
398         (Ifelse): Backport some improvements from head.
400 2006-09-04  Eric Blake  <ebb9@byu.net>
402         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
403         native echo is braindead.
404         * checks/check-them (strip_needed): Ignore \r in output.  Now the
405         testsuite will pass when cross-compiling from cygwin to mingw.
407         * src/input.c (peek_input): Fix regression in handling macro
408         without arguments as last token in file; debian bug 385720.
409         (next_token): Always consume an input character.
410         Reported by Andreas Schultz.
411         * configure.ac (AC_INIT): Bump version number.
412         * NEWS: Document this fix.
413         * doc/m4.texinfo (History): Mention next version.
414         (Changeword): Add example that exposes this bug.
415         * THANKS: Update.
417 2006-08-25  Eric Blake  <ebb9@byu.net>
419         Release 1.4.6:
421         * configure.ac (AC_INIT): Bump version number.
422         * NEWS: Describe changes since 1.4.5.
424         * Makefile.maint (web-manual): Give up on VPATH build during
425         distribution.  But distributions are made so infrequently that
426         this is not too much of a hardship.
427         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
428         exists.
430 2006-08-24  Eric Blake  <ebb9@byu.net>
432         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
433         Solaris, produce output on just one argument.
434         (m4_regexp, m4_patsubst): For consistency, do likewise.
435         (m4_patsubst): Allow zero-length match at end of string.
436         * doc/m4.texinfo (Sysval): Fix overfull hbox.
437         (Bugs, Macro Arguments): Minor fixes.
438         (Other tokens): Rearrange node order.
439         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
440         * NEWS: Document these fixes.
442 2006-08-22  Eric Blake  <ebb9@byu.net>
444         * src/input.c (pop_input): Avoid empty filename with -di option.
445         * src/debug.c (debug_message_prefix): Put space before message.
447         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
449         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
450         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
452         * checks/check-them: State why a test is skipped.
453         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
455         * ChangeLog: Add copyright.
456         * AUTHORS: Likewise.
457         * BACKLOG: Likewise.
458         * README: Likewise.
459         * THANKS: Likewise.
460         * TODO: Likewise.
461         * examples/COPYING: New file, add copyright for all the examples.
462         * checks/get-them: Put copyright on testsuite files.
464 2006-08-18  Eric Blake  <ebb9@byu.net>
466         Don't let unrelated child processes see too many files.
467         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
468         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
469         spelling in error message.
470         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
471         (debug_set_output): Close debug file on exec.
472         * src/m4.h (includes): Add cloexec.h.
473         * src/output.c (make_room_for): Close diversions on exec.
474         * src/path.c (path_search): Close include files on exec.
475         * NEWS: Document this.
477         Regular expressions were leaking memory.
478         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
479         helper methods.
480         (m4_regexp, m4_patsubst): Avoid memory leak.
481         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
482         static.
483         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
484         from O(n^2) to O(n) for calculating word_start.
485         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
486         O(1) bitmap, not O(n) search string.
487         * NEWS: Document this fix.
489 2006-08-17  Eric Blake  <ebb9@byu.net>
491         * NEWS: Document previous checkin.
493         * src/builtin.c (substitute): Avoid core dump when accessing
494         beyond bound of regular expression.
495         Reported by Karl Nelson.
496         * doc/m4.texinfo (Regexp): Add example that causes core dump on
497         some architectures prior to this patch.
498         * THANKS: Updated.
500 2006-08-16  Eric Blake  <ebb9@byu.net>
502         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
503         clear that dumpdef does not always go to stderr.
505         * src/builtin.c (m4_errprint): Flush buffers before printing to
506         stderr.
507         * THANKS: Updated.
509 2006-08-15  Eric Blake  <ebb9@byu.net>
511         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
512         per debian bug 96075.
513         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
514         (Changeword): Don't use shift as an example of a swallowed word.
515         (Divert): Discuss fact that divert is an English word.
516         Reported by Richard A Nelson.
518 2006-08-14  Eric Blake  <ebb9@byu.net>
520         * doc/m4.texinfo (Invoking m4): Minor fixes.
522 2006-08-12  Eric Blake  <ebb9@byu.net>
524         * doc/m4.texinfo (Arguments): Hint at better exch macro.
525         (Answers): Provide a better definition.
527 2006-08-09  Eric Blake  <ebb9@byu.net>
529         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
530         yet understand locales.
531         * NEWS: Fix wording of a few items.
533 2006-08-08  Eric Blake  <ebb9@byu.net>
535         Avoid printing `NONE:0:' in error messages.
536         * src/m4.h (m4_error_at_line): New function.
537         * src/m4.c (m4_error_at_line): Implement.
538         * src/input.c (skip_line, input_init, next_token): Use "", not
539         "NONE", for no file, since NONE can be a real file name.
540         * src/macro.c (expand_argument): Likewise.
541         * src/debug.c (debug_message_prefix, trace_header): Check for
542         current file.
543         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
544         (Location): Document that synclines and internal message format
545         are not impacted by redefining these macros.
546         (M4exit): Hint at bug in fatal_error.
547         (Answers): Provide workaround to match m4 output.
549         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
550         * src/m4.h (m4_error): New function.
551         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
552         error module deficiencies.
553         (reference_error, suppress_line): No longer needed.
554         * src/m4.c (m4_error): Implement.
555         (main): No longer need to install error callback.
557 2006-08-04  Eric Blake  <ebb9@byu.net>
559         * src/m4.h (program_name): Declare.
560         (suppress_line): New variable.
561         (M4ERROR_AT_LINE): New macro.
562         * src/m4.c (reference_error, main): Follow GNU Coding Standards
563         for error message format.
564         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
565         * src/macro.c (expand_argument): Likewise.
566         * checks/check-them (examples): Adjust to new message format.
567         * src/builtin.c (m4___program__): New builtin.
568         * doc/m4.texinfo (Location): Split from Errprint into new node,
569         and document __program__.
570         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
571         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
572         format.
573         (Extensions): Document __program__.
574         * NEWS: Document this change.
576 2006-08-03  Eric Blake  <ebb9@byu.net>
578         Don't confuse leading `(' in comment or quote with start of
579         argument collection.
580         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
581         TOKEN_CLOSE.
582         (peek_input): Make private to input.c.
583         (peek_token): New prototype.
584         * src/input.c (default_word_regexp): Reduce ifdefs.
585         (peek_input): Make static.
586         (next_token): Return new token types.
587         (match_input, MATCH): Add argument consume, which controls
588         whether match should be pushed back.
589         (peek_token): New function.
590         (token_type_string) [DEBUG_INPUT]: New function.
591         * src/macro.c (expand_token, expand_argument, collect_arguments):
592         Handle new token types.
593         * doc/m4.texinfo (Changequote, Changecom): Document this.
594         * NEWS: Document this.
596         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
598         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
599         overflow detection when sigstack exists but is not implemented.
600         Fixes debian bug 154053.
601         * THANKS: Updated.
602         Reported by David Perlin.
604 2006-08-02  Eric Blake  <ebb9@byu.net>
606         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
607         close.
609 2006-08-01  Eric Blake  <ebb9@byu.net>
611         * src/input.c (skip_line, next_token): Remember current file in
612         case input file ends abruptly.  Addresses debian bug 175365.
613         (pop_input): Defer freeing storage that holds previous file
614         name...
615         (pop_wrapup): to here, after error message is issued.
616         * src/macro.c (expand_argument): Remember current file in case
617         input file ends abruptly.
618         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
619         (M4wrap): Adjust testsuite accordingly.
620         (Errprint): Document line number limitation of m4wrap.
621         * NEWS: Document this fix.
622         * THANKS: Update.
624 2006-07-31  Eric Blake  <ebb9@byu.net>
626         * src/input.c (peek_input, next_char, match_input): Be eight-bit
627         clean; fixes debian bug 311378.
628         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
629         (Changequote, Changecom): Add examples to test this.
630         * NEWS: Document this fix.
631         * THANKS: Update.
632         Reported by Steven Augart.
634         * doc/m4.texinfo: Whitespace fix.
635         * checks/get-them: Avoid exceeding 14-char file name limit.
636         * THANKS: Update.
638 2006-07-30  Eric Blake  <ebb9@byu.net>
640         * src/path.c (path_search): Detect allocation failure.
642         Use native free when it is good enough.
643         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
644         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
645         Adjust calls.
646         * src/symtab.c (free_symbol): Likewise.
647         * src/m4.c (xfree, main): Likewise.
648         * src/m4.h (obstack_chunk_free): Likewise.
649         * src/path.c (path_search): Likewise.
650         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
652         * doc/m4.texinfo (Errprint): Add example for last patch.
653         * checks/check-them: Account for VPATH in latest example.
655 2006-07-29  Eric Blake  <ebb9@byu.net>
657         * src/path.c (path_search): Add result parameter, so that
658         -I can be accounted for.  Debian bug 53685.
659         * src/m4.h (path_search): Update prototype.
660         * src/m4.c (main): Adjust callers.
661         * src/freeze.c (reload_frozen_state): Likewise.
662         * src/builtin.c (include, m4_undivert): Likewise.
663         * NEWS: Document this change.
664         Reported by Nicolas Lichtmaier.
666 2006-07-28  Eric Blake  <ebb9@byu.net>
668         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
669         several non-GNU makes.
670         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
671         * src/m4.h: Likewise.
672         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
673         /usr/ccs/bin/ucbcc.
675 2006-07-27  Eric Blake  <ebb9@byu.net>
677         * doc/m4.texinfo: Use @acronym{GNU} throughout.
678         (History): Update for 1.4.6.
680         * src/m4.h (_): Remove K&R cruft.
681         * src/builtin.c: Likewise.
682         * src/debug.c: Likewise.
683         * src/eval.c: Likewise.
684         * src/macro.c: Likewise.
685         * src/stackovf.c: Likewise.
687         * doc/Makefile.am (m4.1): Improve man page.
688         * src/m4.c (usage): Improve --help output, including adding the
689         bug reporting address.
690         (main): Follow GNU Coding Standards for --version output.
692 2006-07-26  Eric Blake  <ebb9@byu.net>
694         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
695         end-comment consistently, to match POSIX.
697         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
698         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
699         (Incompatibilities): Document incompatibility of changecom
700         vs. macro names, and of EOF in include.
701         * src/input.c (next_token): Reject unterminated comments at EOF.
702         (skip_line): Warn on unterminated dnl at EOF.
703         * NEWS: Document these changes.
705 2006-07-25  Eric Blake  <ebb9@byu.net>
707         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
708         stdio-safer into fopen-safer and tmpfile-safer.
709         * src/m4.c: Remove redundant include.
711 2006-07-24  Eric Blake  <ebb9@byu.net>
713         Fix bugs related to stream handling.
714         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
715         unlocked-io stdio-safer stdlib-safer close-stream.
716         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
717         provided by gnulib if needed.
718         * src/output.c [! HAVE_TMPFILE]: Likewise.
719         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
720         their safer counterparts.
721         (retcode): New global variable.
722         * src/input.c (pop_input): Check for read failure.
723         * src/freeze.c (reload_frozen_state): Likewise.
724         (produce_frozen_state): Check for write failure.
725         * src/debug.c (debug_set_file): Likewise.
726         * src/m4.c (usage, main): Likewise.
727         (retcode): Make global.
728         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
729         status is non-zero except when everything succeeds.
730         * doc/m4.texinfo (M4exit): Document these changes.
731         (Incompatibilities): Remove documentation of bug now fixed.
732         * NEWS: Document these fixes.
734 2006-07-22  Eric Blake  <ebb9@byu.net>
736         * src/format.c (format): Avoid compiler warning that str may be
737         used uninitialized.
739 2006-07-21  Eric Blake  <ebb9@byu.net>
741         * src/m4.h [UNIX]: Add more platforms that are close enough to
742         categorize as UNIX, but which don't predefine __unix__.
743         Reported by Nelson H. F. Beebe.
745 2006-07-20  Eric Blake  <ebb9@byu.net>
747         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
748         to explicitly ask for --assume-autoconf=2.60.
750 2006-07-19  Eric Blake  <ebb9@byu.net>
752         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
753         and exits normally with 129.
754         Reported by Nelson H. F. Beebe.
755         * THANKS: Update.
757         * src/m4.h (EXIT_MISMATCH): Define.
758         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
759         exiting with status 63.
760         * src/m4.c (usage): Document this.
761         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
762         * NEWS: Likewise.
764         * doc/m4.texinfo (copying): Relax restriction on front-cover and
765         back-cover texts.
767 2006-07-17  Eric Blake  <ebb9@byu.net>
769         * src/format.c (format): Support F, g, and G specifiers.
770         * doc/m4.texinfo (Format): Document this.
771         * NEWS: Document this addition.
773         * doc/m4.texinfo (Builtin): Delete redundant text.
775         * configure.ac (AC_INIT): Bump version number.
776         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
777         * NEWS: Document this fix.
779 2006-07-15  Eric Blake  <ebb9@byu.net>
781         Release 1.4.5:
783         * configure.ac (AC_INIT): Bump version number.
784         * NEWS: Describe changes since 1.4.4.
786         * src/m4.c (usage): Document exit status.
787         * doc/m4.texinfo: Use `exit status', not `exit code'.
788         (Invoking m4): Document exit status.
790         * bootstrap: Backport --help, --version from head.
791         (func_update): New function, for easily grabbing up-to-date files
792         from gnulib.
793         * Makefile.maint (web-manual): Fix for VPATH builds.
795 2006-07-14  Eric Blake  <ebb9@byu.net>
797         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
798         looks bad in info.  Use @deffn rather than @example for
799         describing prototypes.  Fix awkward wording and grammar.
801         * src/builtin.c (substitute): Warn on bad escape sequences.
802         Ignore trailing backslash.
803         * doc/m4.texinfo (Regexp): Add documentation for this.
804         * NEWS: Document this change.
806         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
807         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
808         more examples.
809         (Dnl): Update example to show side effects.
810         * checks/get-them: Generate three digit test names.
811         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
813 2006-07-13  Eric Blake  <ebb9@byu.net>
815         * src/input.c (input_init): Simplify.
816         (set_word_regexp): Treat empty string as default, since empty
817         regexp would disable word parsing.
818         * src/m4.c (user_word_regexp): Default to empty string.
819         * src/builtin.c (builtin_tab): Make changeword blind.
820         * doc/m4.texinfo (Changeword): Document this.
821         * NEWS: Document this.
822         * TODO: Knock off completed items.
824         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
825         just the first.
826         * doc/m4.texinfo (Undefine, Pushdef): Test this.
827         * NEWS: Document this change.
829         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
830         warning.  Detect quoted leading space and overflow as warnings.
831         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
832         Treat width as minimum number of digits, as required by POSIX.
833         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
834         arguments.
835         (m4_substr): Likewise.  Silently treat empty start as 0.
836         (m4_undivert): Treat ` 1a' as file, not diversion 1.
837         * src/eval.c (eval_lex): Parse radix 1 numbers.
838         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
839         one type of warning.
840         (Manual): Document behavior of numeric parsing of empty string.
841         (Divert, Incr): Document error handling.
842         (Eval): Document radices better.
843         (Incompatibilities): Document translit incompatibility.
844         * NEWS: Document these changes.
846         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
847         (web-manual): Simplify.
848         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
849         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
850         (MAINTAINERCLEANFILES): Clean it as well.
851         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
852         (MAINTAINERCLEANFILES): Clean it as well.
854 2006-07-12  Eric Blake  <ebb9@byu.net>
856         * doc/m4.texinfo (Extensions): Document how to overcome
857         implementation difference in > 9 positional parameters.
859         * src/m4.c (usage): Sort within sections.
860         (nesting_limit): Raise default from 250 to 1024.
861         * doc/m4.texinfo: Use file name, not filename, per GNU coding
862         standard.  Use @option where appropriate.
863         (Invoking m4): Sort to match --help output.
864         (Debug Levels): Sort.
865         (Frozen files): Sort and break into two nodes.
867         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
868         * NEWS: Document raised -L limit.
870 2006-07-11  Eric Blake  <ebb9@byu.net>
872         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
873         stress-test changeword before a release.
874         * doc/m4.texinfo: More doc cleanups.
875         (Copying This Manual): New node; actually include the FDL in the
876         documentation.
877         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
878         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
879         * NEWS: Mention documentation improvements.
881         * src/m4.h (OS2): New platform macro.
882         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
883         platform macro.
884         * doc/m4.texinfo (Platform macros): Document it.
885         (Sysval): Remove non-portable test of system("").
886         * NEWS: Document this change.
887         Reported by Andreas Buening.
889 2006-07-09  Eric Blake  <ebb9@byu.net>
891         * doc/m4.texinfo (Undivert): Fix typo in last commit.
892         * src/m4.c (usage): Document M4PATH.
893         * src/path.c (path_search): Reject empty string.
894         * src/output.c (insert_diversion): Ignore diversion 0.
895         * src/builtin.c (m4_undivert): Ignore empty string.
896         * NEWS: Document this fix.
898 2006-07-08  Eric Blake  <ebb9@byu.net>
900         * checks/get-them: Make filtering easier.
901         * checks/check-them: Filter non-input lines, so line counts are
902         more realistic in the documentation, and so changeword tests work
903         even when dnl is disabled.
904         * doc/m4.texinfo: Adjust example line numbers.  Clean up
905         front-matter, following autoconf's example.
906         (Changeword): Enable tests, skipping if changeword not supported.
907         (Define, Defn, Ifelse): Backport more examples from head.
908         (Input processing, Answers): New nodes, backported from head.
909         (Include): Expand test to cover empty filename.
910         (Undivert): Add test of undivert(0).
912 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
914         * doc/m4.texinfo: Fix spelling errors.
916 2006-07-07  Eric Blake  <ebb9@byu.net>
918         * THANKS: Update.
920         * doc/Makefile.am (m4.1): No need to go through a temporary file;
921         this also ensures timestamps are updated.
922         * src/m4.h (includes): Require config.h.  Assume string.h,
923         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
924         than prototyping ourselves.
925         (builtin_func): Add parameter type-checking.
926         (voidstar): Delete, now that we assume C89.
927         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
928         voidstar changed.
929         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
930         xfree.
932 2006-07-06  Eric Blake  <ebb9@byu.net>
934         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
935         binary-io.
936         * src/m4.h (includes): Add binary-io.h for O_BINARY.
937         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
938         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
939         * NEWS: Mention this fix.
941         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
942         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
944         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
945         runs first when needed.
946         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
947         once in srcdir rather than multiple times in VPATH builds.
949 2006-07-03  Eric Blake  <ebb9@byu.net>
951         * checks/check-them: Use portable = in test.
952         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
953         directory, as required by Solaris cc.  Include built headers, as
954         required by Solaris make in VPATH build.
955         * checks/Makefile.in: Use $(srcdir) where needed.
956         (CHECKS): Factor $(srcdir) into macro.
957         (DISTFILES): Likewise.  Automake takes care of distributing
958         Makefile.in.
959         (dist): Simplify.
960         (Makefile): Use modern syntax of config.status.
961         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
962         Avoid overfull and underfull hboxes in dvi.
964         Fix 'make check' in VPATH build.  All files included by testsuite
965         now live in a single directory.  Use forloop.m4 in testsuite.
966         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
967         here...
968         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
969         here.
970         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
971         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
972         * checks/check-them: Avoid s/// when filename is in pattern.
973         * examples/forloop.m4: Fix to match documentation.
974         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
975         new locations.
976         (Loops, Format): Actually use forloop.m4 in tests.
978 2006-07-02  Eric Blake  <ebb9@byu.net>
980         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
981         $(bindir) works in installcheck.
982         (check, installcheck): No longer change directory, so that
983         distcheck works with a read-only builddir.
984         * checks/check-them: Work when pwd is no longer builddir.
986 2006-07-01  Eric Blake  <ebb9@byu.net>
988         * GNUmakefile: New file, borrowed from coreutils.
989         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
990         * Makefile.maint (Makefile): Delete this rule, now that
991         GNUmakefile includes Makefile.
993 2006-06-30  Eric Blake  <ebb9@byu.net>
995         For compatibility with other m4 implementations, sysval returns
996         signal<<8 rather than 0 if syscmd is terminated by a signal.
997         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
998         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
999         not provide wait macros.
1000         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1001         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1002         (m4_esyscmd): Set sysval to -1 on failure.
1003         (m4_sysval): Print 127 on failure, and accomodate signals if they
1004         are detectable.
1005         * NEWS: Document this change.
1006         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1007         last commit.
1008         * checks/check-them: Likewise.
1009         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1011         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1012         * src/freeze.c (produce_frozen_state): Use new spelling of
1013         platform macro.
1014         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1015         platforms.
1016         (m4_syscmd, m4_esyscmd): The empty command is successful.
1017         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1018         Document platform-dependence of system().
1019         (Syscmd): Add example.
1020         (Esyscmd): Make example more robust, and actually demonstrate
1021         rescanning.
1022         (Sysval): Expand test to cover esyscmd code path, and to check
1023         that empty command is successful.  Add conditional check for
1024         signal behavior.
1025         (Other Incompatibilities): Move platform macros from here...
1026         (Platform macros): ...to this new node.  Add windows macro.
1027         Check that exactly one platform macro is provided.
1028         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1029         .exe in error messages.  Allow for skipping checks.
1030         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1031         * NEWS: Document platform macros.
1033 2006-06-29  Eric Blake  <ebb9@byu.net>
1035         Fix buffer overrun bug.
1036         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1037         xvasprintf.
1038         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1039         variant instead, since [efg]cvt are obsolete and our use of them
1040         was buggy (savannah sr #104303).
1041         (format): Fix buffer overflow by using xasprintf.
1042         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1043         * NEWS: Document this fix.
1045         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1046         cross-compilation.
1047         (AC_CACHE_CHECK): Cache search for ecvt.
1049 2006-06-27  Eric Blake  <ebb9@byu.net>
1051         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1052         required by POSIX, and add example that exposed core dump on x86
1053         architectures.
1054         (Incompatibilities): Document incompatibility in eval precedence.
1055         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1056         behavior.
1057         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1058         * NEWS: Document this change.
1060         * doc/m4.texinfo: Use @noindent consistently.
1061         (Quoting Arguments): Document that unquoted parentheses group
1062         arguments.
1063         (Pseudo Arguments): Expand tests to show this.
1064         (Incompatibilities): Contrast traditional behavior of
1065         changequote.
1067 2006-06-24  Eric Blake  <ebb9@byu.net>
1069         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1070         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1071         (AC_CHECK_FUNCS_ONCE): Likewise.
1073 2006-06-23  Eric Blake  <ebb9@byu.net>
1075         * doc/m4.texinfo: Quoting cleanup throughout - follow
1076         autoconf-recommended style of one level of quote per parenthesis
1077         in the normal case.  Adjust error messages to match GNU coding
1078         standards (and to allow 'make check' to pass again).
1079         (Quoted strings, Inhibiting Invocation): Turn more examples into
1080         tests.
1081         (Comments): Resolve FIXME by adding example.
1082         (Define): Add example about underquoting.
1083         (Defn): Add example about use of $0.
1084         (Indir, Format): Resolve FIXME done in last commit.
1085         (Ifelse): Add example about creating blind macro.
1086         (Debugging): Fix grammar.
1087         (Dnl): Add example about dnl with arguments.
1088         (M4wrap): Be explicit that LIFO order is non compliant, and will
1089         change in m4 2.0.
1090         (Undivert): Resolve FIXME by adding example.
1091         (Frozen files): Document that m4wrap and sysval will not work
1092         consistently until m4 2.0.
1093         (Incompatibilities): Document another POSIX compliance bug, this
1094         time with changequote.  Document a traditional incompatibility
1095         with partial input spanning file boundaries.
1097         Make error messages more consistent with GNU coding standards -
1098         start with lower case, and don't end sentence with punctuation.
1099         * src/debug.c (trace_pre): Update message wording.
1100         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1101         Likewise.
1102         * src/freeze.c (produce_frozen_state, issue_expect_message),
1103         (reload_frozen_state): Likewise.
1104         * src/input.c (push_string_init, pop_init, init_macro_token),
1105         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1106         * src/m4.c (stackovf_handler, main): Likewise.
1107         * src/macro.c (expand_token, expand_argument, call_macro),
1108         (expand_macro): Likewise.
1109         * src/output.c (make_room_for, output_text, insert_file),
1110         (freeze_diversions): Likewise.
1111         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1113         * src/builtin.c (builtin_tab): Make format and indir blind.
1114         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1115         * NEWS: Mention the change to builtins.
1117 2006-06-22  Eric Blake  <ebb9@byu.net>
1119         Robustify frozen file format.
1120         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1121         macro.  Require V first, and only accept it once.  For F, use
1122         placeholder if builtin is not found, rather than warning.
1123         * src/m4.h (m4_placeholder): New prototype.
1124         * src/builtin.c: Unify error message style.
1125         (m4_placeholder): New function, warn if invoked.
1126         (builtin_tab): Add m4_placeholder.
1127         (m4_defn): Warn if placeholder is encountered.
1128         (find_builtin_by_addr): Handle placeholder.
1129         (find_builtin_by_name): Return placeholder on failure.
1130         (m4_builtin): Treat placeholder as undefined.
1131         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1132         * NEWS: Document this change.
1133         Reported by Bruno Haible.
1135         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1136         (tabchar): New macro, so that 'make check' still works.
1137         (Invoking m4): Document that ignored compatibility options -B, -S,
1138         and -T each consume an argument.
1139         * checks/get-them: Honor @tabchar{}.
1141         Avoid compiler warnings during -DDEBUG.
1142         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1143         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1144         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1145         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1146         (next_token) [DEBUG_INPUT]: Print before returning.
1147         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1148         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1150         Avoid mkstemp bugs on various platforms.
1151         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1152         * src/output.c [! HAVE_MKSTEMP]: Delete.
1153         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1154         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1155         * NEWS: Document this.
1157         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1158         Reported by Bruno Haible.
1160 2006-06-21  Eric Blake  <ebb9@byu.net>
1162         Avoid obsolete sigstack when POSIX sigaltstack is available.
1163         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1164         do likewise.
1165         * configure.ac (AC_CHECK_HEADERS): Likewise.
1166         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1167         obsolete and most hosts now have it in signal.h.
1168         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1169         (AC_CACHE_CHECK): Cache decision to use stackovf.
1170         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1171         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1172         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1173         simplify later code.
1174         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1175         in case of dereferencing a member of a NULL pointer.
1176         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1177         POSIX handler.
1178         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1179         EXIT_FAILURE in error, indent preprocessor directives.
1180         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1181         siginfo.h.
1182         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1183         Reported by Santiago Vila.
1185 2006-06-19  Eric Blake  <ebb9@byu.net>
1187         * THANKS: Update.
1189 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1191         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1192         (check, installcheck): Use it, for OS/2.
1194 2006-06-18  Eric Blake  <ebb9@byu.net>
1196         Consistently use "GNU M4" as package name, "m4" as executable
1197         name.
1198         * NEWS: Document previous fix.
1199         * THANKS: Update.
1200         * README: Fix grammar.  Document that --enable-changeword is on
1201         its last leg.
1202         * doc/m4.texinfo (Top, Changeword): Likewise.
1203         (Sysval): Enhance this test.
1204         (History): Backport this section from CVS head, and update.
1206 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1207             Eric Blake  <ebb9@byu.net>
1209         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1210         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1211         big-endian and little-endian wait status definitions.
1212         (m4_sysval): Use WEXITSTATUS.
1213         Reported by Andreas Buening.
1215 2006-06-18  Eric Blake  <ebb9@byu.net>
1217         * configure.ac (AC_INIT): Bump version number.
1218         * NEWS: Describe changes in 1.4.4c.
1220 2006-06-17  Eric Blake  <ebb9@byu.net>
1222         Release 1.4.4b:
1224         * configure.ac (AC_INIT): Bump version number.
1225         * NEWS: Describe changes since 1.4.4.
1226         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1228         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1229         bootstrap.
1230         * checks/Makefile.in (maintainer-clean): Add missing target.
1231         * COPYING: Remove generated file from CVS.
1233 2006-06-16  Eric Blake  <ebb9@byu.net>
1235         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1237 2006-06-15  Eric Blake  <ebb9@byu.net>
1239         * checks/wrapfifo.m4: New file.  Use it...
1240         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1241         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1243         * src/m4.h (to_uchar): New function.
1244         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1245         isdigit, isalpha, isupper, islower, isspace, isalnum.
1246         * src/builtin.c (expand_user_macro): Likewise.
1247         * src/format.c (format): Likewise.
1248         * src/macro.c (expand_argument): Likewise.
1249         * NEWS: Document this security fix.
1251         Message cleanup.
1252         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1253         * src/freeze.c (reload_frozen_state): Fix typo in message.
1254         (produce_frozen_state): Standardize on builtin, not built-in.
1255         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1257         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1258         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1259         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1260         gnulib.
1261         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1262         * m4/gnulib-cache.m4: New file, from gnulib.
1263         * bootstrap: Invoke gnulib-tool --update.
1264         * src/m4.c (main): Cast away const.
1265         * NEWS: Document that regex is updated.
1266         * THANKS: Update.
1268 2006-06-08  Eric Blake  <ebb9@byu.net>
1270         * configure.ac (changeword): Work even when changeword is not a
1271         macro.
1272         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1273         Delete; now done by automake.
1274         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1276 2006-06-07  Eric Blake  <ebb9@byu.net>
1278         * lib/regex.c (bcmp_translate): Canonicalize type name.
1279         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1280         * configure.ac (changeword): Disable changeword for the creation
1281         of configure, in case of bootstrapping with an m4 configured with
1282         --enable-changeword.
1284         Distribute a rudimentary man page.
1285         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1286         can feed help2man.
1287         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1288         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1290 2006-06-06  Eric Blake  <ebb9@byu.net>
1292         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1293         compiler warnings at -O2.
1294         * lib/getopt.c (_getopt_internal): Likewise.
1296         Cleanup of previous patches.
1297         * src/input.c (struct input_block): Remove traced member.
1298         (push_macro, init_macro_token): Don't pass trace status around.
1299         * src/m4.h (struct token_data): Remove traced member.
1300         (struct symbol, struct builtin): Reduce unused space.
1301         (TOKEN_DATA_FUNC): Simplify.
1302         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1303         (push_macro, define_builtin): Remove unused parameter.
1304         * src/builtin.c (define_builtin, builtin_init, define_macro),
1305         (m4_defn): Don't pass trace status around.
1306         * src/macro.c (expand_argument): Likewise.
1307         * src/freeze.c (reload_frozen_state): Likewise.
1308         * src/symtab.c: Whitespace cleanup.
1309         * NEWS: Clean up wording.
1310         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1311         ensure tests actually expose bugs prior to today's patches.
1313         Trace status of builtins is no longer inherited across
1314         define(...,defn(...)).  Fixes bug that autom4te had been working
1315         around.
1316         * src/builtin.c (define_builtin): Don't override trace status.
1317         * doc/m4.texinfo (Trace): Add test for this.
1318         * NEWS: Document this.
1320         When changing macro definitions inside the arguments to the macro,
1321         consistently preserve the old definition that was in effect before
1322         argument collection, similar to the C pre-processor.
1323         Reported by John Brzustowski.
1324         * NEWS: Document this change.
1325         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1326         this policy, and add tests that expose core dumps prior to this
1327         patch.
1328         * src/m4.h (struct symbol): New members to track when a symbol is
1329         still in use after removal from the symbol table.
1330         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1331         (free_symbol): Prototype.
1332         * src/macro.c (expand_macro): Track pending expansions of a
1333         symbol.  On completion, if a symbol is deleted and no longer
1334         pending, free its memory.
1335         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1336         is still in use.
1337         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1338         is still in use.
1339         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1340         in use as deleted and remove from the table without freeing
1341         memory.
1342         (symtab_print_list) [DEBUG_SYM]: More debug output.
1344         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1345         the symbol table during traversal.
1346         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1347         SYMBOL_POPDEF, since only the latter is safe with
1348         hack_all_symbols.
1350         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1351         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1352         Preserve placeholder when macro is being traced.
1353         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1354         symbol is not defined.
1355         (set_trace): Remove placeholder when no longer traced.
1356         (m4_traceon): On named traces, always reserve a slot in the
1357         symbol table.
1358         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1359         * NEWS: Document new trace behavior.
1360         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1361         no matter whether that macro is currently defined.
1362         (Incompatibilities): Document differences between traditional and
1363         GNU trace.
1365 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1366             Eric Blake  <ebb9@byu.net>
1368         * src/m4.h (hash_table_size): Now size_t instead of int.
1369         * src/m4.c (hash_table_size): Likewise.
1370         (main): Adjust to this; use atol rather than atoi.
1371         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1372         (symtab_init, lookup_symbol, hack_all_symbols):
1373         Use size_t for sizes and indexes, not int.
1374         (symtab_print_list) [DEBUG_SYM]: Likewise.
1375         (hash): Likewise.  Don't case-fold in the hash function.
1376         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1377         Don't assume hash word is 32 bits.
1378         * NEWS: Document this change.
1380 2006-06-04  Eric Blake  <ebb9@byu.net>
1382         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1383         to allow compilation, for use in debugger.
1384         (profiles, current_mode) [DEBUG_SYM]: New variables.
1385         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1386         determining hash table performance.
1388 2006-05-31  Eric Blake  <ebb9@byu.net>
1389             John Brzustowski  <jbrzusto@fastmail.fm>
1391         * src/input.c (input_stack): Delete; use current_input instead.
1392         (wrapup_stack): Dynamically allocate, so that recursion is handled
1393         properly.
1394         (push_wrapup): Use current wrapup stack.
1395         (pop_wrapup): Rotate wrapup stack to current, and create new
1396         wrapup stack.
1397         (input_init): Dynamically allocate stacks.
1398         * NEWS: Update, now that recursive m4wrap can no longer cause
1399         core dump.
1401 2006-05-31  Eric Blake  <ebb9@byu.net>
1403         * lib/getopt.c: Fix copyright year.
1404         * lib/obstack.c: Ditto.
1405         * src/builtin.c: Ditto.
1407 2006-05-30  Eric Blake  <ebb9@byu.net>
1409         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
1410         Reported by John Brzustowski.
1411         (Incompatibilities): Document known POSIX incompatibilities.
1412         * THANKS: Update.
1414 2006-05-29  Eric Blake  <ebb9@byu.net>
1416         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
1417         in read-only dir.
1419         Use automake.
1420         * Makefile.am: New file.
1421         * doc/Makefile.am: Ditto.
1422         * examples/Makefile.am: Ditto.
1423         * lib/Makefile.am: Ditto.
1424         * src/Makefile.am: Ditto.
1425         * acinclude.m4: New file, renamed from aclocal.m4.
1426         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
1427         (AC_ARG_PROGRAM): Now redundant.
1428         (STACKOVF): Turn into automake conditional.
1429         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
1430         * checks/Makefile.in: Converting this dir to automake was not
1431         trivial; for now, just add missing targets demanded by top-level.
1432         * INSTALL: Remove files that are now generated from CVS.
1433         * Makefile.in: Ditto.
1434         * aclocal.m4: Ditto.
1435         * install-sh: Ditto.
1436         * mkinstalldirs: Ditto.
1437         * doc/Makefile.in: Ditto.
1438         * doc/texinfo.tex: Ditto.
1439         * examples/Makefile.in: Ditto.
1440         * lib/Makefile.in: Ditto.
1441         * src/Makefile.in: Ditto.
1443         * AUTHORS: Backport from CVS head, and update.
1444         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
1446 2006-05-27  Eric Blake  <ebb9@byu.net>
1448         * lib/regex.c (regex_compile): Kill compiler warnings.
1449         * lib/getopt.c: Likewise.
1450         * lib/obstack.c: Likewise.
1451         * src/builtin.c (builtin_init): Likewise.
1452         * src/path.c (path_search): Likewise.
1454         * doc/m4.texinfo: Fix usage of a vs. an.
1455         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
1456         overfull hbox warnings.
1457         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
1459         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
1460         quoting.
1461         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
1462         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
1463         assume C89.
1464         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
1465         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
1466         * src/Makefile.in: Delete remains of ansi2knr.
1467         * src/ansi2knr.1: Delete.
1468         * src/ansi2knr.c: Delete.
1470 2006-05-25  Eric Blake  <ebb9@byu.net>
1472         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
1473         `illegal'.
1475         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
1476         Reported by Karl Berry.
1478 2006-05-24  Eric Blake  <ebb9@byu.net>
1480         * Makefile.in (html): New target.
1481         * doc/Makefile.in (html, m4.html): Likewise.
1482         (MAKEINFOHTML): New macro.
1483         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
1484         rendering.
1485         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
1486         absolute URL.
1487         Reported by Bob Badour.
1489         * THANKS: Update.  Move reporter's email addresses here, instead
1490         of in ChangeLog.
1492 2006-05-11  Eric Blake  <ebb9@byu.net>
1494         * THANKS: Update.
1495         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
1496         patched on 2005-12-04.
1497         Reported by Ilya N. Golubev.
1499         * bootstrap: New file, so that generated files need not be stored
1500         in CVS.
1501         * Makefile.in (DISTFILES): Add bootstrap.
1503         Make testsuite less sensitive to doc changes.
1504         * doc/m4.texinfo: Use m4.input instead of filename.
1505         * checks/check-them (xerr): Turn m4.input into filename.
1506         * checks/Makefile.in (dist): Depend on stamp-checks.
1508         Portability updates for OS/2.
1509         * src/Makefile.in (EXEEXT, OBJEXT): Define.
1510         (LINK): Use CFLAGS.
1511         (.c.obj): Define.
1512         * lib/Makefile.in (OBJEXT): Define.
1513         (.c.obj): Define.
1514         * doc/Makefile.in (install, uninstall): Install info files into
1515         the dir listing.
1516         Reported by Andreas Buening.
1518 2006-05-09  Eric Blake  <ebb9@byu.net>
1520         * install-sh: Update to newer upstream version.
1521         * mkinstalldirs: Likewise.
1522         Reported by Andreas Buening.
1524         * src/m4.c (main): Bump copyright year.
1525         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
1526         * doc/Makefile.in (datarootdir): Likewise.
1528 2006-05-08  Eric Blake  <ebb9@byu.net>
1530         * THANKS: Update.
1531         * doc/m4.texinfo (Bugs): Backport bug email address from head.
1532         Reported by Stepan Kasal.
1534 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
1536         * input.c (match_input): Do not pass expression with side effect
1537         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
1538         * NEWS: Updated.
1540 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1542         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
1543         Reported by Damian Menscher.
1545 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1547         * configure.ac (AC_INIT): Bump to 1.4.4a.
1549 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1551         Release 1.4.4:
1553         * configure.ac (AC_INIT): Bump to 1.4.4.
1554         * NEWS: Describe 1.4.4's changes.
1555         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
1557 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
1559         * src/m4.c: fix return code when non-existent files are processed
1561 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
1563         * README: update email address for bug reports.
1565 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
1567         * doc/m4.info: Generated files are not kept in the repository.
1569 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
1571         The FSF are moving offices today.  Changed their contact address
1572         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
1573         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
1575         Also, some of the files here were never updated from the previous
1576         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
1577         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
1579 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
1581         * Makefile.in (bindir, infodir): Substitute from configure rather
1582         than hardcode.
1583         * doc/Makefile.in (infodir): Ditto.
1584         * src/Makefile.in (bindir): Ditto.
1585         * NEWS: Updated.
1587 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
1589         Changes needed to automate the release process for 1.4.3:
1591         * Makefile.in (dist): Make .tar.bz2 tarball too.
1592         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
1593         (cvs-news): Look 1 line further down for NEWS release number.
1594         (cvs-dist): We don't use automake, so make dist is fine.
1595         Remove double . before suffixes.
1596         (cvs-release): Don't mention manual.html.
1597         (fetch): Get latest gendocs files.
1598         (web-manual): Rewritten to use gendoc for multiformat manuals.
1599         * doc/gendocs.sh: Don't save an old version in m4 CVS!
1600         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
1601         preserving, but case insensitive, so generating html docs per node
1602         clashes between Index.html, the node file, and index.html, the
1603         top-level of the document tree...
1604         (Index macro): ...so renamed to this.  Changed all references.
1606 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1608         * configure.ac (AC_INIT): Bump to 1.4.3a.
1610 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1612         Release 1.4.3:
1614         * configure.in (AC_INIT): Bump to 1.4.3.
1615         * NEWS: Describe 1.4.3's changes.
1617 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
1619         * Makefile.maint: New file with release rules, from CVS libtool.
1620         * Makefile.in (DISTFILES): Add Makefile.maint.
1621         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
1622         canonical versions.
1624 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
1626         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
1627         checks/47.patsubst, with a redundant @comment to prevent emacs
1628         from removing it accidentally again.
1629         * checks/get-them: Allow for trailing spaces tucked behind
1630         @comment marks.
1632 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
1634         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
1635         * src/Makefile.in (install, uninstall): Likewise.
1637 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
1639         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
1640         on Cygwin.
1641         Reported by Eric Blake.
1643 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
1645         * lib/regex.c, lib/regex.h: Updated from gnulib.
1646         * src/input.c (set_word_regexp):  Don't change the word_regexp
1647         unless it compiles correctly.
1648         * NEWS: Updated.
1649         Reported by Frank Schwidom.
1651         * Makefile.in (stamp-h): Regenerate config.h properly.
1653 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
1655         * configure.ac (AC_DEFINE): Fix overquoting of description
1656         argument.
1658         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
1659         recognition macros.
1660         * src/freeze.c (produce_frozen_state): Use \n line-endings even
1661         on Windows, so that the frozen file reader will work.
1662         Reported by Josef T. Burger.
1664         * src/m4.c (main): Modernise the --version output.
1666 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
1668         Modernise the configury a little to prevent spurious errors from
1669         Autoconf-2.59's autoreconf:
1671         * config.h.in: Renamed to...
1672         * config-h.in: ...this to better support DOS 8.3 file systems.
1673         * acconfig.h: Removed.
1674         * configure.in: Renamed to...
1675         * configure.ac: ...this, and AC_DEFINE used to declare config.h
1676         entry comments.  Slight reorganisation and reformatting.
1677         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
1678         entry comments.
1679         (AC_INIT): Use a modern 3 argument call.
1680         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1681         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
1682         s/PRODUCT/PACKAGE/g.
1683         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
1684         config.h.in.  Added configure.ac, config-h.in.
1685         (stamp-h.in): Removed acconfig.h from dependencies.
1686         (configure): Depends on configure.ac, not configure.in.
1687         * doc/Makefile.in (stamp-vti): Ditto.
1688         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
1689         difference between PRODUCT="m4" and PACKAGE="GNU M4".
1690         * configure: Regenerated.
1692 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
1694         * src/output.c (mkstemp): Make non-static, and build regardless of
1695         HAVE_TMPFILE; src/builtin.c also needs this replacement.
1696         * NEWS: Update.
1698 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
1700         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
1701         changes from your editor buffer first.
1703         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
1704         * src/m4.c: And include them as appropriate.
1705         * NEWS: Updated.
1707 2004-09-09  Andreas Schwab  <schwab@suse.de>
1709         Refactoring of the string read case in next_char provides about a
1710         20% speedup of M4 as typically used by autoconf:
1712         * src/input.c (next_char_1): Renamed from next_char.
1713         (next_char): New macro.
1714         * NEWS: Updated.
1716 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
1718         * configure.in (VERSION): Bump to 1.4.2a.
1720 2004-08-19  Paul Eggert  <eggert@twinsun.com>
1722         * Release 1.4.2.
1724         * configure.in (VERSION): Bump to 1.4.2.
1725         * News: Describe 1.4.2's changes.
1727         * src/m4.c (reference_error): Preserve errno, since M4ERROR
1728         relies on this.
1729         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
1730         (m4_maketemp): Clear errno before calling mkstemp.
1731         * src/path.c (path_search): Don't let "free" trash errno when
1732         returning NULL.
1733         * src/output.c (insert_file): Don't assume errno has a valid
1734         value simply because fread returns zero.  This fixes a
1735         portability bug reported by Marion Hakanson in
1736         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
1738 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
1740         * configure.in (VERSION): Bump to 1.4.1a.
1741         * NEWS: Place holder for next stable release.
1743 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
1745         * Release 1.4.1.
1747         * configure.in (VERSION): Bump to 1.4.1.
1748         * NEWS: Describe 1.4.1's changes.
1750         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
1751         pacify Autoconf 2.59.
1753         * doc/m4.texinfo: Insert commas after @xref's that lack them,
1754         to pacify Texinfo 4.7.
1755         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
1757         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
1758         pacify Sun C compilers.
1760 2003-09-28  Akim Demaille  <akim@epita.fr>
1762         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
1763         botch.
1765 2003-09-03  Santiago Vila  <sanvila@debian.org>
1767         * examples/stackovf.sh: Use tempfile if available.
1769 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
1771         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
1772         * src/output.c (m4_insert_file): Do not mix buffered and
1773         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
1775 2001-02-01  Santiago Vila  <sanvila@debian.org>
1777         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
1778         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
1780 2001-02-01  Matt Kraai  <kraai@debian.org>
1782         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
1783         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
1784         empty file rather than to a nonexistent file.  This closes a common
1785         security hole.
1786         * src/builtin.c (m4_maketemp): Implement the above, by using
1787         mkstemp rather than mktemp.  (trivial change)
1789 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
1791         * src/builtin.c (expand_ranges): Added break after trailing dash.
1792         This caused misbehaviors on some systems.
1794 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
1796         * Release 1.4.
1798         * doc/Makefile.in (realclean): Also remove stamp-vti.
1799         Reported by Eric Backus.
1801 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
1803         * src/freeze.c (produce_frozen_state): If the frozen file cannot
1804         be opened, return immediately after producing the error message.
1805         Reported by Andreas Schwab.
1807         * configure.in: Check for const only after having found possible
1808         ANSIfying compiler flags, this is of no use to check it before.
1809         Reported by Alexander Lehmann.
1811 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
1813         * src/macro.c (collect_arguments): Cast obstack arguments to
1814         (voidstar), so avoiding compiler warnings.
1815         Reported by Joseph E. Sacco.
1817         * src/freeze.c (produce_frozen_state): Cast printed lengths to
1818         (int) so they correspond to %d format items.
1819         Reported by Joseph E. Sacco.
1821         * src/m4.c (main): Cast the argument to xfree to (voidstar).
1822         * src/symtab.c (free_symbol): Idem.
1823         Reported by Karl Vogel.
1825 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
1827         * Makefile.in (DISTFILES): Distribute BACKLOG.
1829         * configure.in: Define PRODUCT and VERSION.
1830         * acconfig.h: Document PRODUCT and VERSION.
1831         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
1832         constant string m4 and variable or parameter named version.
1834 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
1836         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
1837         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
1838         defines __STDC__ to 0, for indicating it is *not* ANSI!
1839         Reported by Kaveh R. Ghazi.
1841         * configure.in: Added obsolescent tests for AIX and Minix.
1843         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
1844         which texclean does not exist anymore.
1845         Reported by Eric Backus, Jim Meyering, John David Anglin and
1846         Joseph E. Sacco.
1848 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
1850         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
1851         Reported by John David Anglin.
1853         * src/ansi2knr.c: New version, sent by Peter Deutsch.
1854         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
1855         ANSI2KNR, depending on the fact the compiler is ANSI or not.
1856         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
1857         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
1858         of $U, put underline in extensions rather than in basenames.  Use
1859         implicit rules, now that regularity makes this possible.
1860         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
1861         of ansi2knr whenever it is needed.
1862         * configure.in: Adjusted for correct STACKOVF substitution.
1863         * src/debug.c (trace_format): When not __STDC__, use (...) as a
1864         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
1865         Reported by David MacKenzie.
1867         * Makefile.in: Remove binprefix.  Use transform_name instead.
1868         Reported by David MacKenzie.
1870         * doc/Makefile.in: Create version.texi, use it, clean it.
1871         Reported by Jim Meyering.
1873 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
1875         * Makefile.in (all, install, uninstall): Depend on Makefile.
1877         * Makefile.in: For actions invoking $(MAKE) from within compound
1878         sh statements, exit non-zero if the sub-make fails.  Otherwise,
1879         the top-level make may exit successfully when it should fail.
1880         Reported by Jim Kingdon.
1882         * {,/*}Makefile.in: Use && after all cd, in case they fail.
1884         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
1885         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
1886         * configure.in: Substitute PRODUCT and VERSION.
1888         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
1890 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
1892         * Makefile.in (mostlyclean-local): Do not remove *~.
1893         * */Makefile.in (mostlyclean): Idem.
1894         Reported by Robert E. Brown and Richard Stallman.
1896 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
1898         * src/m4.h: Get rid of CONFIG_BROKETS.
1900 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
1902         * configure.in: Use AC_ARG_PROGRAM.
1903         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
1904         Reported by David MacKenzie.
1906 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
1908         * configure.in: Do not add -O to CFLAGS for GNU C, now that
1909         configure does it automatically.
1910         Reported by Jim Meyering.
1912 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
1914         * src/stackovf.c: Declare the handler_t typedef earlier in the
1915         code, use it for stackovf_handler.
1916         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
1917         casting sigsegv_handler.
1918         Reported by Robert Bernstein.
1920         * src/m4.c (main): Initialize program_name to argv[0] without
1921         basename'ing it.
1922         Reported by Karl Berry.
1924 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
1926         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
1927         Reported by Karl Berry.
1929 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
1931         * lib/Makefile.in (mostlyclean): Added.
1932         (TAGS): Make in $(srcdir).
1934         * configure.in: Use `choke me' in test, like everywhere!
1936         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
1937         unreacheable and useless.
1939         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
1941         * lib/Makefile.in (DISTFILES): Distribute TAGS.
1942         (distclean): Do not remove TAGS.
1943         (realclean): Remove it.
1944         * Makefile.in: Make TAGS in lib also, not just in src.
1945         Reported by Karl Berry.
1947         * Makefile.in (distclean, realclean): Instead of recursively
1948         calling $(MAKE) for the -local part, allow parallel execution of
1949         -recursive and -local, only delay the removal of config.status,
1950         which is repeated in both goals.
1952 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
1954         * Release 1.3.
1956         * Makefile.in: Group all *clean-recursive goals in one, using sed
1957         to remove `-recursive' while calling make recursively.  Also, use
1958         a subshell for each recursive $(MAKE).
1959         Reported by Jim Meyering.
1961         * src/m4.h (memcpy): Define with bcopy for BSD systems.
1962         Reported by Kaveh R. Ghazi.
1964         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
1965         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
1966         specify it.
1968         * configure.in: Use date instead of touch for stamp-h.
1969         * Makefile.in (stamp-h.in): Idem.
1971         * Makefile.in (distclean, realclean): Force serial execution of
1972         both goals, in case parallel makes are being used.
1973         Reported by Jim Meyering.
1975         * src/Makefile.in (DISTFILES): Distribute TAGS.
1976         (distclean): Do not remove TAGS.
1977         (realclean): Remove it.
1978         Reported by Karl Berry.
1980 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
1982         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
1983         to old names, for following Autoconf.
1985 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
1987         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
1988         ./install.sh will not be correctly referred to in sub-Makefiles.
1989         Reported by John David Anglin.
1991         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
1992         Reported by Eric Backus.
1994         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1995         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
1996         config.status into remaking this directory's Makefile only.
1997         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
1998         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
1999         Reported by Jim Meyering.
2001 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2003         * configure.in: Correct stack overflow detection logic, taking
2004         care of systems having only incomplete implementations (like for
2005         Pyramid 9820 OSx 5.0d).
2006         Reported by Kaveh R. Ghazi.
2008         * src/Makefile.in (TAGS): Remote -t from etags call.
2010 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2012         * lib/Makefile.in (install): Depend on all.
2014 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2016         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2017         Reported by Jim Meyering and John David Anglin.
2019         * Makefile.in (distclean-local): Delete config.log.
2020         Reported by Jim Meyering.
2022         Solidify frozen files with respect to -P:
2023         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2024         calling a function by that name.  Declare the variable.
2025         * src/m4.h: Adjust declaration for prefix_all_buitins.
2026         * src/builtin.c (builtin_init): Merge in functionality from
2027         previous prefix_all_buitins function, while making entries in the
2028         symbol table, but not modifying the builtin description itself.
2030         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2031         because *many* compilers do not accept an empty `default:'.
2032         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2033         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2035         * configure.in: Use AC_TYPE_SIGNAL.
2036         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2037         Reported by Robert Bernstein.
2039         * checks/Makefile.in (check): Modify PATH so check-them will find
2040         m4 in the src directory.
2041         * Makefile.in (check): Don't.
2042         Reported by Akiko Matsushita and Jim Meyering.
2044         * src/output.c (make_room_for, output_character_helper): New
2045         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2046         a per buffer MAXIMUM_BUFFER_SIZE.
2048         * src/output.c (output_text): New function, for optimizing the
2049         output of strings of characters.  Use it.
2051 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2053         * doc, src: New directories reorganizing the distribution.
2054         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2055         files.
2056         * Makefile.in: Adjusted.
2057         * configure.in: Configure new Makefiles.
2059         * m4.h: Declare STRING typedef.  Use it for comment and quote
2060         strings, adjusting all references.  (This is the rudiments of a
2061         beginning for the eventual withdrawal of NUL terminated strings.)
2062         * output.c (shipout_text): Accept a length parameter, and use it.
2063         All callers adjusted.
2065 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2067         * m4.h: Include <unistd.h> if it exists.
2068         * stackovf.c: Don't.
2070         Clean up for current_diversion variable:
2071         * output.c: Move current_diversion from builtin.c.
2072         * m4.h: Declare current_diversion so builtin.c can access it.
2073         * output.c (output_init, make_diversion): Initialize or update
2074         current_diversion.
2075         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2076         alone.
2078         Remove limit on number of diversions:
2079         * output.c: Replace ndiversion by diversions, declare it.
2080         (output_init): Allocate only diversion 0.
2081         (make_diversion): Allocate new diversions as needed.
2082         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2083         * m4.c: Still accept -N, but do nothing with it.
2084         Reported by David MacKenzie.
2086         Freeze diversions:
2087         * output.c (freeze_diversions): New function.
2088         * m4.h: Declare freeze_diversions.
2089         * freeze.c: Document frozen file format, revise it, call
2090         freeze_diversions to add diversions to frozen format, and code to
2091         reload them properly.
2092         * m4.c: Do not undivert automatically at end when status being
2093         frozen.  Do not call builtin_init when reloading frozen state.
2095         Speed up diversion processing:
2096         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2097         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2098         structure and variables, cached variables out of output_diversion,
2099         reallocate_diversion_for and OUTPUT_CHARACTER.
2100         (shipout_text, make_diversion, insert_diversion): Adapted to new
2101         structures.
2102         (insert_file): Use better buffering.
2103         Reported by David MacKenzie.
2105 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2107         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2108         dist works from another build directory.
2110 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2112         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2113         constant HASHMAX, for -H option to work better.
2115         * builtin.c (DECLARE): Simplify by using _ ().
2117         * freeze.c: New file.
2118         * Makefile.in: Compile it, distribute it.
2119         * m4.c: Recognize, document and process --freeze-state (-F) and
2120         --reload-state (-R) options.  Pass a true flag to builtin_init
2121         only if no reloading some state.
2122         * builtin.c (define_builtin): Remove static specifier.
2123         (find_builtin_by_name): Remove static specifier.
2124         (builtin_init): Accept and obey a flag argument.
2125         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2127 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2129         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2130         specifier.
2132         * configure.in: Implement --with-dmalloc.
2133         * acconfig.h: Document WITH_DMALLOC.
2134         * m4.h: Add code for when WITH_DMALLOC.
2136 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2138         * m4.c (long_options): Use "error-output", the dash was missing.
2139         Reported by Akiko Matsushita.
2141 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2143         * m4.h: Include <sys/types.h>.
2144         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2145         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2146         int.
2147         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2148         as size_t, not int.
2149         * builtin.c (dump_args): Declare len as size_t, not int.
2151         * debug.c: Prototype the forward declaration of debug_set_file.
2153         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2154         shadowing of this variable.
2155         * output.c (insert_diversion): Idem.
2157         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2158         (input_init): Duplicate default quote and comment strings.
2159         (set_quotes): Free previous quote strings in all cases.  Duplicate
2160         even default quote strings.
2161         (set_comment): Free previous comment strings in all cases.
2162         Duplicate even default comment strings.
2164         * configure.in: Updated for Autoconf 2.0.
2165         * Makefile.in (distclean-local): Also delete config.cache.
2167         * m4.c (usage): Reorganize the --help output by topic.  Include a
2168         description for debugging flags.
2170 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2172         * configure.in: If sigaction is available and SA_ONSTACK defined,
2173         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2174         defined, use sigvec.  Else don't compile stackovf.c.
2175         * stackovf.c (setup_stackovf_trap): Idem.
2176         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2177         and Simon Leinen.
2179 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2181         * m4.c (usage): Replace printf par fputs.
2183 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2185         * Release 1.2
2187 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2189         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2190         check for RLIMIT_STACK, combine in the checking for getrlimit.
2191         All those things are not universally available.
2192         * stackovf.c: Split setting up the trap handler and catching
2193         signals, for better taking care of various configure outcomes.
2194         * examples/stackovf.sh: Correct a typo.
2195         Reported by Eric Backus, Jim Avera and Jim Meyering.
2197 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2199         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2201 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2203         * Makefile.in: Modify so parallel make will not try making
2204         lib/libm4.a twice simultaneously.
2205         Reported by Jim Meyering.
2207 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2209         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2210         error message, for when no code possibility exists.  Even if this
2211         line is completely #ifdef'ed out, it brings a syntax error.
2212         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2214         * Makefile.in (install): Have install depend on all too, for lib
2215         to be remade as needed.
2217         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2218         providing ulimit, instead of using only ksh.
2219         Reported by Jim Avera and Joseph E. Sacco.
2221 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2223         * Makefile.in (check): Have it depend on all instead of m4.  In
2224         this way, a change in lib will be detected and processed.
2226         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2227         instead of using sscanf which stops as soon as there is a
2228         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2229         and divert(1xyzzy) were all accepted without any warning or error
2230         messages.
2231         * m4.h: Declare strtol as long if not including stdlib.h.
2232         * configure.in: Check for limits.h, and replace strtol if missing.
2233         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2234         * lib/strtol.c: New file, from elsewhere.
2235         Reported by Andreas Schwab.
2237 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2239         * macro.c (expand_macro): Cast value to (boolean) prior to
2240         assigning it to traced.
2241         Reported by Tom McConnell.
2243         * Makefile.in (m4): Always make all in lib first.
2244         Reported by Jim Meyering.
2246 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2248         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2249         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2250         handlers), and a default error message if the fault address is not
2251         available (when neither siginfo.h nor BSD sigcontext are supported).
2252         * configure.in: Changes for stackovf.h: Check for sigcontext,
2253         sigaction, sigstack, and define rlim_t as int if necessary.
2254         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2255         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2256         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2258 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2260         * configure.in: Use AC_SET_MAKE.
2261         * Makefile.in: Use @SET_MAKE@.
2262         Reported by Jim Meyering.
2264         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2265         Reported by Ian Taylor.
2267 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2269         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2270         because siginfo.h is unrelated to standard headers, and siginfo.h
2271         is already checked for.
2272         Reported by Joseph E. Sacco.
2274         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2275         PROTOTYPES.
2276         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2277         AC_PROTOTYPES.
2279 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2281         * builtin.c (substitute): Use \& to represent this part of the
2282         string which was matched by the whole regexp, instead of
2283         representing the whole string.  Any usage of \0 issues a warning
2284         and acts like \&, it will disappear in some subsequent release.
2286 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2288         * m4.c: Complete prototype for forwarded declaration of usage.
2290         * input.c (init_macro_token): Correct own reference in error
2291         message.  Previous name get_macro_func was referred to instead.
2292         (next_char):  Correct own reference in error message.  Previous
2293         name advance_input was referred to instead.
2295         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2296         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2297         and_term, not_term, logical_not_term, cmp_term, shift_term,
2298         add_term, mult_term, exp_term, unary_term, simple_term): Add
2299         prototype to forwarded declarations.  Declare parameter v1 as
2300         eval_t * instead of int *.  Same for local variable v2 in dyadic
2301         functions.  Same for result in exp_term.
2302         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2303         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2304         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2305         (shipout_int): Cast first argument of ntoa to eval_t.
2306         Reported by Thorsten Ohl.
2308         * macro.c: Complete the prototypes of forwarded expand_macro and
2309         expand_token.
2310         Reported by Thorsten Ohl.
2312         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2313         The Ultrix 3.1 compiler cannot do much with void pointers.
2315         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2316         * m4.c (xfree):  Replace void * by voidstar.
2317         Reported by Tom McConnell.
2319         * ansi2knr.1: New, from elsewhere.
2320         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2322         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2323         stamp-h does not exist yet.  This avoids running it a second time
2324         just after the initial ./configure.
2325         Reported by David MacKenzie and Tom McConnell.
2327         * m4.h: Replace the enum debug_info declaration with a series of
2328         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2329         (int) to most references, when used in expressions.
2330         Reported by Tom McConnell.
2332 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2334         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2335         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2336         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2337         the preprocessor; by not being subject to CFLAGS, this was
2338         discouraging those flags asking for ANSI compilation.
2339         * acconfig.h: Document HAVE_PROTOTYPES.
2340         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2341         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2342         Reported by Eric Backus.
2344         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2345         from the environment.  Default CFLAGS to -g if not set.
2346         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2347         * lib/Makefile.in: Have CFLAGS substituted from configure.
2348         Reported by Eric Backus and Tom McConnell.
2350         * configure.in: m4_undefine changeword before using AC_ENABLE.
2352         * m4.h: Declare prototypes for error (for ANSI compilers only),
2353         prefix_all_builtins and reference_error.
2354         Reported by Tom McConnell.
2356         * input.c (set_word_regexp): Do not try to initialize the array
2357         test from a string, this does not work with non-ANSI compilers.
2358         Reported by Eric Backus.
2360         * Makefile.in (dist): Clean examples/ before saving it.
2361         (distclean-local): Also remove stamp-h.
2362         Reported by Eric Backus.
2364         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2365         non ANSI compilers.
2366         Reported by Tom McConnell.
2368         * checks/Makefile.in (clean): Depends on mostlyclean.
2369         (mostlyclean): New goal.
2371 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
2373         * Makefile.in (DISTFILES): Distribute install.sh.
2374         * install.sh: New file, copied from elsewhere.
2375         Reported by Assar Westerlund and Kaveh R. Ghazi.
2377 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
2379         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2380         * acconfig.h: Explain ENABLE_CHANGEWORD.
2382         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2383         from code provided by Pete Chown]
2384         * m4.h: Add original_text field to u_t variant of union u.
2385         Declare TOKEN_DATA_FUNC macro.
2386         * builtin.c: Declare changeword.
2387         (m4_changeword): New function.
2388         * input.c: Include "regex.h", define variables with word regexps.
2389         (input_init): Initialize the word regexp.
2390         (set_word_regexp): New.
2391         (next_token): Declare local variables, use the previous code if
2392         default_word_regexp is true.  Else, match using a new code.  Save
2393         the original text.
2394         * macro.c (expand_token): Ship out original text if not a macro
2395         name.
2396         Reported by Krste Asanovic and Pete Chown.
2398         [These modifs all depend upon ENABLE_CHANGEWORD]
2399         * m4.h: Declare external user_word_regexp.
2400         * m4.c: Declare user_word_regexp, and initialize it from
2401         --word-regexp or -W, or NULL if not specified.
2402         * input.c: Use user_word_regexp if specified, instead of
2403         DEFAULT_WORD_REGEXP.
2405         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
2406         agree with it.
2408         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2409         * checks/Makefile.in: Empty the suffix list.
2410         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2412         * m4.c: Declare nesting_limit and initialize it to 250.
2413         Implement -LNUMBER or --nesting-limit=NUMBER to change its
2414         value.
2415         * m4.h: Declare nesting_limit as external.
2416         * macro.c (expand_macro): Stop execution whenever nesting limit
2417         is exceeded.
2418         Reported by Bengt Mertensson.
2420         * eval.c (evaluate): Diagnose excess characters in eval input.
2421         Things like `eval(08)' used to return 0 with no diagnostic.
2423         * m4.h: Capitalize first letter of all macro arguments in
2424         definitions.
2426         * m4.c: Declare warning_status, initialize it to 0.  Add new
2427         option -E, or --fatal-warnings, which sets warning_status to
2428         EXIT_FAILURE instead.
2429         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
2430         EXIT_FAILURE if not otherwise done by header files.
2431         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
2432         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
2433         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
2434         argument of all M4ERROR calls.
2435         Reported by Noah Friedman.
2437         * examples/incl-test.m4: Renamed from incl_test.m4.
2438         * examples/include.m4: Include incl-test.m4 instead of
2439         incl_test.m4.
2440         * examples/multiquotes.m4: Renamed from multi-quotes.m.
2442 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
2444         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
2445         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
2446         also tested it on a Sun Sparc workstation running SunOS 4.x.
2448         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
2449         49.format check, abusing a `union values' argument with sprintf
2450         without selecting the proper field.  Now, save the formatting type
2451         first, delaying the fetch of the corresponding argument.
2452         Reported by Joseph E. Sacco and Tom Quinn.
2454         * format.c (format): Remove const from char *fmt declaration when
2455         not HAVE_EFGCVT, because a NUL may be forced into it.
2457         * m4.h: Declare atof() when not STDC_HEADERS.
2458         Reported by Joseph E. Sacco.
2460         * Regenerate configure using Autoconf 1.11, this corrects a
2461         problem about an incorrect cpp seting on NeXT 3.1.
2462         Reported by Alexander Lehmann.
2464 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
2466         * m4.h (_): Change argument from `x' to `Args'.
2468 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
2470         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
2471         bringing more evil than good on a few systems.
2472         Reported by Greg A. Woods.
2474 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
2476         * m4.h: Rename Args() to _().
2477         * m4.h: Remove extern specifier from all function declarations.
2479 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
2481         * stackovf.c: New file implementing stack-overflow detection.
2482         * configure.in: Check for getrlimit, sigaction.  If all of
2483         standard headers, getrlimit and sigaction, define USE_STACKOVF and
2484         substitute ${U}stackovf.o for STACKOVF.
2485         * acconfig.h: Declare USE_STACKOVF.
2486         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
2487         * m4.h: Declare setup_stackovf_trap().
2488         * m4.c: Call setup_stackovf_trap().
2489         * tests/stackovf_test.sh: New file.
2491 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
2493         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
2495         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
2497 Sun Jan 30 14:24:19 1994    (pinard at icule)
2499         * m4.h: Remove definition of volatile, not used anymore.
2500         Reported by Jim Meyering and Joseph E. Sacco.
2502         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
2503         of `if ... else /* nothing */' for if macros.
2504         Reported by Jim Meyering.
2506         * builtin.c (m4_regexp): Reorganize the code for avoiding a
2507         warning from gcc about `repl' possibly used before defined.
2508         Reported by Jim Meyering.
2510         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
2511         Reported by Jim Meyering.
2513 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
2515         * m4.h: Move the conditional definition of volatile after the
2516         inclusion of system files, because they may define it first.
2518 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
2520         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
2521         get around a problem with Alpha make seeing a syntax error, there.
2522         Reported by Vern Paxson.
2524 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
2526         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
2527         Reported by Richard Stallman.
2529 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
2531         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
2532         instead of AC_HAVE_FUNCS.
2533         Reported by Noah Friedman.
2535 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
2537         * m4.c: Initialize show_help and show_version to zero.
2539         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
2540         Use them in exit() and usage() calls.
2542 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
2544         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
2545         syserr() macro.  Delete errref, add reference_error and M4ERROR.
2546         * m4.c: Replace errref, which was returning an input reference
2547         string, with reference_error, which prints it on standard error.
2548         * builtin.c, output.c: Use errno as second parameter to error,
2549         instead of using syserr() with %s.
2550         * *.c: Use M4ERROR instead of error: no more errref() with %s.
2551         Doing so, the program name appears after the input reference
2552         instead of before, which eases M-x next-error processing.
2554 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
2556         * checks/get-them: Escape braces with backslashes in patterns,
2557         because HPUX-9.01 awk needs this.
2558         Reported by Jim Meyering.
2560 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
2562         * builtin.c: Declare "FILE *popen ();".
2564         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
2565         macros, replace error_message_prefix() declaration by errref()'s.
2566         Declare xrealloc, for use in errref().
2567         * m4.c: Delete error_message_prefix() function, add errref().
2568         * *.c: Use error() systematically in place of all error macros,
2569         now that error() flushes stdout first.  Make needed adjustments.
2571         * m4.h: Remove const in sys_errlist[] declaration, it creates
2572         conflicts on SGI and Alpha.
2573         Reported by Kaveh R. Ghazi.
2575 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
2577         * m4.c: Include <getopt.h> instead of "getopt.h".
2579         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
2580         * acconfig.h: New, for documenting HAVE_EFGCVT.
2581         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
2582         use them wherever appropriate.  Also use -I. for compilations.
2583         * lib/Makefile.in: Use -I.. for compilations.
2584         * *.c: Include <config.h> or "config.h".
2586         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
2587         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
2589 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
2591         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
2593         * input.c (input_init): Initialize quote and comment strings
2594         explicitely instead of calling set_quotes and set_comment: by
2595         doing so, we ensure we do not free uninitialized variables.
2597         * checks/check-them: Reverse arguments to both diff, so the
2598         expected is on the left and the obtained on the right.
2600         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
2601         macros. Delete declarations for m4error, warning, fatal and
2602         internal_error, add declaration for error_message_prefix.
2603         * m4.c:  Delete m4error, warning, fatal and internal_error
2604         routines, add error_message_prefix routine.
2605         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
2606         warning with WARNING*, fatal with FATAL* and internal_error with
2607         INTERNAL_ERROR*.
2608         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
2609         this is not needed anymore.
2611         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
2612         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
2613         and debug_message, add declaration for debug_message_prefix.
2614         * debug.c: Remove static specifier for FILE *debug declaration.
2615         Delete debug_print and debug_message routines, add
2616         debug_message_prefix routine.
2617         * builtin.c, debug.c: Replace debug_print routine calls with
2618         DEBUG_PRINT* macro calls.
2619         * input.c, path.c: Replace debug_message routine calls with
2620         DEBUG_MESSAGE* macro calls.
2622         * m4.h: Remove inclusion of <varargs.h>.
2623         * debug.c: Include <stdarg.h> or <varargs.h>.
2624         (trace_format): Use stdarg instead of varargs if __STDC__.
2626         * configure.in: Remove checks for vfprintf and _doprnt.  These
2627         implementations use varargs tricks which are not portable enough.
2628         * lib/vfprintf.c: Deleted.
2629         * lib/_doprnt.c: Deleted.
2630         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
2631         Reported by Joel Sherrill.
2633         * path.c (add_include_directory): Use xstrdup.
2635         * builtin.c (find_builtin_by_name): Declare static.
2637         * *.[ch]: Add const to a few "char *" declarations.
2639         * configure.in: Remove commented tests for fileno() and fstat().
2640         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
2642         * debug.c (debug_flush_files): New.
2643         * m4.h: Declares it.
2644         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
2645         Reported by Nicolas Pioch.
2647 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
2649         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
2650         Reported by Joel Sherrill.
2652         * builtin.c (prefix_all_builtins): Instead of the table size, use
2653         the null entry at end for stopping the loop.  It was overwritten.
2654         Reported by Andreas Schwab and Jim Meyering.
2656         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
2657         Reported by Kaveh R. Ghazi.
2659         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
2660         Reported by Karl Vogel.
2662 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
2664         * m4.h: Do not define volatile if already defined.
2665         Reported by Rene' Seindal.
2667         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
2669         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
2670         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
2672 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
2674         * m4.h: Define strchr and strrchr in terms of index and rindex,
2675         instead of the other way around.
2676         * builtin.c, m4.c, path.c: Use strchr instead of index.
2678         * input.c (next_char): Remove a "break;" after a "return ...;".
2679         Reported by Tom McConnell.
2681 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
2683         * Release 1.1
2685         * configure.in: Do not copy check files in the build hierarchy.
2686         * checks/check-them: Identify the m4 version being checked.  For
2687         finding m4, look in $PATH instead of in the parent directory.
2688         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
2689         * checks/Makefile.in (.all-stamp): Always create check files in
2690         the source hierarchy, not anymore in the build hierarchy.
2691         (check): cd to the source hierarchy before performing checks.
2692         Do not copy nor clean COPYING anymore, take it from `..'.
2693         Reported by Tom McConnell.
2695         * Makefile.in (Makefile): Use $(SHELL).
2696         (config.status): Use $(SHELL).  Use "config.status --recheck"
2697         instead of "configure --no-create", which is obsolete.
2698         Reported by Tom McConnell.
2700 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
2702         * m4.c (usage): Use "%s" instead of "m4" in format string.
2703         Reported by Jim Meyering.
2705         * Makefile.in: Distribute mkinstalldirs.
2706         Reported by Pierre Gaumond.
2707         Reported by Jim Meyering.
2708         Reported by Tom McConnell.
2709         Reported by Andreas Gustafsson.
2711         * checks/check-them: Renamed from checks/check_them.
2712         * checks/get-them: Renamed from checks/get_them.
2713         * checks/.all-stamp: Renamed from checks/.all_stamp.
2714         * checks/Makefile.in: Changed accordingly.
2715         Reported by Jim Meyering.
2717 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
2719         * lib/Makefile.in (dist): Correct permissions on files.
2721         * output.c: Declare tmpfile, some systems don't.
2723 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
2725         * checks/Makefile.in (dist): Correct permissions on files.
2727         * Makefile.in (dist): Ensure recursive linking for subdirectory
2728         `examples', also set read/write permissions on all its files.
2730         * mkinstalldirs: New, from elsewhere.
2731         * Makefile.in: Use it.
2733         * debug.c: Synchronize debug messages and regular output when
2734         the debug file and stdout are redirected to the same file.
2735         * configure.in: Add (commented) checks for fileno and fstat.
2736         Reported by Jim Avera.
2738         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
2739         etc., arguments, then ignore the superfluous one.  m4 used to
2740         diagnose missing arguments and return the empty string.
2741         Reported by Nick S. Kanakakorn.
2743 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
2745         * m4.c (main): At end of all input, ensure all undiverted text
2746         goes to the main output stream.
2747         Reported by Andreas Gustafsson.
2749         * m4.c (main): exit (0), instead of return 0.
2751         * m4.c: Implement -P and --prefix-builtins.
2752         * builtin.c: Delete const specifier on builtin_tab.
2753         (prefix_all_builtins): New.
2754         Reported by Noah Friedman.
2755         Reported by Scott Bartram.
2757         * c-boxes.el: New, from elsewhere.
2758         * Makefile.in: Distribute it.
2760         * m4.h: Do not define bcopy if <string.h> defines it.
2761         Reported by Stephen Perkins.
2763         * builtin.c (define_macro): Allow a missing second argument, in
2764         which case it is implied empty.  Affects define and pushdef.
2765         Reported by Eric Allman.
2767 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
2769         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
2770         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
2771         * builtin.c: Initialize all the blindness fields in builtin_tab.
2772         (define_builtin): Copy the blindness of a builtin into its symbol.
2773         * macro.c (expand_token): Avoid processing a blind builtin if the
2774         next character is not an opening parenthesis.
2775         Reported by David MacKenzie.
2776         Reported by Noah Friedman.
2778         * configure.in: Ensure an exit status of 0 on completion.
2779         Reported by Vivek P. Singhal.
2781         * eval.c (eval_lex): Admit both lower and upper case letters for
2782         bases greater than 10.  Only lower case letters were accepted.
2784         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
2785         Reported by Krste Asanovic.
2787         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
2788         * eval.c (logical_not_term): New name for not_term.
2789         * eval.c (xor_term): New, between or_term and and_term.
2790         * eval.c (not_term): New, between and_term and logical_not_term.
2791         * eval.c (shift_term): New, between cmp_term and add_term.
2792         Reported by Krste Asanovic: ~, ^, <<, >>.
2793         Reported by Ben A. Mesander: ** vs ^.
2795         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
2796         * m4.h: Delete xrealloc.c.
2797         * lib/xmalloc.c: New, from elsewhere.
2798         * lib/xstrdup.c: New, from elsewhere.
2799         * lib/Makefile.in: Distribute and compile them.
2801         * m4.c: Change progname to program_name.
2802         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
2803         * lib/error.c: New, from elsewhere.
2804         * lib/Makefile.in: Distribute and compile error.c.
2805         * configure.in: Check AC_VPRINTF and for strerror.
2806         * m4.c: Delete cmd_error.  Use error instead.
2807         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
2809         * m4.h: Delete #define const, let Autoconf takes care of this.
2811         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
2812         Merge parse_args into main.  Declare argv to be `char *const *',
2813         then remove superfluous casts.
2815         * m4.c: Rename --no-gnu-extensions to --traditional.
2816         Reported by Ben A. Mesander.
2818         * m4.c (usage): Add a status parameter.  Supply one in various
2819         calls.  Add --help processing.  Remove -V for --version.
2821         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
2823         * lib/Makefile.in: Have an AR=ar declaration.
2824         Reported by Eric Backus.
2825         Reported by Bjorn R. Bjornsson.
2826         Reported by Tom Tromey.
2827         Reported by Kristine Lund.
2828         Reported by Marion Hakanson.
2830 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
2832         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
2833         Reported by Noah Friedman.
2835 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
2837         * Makefile.in: Remove MDEFINES and cleanup.
2839 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
2841         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
2842         Create a gzip file.
2844 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
2846         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
2847         ensure 777 mode for directories, so older tar's will restore file
2848         modes properly.
2850 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
2852         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
2853         so the installer can override automatically configured choices.
2854         Reported by Karl Berry.
2856 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
2858         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
2859         previous version was not working properly on m68k-hp-bsd4.3.
2860         Reported by Roland McGrath.
2862         * lib/_doprnt.c: Stolen from Oleo distribution.
2863         * configure.in: Check for _doprnt.c if vfprintf.c selected.
2864         * lib/Makefile.in: Distribute _doprnt.c.
2865         Do not distribute regex.[ch].old anymore.
2867 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
2869         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
2870         Richard wants it there.
2872 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
2874         * Makefile.in: Add DEFS to MDEFINES.
2875         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
2876         (libm4.a): Remove the library before creating it.
2877         (distclean): Remove tags and TAGS too.
2879 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
2881         * Makefile.in (dvi, m4.dvi): New goals.
2883         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
2884         macro.c, output.c, path.c, symtab.c: Change Copyright from
2885         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
2887         * examples/divert.m4: Deleted, this bug has been corrected.
2889         * Makefile.in (texclean, mostlyclean): New goals.
2891         * Makefile.in (clean): Remove clutter from ansi2knr.
2892         Reported by Pierre Gaumond.
2893         Reported by Greg A. Woods.
2895 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
2897         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
2898         might well use CFLAGS is s/he needs it.
2900         * Makefile.in: Allow installation of info files from a separate
2901         build directory.
2902         Reported by Jason Merrill.
2903         Reported by David MacKenzie.
2904         Reported by Skip Montanaro.
2905         Reported by Erez Zadok.
2906         Reported by Assar Westerlund.
2908 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
2910         * Release 1.0.3
2911         This is still a beta release for the future GNU m4 version 1.1.
2913         * lib/alloca.c: New, from elsewhere.
2914         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
2916         * m4.h: Do not define index/rindex if already defined.  If
2917         FALSE/TRUE are already defined, do not redefine them, but merely
2918         define boolean typedef to int.
2920         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
2921         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
2922         because some C compilers do not like connectives with #ifdef.
2923         * m4.h: Define `volatile' only if __GNUC__, instead of once for
2924         __GNUC__ and once for __STDC__.
2925         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
2927         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
2928         Makefile dependencies.  Without it, make keeps destroying and
2929         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
2931         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
2932         to diversion/DIVERSION, this was a spelling error.
2934         * m4.c: Declare version[], remove #include "version.h".
2935         * version.h: Deleted.
2936         * Makefile.in: Remove references to version.h.
2938         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
2939         production, by using a simpler and more robust algorithm.  This
2940         solves the problem of synclines sometimes written in the middle of
2941         an output line.  Delete sync_line() and output_lines variable.
2942         * m4.h: Remove sync_line prototype and output_lines declaration.
2943         * input.c (next_char), output.c (shipout_text): Remove references
2944         to output_lines.
2945         * input.c (push_file, pop_file): Merely put the value -1 in
2946         output_current_line instead of calling sync_line, for delaying a
2947         single `#line NUM FILE' before next output line.  Do not test
2948         for sync_output, because this is unnecessary clutter.
2949         * output.c (make_divertion, insert_divertion): Idem.
2950         * input.c: Rename must_advance_line to start_of_input_line, for
2951         consistency.
2953         * debug.c (trace_header): Select a new debug line format, which
2954         better complies with GNU standards for formatting error messages.
2955         With option `-dfl', M-x next-error might be used on the output.
2956         * m4.c (vmesg): Adjust format of error output to GNU standards.
2957         * m4.texinfo: Adjust examples for `make check' to work.
2959         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
2960         case for enum debug_info constants, which were all lower case.
2962         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
2963         re_search_2.
2964         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
2965         collected patches.  I tried a few times using newer regex.[ch], it
2966         mysteriously stopped aborting with this one.  Insecure feeling...
2967         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
2969 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
2971         * m4.c: Change `--no-warnings' to `--silent'.
2972         Reported by David MacKenzie.
2974         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
2975         leave it off for now.  See comment in m4.c for justification.
2976         Reported by David MacKenzie.
2978         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
2979         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
2981         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
2983         * Makefile.in: Ensure recursive cleaning is done before local
2984         cleaning for all clean goals.
2986         * builtin.c (ntoa): Ensure the value is always interpreted as a
2987         signed quantity, whatever the radix is.
2989 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
2991         * builtin.c, format.c, input.c: Split long lines.
2992         * m4.c: Use typedef macro_definition instead of struct
2993         macro_definition.
2994         * symtab.c: Use typedef symbol instead of struct symbol.
2996 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
2998         * *.[ch]: Remove all trailing whitespace, in code and comments.
3000         * configure.in: Find some awk.
3001         * Makefile.in: Add $(AWK) to MDEFINES.
3002         * checks/Makefile.in: Transmit $(AWK) to get_them.
3003         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3004         awk script when switching files, because without this, mawk runs
3005         out of file descriptors.
3007 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3009         * Makefile.in (realclean): Delete m4.info*.
3010         Reported by Jim Meyering.
3012         * Makefile.in: Adjust and link with checks/Makefile.
3013         * checks/Makefile.in: New.
3014         * configure.in: Output checks/Makefile.
3016         * checks/get_them: Have the dnl header of each test more
3017         recognizable by next-error, also use a better message.
3019 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3021         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3022         And use that only if __GNUC__ since we're using it's GCC-specific
3023         semantics that tell the compiler the associated function doesn't
3024         return.
3026         * builtin.c (substitute): Don't use character as an array index.
3027         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3028         warnings with gcc -W -Wall on systems with qsort prototype.
3029         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3030         from gcc -W -Wall.
3032         * eval.c (most functions): Add parentheses to assignments used
3033         as truth values go avoid warnings from gcc -Wall.
3035         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3036         any functions that don't need external scope.
3038         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3039         (many functions and arrays): Declare `const'.
3041 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3043         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3044         removing the declaration from m4.h.  Also rename false to FALSE
3045         and true to TRUE.
3047         * lib/Makefile.in (Makefile): New goal.
3049         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3050         so heavily loaded.  It gets more easily overridable, calling make.
3051         Reported by Jim Meyering.
3053         * Makefile.in (dist): Get .fname from the current directory name,
3054         instead of from version.h.  I need updating many files manually,
3055         when the version changes, version.h is just one of them.
3057 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3059         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3060         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3061         Reported by Tom McConnell.
3063 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3065         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3066         39.cleardiv, which were describing missing or spurious newlines.
3067         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3068         do not depend on machine word size, `/bin/false' implementation,
3069         or `wc' output format.  `make check' is more dependable, now.
3071         * checks/check_them: Summarize the failed tests by listing their
3072         name, at end.  If none, issue `All checks successful'.  Output
3073         `Checking' instead of `Input file:'.
3075         * checks/get_them, checks/check_them: Reindented.
3077         * Makefile.in (dist): chmod a+r before making the tar file.
3079 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3081         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3083         * input.c (next_token): Reinitialize token_buttom just after using
3084         it as a watermark with obstack_free.  Or else, a future token, big
3085         enough for triggering reallocation of the obstack chunk, could
3086         void the initialized value of token_buttom, later causing panic in
3087         obstack_free.  Rename token_buttom to token_bottom everywhere.
3089         * m4.h: Before declaring errno, first include <errno.h> and
3090         ensure that it does not define errno.
3091         Reported by Richard Stallman.
3093 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3095         * builtin.c: Define and use DECLARE macro for builtins.
3097         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3098         argument, this is a common idiom for introducing long comments.
3100         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3101         arguments.  The last argument was silently ignored.
3103         * m4.c (cmd_error): Add a missing semicolon before va_end().
3105 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3107         * Makefile.in: Now handle protoized sources.  Define and use U.
3108         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3109         Add `aclocal.m4' to `configure' dependencies.
3110         * ansi2knr.c: New, from Ghostscript distribution.
3111         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3112         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3113         * aclocal.m4: New, provide FP_PROTOTYPES.
3114         * m4.h: Conditionnaly protoized through Args, save for varags.
3115         * builtin.c: Protoized.  Then:
3116         Include <sys/types.h> if size_t is not defined, before "regex.h".
3117         (m4_ifelse): Fetch built-in name properly for diagnostic.
3118         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3119         (m4_regexp): Add const to `msg' declaration.
3120         (m4_patsubst): Add const to `msg' declaration.
3121         * debug.c: Protoized, save for varargs.
3122         * eval.c: Protoized.
3123         * format.c: Protoized.
3124         * input.c: Protoized.
3125         * m4.c: Protoized, save for varargs.  Then:
3126         (xfree): Accept void * instead of char *.
3127         (xmalloc): Return void * instead of char *.
3128         (xrealloc): Accept and return void * instead of char *.
3129         * macro.c: Protoized.
3130         * output.c: Protoized.
3131         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3132         * symtab.c: Protoized.
3134 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3136         * m4.texinfo: Remove directory from diagnostics in 30.include,
3137         51.eval, 56.errprint and 57.m4exit tests.
3139         * m4.h: Remove declarations for int or void system functions, they
3140         cause more conflicting trouble than they make good.
3142         * configure.in: Avoid configuration header file.  Add some tests.
3143         * m4.h: Remove #include "config.h".
3144         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3145         Then, rewritten for better compliance with GNU standards.
3147 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3149         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3150         because of a misplaced #endif.
3152         * Many *.[hc] files: Correct intra-line spacing here and there,
3153         according to GNU indent 1.6 advice.
3155         * configure.in: New, using Autoconf 1.2.
3156         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3157         * Delete old configure.in, configure, etc/configure.in,
3158         etc/configure, lib/configure.in, lib/configure and config/*.
3159         Reported by Jason Merrill.
3161         * symtab.c (hash): Change (char) NULL to '\0'.
3162         Reported by Jason Merrill.
3164         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3165         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3166         * version.h: De-automatize, force value in.
3168         * m4.c: Changes in order to use a newer getopt.h.
3169         Reported by David MacKenzie.
3171         * checks/: New name for examples/.
3172         * checks/get_them: New location for etc/get_examples.
3173         * checks/check_them: New location for etc/check_examples.
3174         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3175         * lib/vfprintf.c: New location for etc/vfprintf.c.
3176         * Delete empty etc/.
3177         * examples/: New name for test/.
3179 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3181         * Makefile.in (check): Add m4 as dependency.
3183         * m4.c: Accept --no-warnings instead of --no_warnings, and
3184         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3185         usage message more informative.
3186         Reported by David MacKenzie.
3188 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3190         * etc/check_examples: New name for check_examples.sh.
3191         * etc/get_examples: New name for get_examples.sh.
3192         * Makefile.in, etc/Makefile.in: Use new names.
3194         * Makefile.in: Transmit $(CC) while making in lib.
3196         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3197         code disposition by hand.
3199 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3201         * m4.h: Delete definitions for abort() and exit().
3202         Reported by Richard Stallman.
3204         * config/hmake-unicos, config/s-unicos.h: New files.
3205         Reported by Hal Peterson.
3207         * eval.c (exp_term): Have N^0 return 1.
3208         Reported by Michael Fetterman.
3210         * eval.c, input.c, m4.h: Remove last comma in enums.
3211         Reported by Mike Lijewski.
3213         * Transfer of maintenance duties from Rene' to Franc,ois.
3215 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3217         * Release 1.0.  Many thanks to those, who provided me with bug
3218         reports and feedback.
3220         * Uses GNU configure, taken from the gdb distribution.
3222         * Uses GNU getopt(), with long option names.
3224         * The -Q/+quiet option is added, which suppresses warnings about
3225         missing or superflous arguments to built-in macros.
3227         * Added default options via the M4OPTS environment variable.
3229         * The built-in format can now be configured to use sprintf as
3230         the formatting engine, for systems without [efg]cvt(3).
3232         * GNU library code is moved to the ./lib subdirectory; other
3233         utility files are now in ./etc.
3235         * Several minor bugs have been fixed.
3237 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3239         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3240         Francois Pinard and Roland H. Pesch for providing me with reports.
3242         * The builtins incr and decr are now implemented without use of
3243         eval.
3245         * The builtin indir is added, to allow for indirect macro calls
3246         (allows use of "illegal" macro names).
3248         * The debugging and tracing facilities has been enhanced
3249         considerably.  See the manual for details.
3251         * The -tMACRO option is added, marks MACRO for tracing as soon
3252         as it is defined.
3254         * Builtins are traced after renaming iff they were before.
3256         * Named files can now be undiverted.
3258         * The -Nnum option can be used to increase the number of
3259         divertions available.
3261         * Calling changecom without arguments now disables all comment
3262         handling.
3264         * The function m4_patsubst() is now consistently declared
3265         static.
3267         * A bug in dnl is fixed.
3269         * A bug in the multi-character quoting code is fixed.
3271         * Several typos in the manual has been corrected.  More probably
3272         persist.
3274         * The m4.info file is now installed along with the program.
3276 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3278         * Updated and enhanced version.  Release 0.75, manual 0.07.
3280         * Implemented search path for include files (-I option and
3281         M4PATH envronment variable).
3283         * Implemented builtin "format" for printf-like formatting.
3285         * Implemented builtin "regexp" for searching for regular
3286         expressions.
3288         * Implemented builtin "patsubst" for substitution with regular
3289         expressions.
3291         * Implemented builtin "esyscmd", which expands to a shell
3292         commands output.
3294         * Implemented "__file__" and "__line__" for use in error
3295         messages.
3297         * Implemented character ranges in "translit".
3299         * Implemented control over debugging output.
3301         * Implemented multi-character quotes.
3303         * Implemented multi-character comment delimiters.
3305         * Changed predefined macro "gnu" to "__gnu__".
3307         * Changed predefined macro "unix" to "__unix__", when the -G
3308         option is not used.  With -G, "unix" is still defined.
3310         * Changed "shift", "$@" and "$*" to not insert spaces afters
3311         commas.
3313         * Added program name to error messages.
3315         * Fixed two missing null bytes bugs.
3317 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3319         * Initial beta release.  Release 0.50, manual 0.05.
3321         -----
3323         $Revision$ $Date$
3325         Local Variables:
3326         coding: utf-8
3327         End:
3329         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3330         2005, 2006 Free Software Foundation, Inc.
3332         Copying and distribution of this file, with or without
3333         modification, are permitted provided the copyright notice
3334         and this notice are preserved.