* src/input.c (set_quotes): Don't allow empty end-quote with
[m4/ericb.git] / ChangeLog
blob7e218df1a435e3d1ff8e8874af55efd481bd22a4
1 2006-10-28  Eric Blake  <ebb9@byu.net>
3         * src/input.c (set_quotes): Don't allow empty end-quote with
4         non-empty start-quote.
5         (set_comment): Likewise for end-comment.
6         * src/builtin.c (m4_changecom): Adjust caller.
7         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
8         match behavior.
9         (Incompatibilities): Document another POSIX bug.
10         * NEWS: Mention this change.
12 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
15         files.
17 2006-10-26  Eric Blake  <ebb9@byu.net>
19         Silence -Wwrite-strings -Wpointer-arith warnings.
20         * src/builtin.c (define_user_macro): Allow NULL argument.
21         (m4_builtin, m4_indir): Cast away const of "".
22         * src/format.c (format): Likewise.
23         * src/macro.c (collect_arguments): Likewise.
24         (expand_macro): Avoid math on void*.
25         * src/m4.c (main): Adjust caller.
26         * src/output.c (freeze_diversions): Detect off_t overflow.
28         * src/input.c (pop_input): Remove unnecessary code.
30 2006-10-25  Eric Blake  <ebb9@byu.net>
32         * src/symtab.c (symtab_init): Avoid size_t overflow.
33         * src/output.c (make_diversion): Avoid size_t overflow.
34         * doc/m4.texinfo (Diversions): Test this fix.
35         * src/input.c (input_block): Remove unused member.  Reduce size
36         of struct.
37         (push_file, pop_input): Avoid useless assignment.
38         * NEWS: Document the bug fix.
40         Redo location tracking.  Instead of having just files track the
41         line to return to when popping input, now all input blocks track
42         their current line.
43         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
44         needed.
45         (input_block): Have line and file storage for all input types, and
46         rename some members.
47         (input_change): New global flag.
48         (push_file, push_macro, push_string_init, push_wrapup): Store
49         location.
50         (push_string_finish, pop_input, pop_wrapup): Notice changes in
51         input blocks.
52         (peek_input): Adjust to new member names.
53         (next_char, next_char1): Adjust location if needed.
54         (skip_line): Simplify restoring location.
55         * doc/m4.texinfo (Location): Augment the test to catch line
56         location of expansion of multi-line arguments.
57         Reported by Stepan Kasal.
59 2006-10-23  Eric Blake  <ebb9@byu.net>
61         * doc/m4.texinfo (Macro Arguments): Document that leading space
62         in argument collection stops at macro expansion.
63         (Incompatibilities): Document POSIX whitespace wording issue.
65 2006-10-20  Eric Blake  <ebb9@byu.net>
67         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
68         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
69         end of a TeX line splits incorrectly.
70         (Foreach, Improved foreach): Write these sections, borrowing ideas
71         from CVS head and from m4sugar.
72         * checks/get-them: Accomodate new way to show trailing space in
73         examples.
74         * examples/foreach.m4: Make usable in documentation.
75         * examples/foreachq.m4: New file.
76         * examples/foreachq2.m4: New file.
77         * examples/foreach2.m4: New file.
78         * NEWS: Document the documentation updates.
80 2006-10-19  Eric Blake  <ebb9@byu.net>
82         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
83         (m4_maketemp): Provide traditional behavior.
84         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
85         new `mkstemp' macro and the flaws of the old `maketemp'.
86         (Incompatibilities): Move maketemp discussion to...
87         (Extensions): ...here, since -G now supresses the GNU extension.
88         * NEWS: Document this.
90         * examples/forloop.m4: Simplify.
91         * examples/forloop2.m4: New file.
92         * examples/quote.m4: New file.
93         * doc/m4.texinfo (Loops): Rename to...
94         (Shift): ...this node.
95         (Forloop, Foreach, Improved forloop, Improved foreach): New
96         nodes.
98 2006-10-17  Eric Blake  <ebb9@byu.net>
100         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
101         config-h'.
102         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
103         gnulib headers, rather than in top directory.
104         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
105         output clutter.
107 2006-10-16  Eric Blake  <ebb9@byu.net>
109         * doc/m4.texinfo: Backport some minor cleanups from head.
110         (Cleardivert): Rename from cleardiv.
112         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
113         a section of Preliminaries.
114         (Operation modes, Preprocessor features, Limits control)
115         (Frozen state, Debugging options, Command line files): Subdivide
116         into new sections.
117         (Input processing, Quoting Arguments, Define, Arguments)
118         (Cleardiv, Format, M4exit): Fix grammar of references.
119         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
120         (Debug Levels, Debug Output, Include, Search Path, Divert)
121         (Platform macros, Syscmd, Location, Extensions): Point to new
122         sections.
123         (Top, Loops, Include, Undivert, Location, Incompatibilities):
124         Improve file references.
126 2006-10-14  Eric Blake  <ebb9@byu.net>
128         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
129         is not portable.
130         Reported by Ralf Wildenhues.
132         * src/builtin.c (m4_undivert): Check for read error.
134 2006-10-13  Eric Blake  <ebb9@byu.net>
136         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
137         header files are included, since <unistd.h> can affect the tests.
138         * THANKS: Updated.
139         Reported by Martin Koeppe.
141         Backport head's usage of clean-temp module, as it is cleaner than
142         using tmpfile-safer.
143         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
144         clean-temp closeout', and remove tmpfile-safer.
145         * src/m4.h (includes): Adjust.
146         (m4_path_search): Rename from path_search, to avoid collision
147         with gnulib.
148         * src/m4.c (main): Install closeout handler.  Adjust caller.
149         (usage): Now done by closeout module.
150         * src/builtin.c (m4_m4exit): Likewise.
151         (m4_undivert, include): Adjust callers.
152         * src/freeze.c (reload_frozen_state): Likewise.
153         * src/path.c (m4_path_search): Rename from path_search.
154         * src/output.c (output_temp_dir): New variable.
155         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
156         (insert_diversion, make_room_for): Use them.
157         * doc/m4.texinfo (Diversions): Document this, and add a test.
158         (Improved fatal_error): Fix typo.
159         (Maketemp): Port test to mingw, and no longer hide from
160         documentation.
161         * NEWS: Document the change in TMPDIR behavior.
163         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
164         macros, to work with recent gnulib-tool update.
166         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
167         handling of defn results.
168         * doc/m4.texinfo (Builtin, Indir): Add test cases.
169         * NEWS: Document this.
171 2006-10-12  Eric Blake  <ebb9@byu.net>
173         * doc/m4.texinfo (Location): Fix typo in previous commit.
174         (Changeword): Catch one more case.
175         * src/input.c (skip_line): Fix case when outer file used macro to
176         supply the \n.
178 2006-10-11  Eric Blake  <ebb9@byu.net>
180         * src/input.c (enum input_type): Add additional types, to shave
181         time off the common case.
182         (push_wrapup): Wrapped strings remember location.
183         (push_string_finish): Normal strings carry no location.
184         (push_file): Start new files uninitialized.
185         (peek_input, next_char_1): Optimize common cases by updating
186         location only on new input types.
187         (pop_input): Update to honor new input types.
188         (skip_line, push_string_finish): Fix regression in previous patch
189         when dnl is not followed by newline in included file.
190         (push_string_init): Initialize all fields of INPUT_STRING sooner.
191         (peek_token): Simplify.
192         (peek_input): Don't pop input files on peek, so that __file__ and
193         __line__ as last token of include file work correctly.
194         * doc/m4.texinfo (History): Mention 1.4.8.
195         (Answers): Split into sections, one per answer.
196         (Improved exch, Improved cleardivert, Improved fatal_error): New
197         nodes.
198         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
199         new m4wrap location semantics.
200         (Changeword): Add test that caught the regression.
201         * NEWS: Document this.
203         * src/macro.c (expand_macro): In macro expansion errors, report
204         line number at open parenthesis.
205         * src/input.c (next_token): Fix off-by-one bug in reporting end
206         of file in unterminated comment and string.
207         (file_names): New obstack, necessary since expand_macro now hangs
208         on to file names longer than the files remain open.
209         (input_init): Initialize new obstack.
210         (push_file): Use new obstack.  Delay updates to current_file
211         until after expand_macro has restored state.
212         (peek_input, next_char_1): Update current_file if necessary.
213         (pop_wrapup): Release memory.
214         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
215         the off-by-one bug.
216         (Dnl): Update to the new location reporting rules.
217         * NEWS: Document these changes.
219 2006-10-10  Eric Blake  <ebb9@byu.net>
221         * src/macro.c (argc_stack, argv_stack): New variables for sharing
222         obstacks across multiple macro calls.
223         (expand_input): Initialize and tear down stack once per input
224         file, instead of once per macro.
225         (expand_macro): Reuse existing stacks when possible.
226         (collect_arguments): Simplify slightly.
228         * src/path.c (include_env_init): Fix botched patch application.
229         Reported by Ralf Wildenhues.
231 2006-10-09  Eric Blake  <ebb9@byu.net>
233         * src/m4.c (usage, main): Detect write failures to stderr.
234         * src/builtin.c (m4_m4exit): Likewise.
235         * NEWS: Document this.
237         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
238         the limit.
239         * NEWS: Document this.
240         * doc/m4.texinfo (Invoking m4): Likewise.
242 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
244         * src/path.c (include_env_init): Copy the string returned
245         by getenv before overwriting it; POSIX disallows this.
247 2006-10-09  Eric Blake  <ebb9@byu.net>
249         * src/m4.c (main): Defer debugfile until after --help.
250         * configure.ac (AC_INIT): Bump version number.
251         * NEWS: Start changes of 1.4.7a.
253 2006-09-25  Eric Blake  <ebb9@byu.net>
255         Release 1.4.7:
257         * configure.ac (AC_INIT): Bump version number.
258         * NEWS: Describe changes since 1.4.6.
260 2006-09-21  Eric Blake  <ebb9@byu.net>
262         * doc/m4.texinfo (Invoking m4): Add clarification on option
263         processing behavior.
264         * THANKS: Update.
265         Reported by Mikhail Teterin.
267         * bootstrap: Add --force option, based on idea from coreutils.
268         * README: Document that ./bootstrap and autoreconf are for
269         developers, and not lightly done in tarballs.
271 2006-09-20  Eric Blake  <ebb9@byu.net>
273         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
274         deprecation warning on -e.
275         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
276         * NEWS: Document this.
278 2006-09-19  Eric Blake  <ebb9@byu.net>
280         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
281         -o/--error-output to --debugfile, and deprecate the former.  This
282         will allow a future release to be more consistent with other GNU
283         tools, with -o/--output affecting stdout, not debug.
284         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
285         * NEWS: Document this.
287 2006-09-14  Eric Blake  <ebb9@byu.net>
289         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
290         --diversions. `m4 --help --version' now displays help, not
291         version.
292         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
293         smaller scope.
294         (show_help, show_version): No longer needed.
295         (long_options, DIVERSIONS_OPTION): Backport patch from head to
296         distinguish between -N and --diversions in warning.
297         * doc/m4.texinfo (Invoking m4): Document this.
298         * NEWS: Likewise.
300 2006-09-11  Eric Blake  <ebb9@byu.net>
302         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
303         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
304         seekable.
305         (debug_set_file): Use STDOUT_FILENO.
306         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
307         with POSIX in regards to unread input.
308         * NEWS: Document this fix.
309         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
311 2006-09-07  Eric Blake  <ebb9@byu.net>
313         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
314         * src/m4.h (push_file): Change prototype.
315         * src/input.c (push_file, peek_input, next_char_1): Only call getc
316         once at EOF, to avoid double ^D on terminal stdin; regression from
317         2006-09-04.
318         (push_file, pop_file): Allow reading stdin twice.
319         * src/m4.c (main): Likewise.
320         * src/builtin.c (include): Update caller.
321         * NEWS: Document this change.
322         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
323         (Syscmd): Add a test that failed before this patch.
325 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
327         * checks/check-them: Quote $pwd.
329 2006-09-05  Eric Blake  <ebb9@byu.net>
331         * src/builtin.c (define_macro): Warn on invalid macro name.
332         * NEWS: Document this change.
333         * doc/m4.texinfo: Fix typos.
334         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
335         (Ifelse): Backport some improvements from head.
337 2006-09-04  Eric Blake  <ebb9@byu.net>
339         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
340         native echo is braindead.
341         * checks/check-them (strip_needed): Ignore \r in output.  Now the
342         testsuite will pass when cross-compiling from cygwin to mingw.
344         * src/input.c (peek_input): Fix regression in handling macro
345         without arguments as last token in file; debian bug 385720.
346         (next_token): Always consume an input character.
347         Reported by Andreas Schultz.
348         * configure.ac (AC_INIT): Bump version number.
349         * NEWS: Document this fix.
350         * doc/m4.texinfo (History): Mention next version.
351         (Changeword): Add example that exposes this bug.
352         * THANKS: Update.
354 2006-08-25  Eric Blake  <ebb9@byu.net>
356         Release 1.4.6:
358         * configure.ac (AC_INIT): Bump version number.
359         * NEWS: Describe changes since 1.4.5.
361         * Makefile.maint (web-manual): Give up on VPATH build during
362         distribution.  But distributions are made so infrequently that
363         this is not too much of a hardship.
364         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
365         exists.
367 2006-08-24  Eric Blake  <ebb9@byu.net>
369         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
370         Solaris, produce output on just one argument.
371         (m4_regexp, m4_patsubst): For consistency, do likewise.
372         (m4_patsubst): Allow zero-length match at end of string.
373         * doc/m4.texinfo (Sysval): Fix overfull hbox.
374         (Bugs, Macro Arguments): Minor fixes.
375         (Other tokens): Rearrange node order.
376         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
377         * NEWS: Document these fixes.
379 2006-08-22  Eric Blake  <ebb9@byu.net>
381         * src/input.c (pop_input): Avoid empty filename with -di option.
382         * src/debug.c (debug_message_prefix): Put space before message.
384         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
386         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
387         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
389         * checks/check-them: State why a test is skipped.
390         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
392         * ChangeLog: Add copyright.
393         * AUTHORS: Likewise.
394         * BACKLOG: Likewise.
395         * README: Likewise.
396         * THANKS: Likewise.
397         * TODO: Likewise.
398         * examples/COPYING: New file, add copyright for all the examples.
399         * checks/get-them: Put copyright on testsuite files.
401 2006-08-18  Eric Blake  <ebb9@byu.net>
403         Don't let unrelated child processes see too many files.
404         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
405         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
406         spelling in error message.
407         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
408         (debug_set_output): Close debug file on exec.
409         * src/m4.h (includes): Add cloexec.h.
410         * src/output.c (make_room_for): Close diversions on exec.
411         * src/path.c (path_search): Close include files on exec.
412         * NEWS: Document this.
414         Regular expressions were leaking memory.
415         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
416         helper methods.
417         (m4_regexp, m4_patsubst): Avoid memory leak.
418         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
419         static.
420         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
421         from O(n^2) to O(n) for calculating word_start.
422         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
423         O(1) bitmap, not O(n) search string.
424         * NEWS: Document this fix.
426 2006-08-17  Eric Blake  <ebb9@byu.net>
428         * NEWS: Document previous checkin.
430         * src/builtin.c (substitute): Avoid core dump when accessing
431         beyond bound of regular expression.
432         Reported by Karl Nelson.
433         * doc/m4.texinfo (Regexp): Add example that causes core dump on
434         some architectures prior to this patch.
435         * THANKS: Updated.
437 2006-08-16  Eric Blake  <ebb9@byu.net>
439         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
440         clear that dumpdef does not always go to stderr.
442         * src/builtin.c (m4_errprint): Flush buffers before printing to
443         stderr.
444         * THANKS: Updated.
446 2006-08-15  Eric Blake  <ebb9@byu.net>
448         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
449         per debian bug 96075.
450         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
451         (Changeword): Don't use shift as an example of a swallowed word.
452         (Divert): Discuss fact that divert is an English word.
453         Reported by Richard A Nelson.
455 2006-08-14  Eric Blake  <ebb9@byu.net>
457         * doc/m4.texinfo (Invoking m4): Minor fixes.
459 2006-08-12  Eric Blake  <ebb9@byu.net>
461         * doc/m4.texinfo (Arguments): Hint at better exch macro.
462         (Answers): Provide a better definition.
464 2006-08-09  Eric Blake  <ebb9@byu.net>
466         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
467         yet understand locales.
468         * NEWS: Fix wording of a few items.
470 2006-08-08  Eric Blake  <ebb9@byu.net>
472         Avoid printing `NONE:0:' in error messages.
473         * src/m4.h (m4_error_at_line): New function.
474         * src/m4.c (m4_error_at_line): Implement.
475         * src/input.c (skip_line, input_init, next_token): Use "", not
476         "NONE", for no file, since NONE can be a real file name.
477         * src/macro.c (expand_argument): Likewise.
478         * src/debug.c (debug_message_prefix, trace_header): Check for
479         current file.
480         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
481         (Location): Document that synclines and internal message format
482         are not impacted by redefining these macros.
483         (M4exit): Hint at bug in fatal_error.
484         (Answers): Provide workaround to match m4 output.
486         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
487         * src/m4.h (m4_error): New function.
488         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
489         error module deficiencies.
490         (reference_error, suppress_line): No longer needed.
491         * src/m4.c (m4_error): Implement.
492         (main): No longer need to install error callback.
494 2006-08-04  Eric Blake  <ebb9@byu.net>
496         * src/m4.h (program_name): Declare.
497         (suppress_line): New variable.
498         (M4ERROR_AT_LINE): New macro.
499         * src/m4.c (reference_error, main): Follow GNU Coding Standards
500         for error message format.
501         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
502         * src/macro.c (expand_argument): Likewise.
503         * checks/check-them (examples): Adjust to new message format.
504         * src/builtin.c (m4___program__): New builtin.
505         * doc/m4.texinfo (Location): Split from Errprint into new node,
506         and document __program__.
507         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
508         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
509         format.
510         (Extensions): Document __program__.
511         * NEWS: Document this change.
513 2006-08-03  Eric Blake  <ebb9@byu.net>
515         Don't confuse leading `(' in comment or quote with start of
516         argument collection.
517         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
518         TOKEN_CLOSE.
519         (peek_input): Make private to input.c.
520         (peek_token): New prototype.
521         * src/input.c (default_word_regexp): Reduce ifdefs.
522         (peek_input): Make static.
523         (next_token): Return new token types.
524         (match_input, MATCH): Add argument consume, which controls
525         whether match should be pushed back.
526         (peek_token): New function.
527         (token_type_string) [DEBUG_INPUT]: New function.
528         * src/macro.c (expand_token, expand_argument, collect_arguments):
529         Handle new token types.
530         * doc/m4.texinfo (Changequote, Changecom): Document this.
531         * NEWS: Document this.
533         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
535         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
536         overflow detection when sigstack exists but is not implemented.
537         Fixes debian bug 154053.
538         * THANKS: Updated.
539         Reported by David Perlin.
541 2006-08-02  Eric Blake  <ebb9@byu.net>
543         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
544         close.
546 2006-08-01  Eric Blake  <ebb9@byu.net>
548         * src/input.c (skip_line, next_token): Remember current file in
549         case input file ends abruptly.  Addresses debian bug 175365.
550         (pop_input): Defer freeing storage that holds previous file
551         name...
552         (pop_wrapup): to here, after error message is issued.
553         * src/macro.c (expand_argument): Remember current file in case
554         input file ends abruptly.
555         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
556         (M4wrap): Adjust testsuite accordingly.
557         (Errprint): Document line number limitation of m4wrap.
558         * NEWS: Document this fix.
559         * THANKS: Update.
561 2006-07-31  Eric Blake  <ebb9@byu.net>
563         * src/input.c (peek_input, next_char, match_input): Be eight-bit
564         clean; fixes debian bug 311378.
565         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
566         (Changequote, Changecom): Add examples to test this.
567         * NEWS: Document this fix.
568         * THANKS: Update.
569         Reported by Steven Augart.
571         * doc/m4.texinfo: Whitespace fix.
572         * checks/get-them: Avoid exceeding 14-char file name limit.
573         * THANKS: Update.
575 2006-07-30  Eric Blake  <ebb9@byu.net>
577         * src/path.c (path_search): Detect allocation failure.
579         Use native free when it is good enough.
580         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
581         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
582         Adjust calls.
583         * src/symtab.c (free_symbol): Likewise.
584         * src/m4.c (xfree, main): Likewise.
585         * src/m4.h (obstack_chunk_free): Likewise.
586         * src/path.c (path_search): Likewise.
587         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
589         * doc/m4.texinfo (Errprint): Add example for last patch.
590         * checks/check-them: Account for VPATH in latest example.
592 2006-07-29  Eric Blake  <ebb9@byu.net>
594         * src/path.c (path_search): Add result parameter, so that
595         -I can be accounted for.  Debian bug 53685.
596         * src/m4.h (path_search): Update prototype.
597         * src/m4.c (main): Adjust callers.
598         * src/freeze.c (reload_frozen_state): Likewise.
599         * src/builtin.c (include, m4_undivert): Likewise.
600         * NEWS: Document this change.
601         Reported by Nicolas Lichtmaier.
603 2006-07-28  Eric Blake  <ebb9@byu.net>
605         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
606         several non-GNU makes.
607         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
608         * src/m4.h: Likewise.
609         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
610         /usr/ccs/bin/ucbcc.
612 2006-07-27  Eric Blake  <ebb9@byu.net>
614         * doc/m4.texinfo: Use @acronym{GNU} throughout.
615         (History): Update for 1.4.6.
617         * src/m4.h (_): Remove K&R cruft.
618         * src/builtin.c: Likewise.
619         * src/debug.c: Likewise.
620         * src/eval.c: Likewise.
621         * src/macro.c: Likewise.
622         * src/stackovf.c: Likewise.
624         * doc/Makefile.am (m4.1): Improve man page.
625         * src/m4.c (usage): Improve --help output, including adding the
626         bug reporting address.
627         (main): Follow GNU Coding Standards for --version output.
629 2006-07-26  Eric Blake  <ebb9@byu.net>
631         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
632         end-comment consistently, to match POSIX.
634         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
635         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
636         (Incompatibilities): Document incompatibility of changecom
637         vs. macro names, and of EOF in include.
638         * src/input.c (next_token): Reject unterminated comments at EOF.
639         (skip_line): Warn on unterminated dnl at EOF.
640         * NEWS: Document these changes.
642 2006-07-25  Eric Blake  <ebb9@byu.net>
644         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
645         stdio-safer into fopen-safer and tmpfile-safer.
646         * src/m4.c: Remove redundant include.
648 2006-07-24  Eric Blake  <ebb9@byu.net>
650         Fix bugs related to stream handling.
651         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
652         unlocked-io stdio-safer stdlib-safer close-stream.
653         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
654         provided by gnulib if needed.
655         * src/output.c [! HAVE_TMPFILE]: Likewise.
656         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
657         their safer counterparts.
658         (retcode): New global variable.
659         * src/input.c (pop_input): Check for read failure.
660         * src/freeze.c (reload_frozen_state): Likewise.
661         (produce_frozen_state): Check for write failure.
662         * src/debug.c (debug_set_file): Likewise.
663         * src/m4.c (usage, main): Likewise.
664         (retcode): Make global.
665         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
666         status is non-zero except when everything succeeds.
667         * doc/m4.texinfo (M4exit): Document these changes.
668         (Incompatibilities): Remove documentation of bug now fixed.
669         * NEWS: Document these fixes.
671 2006-07-22  Eric Blake  <ebb9@byu.net>
673         * src/format.c (format): Avoid compiler warning that str may be
674         used uninitialized.
676 2006-07-21  Eric Blake  <ebb9@byu.net>
678         * src/m4.h [UNIX]: Add more platforms that are close enough to
679         categorize as UNIX, but which don't predefine __unix__.
680         Reported by Nelson H. F. Beebe.
682 2006-07-20  Eric Blake  <ebb9@byu.net>
684         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
685         to explicitly ask for --assume-autoconf=2.60.
687 2006-07-19  Eric Blake  <ebb9@byu.net>
689         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
690         and exits normally with 129.
691         Reported by Nelson H. F. Beebe.
692         * THANKS: Update.
694         * src/m4.h (EXIT_MISMATCH): Define.
695         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
696         exiting with status 63.
697         * src/m4.c (usage): Document this.
698         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
699         * NEWS: Likewise.
701         * doc/m4.texinfo (copying): Relax restriction on front-cover and
702         back-cover texts.
704 2006-07-17  Eric Blake  <ebb9@byu.net>
706         * src/format.c (format): Support F, g, and G specifiers.
707         * doc/m4.texinfo (Format): Document this.
708         * NEWS: Document this addition.
710         * doc/m4.texinfo (Builtin): Delete redundant text.
712         * configure.ac (AC_INIT): Bump version number.
713         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
714         * NEWS: Document this fix.
716 2006-07-15  Eric Blake  <ebb9@byu.net>
718         Release 1.4.5:
720         * configure.ac (AC_INIT): Bump version number.
721         * NEWS: Describe changes since 1.4.4.
723         * src/m4.c (usage): Document exit status.
724         * doc/m4.texinfo: Use `exit status', not `exit code'.
725         (Invoking m4): Document exit status.
727         * bootstrap: Backport --help, --version from head.
728         (func_update): New function, for easily grabbing up-to-date files
729         from gnulib.
730         * Makefile.maint (web-manual): Fix for VPATH builds.
732 2006-07-14  Eric Blake  <ebb9@byu.net>
734         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
735         looks bad in info.  Use @deffn rather than @example for
736         describing prototypes.  Fix awkward wording and grammar.
738         * src/builtin.c (substitute): Warn on bad escape sequences.
739         Ignore trailing backslash.
740         * doc/m4.texinfo (Regexp): Add documentation for this.
741         * NEWS: Document this change.
743         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
744         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
745         more examples.
746         (Dnl): Update example to show side effects.
747         * checks/get-them: Generate three digit test names.
748         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
750 2006-07-13  Eric Blake  <ebb9@byu.net>
752         * src/input.c (input_init): Simplify.
753         (set_word_regexp): Treat empty string as default, since empty
754         regexp would disable word parsing.
755         * src/m4.c (user_word_regexp): Default to empty string.
756         * src/builtin.c (builtin_tab): Make changeword blind.
757         * doc/m4.texinfo (Changeword): Document this.
758         * NEWS: Document this.
759         * TODO: Knock off completed items.
761         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
762         just the first.
763         * doc/m4.texinfo (Undefine, Pushdef): Test this.
764         * NEWS: Document this change.
766         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
767         warning.  Detect quoted leading space and overflow as warnings.
768         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
769         Treat width as minimum number of digits, as required by POSIX.
770         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
771         arguments.
772         (m4_substr): Likewise.  Silently treat empty start as 0.
773         (m4_undivert): Treat ` 1a' as file, not diversion 1.
774         * src/eval.c (eval_lex): Parse radix 1 numbers.
775         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
776         one type of warning.
777         (Manual): Document behavior of numeric parsing of empty string.
778         (Divert, Incr): Document error handling.
779         (Eval): Document radices better.
780         (Incompatibilities): Document translit incompatibility.
781         * NEWS: Document these changes.
783         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
784         (web-manual): Simplify.
785         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
786         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
787         (MAINTAINERCLEANFILES): Clean it as well.
788         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
789         (MAINTAINERCLEANFILES): Clean it as well.
791 2006-07-12  Eric Blake  <ebb9@byu.net>
793         * doc/m4.texinfo (Extensions): Document how to overcome
794         implementation difference in > 9 positional parameters.
796         * src/m4.c (usage): Sort within sections.
797         (nesting_limit): Raise default from 250 to 1024.
798         * doc/m4.texinfo: Use file name, not filename, per GNU coding
799         standard.  Use @option where appropriate.
800         (Invoking m4): Sort to match --help output.
801         (Debug Levels): Sort.
802         (Frozen files): Sort and break into two nodes.
804         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
805         * NEWS: Document raised -L limit.
807 2006-07-11  Eric Blake  <ebb9@byu.net>
809         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
810         stress-test changeword before a release.
811         * doc/m4.texinfo: More doc cleanups.
812         (Copying This Manual): New node; actually include the FDL in the
813         documentation.
814         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
815         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
816         * NEWS: Mention documentation improvements.
818         * src/m4.h (OS2): New platform macro.
819         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
820         platform macro.
821         * doc/m4.texinfo (Platform macros): Document it.
822         (Sysval): Remove non-portable test of system("").
823         * NEWS: Document this change.
824         Reported by Andreas Buening.
826 2006-07-09  Eric Blake  <ebb9@byu.net>
828         * doc/m4.texinfo (Undivert): Fix typo in last commit.
829         * src/m4.c (usage): Document M4PATH.
830         * src/path.c (path_search): Reject empty string.
831         * src/output.c (insert_diversion): Ignore diversion 0.
832         * src/builtin.c (m4_undivert): Ignore empty string.
833         * NEWS: Document this fix.
835 2006-07-08  Eric Blake  <ebb9@byu.net>
837         * checks/get-them: Make filtering easier.
838         * checks/check-them: Filter non-input lines, so line counts are
839         more realistic in the documentation, and so changeword tests work
840         even when dnl is disabled.
841         * doc/m4.texinfo: Adjust example line numbers.  Clean up
842         front-matter, following autoconf's example.
843         (Changeword): Enable tests, skipping if changeword not supported.
844         (Define, Defn, Ifelse): Backport more examples from head.
845         (Input processing, Answers): New nodes, backported from head.
846         (Include): Expand test to cover empty filename.
847         (Undivert): Add test of undivert(0).
849 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
851         * doc/m4.texinfo: Fix spelling errors.
853 2006-07-07  Eric Blake  <ebb9@byu.net>
855         * THANKS: Update.
857         * doc/Makefile.am (m4.1): No need to go through a temporary file;
858         this also ensures timestamps are updated.
859         * src/m4.h (includes): Require config.h.  Assume string.h,
860         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
861         than prototyping ourselves.
862         (builtin_func): Add parameter type-checking.
863         (voidstar): Delete, now that we assume C89.
864         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
865         voidstar changed.
866         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
867         xfree.
869 2006-07-06  Eric Blake  <ebb9@byu.net>
871         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
872         binary-io.
873         * src/m4.h (includes): Add binary-io.h for O_BINARY.
874         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
875         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
876         * NEWS: Mention this fix.
878         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
879         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
881         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
882         runs first when needed.
883         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
884         once in srcdir rather than multiple times in VPATH builds.
886 2006-07-03  Eric Blake  <ebb9@byu.net>
888         * checks/check-them: Use portable = in test.
889         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
890         directory, as required by Solaris cc.  Include built headers, as
891         required by Solaris make in VPATH build.
892         * checks/Makefile.in: Use $(srcdir) where needed.
893         (CHECKS): Factor $(srcdir) into macro.
894         (DISTFILES): Likewise.  Automake takes care of distributing
895         Makefile.in.
896         (dist): Simplify.
897         (Makefile): Use modern syntax of config.status.
898         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
899         Avoid overfull and underfull hboxes in dvi.
901         Fix 'make check' in VPATH build.  All files included by testsuite
902         now live in a single directory.  Use forloop.m4 in testsuite.
903         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
904         here...
905         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
906         here.
907         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
908         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
909         * checks/check-them: Avoid s/// when filename is in pattern.
910         * examples/forloop.m4: Fix to match documentation.
911         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
912         new locations.
913         (Loops, Format): Actually use forloop.m4 in tests.
915 2006-07-02  Eric Blake  <ebb9@byu.net>
917         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
918         $(bindir) works in installcheck.
919         (check, installcheck): No longer change directory, so that
920         distcheck works with a read-only builddir.
921         * checks/check-them: Work when pwd is no longer builddir.
923 2006-07-01  Eric Blake  <ebb9@byu.net>
925         * GNUmakefile: New file, borrowed from coreutils.
926         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
927         * Makefile.maint (Makefile): Delete this rule, now that
928         GNUmakefile includes Makefile.
930 2006-06-30  Eric Blake  <ebb9@byu.net>
932         For compatibility with other m4 implementations, sysval returns
933         signal<<8 rather than 0 if syscmd is terminated by a signal.
934         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
935         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
936         not provide wait macros.
937         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
938         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
939         (m4_esyscmd): Set sysval to -1 on failure.
940         (m4_sysval): Print 127 on failure, and accomodate signals if they
941         are detectable.
942         * NEWS: Document this change.
943         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
944         last commit.
945         * checks/check-them: Likewise.
946         * src/debug.c (debug_set_file): Work around mingw fstat bug.
948         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
949         * src/freeze.c (produce_frozen_state): Use new spelling of
950         platform macro.
951         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
952         platforms.
953         (m4_syscmd, m4_esyscmd): The empty command is successful.
954         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
955         Document platform-dependence of system().
956         (Syscmd): Add example.
957         (Esyscmd): Make example more robust, and actually demonstrate
958         rescanning.
959         (Sysval): Expand test to cover esyscmd code path, and to check
960         that empty command is successful.  Add conditional check for
961         signal behavior.
962         (Other Incompatibilities): Move platform macros from here...
963         (Platform macros): ...to this new node.  Add windows macro.
964         Check that exactly one platform macro is provided.
965         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
966         .exe in error messages.  Allow for skipping checks.
967         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
968         * NEWS: Document platform macros.
970 2006-06-29  Eric Blake  <ebb9@byu.net>
972         Fix buffer overrun bug.
973         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
974         xvasprintf.
975         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
976         variant instead, since [efg]cvt are obsolete and our use of them
977         was buggy (savannah sr #104303).
978         (format): Fix buffer overflow by using xasprintf.
979         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
980         * NEWS: Document this fix.
982         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
983         cross-compilation.
984         (AC_CACHE_CHECK): Cache search for ecvt.
986 2006-06-27  Eric Blake  <ebb9@byu.net>
988         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
989         required by POSIX, and add example that exposed core dump on x86
990         architectures.
991         (Incompatibilities): Document incompatibility in eval precedence.
992         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
993         behavior.
994         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
995         * NEWS: Document this change.
997         * doc/m4.texinfo: Use @noindent consistently.
998         (Quoting Arguments): Document that unquoted parentheses group
999         arguments.
1000         (Pseudo Arguments): Expand tests to show this.
1001         (Incompatibilities): Contrast traditional behavior of
1002         changequote.
1004 2006-06-24  Eric Blake  <ebb9@byu.net>
1006         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1007         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1008         (AC_CHECK_FUNCS_ONCE): Likewise.
1010 2006-06-23  Eric Blake  <ebb9@byu.net>
1012         * doc/m4.texinfo: Quoting cleanup throughout - follow
1013         autoconf-recommended style of one level of quote per parenthesis
1014         in the normal case.  Adjust error messages to match GNU coding
1015         standards (and to allow 'make check' to pass again).
1016         (Quoted strings, Inhibiting Invocation): Turn more examples into
1017         tests.
1018         (Comments): Resolve FIXME by adding example.
1019         (Define): Add example about underquoting.
1020         (Defn): Add example about use of $0.
1021         (Indir, Format): Resolve FIXME done in last commit.
1022         (Ifelse): Add example about creating blind macro.
1023         (Debugging): Fix grammar.
1024         (Dnl): Add example about dnl with arguments.
1025         (M4wrap): Be explicit that LIFO order is non compliant, and will
1026         change in m4 2.0.
1027         (Undivert): Resolve FIXME by adding example.
1028         (Frozen files): Document that m4wrap and sysval will not work
1029         consistently until m4 2.0.
1030         (Incompatibilities): Document another POSIX compliance bug, this
1031         time with changequote.  Document a traditional incompatibility
1032         with partial input spanning file boundaries.
1034         Make error messages more consistent with GNU coding standards -
1035         start with lower case, and don't end sentence with punctuation.
1036         * src/debug.c (trace_pre): Update message wording.
1037         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1038         Likewise.
1039         * src/freeze.c (produce_frozen_state, issue_expect_message),
1040         (reload_frozen_state): Likewise.
1041         * src/input.c (push_string_init, pop_init, init_macro_token),
1042         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1043         * src/m4.c (stackovf_handler, main): Likewise.
1044         * src/macro.c (expand_token, expand_argument, call_macro),
1045         (expand_macro): Likewise.
1046         * src/output.c (make_room_for, output_text, insert_file),
1047         (freeze_diversions): Likewise.
1048         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1050         * src/builtin.c (builtin_tab): Make format and indir blind.
1051         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1052         * NEWS: Mention the change to builtins.
1054 2006-06-22  Eric Blake  <ebb9@byu.net>
1056         Robustify frozen file format.
1057         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1058         macro.  Require V first, and only accept it once.  For F, use
1059         placeholder if builtin is not found, rather than warning.
1060         * src/m4.h (m4_placeholder): New prototype.
1061         * src/builtin.c: Unify error message style.
1062         (m4_placeholder): New function, warn if invoked.
1063         (builtin_tab): Add m4_placeholder.
1064         (m4_defn): Warn if placeholder is encountered.
1065         (find_builtin_by_addr): Handle placeholder.
1066         (find_builtin_by_name): Return placeholder on failure.
1067         (m4_builtin): Treat placeholder as undefined.
1068         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1069         * NEWS: Document this change.
1070         Reported by Bruno Haible.
1072         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1073         (tabchar): New macro, so that 'make check' still works.
1074         (Invoking m4): Document that ignored compatibility options -B, -S,
1075         and -T each consume an argument.
1076         * checks/get-them: Honor @tabchar{}.
1078         Avoid compiler warnings during -DDEBUG.
1079         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1080         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1081         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1082         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1083         (next_token) [DEBUG_INPUT]: Print before returning.
1084         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1085         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1087         Avoid mkstemp bugs on various platforms.
1088         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1089         * src/output.c [! HAVE_MKSTEMP]: Delete.
1090         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1091         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1092         * NEWS: Document this.
1094         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1095         Reported by Bruno Haible.
1097 2006-06-21  Eric Blake  <ebb9@byu.net>
1099         Avoid obsolete sigstack when POSIX sigaltstack is available.
1100         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1101         do likewise.
1102         * configure.ac (AC_CHECK_HEADERS): Likewise.
1103         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1104         obsolete and most hosts now have it in signal.h.
1105         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1106         (AC_CACHE_CHECK): Cache decision to use stackovf.
1107         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1108         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1109         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1110         simplify later code.
1111         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1112         in case of dereferencing a member of a NULL pointer.
1113         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1114         POSIX handler.
1115         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1116         EXIT_FAILURE in error, indent preprocessor directives.
1117         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1118         siginfo.h.
1119         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1120         Reported by Santiago Vila.
1122 2006-06-19  Eric Blake  <ebb9@byu.net>
1124         * THANKS: Update.
1126 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1128         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1129         (check, installcheck): Use it, for OS/2.
1131 2006-06-18  Eric Blake  <ebb9@byu.net>
1133         Consistently use "GNU M4" as package name, "m4" as executable
1134         name.
1135         * NEWS: Document previous fix.
1136         * THANKS: Update.
1137         * README: Fix grammar.  Document that --enable-changeword is on
1138         its last leg.
1139         * doc/m4.texinfo (Top, Changeword): Likewise.
1140         (Sysval): Enhance this test.
1141         (History): Backport this section from CVS head, and update.
1143 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1144             Eric Blake  <ebb9@byu.net>
1146         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1147         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1148         big-endian and little-endian wait status definitions.
1149         (m4_sysval): Use WEXITSTATUS.
1150         Reported by Andreas Buening.
1152 2006-06-18  Eric Blake  <ebb9@byu.net>
1154         * configure.ac (AC_INIT): Bump version number.
1155         * NEWS: Describe changes in 1.4.4c.
1157 2006-06-17  Eric Blake  <ebb9@byu.net>
1159         Release 1.4.4b:
1161         * configure.ac (AC_INIT): Bump version number.
1162         * NEWS: Describe changes since 1.4.4.
1163         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1165         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1166         bootstrap.
1167         * checks/Makefile.in (maintainer-clean): Add missing target.
1168         * COPYING: Remove generated file from CVS.
1170 2006-06-16  Eric Blake  <ebb9@byu.net>
1172         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1174 2006-06-15  Eric Blake  <ebb9@byu.net>
1176         * checks/wrapfifo.m4: New file.  Use it...
1177         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1178         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1180         * src/m4.h (to_uchar): New function.
1181         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1182         isdigit, isalpha, isupper, islower, isspace, isalnum.
1183         * src/builtin.c (expand_user_macro): Likewise.
1184         * src/format.c (format): Likewise.
1185         * src/macro.c (expand_argument): Likewise.
1186         * NEWS: Document this security fix.
1188         Message cleanup.
1189         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1190         * src/freeze.c (reload_frozen_state): Fix typo in message.
1191         (produce_frozen_state): Standardize on builtin, not built-in.
1192         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1194         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1195         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1196         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1197         gnulib.
1198         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1199         * m4/gnulib-cache.m4: New file, from gnulib.
1200         * bootstrap: Invoke gnulib-tool --update.
1201         * src/m4.c (main): Cast away const.
1202         * NEWS: Document that regex is updated.
1203         * THANKS: Update.
1205 2006-06-08  Eric Blake  <ebb9@byu.net>
1207         * configure.ac (changeword): Work even when changeword is not a
1208         macro.
1209         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1210         Delete; now done by automake.
1211         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1213 2006-06-07  Eric Blake  <ebb9@byu.net>
1215         * lib/regex.c (bcmp_translate): Canonicalize type name.
1216         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1217         * configure.ac (changeword): Disable changeword for the creation
1218         of configure, in case of bootstrapping with an m4 configured with
1219         --enable-changeword.
1221         Distribute a rudimentary man page.
1222         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1223         can feed help2man.
1224         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1225         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1227 2006-06-06  Eric Blake  <ebb9@byu.net>
1229         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1230         compiler warnings at -O2.
1231         * lib/getopt.c (_getopt_internal): Likewise.
1233         Cleanup of previous patches.
1234         * src/input.c (struct input_block): Remove traced member.
1235         (push_macro, init_macro_token): Don't pass trace status around.
1236         * src/m4.h (struct token_data): Remove traced member.
1237         (struct symbol, struct builtin): Reduce unused space.
1238         (TOKEN_DATA_FUNC): Simplify.
1239         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1240         (push_macro, define_builtin): Remove unused parameter.
1241         * src/builtin.c (define_builtin, builtin_init, define_macro),
1242         (m4_defn): Don't pass trace status around.
1243         * src/macro.c (expand_argument): Likewise.
1244         * src/freeze.c (reload_frozen_state): Likewise.
1245         * src/symtab.c: Whitespace cleanup.
1246         * NEWS: Clean up wording.
1247         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1248         ensure tests actually expose bugs prior to today's patches.
1250         Trace status of builtins is no longer inherited across
1251         define(...,defn(...)).  Fixes bug that autom4te had been working
1252         around.
1253         * src/builtin.c (define_builtin): Don't override trace status.
1254         * doc/m4.texinfo (Trace): Add test for this.
1255         * NEWS: Document this.
1257         When changing macro definitions inside the arguments to the macro,
1258         consistently preserve the old definition that was in effect before
1259         argument collection, similar to the C pre-processor.
1260         Reported by John Brzustowski.
1261         * NEWS: Document this change.
1262         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1263         this policy, and add tests that expose core dumps prior to this
1264         patch.
1265         * src/m4.h (struct symbol): New members to track when a symbol is
1266         still in use after removal from the symbol table.
1267         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1268         (free_symbol): Prototype.
1269         * src/macro.c (expand_macro): Track pending expansions of a
1270         symbol.  On completion, if a symbol is deleted and no longer
1271         pending, free its memory.
1272         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1273         is still in use.
1274         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1275         is still in use.
1276         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1277         in use as deleted and remove from the table without freeing
1278         memory.
1279         (symtab_print_list) [DEBUG_SYM]: More debug output.
1281         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1282         the symbol table during traversal.
1283         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1284         SYMBOL_POPDEF, since only the latter is safe with
1285         hack_all_symbols.
1287         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1288         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1289         Preserve placeholder when macro is being traced.
1290         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1291         symbol is not defined.
1292         (set_trace): Remove placeholder when no longer traced.
1293         (m4_traceon): On named traces, always reserve a slot in the
1294         symbol table.
1295         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1296         * NEWS: Document new trace behavior.
1297         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1298         no matter whether that macro is currently defined.
1299         (Incompatibilities): Document differences between traditional and
1300         GNU trace.
1302 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1303             Eric Blake  <ebb9@byu.net>
1305         * src/m4.h (hash_table_size): Now size_t instead of int.
1306         * src/m4.c (hash_table_size): Likewise.
1307         (main): Adjust to this; use atol rather than atoi.
1308         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1309         (symtab_init, lookup_symbol, hack_all_symbols):
1310         Use size_t for sizes and indexes, not int.
1311         (symtab_print_list) [DEBUG_SYM]: Likewise.
1312         (hash): Likewise.  Don't case-fold in the hash function.
1313         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1314         Don't assume hash word is 32 bits.
1315         * NEWS: Document this change.
1317 2006-06-04  Eric Blake  <ebb9@byu.net>
1319         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1320         to allow compilation, for use in debugger.
1321         (profiles, current_mode) [DEBUG_SYM]: New variables.
1322         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1323         determining hash table performance.
1325 2006-05-31  Eric Blake  <ebb9@byu.net>
1326             John Brzustowski  <jbrzusto@fastmail.fm>
1328         * src/input.c (input_stack): Delete; use current_input instead.
1329         (wrapup_stack): Dynamically allocate, so that recursion is handled
1330         properly.
1331         (push_wrapup): Use current wrapup stack.
1332         (pop_wrapup): Rotate wrapup stack to current, and create new
1333         wrapup stack.
1334         (input_init): Dynamically allocate stacks.
1335         * NEWS: Update, now that recursive m4wrap can no longer cause
1336         core dump.
1338 2006-05-31  Eric Blake  <ebb9@byu.net>
1340         * lib/getopt.c: Fix copyright year.
1341         * lib/obstack.c: Ditto.
1342         * src/builtin.c: Ditto.
1344 2006-05-30  Eric Blake  <ebb9@byu.net>
1346         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
1347         Reported by John Brzustowski.
1348         (Incompatibilities): Document known POSIX incompatibilities.
1349         * THANKS: Update.
1351 2006-05-29  Eric Blake  <ebb9@byu.net>
1353         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
1354         in read-only dir.
1356         Use automake.
1357         * Makefile.am: New file.
1358         * doc/Makefile.am: Ditto.
1359         * examples/Makefile.am: Ditto.
1360         * lib/Makefile.am: Ditto.
1361         * src/Makefile.am: Ditto.
1362         * acinclude.m4: New file, renamed from aclocal.m4.
1363         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
1364         (AC_ARG_PROGRAM): Now redundant.
1365         (STACKOVF): Turn into automake conditional.
1366         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
1367         * checks/Makefile.in: Converting this dir to automake was not
1368         trivial; for now, just add missing targets demanded by top-level.
1369         * INSTALL: Remove files that are now generated from CVS.
1370         * Makefile.in: Ditto.
1371         * aclocal.m4: Ditto.
1372         * install-sh: Ditto.
1373         * mkinstalldirs: Ditto.
1374         * doc/Makefile.in: Ditto.
1375         * doc/texinfo.tex: Ditto.
1376         * examples/Makefile.in: Ditto.
1377         * lib/Makefile.in: Ditto.
1378         * src/Makefile.in: Ditto.
1380         * AUTHORS: Backport from CVS head, and update.
1381         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
1383 2006-05-27  Eric Blake  <ebb9@byu.net>
1385         * lib/regex.c (regex_compile): Kill compiler warnings.
1386         * lib/getopt.c: Likewise.
1387         * lib/obstack.c: Likewise.
1388         * src/builtin.c (builtin_init): Likewise.
1389         * src/path.c (path_search): Likewise.
1391         * doc/m4.texinfo: Fix usage of a vs. an.
1392         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
1393         overfull hbox warnings.
1394         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
1396         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
1397         quoting.
1398         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
1399         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
1400         assume C89.
1401         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
1402         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
1403         * src/Makefile.in: Delete remains of ansi2knr.
1404         * src/ansi2knr.1: Delete.
1405         * src/ansi2knr.c: Delete.
1407 2006-05-25  Eric Blake  <ebb9@byu.net>
1409         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
1410         `illegal'.
1412         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
1413         Reported by Karl Berry.
1415 2006-05-24  Eric Blake  <ebb9@byu.net>
1417         * Makefile.in (html): New target.
1418         * doc/Makefile.in (html, m4.html): Likewise.
1419         (MAKEINFOHTML): New macro.
1420         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
1421         rendering.
1422         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
1423         absolute URL.
1424         Reported by Bob Badour.
1426         * THANKS: Update.  Move reporter's email addresses here, instead
1427         of in ChangeLog.
1429 2006-05-11  Eric Blake  <ebb9@byu.net>
1431         * THANKS: Update.
1432         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
1433         patched on 2005-12-04.
1434         Reported by Ilya N. Golubev.
1436         * bootstrap: New file, so that generated files need not be stored
1437         in CVS.
1438         * Makefile.in (DISTFILES): Add bootstrap.
1440         Make testsuite less sensitive to doc changes.
1441         * doc/m4.texinfo: Use m4.input instead of filename.
1442         * checks/check-them (xerr): Turn m4.input into filename.
1443         * checks/Makefile.in (dist): Depend on stamp-checks.
1445         Portability updates for OS/2.
1446         * src/Makefile.in (EXEEXT, OBJEXT): Define.
1447         (LINK): Use CFLAGS.
1448         (.c.obj): Define.
1449         * lib/Makefile.in (OBJEXT): Define.
1450         (.c.obj): Define.
1451         * doc/Makefile.in (install, uninstall): Install info files into
1452         the dir listing.
1453         Reported by Andreas Buening.
1455 2006-05-09  Eric Blake  <ebb9@byu.net>
1457         * install-sh: Update to newer upstream version.
1458         * mkinstalldirs: Likewise.
1459         Reported by Andreas Buening.
1461         * src/m4.c (main): Bump copyright year.
1462         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
1463         * doc/Makefile.in (datarootdir): Likewise.
1465 2006-05-08  Eric Blake  <ebb9@byu.net>
1467         * THANKS: Update.
1468         * doc/m4.texinfo (Bugs): Backport bug email address from head.
1469         Reported by Stepan Kasal.
1471 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
1473         * input.c (match_input): Do not pass expression with side effect
1474         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
1475         * NEWS: Updated.
1477 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1479         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
1480         Reported by Damian Menscher.
1482 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1484         * configure.ac (AC_INIT): Bump to 1.4.4a.
1486 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1488         Release 1.4.4:
1490         * configure.ac (AC_INIT): Bump to 1.4.4.
1491         * NEWS: Describe 1.4.4's changes.
1492         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
1494 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
1496         * src/m4.c: fix return code when non-existent files are processed
1498 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
1500         * README: update email address for bug reports.
1502 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
1504         * doc/m4.info: Generated files are not kept in the repository.
1506 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
1508         The FSF are moving offices today.  Changed their contact address
1509         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
1510         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
1512         Also, some of the files here were never updated from the previous
1513         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
1514         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
1516 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
1518         * Makefile.in (bindir, infodir): Substitute from configure rather
1519         than hardcode.
1520         * doc/Makefile.in (infodir): Ditto.
1521         * src/Makefile.in (bindir): Ditto.
1522         * NEWS: Updated.
1524 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
1526         Changes needed to automate the release process for 1.4.3:
1528         * Makefile.in (dist): Make .tar.bz2 tarball too.
1529         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
1530         (cvs-news): Look 1 line further down for NEWS release number.
1531         (cvs-dist): We don't use automake, so make dist is fine.
1532         Remove double . before suffixes.
1533         (cvs-release): Don't mention manual.html.
1534         (fetch): Get latest gendocs files.
1535         (web-manual): Rewritten to use gendoc for multiformat manuals.
1536         * doc/gendocs.sh: Don't save an old version in m4 CVS!
1537         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
1538         preserving, but case insensitive, so generating html docs per node
1539         clashes between Index.html, the node file, and index.html, the
1540         top-level of the document tree...
1541         (Index macro): ...so renamed to this.  Changed all references.
1543 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1545         * configure.ac (AC_INIT): Bump to 1.4.3a.
1547 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1549         Release 1.4.3:
1551         * configure.in (AC_INIT): Bump to 1.4.3.
1552         * NEWS: Describe 1.4.3's changes.
1554 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
1556         * Makefile.maint: New file with release rules, from CVS libtool.
1557         * Makefile.in (DISTFILES): Add Makefile.maint.
1558         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
1559         canonical versions.
1561 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
1563         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
1564         checks/47.patsubst, with a redundant @comment to prevent emacs
1565         from removing it accidentally again.
1566         * checks/get-them: Allow for trailing spaces tucked behind
1567         @comment marks.
1569 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
1571         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
1572         * src/Makefile.in (install, uninstall): Likewise.
1574 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
1576         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
1577         on Cygwin.
1578         Reported by Eric Blake.
1580 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
1582         * lib/regex.c, lib/regex.h: Updated from gnulib.
1583         * src/input.c (set_word_regexp):  Don't change the word_regexp
1584         unless it compiles correctly.
1585         * NEWS: Updated.
1586         Reported by Frank Schwidom.
1588         * Makefile.in (stamp-h): Regenerate config.h properly.
1590 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
1592         * configure.ac (AC_DEFINE): Fix overquoting of description
1593         argument.
1595         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
1596         recognition macros.
1597         * src/freeze.c (produce_frozen_state): Use \n line-endings even
1598         on Windows, so that the frozen file reader will work.
1599         Reported by Josef T. Burger.
1601         * src/m4.c (main): Modernise the --version output.
1603 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
1605         Modernise the configury a little to prevent spurious errors from
1606         Autoconf-2.59's autoreconf:
1608         * config.h.in: Renamed to...
1609         * config-h.in: ...this to better support DOS 8.3 file systems.
1610         * acconfig.h: Removed.
1611         * configure.in: Renamed to...
1612         * configure.ac: ...this, and AC_DEFINE used to declare config.h
1613         entry comments.  Slight reorganisation and reformatting.
1614         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
1615         entry comments.
1616         (AC_INIT): Use a modern 3 argument call.
1617         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1618         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
1619         s/PRODUCT/PACKAGE/g.
1620         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
1621         config.h.in.  Added configure.ac, config-h.in.
1622         (stamp-h.in): Removed acconfig.h from dependencies.
1623         (configure): Depends on configure.ac, not configure.in.
1624         * doc/Makefile.in (stamp-vti): Ditto.
1625         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
1626         difference between PRODUCT="m4" and PACKAGE="GNU M4".
1627         * configure: Regenerated.
1629 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
1631         * src/output.c (mkstemp): Make non-static, and build regardless of
1632         HAVE_TMPFILE; src/builtin.c also needs this replacement.
1633         * NEWS: Update.
1635 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
1637         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
1638         changes from your editor buffer first.
1640         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
1641         * src/m4.c: And include them as appropriate.
1642         * NEWS: Updated.
1644 2004-09-09  Andreas Schwab  <schwab@suse.de>
1646         Refactoring of the string read case in next_char provides about a
1647         20% speedup of M4 as typically used by autoconf:
1649         * src/input.c (next_char_1): Renamed from next_char.
1650         (next_char): New macro.
1651         * NEWS: Updated.
1653 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
1655         * configure.in (VERSION): Bump to 1.4.2a.
1657 2004-08-19  Paul Eggert  <eggert@twinsun.com>
1659         * Release 1.4.2.
1661         * configure.in (VERSION): Bump to 1.4.2.
1662         * News: Describe 1.4.2's changes.
1664         * src/m4.c (reference_error): Preserve errno, since M4ERROR
1665         relies on this.
1666         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
1667         (m4_maketemp): Clear errno before calling mkstemp.
1668         * src/path.c (path_search): Don't let "free" trash errno when
1669         returning NULL.
1670         * src/output.c (insert_file): Don't assume errno has a valid
1671         value simply because fread returns zero.  This fixes a
1672         portability bug reported by Marion Hakanson in
1673         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
1675 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
1677         * configure.in (VERSION): Bump to 1.4.1a.
1678         * NEWS: Place holder for next stable release.
1680 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
1682         * Release 1.4.1.
1684         * configure.in (VERSION): Bump to 1.4.1.
1685         * NEWS: Describe 1.4.1's changes.
1687         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
1688         pacify Autoconf 2.59.
1690         * doc/m4.texinfo: Insert commas after @xref's that lack them,
1691         to pacify Texinfo 4.7.
1692         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
1694         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
1695         pacify Sun C compilers.
1697 2003-09-28  Akim Demaille  <akim@epita.fr>
1699         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
1700         botch.
1702 2003-09-03  Santiago Vila  <sanvila@debian.org>
1704         * examples/stackovf.sh: Use tempfile if available.
1706 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
1708         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
1709         * src/output.c (m4_insert_file): Do not mix buffered and
1710         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
1712 2001-02-01  Santiago Vila  <sanvila@debian.org>
1714         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
1715         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
1717 2001-02-01  Matt Kraai  <kraai@debian.org>
1719         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
1720         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
1721         empty file rather than to a nonexistent file.  This closes a common
1722         security hole.
1723         * src/builtin.c (m4_maketemp): Implement the above, by using
1724         mkstemp rather than mktemp.  (trivial change)
1726 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
1728         * src/builtin.c (expand_ranges): Added break after trailing dash.
1729         This caused misbehaviors on some systems.
1731 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
1733         * Release 1.4.
1735         * doc/Makefile.in (realclean): Also remove stamp-vti.
1736         Reported by Eric Backus.
1738 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
1740         * src/freeze.c (produce_frozen_state): If the frozen file cannot
1741         be opened, return immediately after producing the error message.
1742         Reported by Andreas Schwab.
1744         * configure.in: Check for const only after having found possible
1745         ANSIfying compiler flags, this is of no use to check it before.
1746         Reported by Alexander Lehmann.
1748 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
1750         * src/macro.c (collect_arguments): Cast obstack arguments to
1751         (voidstar), so avoiding compiler warnings.
1752         Reported by Joseph E. Sacco.
1754         * src/freeze.c (produce_frozen_state): Cast printed lengths to
1755         (int) so they correspond to %d format items.
1756         Reported by Joseph E. Sacco.
1758         * src/m4.c (main): Cast the argument to xfree to (voidstar).
1759         * src/symtab.c (free_symbol): Idem.
1760         Reported by Karl Vogel.
1762 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
1764         * Makefile.in (DISTFILES): Distribute BACKLOG.
1766         * configure.in: Define PRODUCT and VERSION.
1767         * acconfig.h: Document PRODUCT and VERSION.
1768         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
1769         constant string m4 and variable or parameter named version.
1771 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
1773         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
1774         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
1775         defines __STDC__ to 0, for indicating it is *not* ANSI!
1776         Reported by Kaveh R. Ghazi.
1778         * configure.in: Added obsolescent tests for AIX and Minix.
1780         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
1781         which texclean does not exist anymore.
1782         Reported by Eric Backus, Jim Meyering, John David Anglin and
1783         Joseph E. Sacco.
1785 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
1787         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
1788         Reported by John David Anglin.
1790         * src/ansi2knr.c: New version, sent by Peter Deutsch.
1791         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
1792         ANSI2KNR, depending on the fact the compiler is ANSI or not.
1793         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
1794         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
1795         of $U, put underline in extensions rather than in basenames.  Use
1796         implicit rules, now that regularity makes this possible.
1797         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
1798         of ansi2knr whenever it is needed.
1799         * configure.in: Adjusted for correct STACKOVF substitution.
1800         * src/debug.c (trace_format): When not __STDC__, use (...) as a
1801         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
1802         Reported by David MacKenzie.
1804         * Makefile.in: Remove binprefix.  Use transform_name instead.
1805         Reported by David MacKenzie.
1807         * doc/Makefile.in: Create version.texi, use it, clean it.
1808         Reported by Jim Meyering.
1810 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
1812         * Makefile.in (all, install, uninstall): Depend on Makefile.
1814         * Makefile.in: For actions invoking $(MAKE) from within compound
1815         sh statements, exit non-zero if the sub-make fails.  Otherwise,
1816         the top-level make may exit successfully when it should fail.
1817         Reported by Jim Kingdon.
1819         * {,/*}Makefile.in: Use && after all cd, in case they fail.
1821         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
1822         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
1823         * configure.in: Substitute PRODUCT and VERSION.
1825         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
1827 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
1829         * Makefile.in (mostlyclean-local): Do not remove *~.
1830         * */Makefile.in (mostlyclean): Idem.
1831         Reported by Robert E. Brown and Richard Stallman.
1833 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
1835         * src/m4.h: Get rid of CONFIG_BROKETS.
1837 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
1839         * configure.in: Use AC_ARG_PROGRAM.
1840         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
1841         Reported by David MacKenzie.
1843 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
1845         * configure.in: Do not add -O to CFLAGS for GNU C, now that
1846         configure does it automatically.
1847         Reported by Jim Meyering.
1849 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
1851         * src/stackovf.c: Declare the handler_t typedef earlier in the
1852         code, use it for stackovf_handler.
1853         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
1854         casting sigsegv_handler.
1855         Reported by Robert Bernstein.
1857         * src/m4.c (main): Initialize program_name to argv[0] without
1858         basename'ing it.
1859         Reported by Karl Berry.
1861 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
1863         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
1864         Reported by Karl Berry.
1866 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
1868         * lib/Makefile.in (mostlyclean): Added.
1869         (TAGS): Make in $(srcdir).
1871         * configure.in: Use `choke me' in test, like everywhere!
1873         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
1874         unreacheable and useless.
1876         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
1878         * lib/Makefile.in (DISTFILES): Distribute TAGS.
1879         (distclean): Do not remove TAGS.
1880         (realclean): Remove it.
1881         * Makefile.in: Make TAGS in lib also, not just in src.
1882         Reported by Karl Berry.
1884         * Makefile.in (distclean, realclean): Instead of recursively
1885         calling $(MAKE) for the -local part, allow parallel execution of
1886         -recursive and -local, only delay the removal of config.status,
1887         which is repeated in both goals.
1889 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
1891         * Release 1.3.
1893         * Makefile.in: Group all *clean-recursive goals in one, using sed
1894         to remove `-recursive' while calling make recursively.  Also, use
1895         a subshell for each recursive $(MAKE).
1896         Reported by Jim Meyering.
1898         * src/m4.h (memcpy): Define with bcopy for BSD systems.
1899         Reported by Kaveh R. Ghazi.
1901         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
1902         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
1903         specify it.
1905         * configure.in: Use date instead of touch for stamp-h.
1906         * Makefile.in (stamp-h.in): Idem.
1908         * Makefile.in (distclean, realclean): Force serial execution of
1909         both goals, in case parallel makes are being used.
1910         Reported by Jim Meyering.
1912         * src/Makefile.in (DISTFILES): Distribute TAGS.
1913         (distclean): Do not remove TAGS.
1914         (realclean): Remove it.
1915         Reported by Karl Berry.
1917 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
1919         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
1920         to old names, for following Autoconf.
1922 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
1924         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
1925         ./install.sh will not be correctly referred to in sub-Makefiles.
1926         Reported by John David Anglin.
1928         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
1929         Reported by Eric Backus.
1931         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1932         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
1933         config.status into remaking this directory's Makefile only.
1934         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
1935         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
1936         Reported by Jim Meyering.
1938 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
1940         * configure.in: Correct stack overflow detection logic, taking
1941         care of systems having only incomplete implementations (like for
1942         Pyramid 9820 OSx 5.0d).
1943         Reported by Kaveh R. Ghazi.
1945         * src/Makefile.in (TAGS): Remote -t from etags call.
1947 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
1949         * lib/Makefile.in (install): Depend on all.
1951 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
1953         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
1954         Reported by Jim Meyering and John David Anglin.
1956         * Makefile.in (distclean-local): Delete config.log.
1957         Reported by Jim Meyering.
1959         Solidify frozen files with respect to -P:
1960         * src/m4.c: Have -P set prefix_all_buitins variable instead of
1961         calling a function by that name.  Declare the variable.
1962         * src/m4.h: Adjust declaration for prefix_all_buitins.
1963         * src/builtin.c (builtin_init): Merge in functionality from
1964         previous prefix_all_buitins function, while making entries in the
1965         symbol table, but not modifying the builtin description itself.
1967         * src/freeze.c (reload_frozen_state): Add a useless `break;',
1968         because *many* compilers do not accept an empty `default:'.
1969         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
1970         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
1972         * configure.in: Use AC_TYPE_SIGNAL.
1973         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
1974         Reported by Robert Bernstein.
1976         * checks/Makefile.in (check): Modify PATH so check-them will find
1977         m4 in the src directory.
1978         * Makefile.in (check): Don't.
1979         Reported by Akiko Matsushita and Jim Meyering.
1981         * src/output.c (make_room_for, output_character_helper): New
1982         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
1983         a per buffer MAXIMUM_BUFFER_SIZE.
1985         * src/output.c (output_text): New function, for optimizing the
1986         output of strings of characters.  Use it.
1988 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
1990         * doc, src: New directories reorganizing the distribution.
1991         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
1992         files.
1993         * Makefile.in: Adjusted.
1994         * configure.in: Configure new Makefiles.
1996         * m4.h: Declare STRING typedef.  Use it for comment and quote
1997         strings, adjusting all references.  (This is the rudiments of a
1998         beginning for the eventual withdrawal of NUL terminated strings.)
1999         * output.c (shipout_text): Accept a length parameter, and use it.
2000         All callers adjusted.
2002 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2004         * m4.h: Include <unistd.h> if it exists.
2005         * stackovf.c: Don't.
2007         Clean up for current_diversion variable:
2008         * output.c: Move current_diversion from builtin.c.
2009         * m4.h: Declare current_diversion so builtin.c can access it.
2010         * output.c (output_init, make_diversion): Initialize or update
2011         current_diversion.
2012         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2013         alone.
2015         Remove limit on number of diversions:
2016         * output.c: Replace ndiversion by diversions, declare it.
2017         (output_init): Allocate only diversion 0.
2018         (make_diversion): Allocate new diversions as needed.
2019         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2020         * m4.c: Still accept -N, but do nothing with it.
2021         Reported by David MacKenzie.
2023         Freeze diversions:
2024         * output.c (freeze_diversions): New function.
2025         * m4.h: Declare freeze_diversions.
2026         * freeze.c: Document frozen file format, revise it, call
2027         freeze_diversions to add diversions to frozen format, and code to
2028         reload them properly.
2029         * m4.c: Do not undivert automatically at end when status being
2030         frozen.  Do not call builtin_init when reloading frozen state.
2032         Speed up diversion processing:
2033         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2034         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2035         structure and variables, cached variables out of output_diversion,
2036         reallocate_diversion_for and OUTPUT_CHARACTER.
2037         (shipout_text, make_diversion, insert_diversion): Adapted to new
2038         structures.
2039         (insert_file): Use better buffering.
2040         Reported by David MacKenzie.
2042 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2044         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2045         dist works from another build directory.
2047 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2049         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2050         constant HASHMAX, for -H option to work better.
2052         * builtin.c (DECLARE): Simplify by using _ ().
2054         * freeze.c: New file.
2055         * Makefile.in: Compile it, distribute it.
2056         * m4.c: Recognize, document and process --freeze-state (-F) and
2057         --reload-state (-R) options.  Pass a true flag to builtin_init
2058         only if no reloading some state.
2059         * builtin.c (define_builtin): Remove static specifier.
2060         (find_builtin_by_name): Remove static specifier.
2061         (builtin_init): Accept and obey a flag argument.
2062         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2064 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2066         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2067         specifier.
2069         * configure.in: Implement --with-dmalloc.
2070         * acconfig.h: Document WITH_DMALLOC.
2071         * m4.h: Add code for when WITH_DMALLOC.
2073 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2075         * m4.c (long_options): Use "error-output", the dash was missing.
2076         Reported by Akiko Matsushita.
2078 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2080         * m4.h: Include <sys/types.h>.
2081         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2082         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2083         int.
2084         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2085         as size_t, not int.
2086         * builtin.c (dump_args): Declare len as size_t, not int.
2088         * debug.c: Prototype the forward declaration of debug_set_file.
2090         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2091         shadowing of this variable.
2092         * output.c (insert_diversion): Idem.
2094         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2095         (input_init): Duplicate default quote and comment strings.
2096         (set_quotes): Free previous quote strings in all cases.  Duplicate
2097         even default quote strings.
2098         (set_comment): Free previous comment strings in all cases.
2099         Duplicate even default comment strings.
2101         * configure.in: Updated for Autoconf 2.0.
2102         * Makefile.in (distclean-local): Also delete config.cache.
2104         * m4.c (usage): Reorganize the --help output by topic.  Include a
2105         description for debugging flags.
2107 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2109         * configure.in: If sigaction is available and SA_ONSTACK defined,
2110         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2111         defined, use sigvec.  Else don't compile stackovf.c.
2112         * stackovf.c (setup_stackovf_trap): Idem.
2113         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2114         and Simon Leinen.
2116 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2118         * m4.c (usage): Replace printf par fputs.
2120 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2122         * Release 1.2
2124 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2126         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2127         check for RLIMIT_STACK, combine in the checking for getrlimit.
2128         All those things are not universally available.
2129         * stackovf.c: Split setting up the trap handler and catching
2130         signals, for better taking care of various configure outcomes.
2131         * examples/stackovf.sh: Correct a typo.
2132         Reported by Eric Backus, Jim Avera and Jim Meyering.
2134 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2136         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2138 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2140         * Makefile.in: Modify so parallel make will not try making
2141         lib/libm4.a twice simultaneously.
2142         Reported by Jim Meyering.
2144 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2146         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2147         error message, for when no code possibility exists.  Even if this
2148         line is completely #ifdef'ed out, it brings a syntax error.
2149         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2151         * Makefile.in (install): Have install depend on all too, for lib
2152         to be remade as needed.
2154         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2155         providing ulimit, instead of using only ksh.
2156         Reported by Jim Avera and Joseph E. Sacco.
2158 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2160         * Makefile.in (check): Have it depend on all instead of m4.  In
2161         this way, a change in lib will be detected and processed.
2163         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2164         instead of using sscanf which stops as soon as there is a
2165         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2166         and divert(1xyzzy) were all accepted without any warning or error
2167         messages.
2168         * m4.h: Declare strtol as long if not including stdlib.h.
2169         * configure.in: Check for limits.h, and replace strtol if missing.
2170         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2171         * lib/strtol.c: New file, from elsewhere.
2172         Reported by Andreas Schwab.
2174 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2176         * macro.c (expand_macro): Cast value to (boolean) prior to
2177         assigning it to traced.
2178         Reported by Tom McConnell.
2180         * Makefile.in (m4): Always make all in lib first.
2181         Reported by Jim Meyering.
2183 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2185         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2186         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2187         handlers), and a default error message if the fault address is not
2188         available (when neither siginfo.h nor BSD sigcontext are supported).
2189         * configure.in: Changes for stackovf.h: Check for sigcontext,
2190         sigaction, sigstack, and define rlim_t as int if necessary.
2191         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2192         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2193         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2195 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2197         * configure.in: Use AC_SET_MAKE.
2198         * Makefile.in: Use @SET_MAKE@.
2199         Reported by Jim Meyering.
2201         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2202         Reported by Ian Taylor.
2204 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2206         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2207         because siginfo.h is unrelated to standard headers, and siginfo.h
2208         is already checked for.
2209         Reported by Joseph E. Sacco.
2211         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2212         PROTOTYPES.
2213         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2214         AC_PROTOTYPES.
2216 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2218         * builtin.c (substitute): Use \& to represent this part of the
2219         string which was matched by the whole regexp, instead of
2220         representing the whole string.  Any usage of \0 issues a warning
2221         and acts like \&, it will disappear in some subsequent release.
2223 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2225         * m4.c: Complete prototype for forwarded declaration of usage.
2227         * input.c (init_macro_token): Correct own reference in error
2228         message.  Previous name get_macro_func was referred to instead.
2229         (next_char):  Correct own reference in error message.  Previous
2230         name advance_input was referred to instead.
2232         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2233         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2234         and_term, not_term, logical_not_term, cmp_term, shift_term,
2235         add_term, mult_term, exp_term, unary_term, simple_term): Add
2236         prototype to forwarded declarations.  Declare parameter v1 as
2237         eval_t * instead of int *.  Same for local variable v2 in dyadic
2238         functions.  Same for result in exp_term.
2239         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2240         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2241         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2242         (shipout_int): Cast first argument of ntoa to eval_t.
2243         Reported by Thorsten Ohl.
2245         * macro.c: Complete the prototypes of forwarded expand_macro and
2246         expand_token.
2247         Reported by Thorsten Ohl.
2249         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2250         The Ultrix 3.1 compiler cannot do much with void pointers.
2252         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2253         * m4.c (xfree):  Replace void * by voidstar.
2254         Reported by Tom McConnell.
2256         * ansi2knr.1: New, from elsewhere.
2257         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2259         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2260         stamp-h does not exist yet.  This avoids running it a second time
2261         just after the initial ./configure.
2262         Reported by David MacKenzie and Tom McConnell.
2264         * m4.h: Replace the enum debug_info declaration with a series of
2265         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2266         (int) to most references, when used in expressions.
2267         Reported by Tom McConnell.
2269 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2271         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2272         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2273         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2274         the preprocessor; by not being subject to CFLAGS, this was
2275         discouraging those flags asking for ANSI compilation.
2276         * acconfig.h: Document HAVE_PROTOTYPES.
2277         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2278         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2279         Reported by Eric Backus.
2281         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2282         from the environment.  Default CFLAGS to -g if not set.
2283         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2284         * lib/Makefile.in: Have CFLAGS substituted from configure.
2285         Reported by Eric Backus and Tom McConnell.
2287         * configure.in: m4_undefine changeword before using AC_ENABLE.
2289         * m4.h: Declare prototypes for error (for ANSI compilers only),
2290         prefix_all_builtins and reference_error.
2291         Reported by Tom McConnell.
2293         * input.c (set_word_regexp): Do not try to initialize the array
2294         test from a string, this does not work with non-ANSI compilers.
2295         Reported by Eric Backus.
2297         * Makefile.in (dist): Clean examples/ before saving it.
2298         (distclean-local): Also remove stamp-h.
2299         Reported by Eric Backus.
2301         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2302         non ANSI compilers.
2303         Reported by Tom McConnell.
2305         * checks/Makefile.in (clean): Depends on mostlyclean.
2306         (mostlyclean): New goal.
2308 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
2310         * Makefile.in (DISTFILES): Distribute install.sh.
2311         * install.sh: New file, copied from elsewhere.
2312         Reported by Assar Westerlund and Kaveh R. Ghazi.
2314 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
2316         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2317         * acconfig.h: Explain ENABLE_CHANGEWORD.
2319         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2320         from code provided by Pete Chown]
2321         * m4.h: Add original_text field to u_t variant of union u.
2322         Declare TOKEN_DATA_FUNC macro.
2323         * builtin.c: Declare changeword.
2324         (m4_changeword): New function.
2325         * input.c: Include "regex.h", define variables with word regexps.
2326         (input_init): Initialize the word regexp.
2327         (set_word_regexp): New.
2328         (next_token): Declare local variables, use the previous code if
2329         default_word_regexp is true.  Else, match using a new code.  Save
2330         the original text.
2331         * macro.c (expand_token): Ship out original text if not a macro
2332         name.
2333         Reported by Krste Asanovic and Pete Chown.
2335         [These modifs all depend upon ENABLE_CHANGEWORD]
2336         * m4.h: Declare external user_word_regexp.
2337         * m4.c: Declare user_word_regexp, and initialize it from
2338         --word-regexp or -W, or NULL if not specified.
2339         * input.c: Use user_word_regexp if specified, instead of
2340         DEFAULT_WORD_REGEXP.
2342         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
2343         agree with it.
2345         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2346         * checks/Makefile.in: Empty the suffix list.
2347         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2349         * m4.c: Declare nesting_limit and initialize it to 250.
2350         Implement -LNUMBER or --nesting-limit=NUMBER to change its
2351         value.
2352         * m4.h: Declare nesting_limit as external.
2353         * macro.c (expand_macro): Stop execution whenever nesting limit
2354         is exceeded.
2355         Reported by Bengt Mertensson.
2357         * eval.c (evaluate): Diagnose excess characters in eval input.
2358         Things like `eval(08)' used to return 0 with no diagnostic.
2360         * m4.h: Capitalize first letter of all macro arguments in
2361         definitions.
2363         * m4.c: Declare warning_status, initialize it to 0.  Add new
2364         option -E, or --fatal-warnings, which sets warning_status to
2365         EXIT_FAILURE instead.
2366         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
2367         EXIT_FAILURE if not otherwise done by header files.
2368         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
2369         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
2370         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
2371         argument of all M4ERROR calls.
2372         Reported by Noah Friedman.
2374         * examples/incl-test.m4: Renamed from incl_test.m4.
2375         * examples/include.m4: Include incl-test.m4 instead of
2376         incl_test.m4.
2377         * examples/multiquotes.m4: Renamed from multi-quotes.m.
2379 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
2381         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
2382         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
2383         also tested it on a Sun Sparc workstation running SunOS 4.x.
2385         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
2386         49.format check, abusing a `union values' argument with sprintf
2387         without selecting the proper field.  Now, save the formatting type
2388         first, delaying the fetch of the corresponding argument.
2389         Reported by Joseph E. Sacco and Tom Quinn.
2391         * format.c (format): Remove const from char *fmt declaration when
2392         not HAVE_EFGCVT, because a NUL may be forced into it.
2394         * m4.h: Declare atof() when not STDC_HEADERS.
2395         Reported by Joseph E. Sacco.
2397         * Regenerate configure using Autoconf 1.11, this corrects a
2398         problem about an incorrect cpp seting on NeXT 3.1.
2399         Reported by Alexander Lehmann.
2401 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
2403         * m4.h (_): Change argument from `x' to `Args'.
2405 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
2407         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
2408         bringing more evil than good on a few systems.
2409         Reported by Greg A. Woods.
2411 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
2413         * m4.h: Rename Args() to _().
2414         * m4.h: Remove extern specifier from all function declarations.
2416 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
2418         * stackovf.c: New file implementing stack-overflow detection.
2419         * configure.in: Check for getrlimit, sigaction.  If all of
2420         standard headers, getrlimit and sigaction, define USE_STACKOVF and
2421         substitute ${U}stackovf.o for STACKOVF.
2422         * acconfig.h: Declare USE_STACKOVF.
2423         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
2424         * m4.h: Declare setup_stackovf_trap().
2425         * m4.c: Call setup_stackovf_trap().
2426         * tests/stackovf_test.sh: New file.
2428 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
2430         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
2432         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
2434 Sun Jan 30 14:24:19 1994    (pinard at icule)
2436         * m4.h: Remove definition of volatile, not used anymore.
2437         Reported by Jim Meyering and Joseph E. Sacco.
2439         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
2440         of `if ... else /* nothing */' for if macros.
2441         Reported by Jim Meyering.
2443         * builtin.c (m4_regexp): Reorganize the code for avoiding a
2444         warning from gcc about `repl' possibly used before defined.
2445         Reported by Jim Meyering.
2447         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
2448         Reported by Jim Meyering.
2450 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
2452         * m4.h: Move the conditional definition of volatile after the
2453         inclusion of system files, because they may define it first.
2455 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
2457         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
2458         get around a problem with Alpha make seeing a syntax error, there.
2459         Reported by Vern Paxson.
2461 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
2463         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
2464         Reported by Richard Stallman.
2466 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
2468         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
2469         instead of AC_HAVE_FUNCS.
2470         Reported by Noah Friedman.
2472 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
2474         * m4.c: Initialize show_help and show_version to zero.
2476         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
2477         Use them in exit() and usage() calls.
2479 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
2481         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
2482         syserr() macro.  Delete errref, add reference_error and M4ERROR.
2483         * m4.c: Replace errref, which was returning an input reference
2484         string, with reference_error, which prints it on standard error.
2485         * builtin.c, output.c: Use errno as second parameter to error,
2486         instead of using syserr() with %s.
2487         * *.c: Use M4ERROR instead of error: no more errref() with %s.
2488         Doing so, the program name appears after the input reference
2489         instead of before, which eases M-x next-error processing.
2491 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
2493         * checks/get-them: Escape braces with backslashes in patterns,
2494         because HPUX-9.01 awk needs this.
2495         Reported by Jim Meyering.
2497 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
2499         * builtin.c: Declare "FILE *popen ();".
2501         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
2502         macros, replace error_message_prefix() declaration by errref()'s.
2503         Declare xrealloc, for use in errref().
2504         * m4.c: Delete error_message_prefix() function, add errref().
2505         * *.c: Use error() systematically in place of all error macros,
2506         now that error() flushes stdout first.  Make needed adjustments.
2508         * m4.h: Remove const in sys_errlist[] declaration, it creates
2509         conflicts on SGI and Alpha.
2510         Reported by Kaveh R. Ghazi.
2512 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
2514         * m4.c: Include <getopt.h> instead of "getopt.h".
2516         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
2517         * acconfig.h: New, for documenting HAVE_EFGCVT.
2518         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
2519         use them wherever appropriate.  Also use -I. for compilations.
2520         * lib/Makefile.in: Use -I.. for compilations.
2521         * *.c: Include <config.h> or "config.h".
2523         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
2524         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
2526 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
2528         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
2530         * input.c (input_init): Initialize quote and comment strings
2531         explicitely instead of calling set_quotes and set_comment: by
2532         doing so, we ensure we do not free uninitialized variables.
2534         * checks/check-them: Reverse arguments to both diff, so the
2535         expected is on the left and the obtained on the right.
2537         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
2538         macros. Delete declarations for m4error, warning, fatal and
2539         internal_error, add declaration for error_message_prefix.
2540         * m4.c:  Delete m4error, warning, fatal and internal_error
2541         routines, add error_message_prefix routine.
2542         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
2543         warning with WARNING*, fatal with FATAL* and internal_error with
2544         INTERNAL_ERROR*.
2545         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
2546         this is not needed anymore.
2548         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
2549         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
2550         and debug_message, add declaration for debug_message_prefix.
2551         * debug.c: Remove static specifier for FILE *debug declaration.
2552         Delete debug_print and debug_message routines, add
2553         debug_message_prefix routine.
2554         * builtin.c, debug.c: Replace debug_print routine calls with
2555         DEBUG_PRINT* macro calls.
2556         * input.c, path.c: Replace debug_message routine calls with
2557         DEBUG_MESSAGE* macro calls.
2559         * m4.h: Remove inclusion of <varargs.h>.
2560         * debug.c: Include <stdarg.h> or <varargs.h>.
2561         (trace_format): Use stdarg instead of varargs if __STDC__.
2563         * configure.in: Remove checks for vfprintf and _doprnt.  These
2564         implementations use varargs tricks which are not portable enough.
2565         * lib/vfprintf.c: Deleted.
2566         * lib/_doprnt.c: Deleted.
2567         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
2568         Reported by Joel Sherrill.
2570         * path.c (add_include_directory): Use xstrdup.
2572         * builtin.c (find_builtin_by_name): Declare static.
2574         * *.[ch]: Add const to a few "char *" declarations.
2576         * configure.in: Remove commented tests for fileno() and fstat().
2577         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
2579         * debug.c (debug_flush_files): New.
2580         * m4.h: Declares it.
2581         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
2582         Reported by Nicolas Pioch.
2584 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
2586         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
2587         Reported by Joel Sherrill.
2589         * builtin.c (prefix_all_builtins): Instead of the table size, use
2590         the null entry at end for stopping the loop.  It was overwritten.
2591         Reported by Andreas Schwab and Jim Meyering.
2593         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
2594         Reported by Kaveh R. Ghazi.
2596         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
2597         Reported by Karl Vogel.
2599 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
2601         * m4.h: Do not define volatile if already defined.
2602         Reported by Rene' Seindal.
2604         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
2606         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
2607         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
2609 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
2611         * m4.h: Define strchr and strrchr in terms of index and rindex,
2612         instead of the other way around.
2613         * builtin.c, m4.c, path.c: Use strchr instead of index.
2615         * input.c (next_char): Remove a "break;" after a "return ...;".
2616         Reported by Tom McConnell.
2618 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
2620         * Release 1.1
2622         * configure.in: Do not copy check files in the build hierarchy.
2623         * checks/check-them: Identify the m4 version being checked.  For
2624         finding m4, look in $PATH instead of in the parent directory.
2625         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
2626         * checks/Makefile.in (.all-stamp): Always create check files in
2627         the source hierarchy, not anymore in the build hierarchy.
2628         (check): cd to the source hierarchy before performing checks.
2629         Do not copy nor clean COPYING anymore, take it from `..'.
2630         Reported by Tom McConnell.
2632         * Makefile.in (Makefile): Use $(SHELL).
2633         (config.status): Use $(SHELL).  Use "config.status --recheck"
2634         instead of "configure --no-create", which is obsolete.
2635         Reported by Tom McConnell.
2637 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
2639         * m4.c (usage): Use "%s" instead of "m4" in format string.
2640         Reported by Jim Meyering.
2642         * Makefile.in: Distribute mkinstalldirs.
2643         Reported by Pierre Gaumond.
2644         Reported by Jim Meyering.
2645         Reported by Tom McConnell.
2646         Reported by Andreas Gustafsson.
2648         * checks/check-them: Renamed from checks/check_them.
2649         * checks/get-them: Renamed from checks/get_them.
2650         * checks/.all-stamp: Renamed from checks/.all_stamp.
2651         * checks/Makefile.in: Changed accordingly.
2652         Reported by Jim Meyering.
2654 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
2656         * lib/Makefile.in (dist): Correct permissions on files.
2658         * output.c: Declare tmpfile, some systems don't.
2660 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
2662         * checks/Makefile.in (dist): Correct permissions on files.
2664         * Makefile.in (dist): Ensure recursive linking for subdirectory
2665         `examples', also set read/write permissions on all its files.
2667         * mkinstalldirs: New, from elsewhere.
2668         * Makefile.in: Use it.
2670         * debug.c: Synchronize debug messages and regular output when
2671         the debug file and stdout are redirected to the same file.
2672         * configure.in: Add (commented) checks for fileno and fstat.
2673         Reported by Jim Avera.
2675         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
2676         etc., arguments, then ignore the superfluous one.  m4 used to
2677         diagnose missing arguments and return the empty string.
2678         Reported by Nick S. Kanakakorn.
2680 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
2682         * m4.c (main): At end of all input, ensure all undiverted text
2683         goes to the main output stream.
2684         Reported by Andreas Gustafsson.
2686         * m4.c (main): exit (0), instead of return 0.
2688         * m4.c: Implement -P and --prefix-builtins.
2689         * builtin.c: Delete const specifier on builtin_tab.
2690         (prefix_all_builtins): New.
2691         Reported by Noah Friedman.
2692         Reported by Scott Bartram.
2694         * c-boxes.el: New, from elsewhere.
2695         * Makefile.in: Distribute it.
2697         * m4.h: Do not define bcopy if <string.h> defines it.
2698         Reported by Stephen Perkins.
2700         * builtin.c (define_macro): Allow a missing second argument, in
2701         which case it is implied empty.  Affects define and pushdef.
2702         Reported by Eric Allman.
2704 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
2706         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
2707         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
2708         * builtin.c: Initialize all the blindness fields in builtin_tab.
2709         (define_builtin): Copy the blindness of a builtin into its symbol.
2710         * macro.c (expand_token): Avoid processing a blind builtin if the
2711         next character is not an opening parenthesis.
2712         Reported by David MacKenzie.
2713         Reported by Noah Friedman.
2715         * configure.in: Ensure an exit status of 0 on completion.
2716         Reported by Vivek P. Singhal.
2718         * eval.c (eval_lex): Admit both lower and upper case letters for
2719         bases greater than 10.  Only lower case letters were accepted.
2721         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
2722         Reported by Krste Asanovic.
2724         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
2725         * eval.c (logical_not_term): New name for not_term.
2726         * eval.c (xor_term): New, between or_term and and_term.
2727         * eval.c (not_term): New, between and_term and logical_not_term.
2728         * eval.c (shift_term): New, between cmp_term and add_term.
2729         Reported by Krste Asanovic: ~, ^, <<, >>.
2730         Reported by Ben A. Mesander: ** vs ^.
2732         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
2733         * m4.h: Delete xrealloc.c.
2734         * lib/xmalloc.c: New, from elsewhere.
2735         * lib/xstrdup.c: New, from elsewhere.
2736         * lib/Makefile.in: Distribute and compile them.
2738         * m4.c: Change progname to program_name.
2739         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
2740         * lib/error.c: New, from elsewhere.
2741         * lib/Makefile.in: Distribute and compile error.c.
2742         * configure.in: Check AC_VPRINTF and for strerror.
2743         * m4.c: Delete cmd_error.  Use error instead.
2744         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
2746         * m4.h: Delete #define const, let Autoconf takes care of this.
2748         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
2749         Merge parse_args into main.  Declare argv to be `char *const *',
2750         then remove superfluous casts.
2752         * m4.c: Rename --no-gnu-extensions to --traditional.
2753         Reported by Ben A. Mesander.
2755         * m4.c (usage): Add a status parameter.  Supply one in various
2756         calls.  Add --help processing.  Remove -V for --version.
2758         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
2760         * lib/Makefile.in: Have an AR=ar declaration.
2761         Reported by Eric Backus.
2762         Reported by Bjorn R. Bjornsson.
2763         Reported by Tom Tromey.
2764         Reported by Kristine Lund.
2765         Reported by Marion Hakanson.
2767 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
2769         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
2770         Reported by Noah Friedman.
2772 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
2774         * Makefile.in: Remove MDEFINES and cleanup.
2776 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
2778         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
2779         Create a gzip file.
2781 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
2783         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
2784         ensure 777 mode for directories, so older tar's will restore file
2785         modes properly.
2787 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
2789         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
2790         so the installer can override automatically configured choices.
2791         Reported by Karl Berry.
2793 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
2795         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
2796         previous version was not working properly on m68k-hp-bsd4.3.
2797         Reported by Roland McGrath.
2799         * lib/_doprnt.c: Stolen from Oleo distribution.
2800         * configure.in: Check for _doprnt.c if vfprintf.c selected.
2801         * lib/Makefile.in: Distribute _doprnt.c.
2802         Do not distribute regex.[ch].old anymore.
2804 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
2806         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
2807         Richard wants it there.
2809 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
2811         * Makefile.in: Add DEFS to MDEFINES.
2812         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
2813         (libm4.a): Remove the library before creating it.
2814         (distclean): Remove tags and TAGS too.
2816 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
2818         * Makefile.in (dvi, m4.dvi): New goals.
2820         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
2821         macro.c, output.c, path.c, symtab.c: Change Copyright from
2822         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
2824         * examples/divert.m4: Deleted, this bug has been corrected.
2826         * Makefile.in (texclean, mostlyclean): New goals.
2828         * Makefile.in (clean): Remove clutter from ansi2knr.
2829         Reported by Pierre Gaumond.
2830         Reported by Greg A. Woods.
2832 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
2834         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
2835         might well use CFLAGS is s/he needs it.
2837         * Makefile.in: Allow installation of info files from a separate
2838         build directory.
2839         Reported by Jason Merrill.
2840         Reported by David MacKenzie.
2841         Reported by Skip Montanaro.
2842         Reported by Erez Zadok.
2843         Reported by Assar Westerlund.
2845 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
2847         * Release 1.0.3
2848         This is still a beta release for the future GNU m4 version 1.1.
2850         * lib/alloca.c: New, from elsewhere.
2851         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
2853         * m4.h: Do not define index/rindex if already defined.  If
2854         FALSE/TRUE are already defined, do not redefine them, but merely
2855         define boolean typedef to int.
2857         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
2858         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
2859         because some C compilers do not like connectives with #ifdef.
2860         * m4.h: Define `volatile' only if __GNUC__, instead of once for
2861         __GNUC__ and once for __STDC__.
2862         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
2864         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
2865         Makefile dependencies.  Without it, make keeps destroying and
2866         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
2868         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
2869         to diversion/DIVERSION, this was a spelling error.
2871         * m4.c: Declare version[], remove #include "version.h".
2872         * version.h: Deleted.
2873         * Makefile.in: Remove references to version.h.
2875         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
2876         production, by using a simpler and more robust algorithm.  This
2877         solves the problem of synclines sometimes written in the middle of
2878         an output line.  Delete sync_line() and output_lines variable.
2879         * m4.h: Remove sync_line prototype and output_lines declaration.
2880         * input.c (next_char), output.c (shipout_text): Remove references
2881         to output_lines.
2882         * input.c (push_file, pop_file): Merely put the value -1 in
2883         output_current_line instead of calling sync_line, for delaying a
2884         single `#line NUM FILE' before next output line.  Do not test
2885         for sync_output, because this is unnecessary clutter.
2886         * output.c (make_divertion, insert_divertion): Idem.
2887         * input.c: Rename must_advance_line to start_of_input_line, for
2888         consistency.
2890         * debug.c (trace_header): Select a new debug line format, which
2891         better complies with GNU standards for formatting error messages.
2892         With option `-dfl', M-x next-error might be used on the output.
2893         * m4.c (vmesg): Adjust format of error output to GNU standards.
2894         * m4.texinfo: Adjust examples for `make check' to work.
2896         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
2897         case for enum debug_info constants, which were all lower case.
2899         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
2900         re_search_2.
2901         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
2902         collected patches.  I tried a few times using newer regex.[ch], it
2903         mysteriously stopped aborting with this one.  Insecure feeling...
2904         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
2906 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
2908         * m4.c: Change `--no-warnings' to `--silent'.
2909         Reported by David MacKenzie.
2911         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
2912         leave it off for now.  See comment in m4.c for justification.
2913         Reported by David MacKenzie.
2915         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
2916         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
2918         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
2920         * Makefile.in: Ensure recursive cleaning is done before local
2921         cleaning for all clean goals.
2923         * builtin.c (ntoa): Ensure the value is always interpreted as a
2924         signed quantity, whatever the radix is.
2926 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
2928         * builtin.c, format.c, input.c: Split long lines.
2929         * m4.c: Use typedef macro_definition instead of struct
2930         macro_definition.
2931         * symtab.c: Use typedef symbol instead of struct symbol.
2933 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
2935         * *.[ch]: Remove all trailing whitespace, in code and comments.
2937         * configure.in: Find some awk.
2938         * Makefile.in: Add $(AWK) to MDEFINES.
2939         * checks/Makefile.in: Transmit $(AWK) to get_them.
2940         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
2941         awk script when switching files, because without this, mawk runs
2942         out of file descriptors.
2944 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
2946         * Makefile.in (realclean): Delete m4.info*.
2947         Reported by Jim Meyering.
2949         * Makefile.in: Adjust and link with checks/Makefile.
2950         * checks/Makefile.in: New.
2951         * configure.in: Output checks/Makefile.
2953         * checks/get_them: Have the dnl header of each test more
2954         recognizable by next-error, also use a better message.
2956 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
2958         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
2959         And use that only if __GNUC__ since we're using it's GCC-specific
2960         semantics that tell the compiler the associated function doesn't
2961         return.
2963         * builtin.c (substitute): Don't use character as an array index.
2964         (dumpdef_cmp): Make formal arguments `const void *' to avoid
2965         warnings with gcc -W -Wall on systems with qsort prototype.
2966         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
2967         from gcc -W -Wall.
2969         * eval.c (most functions): Add parentheses to assignments used
2970         as truth values go avoid warnings from gcc -Wall.
2972         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
2973         any functions that don't need external scope.
2975         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
2976         (many functions and arrays): Declare `const'.
2978 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
2980         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
2981         removing the declaration from m4.h.  Also rename false to FALSE
2982         and true to TRUE.
2984         * lib/Makefile.in (Makefile): New goal.
2986         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
2987         so heavily loaded.  It gets more easily overridable, calling make.
2988         Reported by Jim Meyering.
2990         * Makefile.in (dist): Get .fname from the current directory name,
2991         instead of from version.h.  I need updating many files manually,
2992         when the version changes, version.h is just one of them.
2994 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
2996         * m4.h: Remove the tag `boolean' on the enum introducing typedef
2997         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
2998         Reported by Tom McConnell.
3000 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3002         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3003         39.cleardiv, which were describing missing or spurious newlines.
3004         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3005         do not depend on machine word size, `/bin/false' implementation,
3006         or `wc' output format.  `make check' is more dependable, now.
3008         * checks/check_them: Summarize the failed tests by listing their
3009         name, at end.  If none, issue `All checks successful'.  Output
3010         `Checking' instead of `Input file:'.
3012         * checks/get_them, checks/check_them: Reindented.
3014         * Makefile.in (dist): chmod a+r before making the tar file.
3016 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3018         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3020         * input.c (next_token): Reinitialize token_buttom just after using
3021         it as a watermark with obstack_free.  Or else, a future token, big
3022         enough for triggering reallocation of the obstack chunk, could
3023         void the initialized value of token_buttom, later causing panic in
3024         obstack_free.  Rename token_buttom to token_bottom everywhere.
3026         * m4.h: Before declaring errno, first include <errno.h> and
3027         ensure that it does not define errno.
3028         Reported by Richard Stallman.
3030 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3032         * builtin.c: Define and use DECLARE macro for builtins.
3034         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3035         argument, this is a common idiom for introducing long comments.
3037         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3038         arguments.  The last argument was silently ignored.
3040         * m4.c (cmd_error): Add a missing semicolon before va_end().
3042 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3044         * Makefile.in: Now handle protoized sources.  Define and use U.
3045         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3046         Add `aclocal.m4' to `configure' dependencies.
3047         * ansi2knr.c: New, from Ghostscript distribution.
3048         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3049         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3050         * aclocal.m4: New, provide FP_PROTOTYPES.
3051         * m4.h: Conditionnaly protoized through Args, save for varags.
3052         * builtin.c: Protoized.  Then:
3053         Include <sys/types.h> if size_t is not defined, before "regex.h".
3054         (m4_ifelse): Fetch built-in name properly for diagnostic.
3055         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3056         (m4_regexp): Add const to `msg' declaration.
3057         (m4_patsubst): Add const to `msg' declaration.
3058         * debug.c: Protoized, save for varargs.
3059         * eval.c: Protoized.
3060         * format.c: Protoized.
3061         * input.c: Protoized.
3062         * m4.c: Protoized, save for varargs.  Then:
3063         (xfree): Accept void * instead of char *.
3064         (xmalloc): Return void * instead of char *.
3065         (xrealloc): Accept and return void * instead of char *.
3066         * macro.c: Protoized.
3067         * output.c: Protoized.
3068         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3069         * symtab.c: Protoized.
3071 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3073         * m4.texinfo: Remove directory from diagnostics in 30.include,
3074         51.eval, 56.errprint and 57.m4exit tests.
3076         * m4.h: Remove declarations for int or void system functions, they
3077         cause more conflicting trouble than they make good.
3079         * configure.in: Avoid configuration header file.  Add some tests.
3080         * m4.h: Remove #include "config.h".
3081         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3082         Then, rewritten for better compliance with GNU standards.
3084 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3086         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3087         because of a misplaced #endif.
3089         * Many *.[hc] files: Correct intra-line spacing here and there,
3090         according to GNU indent 1.6 advice.
3092         * configure.in: New, using Autoconf 1.2.
3093         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3094         * Delete old configure.in, configure, etc/configure.in,
3095         etc/configure, lib/configure.in, lib/configure and config/*.
3096         Reported by Jason Merrill.
3098         * symtab.c (hash): Change (char) NULL to '\0'.
3099         Reported by Jason Merrill.
3101         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3102         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3103         * version.h: De-automatize, force value in.
3105         * m4.c: Changes in order to use a newer getopt.h.
3106         Reported by David MacKenzie.
3108         * checks/: New name for examples/.
3109         * checks/get_them: New location for etc/get_examples.
3110         * checks/check_them: New location for etc/check_examples.
3111         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3112         * lib/vfprintf.c: New location for etc/vfprintf.c.
3113         * Delete empty etc/.
3114         * examples/: New name for test/.
3116 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3118         * Makefile.in (check): Add m4 as dependency.
3120         * m4.c: Accept --no-warnings instead of --no_warnings, and
3121         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3122         usage message more informative.
3123         Reported by David MacKenzie.
3125 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3127         * etc/check_examples: New name for check_examples.sh.
3128         * etc/get_examples: New name for get_examples.sh.
3129         * Makefile.in, etc/Makefile.in: Use new names.
3131         * Makefile.in: Transmit $(CC) while making in lib.
3133         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3134         code disposition by hand.
3136 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3138         * m4.h: Delete definitions for abort() and exit().
3139         Reported by Richard Stallman.
3141         * config/hmake-unicos, config/s-unicos.h: New files.
3142         Reported by Hal Peterson.
3144         * eval.c (exp_term): Have N^0 return 1.
3145         Reported by Michael Fetterman.
3147         * eval.c, input.c, m4.h: Remove last comma in enums.
3148         Reported by Mike Lijewski.
3150         * Transfer of maintenance duties from Rene' to Franc,ois.
3152 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3154         * Release 1.0.  Many thanks to those, who provided me with bug
3155         reports and feedback.
3157         * Uses GNU configure, taken from the gdb distribution.
3159         * Uses GNU getopt(), with long option names.
3161         * The -Q/+quiet option is added, which suppresses warnings about
3162         missing or superflous arguments to built-in macros.
3164         * Added default options via the M4OPTS environment variable.
3166         * The built-in format can now be configured to use sprintf as
3167         the formatting engine, for systems without [efg]cvt(3).
3169         * GNU library code is moved to the ./lib subdirectory; other
3170         utility files are now in ./etc.
3172         * Several minor bugs have been fixed.
3174 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3176         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3177         Francois Pinard and Roland H. Pesch for providing me with reports.
3179         * The builtins incr and decr are now implemented without use of
3180         eval.
3182         * The builtin indir is added, to allow for indirect macro calls
3183         (allows use of "illegal" macro names).
3185         * The debugging and tracing facilities has been enhanced
3186         considerably.  See the manual for details.
3188         * The -tMACRO option is added, marks MACRO for tracing as soon
3189         as it is defined.
3191         * Builtins are traced after renaming iff they were before.
3193         * Named files can now be undiverted.
3195         * The -Nnum option can be used to increase the number of
3196         divertions available.
3198         * Calling changecom without arguments now disables all comment
3199         handling.
3201         * The function m4_patsubst() is now consistently declared
3202         static.
3204         * A bug in dnl is fixed.
3206         * A bug in the multi-character quoting code is fixed.
3208         * Several typos in the manual has been corrected.  More probably
3209         persist.
3211         * The m4.info file is now installed along with the program.
3213 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3215         * Updated and enhanced version.  Release 0.75, manual 0.07.
3217         * Implemented search path for include files (-I option and
3218         M4PATH envronment variable).
3220         * Implemented builtin "format" for printf-like formatting.
3222         * Implemented builtin "regexp" for searching for regular
3223         expressions.
3225         * Implemented builtin "patsubst" for substitution with regular
3226         expressions.
3228         * Implemented builtin "esyscmd", which expands to a shell
3229         commands output.
3231         * Implemented "__file__" and "__line__" for use in error
3232         messages.
3234         * Implemented character ranges in "translit".
3236         * Implemented control over debugging output.
3238         * Implemented multi-character quotes.
3240         * Implemented multi-character comment delimiters.
3242         * Changed predefined macro "gnu" to "__gnu__".
3244         * Changed predefined macro "unix" to "__unix__", when the -G
3245         option is not used.  With -G, "unix" is still defined.
3247         * Changed "shift", "$@" and "$*" to not insert spaces afters
3248         commas.
3250         * Added program name to error messages.
3252         * Fixed two missing null bytes bugs.
3254 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3256         * Initial beta release.  Release 0.50, manual 0.05.
3258         -----
3260         $Revision$ $Date$
3262         Local Variables:
3263         coding: utf-8
3264         End:
3266         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3267         2005, 2006 Free Software Foundation, Inc.
3269         Copying and distribution of this file, with or without
3270         modification, are permitted provided the copyright notice
3271         and this notice are preserved.