Cache regex compilation for another autoconf speedup.
[m4/ericb.git] / ChangeLog
blobae7e0e08e3db3ae8f7b978127b20635fc4ca2985
1 2007-10-09  Eric Blake  <ebb9@byu.net>
3         Cache regex compilation for another autoconf speedup.
4         * src/m4.h (free_macro_sequence): Rename...
5         (free_regex): ...to this.
6         * src/m4.c (main): Update caller.
7         * src/builtin.c (REGEX_CACHE_SIZE, m4_regex, regex_cache): New
8         declarations.
9         (compile_pattern): New function; cache recent regexes.
10         (free_regex): Rename, and clean up additional memory.
11         (m4_regexp, m4_patsubst): Use new function.
13 2007-10-02  Eric Blake  <ebb9@byu.net>
15         Document quoting pitfalls in capitalize.
16         * doc/m4.texinfo (Patsubst): Use the examples directory.  Also
17         document shortfall.
18         (Improved capitalize): New node.
19         * examples/capitalize.m4: Update to match manual.
20         * examples/capitalize2.m4: New file.
22 2007-10-01  Eric Blake  <ebb9@byu.net>
24         Another Autoconf usage pattern optimization.
25         * src/builtin.c (m4_index): Optimize search for one byte.
26         * doc/m4.texinfo (Index macro, Regexp, Patsubst): Test the new
27         code paths.
29 2007-09-29  Eric Blake  <ebb9@byu.net>
31         Optimize for Autoconf usage pattern.
32         * src/builtin.c (m4_regexp, m4_patsubst): Handle empty regex
33         faster.
35 2007-09-24  Eric Blake  <ebb9@byu.net>
37         Create .gitignore alongside .cvsignore.
38         * bootstrap (LC_ALL): Set up front.
39         (version control) Borrow idea from head, to avoid churn in
40         m4/.*ignore files modified by gnulib-tool.
42 2007-09-13  Eric Blake  <ebb9@byu.net>
44         * AUTHORS: Fix typo.
46 2007-09-07  Eric Blake  <ebb9@byu.net>
48         * AUTHORS: Simplify, to match libtool and autoconf layout.
49         * THANKS: Sync with head.
51 2007-08-10  Eric Blake  <ebb9@byu.net>
53         * doc/m4.texinfo (Compatibility): Sync with head.
55 2007-08-10  Konrad Schwarz  <konrad.schwarz@siemens.com>  (tiny change)
56         and Eric Blake  <ebb9@byu.net>
58         * doc/m4.texinfo (Defn): Update wording.
60 2007-08-09  Eric Blake  <ebb9@byu.net>
62         POSIX requires defn(`a',`b') to concatenate definitions.
63         * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
64         trying to mix a builtin with anything else.
65         * doc/m4.texinfo (Defn): Document a use for this POSIX
66         requirement.
67         (Incompatibilities): Update to match current status.
68         * NEWS: Document this change.
69         * THANKS: Update.
70         Reported by Konrad Schwarz.
72 2007-08-04  Eric Blake  <ebb9@byu.net>
74         Normalize all GPL license notices.
75         * GNUmakefile: Update license wording.
76         * Makefile.am: Likewise.
77         * Makefile.maint: Likewise.
78         * bootstrap: Likewise.
79         * commit: Likewise.
80         * configure.ac: Likewise.
81         * checks/Makefile.in: Likewise.
82         * doc/Makefile.am: Likewise.
83         * examples/Makefile.am: Likewise.
84         * src/Makefile.am: Likewise.
85         * src/builtin.c: Likewise.
86         * src/debug.c: Likewise.
87         * src/eval.c: Likewise.
88         * src/format.c: Likewise.
89         * src/freeze.c: Likewise.
90         * src/input.c: Likewise.
91         * src/m4.c: Likewise.
92         * src/m4.h: Likewise.
93         * src/macro.c: Likewise.
94         * src/output.c: Likewise.
95         * src/path.c: Likewise.
96         * src/stackovf.c: Likewise.
97         * src/symtab.c: Likewise.
99 2007-07-21  Eric Blake  <ebb9@byu.net>
101         Fix regression on NetBSD from 2007-05-28.
102         * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
103         position to byte 0.
104         * NEWS: Document this fix.
105         * THANKS: Update.
106         Reported by Thomas Klausner.
108 2007-07-20  Eric Blake  <ebb9@byu.net>
110         Fix 'make distcheck' issues.
111         * Makefile.am (EXTRA_DIST): No need to distribute
112         gpl-3.0.texi.diff anymore.
113         * m4/gnulib-cache.m4: Update to latest gnulib.
115 2007-07-14  Eric Blake  <ebb9@byu.net>
117         Reflect upstream license .texi changes.
118         * doc/m4.texinfo (Copying): Rename node...
119         (GNU General Public License): ...to this.
120         (GNU Free Documentation License): Adjust node location.
121         * local/doc/gpl-3.0.texi.diff: Remove file.
123 2007-07-10  Eric Blake  <ebb9@byu.net>
125         Start 1.4.10a.
126         * configure.ac (AC_INIT): Bump version number.
127         * NEWS: Start changes since 1.4.10.
128         * doc/m4.texinfo (History): Mention 1.4.11.
129         (Copying This Package, Copying This Manual): Add index entries.
130         * local/lib/version-etc.c.diff: Delete, now that gnulib has been
131         updated.
132         * Makefile.am (EXTRA_DIST): Remove dead file.
134 2007-07-09  Eric Blake  <ebb9@byu.net>
136         Release 1.4.10:
137         * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
138         * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
139         * configure.ac (AC_INIT): Bump version number.
140         * NEWS: Describe changes since 1.4.9.
142         * src/format.c: Missed a GPLv3 conversion.
144         Avoid undefined behavior of %.*c in printf.
145         * src/format.c (format): Special case %c.
146         * TODO: Document that more remains to be done.
147         * NEWS: Document the fix.
149 2007-07-05  Eric Blake  <ebb9@byu.net>
151         Fix up gnulib-tool usage.
152         * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
153         * version-etc.c.diff: Move to...
154         * local/lib/version-etc.c.diff: ...here.
155         * gpl-3.0.texi.diff: Move to...
156         * local/doc/gpl-3.0.texi.diff: ...here.
158 2007-07-04  Eric Blake  <ebb9@byu.net>
160         Upgrade to GPL version 3 or later.
161         * bootstrap: Pick up GPLv3.
162         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
163         --local-dir=. --import gpl-3.0'.
164         * doc/m4.texinfo (Copying This Package): New appendix.
165         * NEWS: Mention this change.
166         * README: Mention why some files still claim to be version 2.
167         * version-etc.c.diff: New file, to make sure --version claims
168         correct GPL version.  Temporary until gnulib makes move.
169         * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
170         appendix, rather than section, of the manual.
171         * GNUmakefile: Update to new license.
172         * Makefile.am: Likewise.
173         * Makefile.maint: Likewise.
174         * commit: Likewise.
175         * configure.ac: Likewise.
176         * checks/Makefile.in: Likewise.
177         * doc/Makefile.am: Likewise.
178         * examples/Makefile.am: Likewise.
179         * src/Makefile.am: Likewise.
180         * src/builtin.c: Likewise.
181         * src/debug.c: Likewise.
182         * src/eval.c: Likewise.
183         * src/freeze.c: Likewise.
184         * src/input.c: Likewise.
185         * src/m4.c: Likewise.
186         * src/m4.h: Likewise.
187         * src/macro.c: Likewise.
188         * src/output.c: Likewise.
189         * src/path.c: Likewise.
190         * src/stackovf.c: Likewise.
191         * src/symtab.c: Likewise.
193 2007-06-26  Eric Blake  <ebb9@byu.net>
195         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
197 2007-06-26  Karl Berry  <karl@freefriends.org>  (tiny change)
199         Match Free Software Directory categories.
200         * doc/m4.texinfo (dircategory): Update.
202 2007-05-31  Eric Blake  <ebb9@byu.net>
204         * src/output.c (output_text): Fix regression from 2007-05-28.
205         * doc/m4.texinfo (History): Mention 1.4.10.
206         (Format): Make testsuite output easier to debug.
208 2007-05-29  Eric Blake  <ebb9@byu.net>
210         Start 1.4.9c.
211         * configure.ac (AC_INIT): Bump version number.
212         * NEWS: Start changes since 1.4.9b, and fix typo.
214         Beta Release 1.4.9b:
215         * configure.ac (AC_INIT): Bump version number.
216         * NEWS: Describe changes since 1.4.9.
218         Improve format support.
219         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
220         vasprintf-posix'.
221         * src/format.c (format): Parse %'hhd, %a, %A.  Avoid calling
222         printf with too few arguments, as in format(%*.*d,-1,-1,1).
223         * doc/m4.texinfo (Format): Expand tests, and improve
224         documentation.
225         * NEWS: Document this change.
227 2007-05-28  Eric Blake  <ebb9@byu.net>
229         Fix large diversion corner cases, including 1.4.8 regression.
230         * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
231         (make_room_for): Use NULL, not 0, for pointers.
232         (insert_diversion_helper): Avoid using rewind.
233         (freeze_diversions): Allow freezing large diversions.
234         * NEWS: Document this fix.
236         Also run gnulib unit tests during make check.
237         * m4/gnulib-cache.m4: Augment with 'gnulib-tool
238         --tests-base=tests --with-tests'.
239         * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
240         * Makefile.am (SUBDIRS): Run gnulib tests before ours.
242 2007-05-25  Eric Blake  <ebb9@byu.net>
244         Backport prompts in examples from head.
245         * src/macro.c (expand_macro): Shorten message.
246         * doc/m4.texinfo (Manual, Command line files, Comments)
247         (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
248         (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
249         (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
250         (Using frozen files, Improved forloop, Improved foreach): Add
251         prompts to examples.
252         * checks/get-them: Ignore prompts in examples.
254         Fix sync line interaction with multiline comments.
255         * doc/m4.texinfo (Other Incompatibilities): Add example, and
256         document bug in --syncline/divert interaction.
257         (Preprocessor features): Augment test.
258         * src/m4.h (output_text): Export.
259         (shipout_text, next_token): Add parameter.
260         * src/freeze.c (reload_frozen_state): Don't interfere with
261         synclines when reloading state.
262         * src/output.c (output_text): Export.
263         (shipout_text): Take new parameter for start line of token.
264         Output at most one syncline per token.
265         * src/input.c (next_token): Report line where multiline tokens
266         start.
267         * src/macro.c (expand_input, expand_token, expand_argument):
268         Adjust callers so that line is passed from input to output.
269         * NEWS: Document this fix.
270         Reported by Sergey Poznyakoff.
272         Test -s in testsuite.
273         * doc/m4.texinfo (Preprocessor features): Add a test.
274         * checks/get-them: Support extra options in testsuite.
275         * checks/check-them (examples): Use extra options.
276         * THANKS: Update.
277         Reported by Sergey Poznyakoff.
279 2007-05-24  Eric Blake  <ebb9@byu.net>
281         Support POSIX flush semantics on all platforms.
282         * m4/gnulib-cache.m4: Remove closeout, and augment with
283         'gnulib-tool --import closein fflush'.
284         * src/m4.h (includes): Use closein, not closeout.
285         * src/m4.c (main): Ensure stdin is flushed when not all input is
286         consumed.
287         (process_file): No return needed.
288         * src/debug.c (debug_flush_files): Rely on gnulib module, rather
289         than excluding mingw.
290         * NEWS: Document this change.
292         Work around cygwin and mingw fseeko bugs.
293         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
294         * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
296 2007-04-25  Eric Blake  <ebb9@byu.net>
298         Fix negative division within eval, regression of 2007-01-06.
299         * doc/m4.texinfo (Eval): Catch this bug.
300         * src/eval.c (mult_term): Fix it.
301         * NEWS: Document this.
302         * THANKS: Update.
303         Reported by Cesar Strauss.
305 2007-04-23  Eric Blake  <ebb9@byu.net>
307         Start 1.4.9a.
308         * configure.ac (AC_INIT): Bump version number.
309         * NEWS: Start changes since 1.4.9.
311 2007-03-23  Eric Blake  <ebb9@byu.net>
313         Release 1.4.9:
314         * configure.ac (AC_INIT): Bump version number.
315         * NEWS: Describe changes since 1.4.8b.
317 2007-03-16  Eric Blake  <ebb9@byu.net>
319         * doc/m4.texinfo (Mkstemp): Tweak wording.
320         * src/output.c (output_init): Adjust to latest gnulib.
322 2007-03-15  Eric Blake  <ebb9@byu.net>
324         Avoid Tandem/NSK's broken long long (without a symmetric unsigned
325         long long, it confuses gnulib).
326         * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
327         if unsigned long long doesn't work.
328         * THANKS: Update.
329         Reported by Matthew Woehlke.
331 2007-03-07  Eric Blake  <ebb9@byu.net>
333         * AUTHORS: Update.
334         * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
336 2007-03-01  Eric Blake  <ebb9@byu.net>
338         * doc/m4.texinfo: Pick up more index entries from head.  Follow
339         more texinfo recommendations.
340         (Sysval): Improve tests.
342         Avoid overfull \vbox warning from texinfo, due to indices that
343         weren't quite big enough to split across page boundaries.
344         * doc/m4.texinfo: Add lots of concept index entries.
345         (Concept Index): Move to be last, as recommended by texinfo
346         manual.
347         (Define, Arguments, Pseudo Arguments): Add more function entries.
349 2007-02-28  Eric Blake  <ebb9@byu.net>
351         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
352         137.
353         (Pseudo Arguments): Add useful example.
355         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
356         reflect POSIX XCU ERN 118.
358         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
359         * src/m4.c (usage): ...here,...
360         * src/builtin.c (set_macro_sequence): ...and here.
361         (define_user_macro): Fix typo.
362         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
363         inaccuracies.
364         (Shift): Document composite macro argn for portably getting at
365         positional parameters beyond 9.
366         * configure.ac (AC_INIT): Bump version number.
367         * NEWS: Start changes of 1.4.8c.
369 2007-02-24  Eric Blake  <ebb9@byu.net>
371         Beta Release 1.4.8b:
372         * configure.ac (AC_INIT): Bump version number.
373         * NEWS: Describe changes since 1.4.8.
375         Reserve all uses of raw ${} in macro definitions, not just
376         ${<digit>}.
377         * src/builtin.c (set_macro_sequence): Change default macro
378         sequence.
379         * doc/m4.texinfo (Operation modes): Update to match.
380         * src/m4.c (usage): Likewise.
381         * NEWS: Likewise.
383 2007-02-23  Eric Blake  <ebb9@byu.net>
385         * src/m4.h (includes): Update to latest gnulib.
387 2007-02-08  Eric Blake  <ebb9@byu.net>
389         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
390         more flexible, and so that autoconf can use it.
391         * src/m4.h (set_macro_sequence, free_macro_sequence): New
392         prototypes.
393         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
394         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
395         New variables and functions.
396         (define_user_macro): Allow flexibility in regular expression used
397         to trigger warning.
398         * src/m4.c (warn_syntax): Delete.
399         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
400         spelling of option, along with optional argument.
401         * doc/m4.texinfo (Operation modes, Arguments): Document this
402         change.
403         * NEWS: Document this change.
405 2007-02-05  Eric Blake  <ebb9@byu.net>
407         * m4/gnulib-cache.m4: Module strstr no longer exists.
409         Avoid bool bitfields, as they don't work on AIX.
410         * src/m4.h (bool_bitfield): New typedef.
411         (struct symbol, struct builtin): Use it.
412         * src/input.c (struct input_block): Likewise.
413         Reported by Albert Chin.
415         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
416         Reported by Albert Chin.
417         * THANKS: Update.
419 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
421         * doc/m4.texinfo (Input processing): Further clarifications.
423 2007-02-03  Eric Blake  <ebb9@byu.net>
425         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
426         the examples.
427         Reported by Bruno Haible.
429 2007-02-01  Eric Blake  <ebb9@byu.net>
431         * src/m4.c (fatal_warnings): New variable.
432         (usage): Document new -E behavior.
433         (main): Make -E an additive option.
434         (m4_error, m4_error_at_line): Change exit status when required.
435         * NEWS: Document this change.
436         * doc/m4.texinfo (Operation modes): Likewise.
437         Reported by Ralf Wildenhues.
439 2007-01-27  Eric Blake  <ebb9@byu.net>
441         * src/m4.h (warn_syntax): Declare.
442         (init_pattern_buffer): Export.
443         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
444         (long_options, main): Implement new option.
445         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
446         (define_user_macro): Warn on $11 and ${1} if requested.
447         * src/input.c (init_pattern_buffer): Delete duplicate method.
448         * doc/m4.texinfo (Operation modes): Document it.
449         (Arguments): Document future direction of ${11} vs. $11.
450         (Incompatibilities): Fix wording on POSIX limitations.
451         * checks/get-them: Parse @{ and @} correctly.
452         * NEWS: Document this change.
454 2007-01-26  Eric Blake  <ebb9@byu.net>
456         * src/builtin.c (includes): Adjust to gnulib changes.
458 2007-01-15  Eric Blake  <ebb9@byu.net>
460         * doc/m4.texinfo: Pull in various improvements from head.
461         * src/builtin.c (include): Alter exit status on failure.
462         * NEWS: Document this fix.
464 2007-01-13  Eric Blake  <ebb9@byu.net>
466         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
467         assume the fallback of ss_base for BSDI 4.0.1.
468         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
469         ! HAVE_STACK_T_SS_SP]: Use this check.
470         Reported by Chris McGuire.
471         * THANKS: Update.
472         * NEWS: Document the improvement.
474 2007-01-09  Eric Blake  <ebb9@byu.net>
476         * src/eval.c (ASSIGN): New enumerator.
477         (eval_lex): Recognize '='.
478         (equality_term): Treat '=' like '==', but warn that it is
479         deprecated.
480         * doc/m4.texinfo (Eval): Document and test this.
481         (Incompatibilities): Document the POSIX incompatibility.
482         * NEWS: Document this change.
484 2007-01-06  Eric Blake  <ebb9@byu.net>
486         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
487         * checks/check-them: Record expected exit status.
488         * checks/get-them: Check exit status.
489         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
490         instead.
491         * src/builtin.c: All users changed.
492         * src/eval.c: Likewise.  Also document where we are triggering
493         undefined or implementation-defined behavior.
494         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
495         (logical_or_term, logical_and_term, logical_not_term, not_term)
496         (equality_term, unary_term): Port from head to follow POSIX
497         semantics.
498         (exp_term): Reject 0**0 as undefined.
499         * doc/m4.texinfo (History): Mention 1.4.9.
500         (Format, Incompatibilities): Update to document POSIX compliance.
501         * NEWS: Document this change.
503 2007-01-04  Eric Blake  <ebb9@byu.net>
505         * NEWS: Document previous fix.
506         * THANKS: Update.
508 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
510         Fix Debian bug 405594, introduced 2006-11-01 from a bad
511         copy-n-paste from head.
512         * src/m4.c (main): Use correct file name after --.
514 2007-01-04  Eric Blake  <ebb9@byu.net>
516         Fix regression from 1.4.7 in large file handling on some
517         platforms, introduced on 2006-10-13.
518         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
519         will be handled.
520         * NEWS: Document this fix.
522 2007-01-03  Eric Blake  <ebb9@byu.net>
524         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
525         version-etc-fsf'.
526         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
527         it bumps the copyright year).
529 2006-12-27  Eric Blake  <ebb9@byu.net>
531         * doc/m4.texinfo (Patsubst): Fix typo.
533 2006-12-16  Eric Blake  <ebb9@byu.net>
535         * src/m4.c (main): Check for errors when closing stdin.
537 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
539         * doc/m4.texinfo: Fix some typos.
541 2006-12-09  Eric Blake  <ebb9@byu.net>
543         * configure.ac (AC_INIT): Bump version number.
544         * NEWS: Start changes of 1.4.8a.
546 2006-11-20  Eric Blake  <ebb9@byu.net>
548         Release 1.4.8:
549         * configure.ac (AC_INIT): Bump version number.
550         * NEWS: Describe changes since 1.4.7.
552 2006-11-16  Eric Blake  <ebb9@byu.net>
554         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
555         Minor tweaks noticed while porting to head.
557 2006-11-14  Eric Blake  <ebb9@byu.net>
559         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
560         spent iterators.
561         (m4_tmpname): Avoid memory leak.
563 2006-11-13  Eric Blake  <ebb9@byu.net>
565         * src/output.c (cleanup_tmpfile): Avoid double error message when
566         umask is prohibitive.
567         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
568         functions.
569         (m4_tmpfile): Add parameter, move cloexec action here.
570         (make_room_for): Adjust caller.  Don't keep too many files open.
571         (insert_diversion_helper): Unlink emptied temp files.
572         (make_diversion): Don't keep too many files open.
573         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
574         descriptors are no longer a limiting factor.
575         * NEWS: Document this change.
577         Backport sparse diversion handling from head.
578         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
579         avltree-oset'.
580         * src/output.c (struct m4_diversion): Rename from struct
581         diversion, and update members.  All users changed.
582         (diversion_table): Change to an ordered set, instead of an array.
583         (div0): New storage for diversion 0.
584         (diversions): No longer needed.
585         (free_list): New list to allow recycling diversion storage.
586         (diversion_storage): New storage to reduce malloc overhead.
587         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
588         (output_init, output_exit, cleanup_tmpfile, make_room_for)
589         (make_diversion): Handle new diversion storage scheme.
590         (insert_diversion_helper): New function.
591         (insert_diversion, undivert_all, freeze_diversions): Use it.
592         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
593         exhaustion to visible test of large diversion numbers.
594         * NEWS: Document this fix.
596 2006-11-11  Eric Blake  <ebb9@byu.net>
598         * src/builtin.c (m4_translit): Slight optimization.
600         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
602         * src/builtin.c: Remove unnecessary casts.
603         (expand_ranges): Make 8-bit clean.
604         * doc/m4.texinfo (Translit): Add tests and wording.
605         * NEWS: Document this fix.
607 2006-11-07  Eric Blake  <ebb9@byu.net>
609         * src/m4.h (output_exit): New prototype.
610         * src/m4.c (main): Use it.
611         * src/output.c (cleanup_tmpfile): Close files before removing
612         directory.
613         (insert_diversion): Check for failure.
614         (output_exit): Avoid memory leak.
615         * doc/m4.texinfo (Diversions): Test this bug.
617         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
619 2006-11-01  Eric Blake  <ebb9@byu.net>
621         Allow C++ compilation on Linux, as a safety measure in type
622         checking.
623         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
624         stdbool'.
625         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
626         (boolean): Kill this, and use stdbool.h instead.
627         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
628         * src/output.c, src/symtab.c: All users changed.
629         * src/symtab.c (hack_all_symbols): Update prototype.
630         * src/builtin.c (dump_symbol, set_trace): Update signature.
631         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
632         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
633         C++ compilation.
634         * src/debug.c (trace_flush): Likewise.
635         * src/freeze.c (reload_frozen_state): Likewise.
636         * src/input.c (push_file, push_string_finish, push_wrapup):
637         (token_bottom, next_token): Likewise.
638         * src/m4.c (main): Likewise.
640         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
641         draft wording.
642         * src/m4.h (m4_path_search): Tweak signature.
643         * src/path.c (m4_path_search): Likewise.
644         * src/builtin.c (include): Update caller.
645         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
646         with file names.  Don't write to **argv.
647         (process_file): New helper method.
648         * NEWS: Document this fix.
650 2006-10-31  Eric Blake  <ebb9@byu.net>
652         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
653         * doc/m4.texinfo (Translit): Improve the documentation.
654         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
655         algorithm.
656         (m4_index): Simplify, and speed up slightly.
657         * NEWS: Document this fix.
659 2006-10-28  Eric Blake  <ebb9@byu.net>
661         * src/input.c (set_quotes): Don't allow empty end-quote with
662         non-empty start-quote.
663         (set_comment): Likewise for end-comment.
664         * src/builtin.c (m4_changecom): Adjust caller.
665         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
666         match behavior.
667         (Incompatibilities): Document another POSIX bug.
668         * NEWS: Mention this change.
670 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
672         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
673         files.
675 2006-10-26  Eric Blake  <ebb9@byu.net>
677         Silence -Wwrite-strings -Wpointer-arith warnings.
678         * src/builtin.c (define_user_macro): Allow NULL argument.
679         (m4_builtin, m4_indir): Cast away const of "".
680         * src/format.c (format): Likewise.
681         * src/macro.c (collect_arguments): Likewise.
682         (expand_macro): Avoid math on void*.
683         * src/m4.c (main): Adjust caller.
684         * src/output.c (freeze_diversions): Detect off_t overflow.
686         * src/input.c (pop_input): Remove unnecessary code.
688 2006-10-25  Eric Blake  <ebb9@byu.net>
690         * src/symtab.c (symtab_init): Avoid size_t overflow.
691         * src/output.c (make_diversion): Avoid size_t overflow.
692         * doc/m4.texinfo (Diversions): Test this fix.
693         * src/input.c (input_block): Remove unused member.  Reduce size
694         of struct.
695         (push_file, pop_input): Avoid useless assignment.
696         * NEWS: Document the bug fix.
698         Redo location tracking.  Instead of having just files track the
699         line to return to when popping input, now all input blocks track
700         their current line.
701         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
702         needed.
703         (input_block): Have line and file storage for all input types, and
704         rename some members.
705         (input_change): New global flag.
706         (push_file, push_macro, push_string_init, push_wrapup): Store
707         location.
708         (push_string_finish, pop_input, pop_wrapup): Notice changes in
709         input blocks.
710         (peek_input): Adjust to new member names.
711         (next_char, next_char1): Adjust location if needed.
712         (skip_line): Simplify restoring location.
713         * doc/m4.texinfo (Location): Augment the test to catch line
714         location of expansion of multi-line arguments.
715         Reported by Stepan Kasal.
717 2006-10-23  Eric Blake  <ebb9@byu.net>
719         * doc/m4.texinfo (Macro Arguments): Document that leading space
720         in argument collection stops at macro expansion.
721         (Incompatibilities): Document POSIX whitespace wording issue.
723 2006-10-20  Eric Blake  <ebb9@byu.net>
725         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
726         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
727         end of a TeX line splits incorrectly.
728         (Foreach, Improved foreach): Write these sections, borrowing ideas
729         from CVS head and from m4sugar.
730         * checks/get-them: Accomodate new way to show trailing space in
731         examples.
732         * examples/foreach.m4: Make usable in documentation.
733         * examples/foreachq.m4: New file.
734         * examples/foreachq2.m4: New file.
735         * examples/foreach2.m4: New file.
736         * NEWS: Document the documentation updates.
738 2006-10-19  Eric Blake  <ebb9@byu.net>
740         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
741         (m4_maketemp): Provide traditional behavior.
742         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
743         new `mkstemp' macro and the flaws of the old `maketemp'.
744         (Incompatibilities): Move maketemp discussion to...
745         (Extensions): ...here, since -G now supresses the GNU extension.
746         * NEWS: Document this.
748         * examples/forloop.m4: Simplify.
749         * examples/forloop2.m4: New file.
750         * examples/quote.m4: New file.
751         * doc/m4.texinfo (Loops): Rename to...
752         (Shift): ...this node.
753         (Forloop, Foreach, Improved forloop, Improved foreach): New
754         nodes.
756 2006-10-17  Eric Blake  <ebb9@byu.net>
758         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
759         config-h'.
760         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
761         gnulib headers, rather than in top directory.
762         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
763         output clutter.
765 2006-10-16  Eric Blake  <ebb9@byu.net>
767         * doc/m4.texinfo: Backport some minor cleanups from head.
768         (Cleardivert): Rename from cleardiv.
770         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
771         a section of Preliminaries.
772         (Operation modes, Preprocessor features, Limits control)
773         (Frozen state, Debugging options, Command line files): Subdivide
774         into new sections.
775         (Input processing, Quoting Arguments, Define, Arguments)
776         (Cleardiv, Format, M4exit): Fix grammar of references.
777         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
778         (Debug Levels, Debug Output, Include, Search Path, Divert)
779         (Platform macros, Syscmd, Location, Extensions): Point to new
780         sections.
781         (Top, Loops, Include, Undivert, Location, Incompatibilities):
782         Improve file references.
784 2006-10-14  Eric Blake  <ebb9@byu.net>
786         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
787         is not portable.
788         Reported by Ralf Wildenhues.
790         * src/builtin.c (m4_undivert): Check for read error.
792 2006-10-13  Eric Blake  <ebb9@byu.net>
794         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
795         header files are included, since <unistd.h> can affect the tests.
796         * THANKS: Updated.
797         Reported by Martin Koeppe.
799         Backport head's usage of clean-temp module, as it is cleaner than
800         using tmpfile-safer.
801         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
802         clean-temp closeout', and remove tmpfile-safer.
803         * src/m4.h (includes): Adjust.
804         (m4_path_search): Rename from path_search, to avoid collision
805         with gnulib.
806         * src/m4.c (main): Install closeout handler.  Adjust caller.
807         (usage): Now done by closeout module.
808         * src/builtin.c (m4_m4exit): Likewise.
809         (m4_undivert, include): Adjust callers.
810         * src/freeze.c (reload_frozen_state): Likewise.
811         * src/path.c (m4_path_search): Rename from path_search.
812         * src/output.c (output_temp_dir): New variable.
813         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
814         (insert_diversion, make_room_for): Use them.
815         * doc/m4.texinfo (Diversions): Document this, and add a test.
816         (Improved fatal_error): Fix typo.
817         (Maketemp): Port test to mingw, and no longer hide from
818         documentation.
819         * NEWS: Document the change in TMPDIR behavior.
821         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
822         macros, to work with recent gnulib-tool update.
824         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
825         handling of defn results.
826         * doc/m4.texinfo (Builtin, Indir): Add test cases.
827         * NEWS: Document this.
829 2006-10-12  Eric Blake  <ebb9@byu.net>
831         * doc/m4.texinfo (Location): Fix typo in previous commit.
832         (Changeword): Catch one more case.
833         * src/input.c (skip_line): Fix case when outer file used macro to
834         supply the \n.
836 2006-10-11  Eric Blake  <ebb9@byu.net>
838         * src/input.c (enum input_type): Add additional types, to shave
839         time off the common case.
840         (push_wrapup): Wrapped strings remember location.
841         (push_string_finish): Normal strings carry no location.
842         (push_file): Start new files uninitialized.
843         (peek_input, next_char_1): Optimize common cases by updating
844         location only on new input types.
845         (pop_input): Update to honor new input types.
846         (skip_line, push_string_finish): Fix regression in previous patch
847         when dnl is not followed by newline in included file.
848         (push_string_init): Initialize all fields of INPUT_STRING sooner.
849         (peek_token): Simplify.
850         (peek_input): Don't pop input files on peek, so that __file__ and
851         __line__ as last token of include file work correctly.
852         * doc/m4.texinfo (History): Mention 1.4.8.
853         (Answers): Split into sections, one per answer.
854         (Improved exch, Improved cleardivert, Improved fatal_error): New
855         nodes.
856         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
857         new m4wrap location semantics.
858         (Changeword): Add test that caught the regression.
859         * NEWS: Document this.
861         * src/macro.c (expand_macro): In macro expansion errors, report
862         line number at open parenthesis.
863         * src/input.c (next_token): Fix off-by-one bug in reporting end
864         of file in unterminated comment and string.
865         (file_names): New obstack, necessary since expand_macro now hangs
866         on to file names longer than the files remain open.
867         (input_init): Initialize new obstack.
868         (push_file): Use new obstack.  Delay updates to current_file
869         until after expand_macro has restored state.
870         (peek_input, next_char_1): Update current_file if necessary.
871         (pop_wrapup): Release memory.
872         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
873         the off-by-one bug.
874         (Dnl): Update to the new location reporting rules.
875         * NEWS: Document these changes.
877 2006-10-10  Eric Blake  <ebb9@byu.net>
879         * src/macro.c (argc_stack, argv_stack): New variables for sharing
880         obstacks across multiple macro calls.
881         (expand_input): Initialize and tear down stack once per input
882         file, instead of once per macro.
883         (expand_macro): Reuse existing stacks when possible.
884         (collect_arguments): Simplify slightly.
886         * src/path.c (include_env_init): Fix botched patch application.
887         Reported by Ralf Wildenhues.
889 2006-10-09  Eric Blake  <ebb9@byu.net>
891         * src/m4.c (usage, main): Detect write failures to stderr.
892         * src/builtin.c (m4_m4exit): Likewise.
893         * NEWS: Document this.
895         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
896         the limit.
897         * NEWS: Document this.
898         * doc/m4.texinfo (Invoking m4): Likewise.
900 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
902         * src/path.c (include_env_init): Copy the string returned
903         by getenv before overwriting it; POSIX disallows this.
905 2006-10-09  Eric Blake  <ebb9@byu.net>
907         * src/m4.c (main): Defer debugfile until after --help.
908         * configure.ac (AC_INIT): Bump version number.
909         * NEWS: Start changes of 1.4.7a.
911 2006-09-25  Eric Blake  <ebb9@byu.net>
913         Release 1.4.7:
914         * configure.ac (AC_INIT): Bump version number.
915         * NEWS: Describe changes since 1.4.6.
917 2006-09-21  Eric Blake  <ebb9@byu.net>
919         * doc/m4.texinfo (Invoking m4): Add clarification on option
920         processing behavior.
921         * THANKS: Update.
922         Reported by Mikhail Teterin.
924         * bootstrap: Add --force option, based on idea from coreutils.
925         * README: Document that ./bootstrap and autoreconf are for
926         developers, and not lightly done in tarballs.
928 2006-09-20  Eric Blake  <ebb9@byu.net>
930         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
931         deprecation warning on -e.
932         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
933         * NEWS: Document this.
935 2006-09-19  Eric Blake  <ebb9@byu.net>
937         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
938         -o/--error-output to --debugfile, and deprecate the former.  This
939         will allow a future release to be more consistent with other GNU
940         tools, with -o/--output affecting stdout, not debug.
941         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
942         * NEWS: Document this.
944 2006-09-14  Eric Blake  <ebb9@byu.net>
946         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
947         --diversions. `m4 --help --version' now displays help, not
948         version.
949         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
950         smaller scope.
951         (show_help, show_version): No longer needed.
952         (long_options, DIVERSIONS_OPTION): Backport patch from head to
953         distinguish between -N and --diversions in warning.
954         * doc/m4.texinfo (Invoking m4): Document this.
955         * NEWS: Likewise.
957 2006-09-11  Eric Blake  <ebb9@byu.net>
959         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
960         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
961         seekable.
962         (debug_set_file): Use STDOUT_FILENO.
963         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
964         with POSIX in regards to unread input.
965         * NEWS: Document this fix.
966         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
968 2006-09-07  Eric Blake  <ebb9@byu.net>
970         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
971         * src/m4.h (push_file): Change prototype.
972         * src/input.c (push_file, peek_input, next_char_1): Only call getc
973         once at EOF, to avoid double ^D on terminal stdin; regression from
974         2006-09-04.
975         (push_file, pop_file): Allow reading stdin twice.
976         * src/m4.c (main): Likewise.
977         * src/builtin.c (include): Update caller.
978         * NEWS: Document this change.
979         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
980         (Syscmd): Add a test that failed before this patch.
982 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
984         * checks/check-them: Quote $pwd.
986 2006-09-05  Eric Blake  <ebb9@byu.net>
988         * src/builtin.c (define_macro): Warn on invalid macro name.
989         * NEWS: Document this change.
990         * doc/m4.texinfo: Fix typos.
991         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
992         (Ifelse): Backport some improvements from head.
994 2006-09-04  Eric Blake  <ebb9@byu.net>
996         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
997         native echo is braindead.
998         * checks/check-them (strip_needed): Ignore \r in output.  Now the
999         testsuite will pass when cross-compiling from cygwin to mingw.
1001         * src/input.c (peek_input): Fix regression in handling macro
1002         without arguments as last token in file; debian bug 385720.
1003         (next_token): Always consume an input character.
1004         Reported by Andreas Schultz.
1005         * configure.ac (AC_INIT): Bump version number.
1006         * NEWS: Document this fix.
1007         * doc/m4.texinfo (History): Mention next version.
1008         (Changeword): Add example that exposes this bug.
1009         * THANKS: Update.
1011 2006-08-25  Eric Blake  <ebb9@byu.net>
1013         Release 1.4.6:
1014         * configure.ac (AC_INIT): Bump version number.
1015         * NEWS: Describe changes since 1.4.5.
1017         * Makefile.maint (web-manual): Give up on VPATH build during
1018         distribution.  But distributions are made so infrequently that
1019         this is not too much of a hardship.
1020         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
1021         exists.
1023 2006-08-24  Eric Blake  <ebb9@byu.net>
1025         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
1026         Solaris, produce output on just one argument.
1027         (m4_regexp, m4_patsubst): For consistency, do likewise.
1028         (m4_patsubst): Allow zero-length match at end of string.
1029         * doc/m4.texinfo (Sysval): Fix overfull hbox.
1030         (Bugs, Macro Arguments): Minor fixes.
1031         (Other tokens): Rearrange node order.
1032         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
1033         * NEWS: Document these fixes.
1035 2006-08-22  Eric Blake  <ebb9@byu.net>
1037         * src/input.c (pop_input): Avoid empty filename with -di option.
1038         * src/debug.c (debug_message_prefix): Put space before message.
1040         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
1042         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
1043         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
1045         * checks/check-them: State why a test is skipped.
1046         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
1048         * ChangeLog: Add copyright.
1049         * AUTHORS: Likewise.
1050         * BACKLOG: Likewise.
1051         * README: Likewise.
1052         * THANKS: Likewise.
1053         * TODO: Likewise.
1054         * examples/COPYING: New file, add copyright for all the examples.
1055         * checks/get-them: Put copyright on testsuite files.
1057 2006-08-18  Eric Blake  <ebb9@byu.net>
1059         Don't let unrelated child processes see too many files.
1060         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
1061         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
1062         spelling in error message.
1063         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
1064         (debug_set_output): Close debug file on exec.
1065         * src/m4.h (includes): Add cloexec.h.
1066         * src/output.c (make_room_for): Close diversions on exec.
1067         * src/path.c (path_search): Close include files on exec.
1068         * NEWS: Document this.
1070         Regular expressions were leaking memory.
1071         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
1072         helper methods.
1073         (m4_regexp, m4_patsubst): Avoid memory leak.
1074         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
1075         static.
1076         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
1077         from O(n^2) to O(n) for calculating word_start.
1078         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
1079         O(1) bitmap, not O(n) search string.
1080         * NEWS: Document this fix.
1082 2006-08-17  Eric Blake  <ebb9@byu.net>
1084         * NEWS: Document previous checkin.
1086         * src/builtin.c (substitute): Avoid core dump when accessing
1087         beyond bound of regular expression.
1088         Reported by Karl Nelson.
1089         * doc/m4.texinfo (Regexp): Add example that causes core dump on
1090         some architectures prior to this patch.
1091         * THANKS: Updated.
1093 2006-08-16  Eric Blake  <ebb9@byu.net>
1095         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
1096         clear that dumpdef does not always go to stderr.
1098         * src/builtin.c (m4_errprint): Flush buffers before printing to
1099         stderr.
1100         * THANKS: Updated.
1102 2006-08-15  Eric Blake  <ebb9@byu.net>
1104         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
1105         per debian bug 96075.
1106         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
1107         (Changeword): Don't use shift as an example of a swallowed word.
1108         (Divert): Discuss fact that divert is an English word.
1109         Reported by Richard A Nelson.
1111 2006-08-14  Eric Blake  <ebb9@byu.net>
1113         * doc/m4.texinfo (Invoking m4): Minor fixes.
1115 2006-08-12  Eric Blake  <ebb9@byu.net>
1117         * doc/m4.texinfo (Arguments): Hint at better exch macro.
1118         (Answers): Provide a better definition.
1120 2006-08-09  Eric Blake  <ebb9@byu.net>
1122         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
1123         yet understand locales.
1124         * NEWS: Fix wording of a few items.
1126 2006-08-08  Eric Blake  <ebb9@byu.net>
1128         Avoid printing `NONE:0:' in error messages.
1129         * src/m4.h (m4_error_at_line): New function.
1130         * src/m4.c (m4_error_at_line): Implement.
1131         * src/input.c (skip_line, input_init, next_token): Use "", not
1132         "NONE", for no file, since NONE can be a real file name.
1133         * src/macro.c (expand_argument): Likewise.
1134         * src/debug.c (debug_message_prefix, trace_header): Check for
1135         current file.
1136         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
1137         (Location): Document that synclines and internal message format
1138         are not impacted by redefining these macros.
1139         (M4exit): Hint at bug in fatal_error.
1140         (Answers): Provide workaround to match m4 output.
1142         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
1143         * src/m4.h (m4_error): New function.
1144         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
1145         error module deficiencies.
1146         (reference_error, suppress_line): No longer needed.
1147         * src/m4.c (m4_error): Implement.
1148         (main): No longer need to install error callback.
1150 2006-08-04  Eric Blake  <ebb9@byu.net>
1152         * src/m4.h (program_name): Declare.
1153         (suppress_line): New variable.
1154         (M4ERROR_AT_LINE): New macro.
1155         * src/m4.c (reference_error, main): Follow GNU Coding Standards
1156         for error message format.
1157         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
1158         * src/macro.c (expand_argument): Likewise.
1159         * checks/check-them (examples): Adjust to new message format.
1160         * src/builtin.c (m4___program__): New builtin.
1161         * doc/m4.texinfo (Location): Split from Errprint into new node,
1162         and document __program__.
1163         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
1164         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
1165         format.
1166         (Extensions): Document __program__.
1167         * NEWS: Document this change.
1169 2006-08-03  Eric Blake  <ebb9@byu.net>
1171         Don't confuse leading `(' in comment or quote with start of
1172         argument collection.
1173         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
1174         TOKEN_CLOSE.
1175         (peek_input): Make private to input.c.
1176         (peek_token): New prototype.
1177         * src/input.c (default_word_regexp): Reduce ifdefs.
1178         (peek_input): Make static.
1179         (next_token): Return new token types.
1180         (match_input, MATCH): Add argument consume, which controls
1181         whether match should be pushed back.
1182         (peek_token): New function.
1183         (token_type_string) [DEBUG_INPUT]: New function.
1184         * src/macro.c (expand_token, expand_argument, collect_arguments):
1185         Handle new token types.
1186         * doc/m4.texinfo (Changequote, Changecom): Document this.
1187         * NEWS: Document this.
1189         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
1191         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
1192         overflow detection when sigstack exists but is not implemented.
1193         Fixes debian bug 154053.
1194         * THANKS: Updated.
1195         Reported by David Perlin.
1197 2006-08-02  Eric Blake  <ebb9@byu.net>
1199         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
1200         close.
1202 2006-08-01  Eric Blake  <ebb9@byu.net>
1204         * src/input.c (skip_line, next_token): Remember current file in
1205         case input file ends abruptly.  Addresses debian bug 175365.
1206         (pop_input): Defer freeing storage that holds previous file
1207         name...
1208         (pop_wrapup): to here, after error message is issued.
1209         * src/macro.c (expand_argument): Remember current file in case
1210         input file ends abruptly.
1211         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
1212         (M4wrap): Adjust testsuite accordingly.
1213         (Errprint): Document line number limitation of m4wrap.
1214         * NEWS: Document this fix.
1215         * THANKS: Update.
1217 2006-07-31  Eric Blake  <ebb9@byu.net>
1219         * src/input.c (peek_input, next_char, match_input): Be eight-bit
1220         clean; fixes debian bug 311378.
1221         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
1222         (Changequote, Changecom): Add examples to test this.
1223         * NEWS: Document this fix.
1224         * THANKS: Update.
1225         Reported by Steven Augart.
1227         * doc/m4.texinfo: Whitespace fix.
1228         * checks/get-them: Avoid exceeding 14-char file name limit.
1229         * THANKS: Update.
1231 2006-07-30  Eric Blake  <ebb9@byu.net>
1233         * src/path.c (path_search): Detect allocation failure.
1235         Use native free when it is good enough.
1236         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
1237         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
1238         Adjust calls.
1239         * src/symtab.c (free_symbol): Likewise.
1240         * src/m4.c (xfree, main): Likewise.
1241         * src/m4.h (obstack_chunk_free): Likewise.
1242         * src/path.c (path_search): Likewise.
1243         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
1245         * doc/m4.texinfo (Errprint): Add example for last patch.
1246         * checks/check-them: Account for VPATH in latest example.
1248 2006-07-29  Eric Blake  <ebb9@byu.net>
1250         * src/path.c (path_search): Add result parameter, so that
1251         -I can be accounted for.  Debian bug 53685.
1252         * src/m4.h (path_search): Update prototype.
1253         * src/m4.c (main): Adjust callers.
1254         * src/freeze.c (reload_frozen_state): Likewise.
1255         * src/builtin.c (include, m4_undivert): Likewise.
1256         * NEWS: Document this change.
1257         Reported by Nicolas Lichtmaier.
1259 2006-07-28  Eric Blake  <ebb9@byu.net>
1261         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
1262         several non-GNU makes.
1263         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
1264         * src/m4.h: Likewise.
1265         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
1266         /usr/ccs/bin/ucbcc.
1268 2006-07-27  Eric Blake  <ebb9@byu.net>
1270         * doc/m4.texinfo: Use @acronym{GNU} throughout.
1271         (History): Update for 1.4.6.
1273         * src/m4.h (_): Remove K&R cruft.
1274         * src/builtin.c: Likewise.
1275         * src/debug.c: Likewise.
1276         * src/eval.c: Likewise.
1277         * src/macro.c: Likewise.
1278         * src/stackovf.c: Likewise.
1280         * doc/Makefile.am (m4.1): Improve man page.
1281         * src/m4.c (usage): Improve --help output, including adding the
1282         bug reporting address.
1283         (main): Follow GNU Coding Standards for --version output.
1285 2006-07-26  Eric Blake  <ebb9@byu.net>
1287         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
1288         end-comment consistently, to match POSIX.
1290         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
1291         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
1292         (Incompatibilities): Document incompatibility of changecom
1293         vs. macro names, and of EOF in include.
1294         * src/input.c (next_token): Reject unterminated comments at EOF.
1295         (skip_line): Warn on unterminated dnl at EOF.
1296         * NEWS: Document these changes.
1298 2006-07-25  Eric Blake  <ebb9@byu.net>
1300         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
1301         stdio-safer into fopen-safer and tmpfile-safer.
1302         * src/m4.c: Remove redundant include.
1304 2006-07-24  Eric Blake  <ebb9@byu.net>
1306         Fix bugs related to stream handling.
1307         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1308         unlocked-io stdio-safer stdlib-safer close-stream.
1309         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
1310         provided by gnulib if needed.
1311         * src/output.c [! HAVE_TMPFILE]: Likewise.
1312         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
1313         their safer counterparts.
1314         (retcode): New global variable.
1315         * src/input.c (pop_input): Check for read failure.
1316         * src/freeze.c (reload_frozen_state): Likewise.
1317         (produce_frozen_state): Check for write failure.
1318         * src/debug.c (debug_set_file): Likewise.
1319         * src/m4.c (usage, main): Likewise.
1320         (retcode): Make global.
1321         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
1322         status is non-zero except when everything succeeds.
1323         * doc/m4.texinfo (M4exit): Document these changes.
1324         (Incompatibilities): Remove documentation of bug now fixed.
1325         * NEWS: Document these fixes.
1327 2006-07-22  Eric Blake  <ebb9@byu.net>
1329         * src/format.c (format): Avoid compiler warning that str may be
1330         used uninitialized.
1332 2006-07-21  Eric Blake  <ebb9@byu.net>
1334         * src/m4.h [UNIX]: Add more platforms that are close enough to
1335         categorize as UNIX, but which don't predefine __unix__.
1336         Reported by Nelson H. F. Beebe.
1338 2006-07-20  Eric Blake  <ebb9@byu.net>
1340         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1341         to explicitly ask for --assume-autoconf=2.60.
1343 2006-07-19  Eric Blake  <ebb9@byu.net>
1345         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1346         and exits normally with 129.
1347         Reported by Nelson H. F. Beebe.
1348         * THANKS: Update.
1350         * src/m4.h (EXIT_MISMATCH): Define.
1351         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1352         exiting with status 63.
1353         * src/m4.c (usage): Document this.
1354         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1355         * NEWS: Likewise.
1357         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1358         back-cover texts.
1360 2006-07-17  Eric Blake  <ebb9@byu.net>
1362         * src/format.c (format): Support F, g, and G specifiers.
1363         * doc/m4.texinfo (Format): Document this.
1364         * NEWS: Document this addition.
1366         * doc/m4.texinfo (Builtin): Delete redundant text.
1368         * configure.ac (AC_INIT): Bump version number.
1369         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1370         * NEWS: Document this fix.
1372 2006-07-15  Eric Blake  <ebb9@byu.net>
1374         Release 1.4.5:
1375         * configure.ac (AC_INIT): Bump version number.
1376         * NEWS: Describe changes since 1.4.4.
1378         * src/m4.c (usage): Document exit status.
1379         * doc/m4.texinfo: Use `exit status', not `exit code'.
1380         (Invoking m4): Document exit status.
1382         * bootstrap: Backport --help, --version from head.
1383         (func_update): New function, for easily grabbing up-to-date files
1384         from gnulib.
1385         * Makefile.maint (web-manual): Fix for VPATH builds.
1387 2006-07-14  Eric Blake  <ebb9@byu.net>
1389         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1390         looks bad in info.  Use @deffn rather than @example for
1391         describing prototypes.  Fix awkward wording and grammar.
1393         * src/builtin.c (substitute): Warn on bad escape sequences.
1394         Ignore trailing backslash.
1395         * doc/m4.texinfo (Regexp): Add documentation for this.
1396         * NEWS: Document this change.
1398         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1399         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1400         more examples.
1401         (Dnl): Update example to show side effects.
1402         * checks/get-them: Generate three digit test names.
1403         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1405 2006-07-13  Eric Blake  <ebb9@byu.net>
1407         * src/input.c (input_init): Simplify.
1408         (set_word_regexp): Treat empty string as default, since empty
1409         regexp would disable word parsing.
1410         * src/m4.c (user_word_regexp): Default to empty string.
1411         * src/builtin.c (builtin_tab): Make changeword blind.
1412         * doc/m4.texinfo (Changeword): Document this.
1413         * NEWS: Document this.
1414         * TODO: Knock off completed items.
1416         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1417         just the first.
1418         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1419         * NEWS: Document this change.
1421         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1422         warning.  Detect quoted leading space and overflow as warnings.
1423         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1424         Treat width as minimum number of digits, as required by POSIX.
1425         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1426         arguments.
1427         (m4_substr): Likewise.  Silently treat empty start as 0.
1428         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1429         * src/eval.c (eval_lex): Parse radix 1 numbers.
1430         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1431         one type of warning.
1432         (Manual): Document behavior of numeric parsing of empty string.
1433         (Divert, Incr): Document error handling.
1434         (Eval): Document radices better.
1435         (Incompatibilities): Document translit incompatibility.
1436         * NEWS: Document these changes.
1438         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1439         (web-manual): Simplify.
1440         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1441         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1442         (MAINTAINERCLEANFILES): Clean it as well.
1443         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1444         (MAINTAINERCLEANFILES): Clean it as well.
1446 2006-07-12  Eric Blake  <ebb9@byu.net>
1448         * doc/m4.texinfo (Extensions): Document how to overcome
1449         implementation difference in > 9 positional parameters.
1451         * src/m4.c (usage): Sort within sections.
1452         (nesting_limit): Raise default from 250 to 1024.
1453         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1454         standard.  Use @option where appropriate.
1455         (Invoking m4): Sort to match --help output.
1456         (Debug Levels): Sort.
1457         (Frozen files): Sort and break into two nodes.
1459         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1460         * NEWS: Document raised -L limit.
1462 2006-07-11  Eric Blake  <ebb9@byu.net>
1464         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1465         stress-test changeword before a release.
1466         * doc/m4.texinfo: More doc cleanups.
1467         (Copying This Manual): New node; actually include the FDL in the
1468         documentation.
1469         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1470         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1471         * NEWS: Mention documentation improvements.
1473         * src/m4.h (OS2): New platform macro.
1474         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
1475         platform macro.
1476         * doc/m4.texinfo (Platform macros): Document it.
1477         (Sysval): Remove non-portable test of system("").
1478         * NEWS: Document this change.
1479         Reported by Andreas Buening.
1481 2006-07-09  Eric Blake  <ebb9@byu.net>
1483         * doc/m4.texinfo (Undivert): Fix typo in last commit.
1484         * src/m4.c (usage): Document M4PATH.
1485         * src/path.c (path_search): Reject empty string.
1486         * src/output.c (insert_diversion): Ignore diversion 0.
1487         * src/builtin.c (m4_undivert): Ignore empty string.
1488         * NEWS: Document this fix.
1490 2006-07-08  Eric Blake  <ebb9@byu.net>
1492         * checks/get-them: Make filtering easier.
1493         * checks/check-them: Filter non-input lines, so line counts are
1494         more realistic in the documentation, and so changeword tests work
1495         even when dnl is disabled.
1496         * doc/m4.texinfo: Adjust example line numbers.  Clean up
1497         front-matter, following autoconf's example.
1498         (Changeword): Enable tests, skipping if changeword not supported.
1499         (Define, Defn, Ifelse): Backport more examples from head.
1500         (Input processing, Answers): New nodes, backported from head.
1501         (Include): Expand test to cover empty filename.
1502         (Undivert): Add test of undivert(0).
1504 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1506         * doc/m4.texinfo: Fix spelling errors.
1508 2006-07-07  Eric Blake  <ebb9@byu.net>
1510         * THANKS: Update.
1512         * doc/Makefile.am (m4.1): No need to go through a temporary file;
1513         this also ensures timestamps are updated.
1514         * src/m4.h (includes): Require config.h.  Assume string.h,
1515         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
1516         than prototyping ourselves.
1517         (builtin_func): Add parameter type-checking.
1518         (voidstar): Delete, now that we assume C89.
1519         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1520         voidstar changed.
1521         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1522         xfree.
1524 2006-07-06  Eric Blake  <ebb9@byu.net>
1526         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1527         binary-io.
1528         * src/m4.h (includes): Add binary-io.h for O_BINARY.
1529         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1530         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
1531         * NEWS: Mention this fix.
1533         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1534         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1536         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1537         runs first when needed.
1538         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1539         once in srcdir rather than multiple times in VPATH builds.
1541 2006-07-03  Eric Blake  <ebb9@byu.net>
1543         * checks/check-them: Use portable = in test.
1544         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1545         directory, as required by Solaris cc.  Include built headers, as
1546         required by Solaris make in VPATH build.
1547         * checks/Makefile.in: Use $(srcdir) where needed.
1548         (CHECKS): Factor $(srcdir) into macro.
1549         (DISTFILES): Likewise.  Automake takes care of distributing
1550         Makefile.in.
1551         (dist): Simplify.
1552         (Makefile): Use modern syntax of config.status.
1553         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1554         Avoid overfull and underfull hboxes in dvi.
1556         Fix 'make check' in VPATH build.  All files included by testsuite
1557         now live in a single directory.  Use forloop.m4 in testsuite.
1558         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1559         here...
1560         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1561         here.
1562         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1563         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1564         * checks/check-them: Avoid s/// when filename is in pattern.
1565         * examples/forloop.m4: Fix to match documentation.
1566         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1567         new locations.
1568         (Loops, Format): Actually use forloop.m4 in tests.
1570 2006-07-02  Eric Blake  <ebb9@byu.net>
1572         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1573         $(bindir) works in installcheck.
1574         (check, installcheck): No longer change directory, so that
1575         distcheck works with a read-only builddir.
1576         * checks/check-them: Work when pwd is no longer builddir.
1578 2006-07-01  Eric Blake  <ebb9@byu.net>
1580         * GNUmakefile: New file, borrowed from coreutils.
1581         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1582         * Makefile.maint (Makefile): Delete this rule, now that
1583         GNUmakefile includes Makefile.
1585 2006-06-30  Eric Blake  <ebb9@byu.net>
1587         For compatibility with other m4 implementations, sysval returns
1588         signal<<8 rather than 0 if syscmd is terminated by a signal.
1589         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1590         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1591         not provide wait macros.
1592         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1593         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1594         (m4_esyscmd): Set sysval to -1 on failure.
1595         (m4_sysval): Print 127 on failure, and accomodate signals if they
1596         are detectable.
1597         * NEWS: Document this change.
1598         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1599         last commit.
1600         * checks/check-them: Likewise.
1601         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1603         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1604         * src/freeze.c (produce_frozen_state): Use new spelling of
1605         platform macro.
1606         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1607         platforms.
1608         (m4_syscmd, m4_esyscmd): The empty command is successful.
1609         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1610         Document platform-dependence of system().
1611         (Syscmd): Add example.
1612         (Esyscmd): Make example more robust, and actually demonstrate
1613         rescanning.
1614         (Sysval): Expand test to cover esyscmd code path, and to check
1615         that empty command is successful.  Add conditional check for
1616         signal behavior.
1617         (Other Incompatibilities): Move platform macros from here...
1618         (Platform macros): ...to this new node.  Add windows macro.
1619         Check that exactly one platform macro is provided.
1620         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1621         .exe in error messages.  Allow for skipping checks.
1622         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1623         * NEWS: Document platform macros.
1625 2006-06-29  Eric Blake  <ebb9@byu.net>
1627         Fix buffer overrun bug.
1628         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1629         xvasprintf.
1630         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1631         variant instead, since [efg]cvt are obsolete and our use of them
1632         was buggy (savannah sr #104303).
1633         (format): Fix buffer overflow by using xasprintf.
1634         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1635         * NEWS: Document this fix.
1637         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1638         cross-compilation.
1639         (AC_CACHE_CHECK): Cache search for ecvt.
1641 2006-06-27  Eric Blake  <ebb9@byu.net>
1643         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1644         required by POSIX, and add example that exposed core dump on x86
1645         architectures.
1646         (Incompatibilities): Document incompatibility in eval precedence.
1647         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1648         behavior.
1649         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1650         * NEWS: Document this change.
1652         * doc/m4.texinfo: Use @noindent consistently.
1653         (Quoting Arguments): Document that unquoted parentheses group
1654         arguments.
1655         (Pseudo Arguments): Expand tests to show this.
1656         (Incompatibilities): Contrast traditional behavior of
1657         changequote.
1659 2006-06-24  Eric Blake  <ebb9@byu.net>
1661         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1662         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1663         (AC_CHECK_FUNCS_ONCE): Likewise.
1665 2006-06-23  Eric Blake  <ebb9@byu.net>
1667         * doc/m4.texinfo: Quoting cleanup throughout - follow
1668         autoconf-recommended style of one level of quote per parenthesis
1669         in the normal case.  Adjust error messages to match GNU coding
1670         standards (and to allow 'make check' to pass again).
1671         (Quoted strings, Inhibiting Invocation): Turn more examples into
1672         tests.
1673         (Comments): Resolve FIXME by adding example.
1674         (Define): Add example about underquoting.
1675         (Defn): Add example about use of $0.
1676         (Indir, Format): Resolve FIXME done in last commit.
1677         (Ifelse): Add example about creating blind macro.
1678         (Debugging): Fix grammar.
1679         (Dnl): Add example about dnl with arguments.
1680         (M4wrap): Be explicit that LIFO order is non compliant, and will
1681         change in m4 2.0.
1682         (Undivert): Resolve FIXME by adding example.
1683         (Frozen files): Document that m4wrap and sysval will not work
1684         consistently until m4 2.0.
1685         (Incompatibilities): Document another POSIX compliance bug, this
1686         time with changequote.  Document a traditional incompatibility
1687         with partial input spanning file boundaries.
1689         Make error messages more consistent with GNU coding standards -
1690         start with lower case, and don't end sentence with punctuation.
1691         * src/debug.c (trace_pre): Update message wording.
1692         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1693         Likewise.
1694         * src/freeze.c (produce_frozen_state, issue_expect_message),
1695         (reload_frozen_state): Likewise.
1696         * src/input.c (push_string_init, pop_init, init_macro_token),
1697         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1698         * src/m4.c (stackovf_handler, main): Likewise.
1699         * src/macro.c (expand_token, expand_argument, call_macro),
1700         (expand_macro): Likewise.
1701         * src/output.c (make_room_for, output_text, insert_file),
1702         (freeze_diversions): Likewise.
1703         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1705         * src/builtin.c (builtin_tab): Make format and indir blind.
1706         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1707         * NEWS: Mention the change to builtins.
1709 2006-06-22  Eric Blake  <ebb9@byu.net>
1711         Robustify frozen file format.
1712         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1713         macro.  Require V first, and only accept it once.  For F, use
1714         placeholder if builtin is not found, rather than warning.
1715         * src/m4.h (m4_placeholder): New prototype.
1716         * src/builtin.c: Unify error message style.
1717         (m4_placeholder): New function, warn if invoked.
1718         (builtin_tab): Add m4_placeholder.
1719         (m4_defn): Warn if placeholder is encountered.
1720         (find_builtin_by_addr): Handle placeholder.
1721         (find_builtin_by_name): Return placeholder on failure.
1722         (m4_builtin): Treat placeholder as undefined.
1723         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1724         * NEWS: Document this change.
1725         Reported by Bruno Haible.
1727         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1728         (tabchar): New macro, so that 'make check' still works.
1729         (Invoking m4): Document that ignored compatibility options -B, -S,
1730         and -T each consume an argument.
1731         * checks/get-them: Honor @tabchar{}.
1733         Avoid compiler warnings during -DDEBUG.
1734         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1735         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1736         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1737         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1738         (next_token) [DEBUG_INPUT]: Print before returning.
1739         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1740         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1742         Avoid mkstemp bugs on various platforms.
1743         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1744         * src/output.c [! HAVE_MKSTEMP]: Delete.
1745         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1746         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1747         * NEWS: Document this.
1749         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1750         Reported by Bruno Haible.
1752 2006-06-21  Eric Blake  <ebb9@byu.net>
1754         Avoid obsolete sigstack when POSIX sigaltstack is available.
1755         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1756         do likewise.
1757         * configure.ac (AC_CHECK_HEADERS): Likewise.
1758         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1759         obsolete and most hosts now have it in signal.h.
1760         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1761         (AC_CACHE_CHECK): Cache decision to use stackovf.
1762         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1763         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1764         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1765         simplify later code.
1766         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1767         in case of dereferencing a member of a NULL pointer.
1768         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1769         POSIX handler.
1770         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1771         EXIT_FAILURE in error, indent preprocessor directives.
1772         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1773         siginfo.h.
1774         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1775         Reported by Santiago Vila.
1777 2006-06-19  Eric Blake  <ebb9@byu.net>
1779         * THANKS: Update.
1781 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1783         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1784         (check, installcheck): Use it, for OS/2.
1786 2006-06-18  Eric Blake  <ebb9@byu.net>
1788         Consistently use "GNU M4" as package name, "m4" as executable
1789         name.
1790         * NEWS: Document previous fix.
1791         * THANKS: Update.
1792         * README: Fix grammar.  Document that --enable-changeword is on
1793         its last leg.
1794         * doc/m4.texinfo (Top, Changeword): Likewise.
1795         (Sysval): Enhance this test.
1796         (History): Backport this section from CVS head, and update.
1798 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1799             Eric Blake  <ebb9@byu.net>
1801         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1802         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1803         big-endian and little-endian wait status definitions.
1804         (m4_sysval): Use WEXITSTATUS.
1805         Reported by Andreas Buening.
1807 2006-06-18  Eric Blake  <ebb9@byu.net>
1809         * configure.ac (AC_INIT): Bump version number.
1810         * NEWS: Describe changes in 1.4.4c.
1812 2006-06-17  Eric Blake  <ebb9@byu.net>
1814         Beta Release 1.4.4b:
1815         * configure.ac (AC_INIT): Bump version number.
1816         * NEWS: Describe changes since 1.4.4.
1817         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1819         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1820         bootstrap.
1821         * checks/Makefile.in (maintainer-clean): Add missing target.
1822         * COPYING: Remove generated file from CVS.
1824 2006-06-16  Eric Blake  <ebb9@byu.net>
1826         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1828 2006-06-15  Eric Blake  <ebb9@byu.net>
1830         * checks/wrapfifo.m4: New file.  Use it...
1831         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1832         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1834         * src/m4.h (to_uchar): New function.
1835         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1836         isdigit, isalpha, isupper, islower, isspace, isalnum.
1837         * src/builtin.c (expand_user_macro): Likewise.
1838         * src/format.c (format): Likewise.
1839         * src/macro.c (expand_argument): Likewise.
1840         * NEWS: Document this security fix.
1842         Message cleanup.
1843         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1844         * src/freeze.c (reload_frozen_state): Fix typo in message.
1845         (produce_frozen_state): Standardize on builtin, not built-in.
1846         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1848         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1849         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1850         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1851         gnulib.
1852         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1853         * m4/gnulib-cache.m4: New file, from gnulib.
1854         * bootstrap: Invoke gnulib-tool --update.
1855         * src/m4.c (main): Cast away const.
1856         * NEWS: Document that regex is updated.
1857         * THANKS: Update.
1859 2006-06-08  Eric Blake  <ebb9@byu.net>
1861         * configure.ac (changeword): Work even when changeword is not a
1862         macro.
1863         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1864         Delete; now done by automake.
1865         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1867 2006-06-07  Eric Blake  <ebb9@byu.net>
1869         * lib/regex.c (bcmp_translate): Canonicalize type name.
1870         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1871         * configure.ac (changeword): Disable changeword for the creation
1872         of configure, in case of bootstrapping with an m4 configured with
1873         --enable-changeword.
1875         Distribute a rudimentary man page.
1876         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1877         can feed help2man.
1878         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1879         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1881 2006-06-06  Eric Blake  <ebb9@byu.net>
1883         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1884         compiler warnings at -O2.
1885         * lib/getopt.c (_getopt_internal): Likewise.
1887         Cleanup of previous patches.
1888         * src/input.c (struct input_block): Remove traced member.
1889         (push_macro, init_macro_token): Don't pass trace status around.
1890         * src/m4.h (struct token_data): Remove traced member.
1891         (struct symbol, struct builtin): Reduce unused space.
1892         (TOKEN_DATA_FUNC): Simplify.
1893         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1894         (push_macro, define_builtin): Remove unused parameter.
1895         * src/builtin.c (define_builtin, builtin_init, define_macro),
1896         (m4_defn): Don't pass trace status around.
1897         * src/macro.c (expand_argument): Likewise.
1898         * src/freeze.c (reload_frozen_state): Likewise.
1899         * src/symtab.c: Whitespace cleanup.
1900         * NEWS: Clean up wording.
1901         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1902         ensure tests actually expose bugs prior to today's patches.
1904         Trace status of builtins is no longer inherited across
1905         define(...,defn(...)).  Fixes bug that autom4te had been working
1906         around.
1907         * src/builtin.c (define_builtin): Don't override trace status.
1908         * doc/m4.texinfo (Trace): Add test for this.
1909         * NEWS: Document this.
1911         When changing macro definitions inside the arguments to the macro,
1912         consistently preserve the old definition that was in effect before
1913         argument collection, similar to the C pre-processor.
1914         Reported by John Brzustowski.
1915         * NEWS: Document this change.
1916         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1917         this policy, and add tests that expose core dumps prior to this
1918         patch.
1919         * src/m4.h (struct symbol): New members to track when a symbol is
1920         still in use after removal from the symbol table.
1921         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1922         (free_symbol): Prototype.
1923         * src/macro.c (expand_macro): Track pending expansions of a
1924         symbol.  On completion, if a symbol is deleted and no longer
1925         pending, free its memory.
1926         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1927         is still in use.
1928         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1929         is still in use.
1930         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1931         in use as deleted and remove from the table without freeing
1932         memory.
1933         (symtab_print_list) [DEBUG_SYM]: More debug output.
1935         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1936         the symbol table during traversal.
1937         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1938         SYMBOL_POPDEF, since only the latter is safe with
1939         hack_all_symbols.
1941         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1942         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1943         Preserve placeholder when macro is being traced.
1944         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1945         symbol is not defined.
1946         (set_trace): Remove placeholder when no longer traced.
1947         (m4_traceon): On named traces, always reserve a slot in the
1948         symbol table.
1949         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1950         * NEWS: Document new trace behavior.
1951         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1952         no matter whether that macro is currently defined.
1953         (Incompatibilities): Document differences between traditional and
1954         GNU trace.
1956 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1957             Eric Blake  <ebb9@byu.net>
1959         * src/m4.h (hash_table_size): Now size_t instead of int.
1960         * src/m4.c (hash_table_size): Likewise.
1961         (main): Adjust to this; use atol rather than atoi.
1962         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1963         (symtab_init, lookup_symbol, hack_all_symbols):
1964         Use size_t for sizes and indexes, not int.
1965         (symtab_print_list) [DEBUG_SYM]: Likewise.
1966         (hash): Likewise.  Don't case-fold in the hash function.
1967         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1968         Don't assume hash word is 32 bits.
1969         * NEWS: Document this change.
1971 2006-06-04  Eric Blake  <ebb9@byu.net>
1973         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1974         to allow compilation, for use in debugger.
1975         (profiles, current_mode) [DEBUG_SYM]: New variables.
1976         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1977         determining hash table performance.
1979 2006-05-31  Eric Blake  <ebb9@byu.net>
1980             John Brzustowski  <jbrzusto@fastmail.fm>
1982         * src/input.c (input_stack): Delete; use current_input instead.
1983         (wrapup_stack): Dynamically allocate, so that recursion is handled
1984         properly.
1985         (push_wrapup): Use current wrapup stack.
1986         (pop_wrapup): Rotate wrapup stack to current, and create new
1987         wrapup stack.
1988         (input_init): Dynamically allocate stacks.
1989         * NEWS: Update, now that recursive m4wrap can no longer cause
1990         core dump.
1992 2006-05-31  Eric Blake  <ebb9@byu.net>
1994         * lib/getopt.c: Fix copyright year.
1995         * lib/obstack.c: Ditto.
1996         * src/builtin.c: Ditto.
1998 2006-05-30  Eric Blake  <ebb9@byu.net>
2000         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
2001         Reported by John Brzustowski.
2002         (Incompatibilities): Document known POSIX incompatibilities.
2003         * THANKS: Update.
2005 2006-05-29  Eric Blake  <ebb9@byu.net>
2007         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
2008         in read-only dir.
2010         Use automake.
2011         * Makefile.am: New file.
2012         * doc/Makefile.am: Ditto.
2013         * examples/Makefile.am: Ditto.
2014         * lib/Makefile.am: Ditto.
2015         * src/Makefile.am: Ditto.
2016         * acinclude.m4: New file, renamed from aclocal.m4.
2017         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
2018         (AC_ARG_PROGRAM): Now redundant.
2019         (STACKOVF): Turn into automake conditional.
2020         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
2021         * checks/Makefile.in: Converting this dir to automake was not
2022         trivial; for now, just add missing targets demanded by top-level.
2023         * INSTALL: Remove files that are now generated from CVS.
2024         * Makefile.in: Ditto.
2025         * aclocal.m4: Ditto.
2026         * install-sh: Ditto.
2027         * mkinstalldirs: Ditto.
2028         * doc/Makefile.in: Ditto.
2029         * doc/texinfo.tex: Ditto.
2030         * examples/Makefile.in: Ditto.
2031         * lib/Makefile.in: Ditto.
2032         * src/Makefile.in: Ditto.
2034         * AUTHORS: Backport from CVS head, and update.
2035         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
2037 2006-05-27  Eric Blake  <ebb9@byu.net>
2039         * lib/regex.c (regex_compile): Kill compiler warnings.
2040         * lib/getopt.c: Likewise.
2041         * lib/obstack.c: Likewise.
2042         * src/builtin.c (builtin_init): Likewise.
2043         * src/path.c (path_search): Likewise.
2045         * doc/m4.texinfo: Fix usage of a vs. an.
2046         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
2047         overfull hbox warnings.
2048         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
2050         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
2051         quoting.
2052         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
2053         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
2054         assume C89.
2055         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
2056         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
2057         * src/Makefile.in: Delete remains of ansi2knr.
2058         * src/ansi2knr.1: Delete.
2059         * src/ansi2knr.c: Delete.
2061 2006-05-25  Eric Blake  <ebb9@byu.net>
2063         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
2064         `illegal'.
2066         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
2067         Reported by Karl Berry.
2069 2006-05-24  Eric Blake  <ebb9@byu.net>
2071         * Makefile.in (html): New target.
2072         * doc/Makefile.in (html, m4.html): Likewise.
2073         (MAKEINFOHTML): New macro.
2074         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
2075         rendering.
2076         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
2077         absolute URL.
2078         Reported by Bob Badour.
2080         * THANKS: Update.  Move reporter's email addresses here, instead
2081         of in ChangeLog.
2083 2006-05-11  Eric Blake  <ebb9@byu.net>
2085         * THANKS: Update.
2086         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
2087         patched on 2005-12-04.
2088         Reported by Ilya N. Golubev.
2090         * bootstrap: New file, so that generated files need not be stored
2091         in CVS.
2092         * Makefile.in (DISTFILES): Add bootstrap.
2094         Make testsuite less sensitive to doc changes.
2095         * doc/m4.texinfo: Use m4.input instead of filename.
2096         * checks/check-them (xerr): Turn m4.input into filename.
2097         * checks/Makefile.in (dist): Depend on stamp-checks.
2099         Portability updates for OS/2.
2100         * src/Makefile.in (EXEEXT, OBJEXT): Define.
2101         (LINK): Use CFLAGS.
2102         (.c.obj): Define.
2103         * lib/Makefile.in (OBJEXT): Define.
2104         (.c.obj): Define.
2105         * doc/Makefile.in (install, uninstall): Install info files into
2106         the dir listing.
2107         Reported by Andreas Buening.
2109 2006-05-09  Eric Blake  <ebb9@byu.net>
2111         * install-sh: Update to newer upstream version.
2112         * mkinstalldirs: Likewise.
2113         Reported by Andreas Buening.
2115         * src/m4.c (main): Bump copyright year.
2116         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
2117         * doc/Makefile.in (datarootdir): Likewise.
2119 2006-05-08  Eric Blake  <ebb9@byu.net>
2121         * THANKS: Update.
2122         * doc/m4.texinfo (Bugs): Backport bug email address from head.
2123         Reported by Stepan Kasal.
2125 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
2127         * input.c (match_input): Do not pass expression with side effect
2128         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
2129         * NEWS: Updated.
2131 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2133         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
2134         Reported by Damian Menscher.
2136 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2138         * configure.ac (AC_INIT): Bump to 1.4.4a.
2140 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2142         Release 1.4.4:
2143         * configure.ac (AC_INIT): Bump to 1.4.4.
2144         * NEWS: Describe 1.4.4's changes.
2145         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
2147 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2149         * src/m4.c: fix return code when non-existent files are processed
2151 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
2153         * README: update email address for bug reports.
2155 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
2157         * doc/m4.info: Generated files are not kept in the repository.
2159 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
2161         The FSF are moving offices today.  Changed their contact address
2162         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
2163         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
2165         Also, some of the files here were never updated from the previous
2166         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
2167         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
2169 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
2171         * Makefile.in (bindir, infodir): Substitute from configure rather
2172         than hardcode.
2173         * doc/Makefile.in (infodir): Ditto.
2174         * src/Makefile.in (bindir): Ditto.
2175         * NEWS: Updated.
2177 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2179         Changes needed to automate the release process for 1.4.3:
2181         * Makefile.in (dist): Make .tar.bz2 tarball too.
2182         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
2183         (cvs-news): Look 1 line further down for NEWS release number.
2184         (cvs-dist): We don't use automake, so make dist is fine.
2185         Remove double . before suffixes.
2186         (cvs-release): Don't mention manual.html.
2187         (fetch): Get latest gendocs files.
2188         (web-manual): Rewritten to use gendoc for multiformat manuals.
2189         * doc/gendocs.sh: Don't save an old version in m4 CVS!
2190         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
2191         preserving, but case insensitive, so generating html docs per node
2192         clashes between Index.html, the node file, and index.html, the
2193         top-level of the document tree...
2194         (Index macro): ...so renamed to this.  Changed all references.
2196 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2198         * configure.ac (AC_INIT): Bump to 1.4.3a.
2200 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
2202         Release 1.4.3:
2203         * configure.in (AC_INIT): Bump to 1.4.3.
2204         * NEWS: Describe 1.4.3's changes.
2206 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
2208         * Makefile.maint: New file with release rules, from CVS libtool.
2209         * Makefile.in (DISTFILES): Add Makefile.maint.
2210         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
2211         canonical versions.
2213 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2215         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
2216         checks/47.patsubst, with a redundant @comment to prevent emacs
2217         from removing it accidentally again.
2218         * checks/get-them: Allow for trailing spaces tucked behind
2219         @comment marks.
2221 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
2223         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
2224         * src/Makefile.in (install, uninstall): Likewise.
2226 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
2228         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
2229         on Cygwin.
2230         Reported by Eric Blake.
2232 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
2234         * lib/regex.c, lib/regex.h: Updated from gnulib.
2235         * src/input.c (set_word_regexp):  Don't change the word_regexp
2236         unless it compiles correctly.
2237         * NEWS: Updated.
2238         Reported by Frank Schwidom.
2240         * Makefile.in (stamp-h): Regenerate config.h properly.
2242 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2244         * configure.ac (AC_DEFINE): Fix overquoting of description
2245         argument.
2247         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
2248         recognition macros.
2249         * src/freeze.c (produce_frozen_state): Use \n line-endings even
2250         on Windows, so that the frozen file reader will work.
2251         Reported by Josef T. Burger.
2253         * src/m4.c (main): Modernise the --version output.
2255 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
2257         Modernise the configury a little to prevent spurious errors from
2258         Autoconf-2.59's autoreconf:
2260         * config.h.in: Renamed to...
2261         * config-h.in: ...this to better support DOS 8.3 file systems.
2262         * acconfig.h: Removed.
2263         * configure.in: Renamed to...
2264         * configure.ac: ...this, and AC_DEFINE used to declare config.h
2265         entry comments.  Slight reorganisation and reformatting.
2266         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
2267         entry comments.
2268         (AC_INIT): Use a modern 3 argument call.
2269         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2270         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
2271         s/PRODUCT/PACKAGE/g.
2272         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
2273         config.h.in.  Added configure.ac, config-h.in.
2274         (stamp-h.in): Removed acconfig.h from dependencies.
2275         (configure): Depends on configure.ac, not configure.in.
2276         * doc/Makefile.in (stamp-vti): Ditto.
2277         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
2278         difference between PRODUCT="m4" and PACKAGE="GNU M4".
2279         * configure: Regenerated.
2281 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
2283         * src/output.c (mkstemp): Make non-static, and build regardless of
2284         HAVE_TMPFILE; src/builtin.c also needs this replacement.
2285         * NEWS: Update.
2287 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
2289         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
2290         changes from your editor buffer first.
2292         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
2293         * src/m4.c: And include them as appropriate.
2294         * NEWS: Updated.
2296 2004-09-09  Andreas Schwab  <schwab@suse.de>
2298         Refactoring of the string read case in next_char provides about a
2299         20% speedup of M4 as typically used by autoconf:
2301         * src/input.c (next_char_1): Renamed from next_char.
2302         (next_char): New macro.
2303         * NEWS: Updated.
2305 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
2307         * configure.in (VERSION): Bump to 1.4.2a.
2309 2004-08-19  Paul Eggert  <eggert@twinsun.com>
2311         Release 1.4.2.
2312         * configure.in (VERSION): Bump to 1.4.2.
2313         * News: Describe 1.4.2's changes.
2315         * src/m4.c (reference_error): Preserve errno, since M4ERROR
2316         relies on this.
2317         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
2318         (m4_maketemp): Clear errno before calling mkstemp.
2319         * src/path.c (path_search): Don't let "free" trash errno when
2320         returning NULL.
2321         * src/output.c (insert_file): Don't assume errno has a valid
2322         value simply because fread returns zero.  This fixes a
2323         portability bug reported by Marion Hakanson in
2324         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
2326 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
2328         * configure.in (VERSION): Bump to 1.4.1a.
2329         * NEWS: Place holder for next stable release.
2331 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
2333         Release 1.4.1.
2334         * configure.in (VERSION): Bump to 1.4.1.
2335         * NEWS: Describe 1.4.1's changes.
2337         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2338         pacify Autoconf 2.59.
2340         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2341         to pacify Texinfo 4.7.
2342         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2344         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2345         pacify Sun C compilers.
2347 2003-09-28  Akim Demaille  <akim@epita.fr>
2349         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2350         botch.
2352 2003-09-03  Santiago Vila  <sanvila@debian.org>
2354         * examples/stackovf.sh: Use tempfile if available.
2356 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2358         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2359         * src/output.c (m4_insert_file): Do not mix buffered and
2360         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2362 2001-02-01  Santiago Vila  <sanvila@debian.org>
2364         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2365         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2367 2001-02-01  Matt Kraai  <kraai@debian.org>
2369         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2370         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2371         empty file rather than to a nonexistent file.  This closes a common
2372         security hole.
2373         * src/builtin.c (m4_maketemp): Implement the above, by using
2374         mkstemp rather than mktemp.  (trivial change)
2376 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2378         * src/builtin.c (expand_ranges): Added break after trailing dash.
2379         This caused misbehaviors on some systems.
2381 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2383         Release 1.4.
2384         * doc/Makefile.in (realclean): Also remove stamp-vti.
2385         Reported by Eric Backus.
2387 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2389         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2390         be opened, return immediately after producing the error message.
2391         Reported by Andreas Schwab.
2393         * configure.in: Check for const only after having found possible
2394         ANSIfying compiler flags, this is of no use to check it before.
2395         Reported by Alexander Lehmann.
2397 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2399         * src/macro.c (collect_arguments): Cast obstack arguments to
2400         (voidstar), so avoiding compiler warnings.
2401         Reported by Joseph E. Sacco.
2403         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2404         (int) so they correspond to %d format items.
2405         Reported by Joseph E. Sacco.
2407         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2408         * src/symtab.c (free_symbol): Idem.
2409         Reported by Karl Vogel.
2411 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2413         * Makefile.in (DISTFILES): Distribute BACKLOG.
2415         * configure.in: Define PRODUCT and VERSION.
2416         * acconfig.h: Document PRODUCT and VERSION.
2417         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2418         constant string m4 and variable or parameter named version.
2420 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2422         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2423         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2424         defines __STDC__ to 0, for indicating it is *not* ANSI!
2425         Reported by Kaveh R. Ghazi.
2427         * configure.in: Added obsolescent tests for AIX and Minix.
2429         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2430         which texclean does not exist anymore.
2431         Reported by Eric Backus, Jim Meyering, John David Anglin and
2432         Joseph E. Sacco.
2434 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2436         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2437         Reported by John David Anglin.
2439         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2440         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2441         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2442         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2443         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2444         of $U, put underline in extensions rather than in basenames.  Use
2445         implicit rules, now that regularity makes this possible.
2446         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2447         of ansi2knr whenever it is needed.
2448         * configure.in: Adjusted for correct STACKOVF substitution.
2449         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2450         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2451         Reported by David MacKenzie.
2453         * Makefile.in: Remove binprefix.  Use transform_name instead.
2454         Reported by David MacKenzie.
2456         * doc/Makefile.in: Create version.texi, use it, clean it.
2457         Reported by Jim Meyering.
2459 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2461         * Makefile.in (all, install, uninstall): Depend on Makefile.
2463         * Makefile.in: For actions invoking $(MAKE) from within compound
2464         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2465         the top-level make may exit successfully when it should fail.
2466         Reported by Jim Kingdon.
2468         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2470         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2471         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2472         * configure.in: Substitute PRODUCT and VERSION.
2474         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
2476 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
2478         * Makefile.in (mostlyclean-local): Do not remove *~.
2479         * */Makefile.in (mostlyclean): Idem.
2480         Reported by Robert E. Brown and Richard Stallman.
2482 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
2484         * src/m4.h: Get rid of CONFIG_BROKETS.
2486 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
2488         * configure.in: Use AC_ARG_PROGRAM.
2489         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
2490         Reported by David MacKenzie.
2492 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
2494         * configure.in: Do not add -O to CFLAGS for GNU C, now that
2495         configure does it automatically.
2496         Reported by Jim Meyering.
2498 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
2500         * src/stackovf.c: Declare the handler_t typedef earlier in the
2501         code, use it for stackovf_handler.
2502         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2503         casting sigsegv_handler.
2504         Reported by Robert Bernstein.
2506         * src/m4.c (main): Initialize program_name to argv[0] without
2507         basename'ing it.
2508         Reported by Karl Berry.
2510 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
2512         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2513         Reported by Karl Berry.
2515 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
2517         * lib/Makefile.in (mostlyclean): Added.
2518         (TAGS): Make in $(srcdir).
2520         * configure.in: Use `choke me' in test, like everywhere!
2522         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2523         unreacheable and useless.
2525         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2527         * lib/Makefile.in (DISTFILES): Distribute TAGS.
2528         (distclean): Do not remove TAGS.
2529         (realclean): Remove it.
2530         * Makefile.in: Make TAGS in lib also, not just in src.
2531         Reported by Karl Berry.
2533         * Makefile.in (distclean, realclean): Instead of recursively
2534         calling $(MAKE) for the -local part, allow parallel execution of
2535         -recursive and -local, only delay the removal of config.status,
2536         which is repeated in both goals.
2538 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
2540         Release 1.3.
2541         * Makefile.in: Group all *clean-recursive goals in one, using sed
2542         to remove `-recursive' while calling make recursively.  Also, use
2543         a subshell for each recursive $(MAKE).
2544         Reported by Jim Meyering.
2546         * src/m4.h (memcpy): Define with bcopy for BSD systems.
2547         Reported by Kaveh R. Ghazi.
2549         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2550         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2551         specify it.
2553         * configure.in: Use date instead of touch for stamp-h.
2554         * Makefile.in (stamp-h.in): Idem.
2556         * Makefile.in (distclean, realclean): Force serial execution of
2557         both goals, in case parallel makes are being used.
2558         Reported by Jim Meyering.
2560         * src/Makefile.in (DISTFILES): Distribute TAGS.
2561         (distclean): Do not remove TAGS.
2562         (realclean): Remove it.
2563         Reported by Karl Berry.
2565 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
2567         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
2568         to old names, for following Autoconf.
2570 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
2572         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2573         ./install.sh will not be correctly referred to in sub-Makefiles.
2574         Reported by John David Anglin.
2576         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2577         Reported by Eric Backus.
2579         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2580         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2581         config.status into remaking this directory's Makefile only.
2582         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2583         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2584         Reported by Jim Meyering.
2586 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2588         * configure.in: Correct stack overflow detection logic, taking
2589         care of systems having only incomplete implementations (like for
2590         Pyramid 9820 OSx 5.0d).
2591         Reported by Kaveh R. Ghazi.
2593         * src/Makefile.in (TAGS): Remote -t from etags call.
2595 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2597         * lib/Makefile.in (install): Depend on all.
2599 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2601         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2602         Reported by Jim Meyering and John David Anglin.
2604         * Makefile.in (distclean-local): Delete config.log.
2605         Reported by Jim Meyering.
2607         Solidify frozen files with respect to -P:
2608         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2609         calling a function by that name.  Declare the variable.
2610         * src/m4.h: Adjust declaration for prefix_all_buitins.
2611         * src/builtin.c (builtin_init): Merge in functionality from
2612         previous prefix_all_buitins function, while making entries in the
2613         symbol table, but not modifying the builtin description itself.
2615         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2616         because *many* compilers do not accept an empty `default:'.
2617         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2618         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2620         * configure.in: Use AC_TYPE_SIGNAL.
2621         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2622         Reported by Robert Bernstein.
2624         * checks/Makefile.in (check): Modify PATH so check-them will find
2625         m4 in the src directory.
2626         * Makefile.in (check): Don't.
2627         Reported by Akiko Matsushita and Jim Meyering.
2629         * src/output.c (make_room_for, output_character_helper): New
2630         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2631         a per buffer MAXIMUM_BUFFER_SIZE.
2633         * src/output.c (output_text): New function, for optimizing the
2634         output of strings of characters.  Use it.
2636 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2638         * doc, src: New directories reorganizing the distribution.
2639         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2640         files.
2641         * Makefile.in: Adjusted.
2642         * configure.in: Configure new Makefiles.
2644         * m4.h: Declare STRING typedef.  Use it for comment and quote
2645         strings, adjusting all references.  (This is the rudiments of a
2646         beginning for the eventual withdrawal of NUL terminated strings.)
2647         * output.c (shipout_text): Accept a length parameter, and use it.
2648         All callers adjusted.
2650 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2652         * m4.h: Include <unistd.h> if it exists.
2653         * stackovf.c: Don't.
2655         Clean up for current_diversion variable:
2656         * output.c: Move current_diversion from builtin.c.
2657         * m4.h: Declare current_diversion so builtin.c can access it.
2658         * output.c (output_init, make_diversion): Initialize or update
2659         current_diversion.
2660         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2661         alone.
2663         Remove limit on number of diversions:
2664         * output.c: Replace ndiversion by diversions, declare it.
2665         (output_init): Allocate only diversion 0.
2666         (make_diversion): Allocate new diversions as needed.
2667         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2668         * m4.c: Still accept -N, but do nothing with it.
2669         Reported by David MacKenzie.
2671         Freeze diversions:
2672         * output.c (freeze_diversions): New function.
2673         * m4.h: Declare freeze_diversions.
2674         * freeze.c: Document frozen file format, revise it, call
2675         freeze_diversions to add diversions to frozen format, and code to
2676         reload them properly.
2677         * m4.c: Do not undivert automatically at end when status being
2678         frozen.  Do not call builtin_init when reloading frozen state.
2680         Speed up diversion processing:
2681         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2682         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2683         structure and variables, cached variables out of output_diversion,
2684         reallocate_diversion_for and OUTPUT_CHARACTER.
2685         (shipout_text, make_diversion, insert_diversion): Adapted to new
2686         structures.
2687         (insert_file): Use better buffering.
2688         Reported by David MacKenzie.
2690 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2692         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2693         dist works from another build directory.
2695 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2697         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2698         constant HASHMAX, for -H option to work better.
2700         * builtin.c (DECLARE): Simplify by using _ ().
2702         * freeze.c: New file.
2703         * Makefile.in: Compile it, distribute it.
2704         * m4.c: Recognize, document and process --freeze-state (-F) and
2705         --reload-state (-R) options.  Pass a true flag to builtin_init
2706         only if no reloading some state.
2707         * builtin.c (define_builtin): Remove static specifier.
2708         (find_builtin_by_name): Remove static specifier.
2709         (builtin_init): Accept and obey a flag argument.
2710         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2712 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2714         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2715         specifier.
2717         * configure.in: Implement --with-dmalloc.
2718         * acconfig.h: Document WITH_DMALLOC.
2719         * m4.h: Add code for when WITH_DMALLOC.
2721 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2723         * m4.c (long_options): Use "error-output", the dash was missing.
2724         Reported by Akiko Matsushita.
2726 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2728         * m4.h: Include <sys/types.h>.
2729         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2730         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2731         int.
2732         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2733         as size_t, not int.
2734         * builtin.c (dump_args): Declare len as size_t, not int.
2736         * debug.c: Prototype the forward declaration of debug_set_file.
2738         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2739         shadowing of this variable.
2740         * output.c (insert_diversion): Idem.
2742         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2743         (input_init): Duplicate default quote and comment strings.
2744         (set_quotes): Free previous quote strings in all cases.  Duplicate
2745         even default quote strings.
2746         (set_comment): Free previous comment strings in all cases.
2747         Duplicate even default comment strings.
2749         * configure.in: Updated for Autoconf 2.0.
2750         * Makefile.in (distclean-local): Also delete config.cache.
2752         * m4.c (usage): Reorganize the --help output by topic.  Include a
2753         description for debugging flags.
2755 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2757         * configure.in: If sigaction is available and SA_ONSTACK defined,
2758         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2759         defined, use sigvec.  Else don't compile stackovf.c.
2760         * stackovf.c (setup_stackovf_trap): Idem.
2761         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2762         and Simon Leinen.
2764 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2766         * m4.c (usage): Replace printf par fputs.
2768 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2770         * Release 1.2
2772 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2774         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2775         check for RLIMIT_STACK, combine in the checking for getrlimit.
2776         All those things are not universally available.
2777         * stackovf.c: Split setting up the trap handler and catching
2778         signals, for better taking care of various configure outcomes.
2779         * examples/stackovf.sh: Correct a typo.
2780         Reported by Eric Backus, Jim Avera and Jim Meyering.
2782 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2784         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2786 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2788         * Makefile.in: Modify so parallel make will not try making
2789         lib/libm4.a twice simultaneously.
2790         Reported by Jim Meyering.
2792 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2794         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2795         error message, for when no code possibility exists.  Even if this
2796         line is completely #ifdef'ed out, it brings a syntax error.
2797         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2799         * Makefile.in (install): Have install depend on all too, for lib
2800         to be remade as needed.
2802         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2803         providing ulimit, instead of using only ksh.
2804         Reported by Jim Avera and Joseph E. Sacco.
2806 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2808         * Makefile.in (check): Have it depend on all instead of m4.  In
2809         this way, a change in lib will be detected and processed.
2811         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2812         instead of using sscanf which stops as soon as there is a
2813         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2814         and divert(1xyzzy) were all accepted without any warning or error
2815         messages.
2816         * m4.h: Declare strtol as long if not including stdlib.h.
2817         * configure.in: Check for limits.h, and replace strtol if missing.
2818         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2819         * lib/strtol.c: New file, from elsewhere.
2820         Reported by Andreas Schwab.
2822 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2824         * macro.c (expand_macro): Cast value to (boolean) prior to
2825         assigning it to traced.
2826         Reported by Tom McConnell.
2828         * Makefile.in (m4): Always make all in lib first.
2829         Reported by Jim Meyering.
2831 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2833         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2834         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2835         handlers), and a default error message if the fault address is not
2836         available (when neither siginfo.h nor BSD sigcontext are supported).
2837         * configure.in: Changes for stackovf.h: Check for sigcontext,
2838         sigaction, sigstack, and define rlim_t as int if necessary.
2839         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2840         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2841         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2843 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2845         * configure.in: Use AC_SET_MAKE.
2846         * Makefile.in: Use @SET_MAKE@.
2847         Reported by Jim Meyering.
2849         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2850         Reported by Ian Taylor.
2852 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2854         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2855         because siginfo.h is unrelated to standard headers, and siginfo.h
2856         is already checked for.
2857         Reported by Joseph E. Sacco.
2859         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2860         PROTOTYPES.
2861         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2862         AC_PROTOTYPES.
2864 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2866         * builtin.c (substitute): Use \& to represent this part of the
2867         string which was matched by the whole regexp, instead of
2868         representing the whole string.  Any usage of \0 issues a warning
2869         and acts like \&, it will disappear in some subsequent release.
2871 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2873         * m4.c: Complete prototype for forwarded declaration of usage.
2875         * input.c (init_macro_token): Correct own reference in error
2876         message.  Previous name get_macro_func was referred to instead.
2877         (next_char):  Correct own reference in error message.  Previous
2878         name advance_input was referred to instead.
2880         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2881         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2882         and_term, not_term, logical_not_term, cmp_term, shift_term,
2883         add_term, mult_term, exp_term, unary_term, simple_term): Add
2884         prototype to forwarded declarations.  Declare parameter v1 as
2885         eval_t * instead of int *.  Same for local variable v2 in dyadic
2886         functions.  Same for result in exp_term.
2887         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2888         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2889         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2890         (shipout_int): Cast first argument of ntoa to eval_t.
2891         Reported by Thorsten Ohl.
2893         * macro.c: Complete the prototypes of forwarded expand_macro and
2894         expand_token.
2895         Reported by Thorsten Ohl.
2897         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2898         The Ultrix 3.1 compiler cannot do much with void pointers.
2900         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2901         * m4.c (xfree):  Replace void * by voidstar.
2902         Reported by Tom McConnell.
2904         * ansi2knr.1: New, from elsewhere.
2905         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2907         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2908         stamp-h does not exist yet.  This avoids running it a second time
2909         just after the initial ./configure.
2910         Reported by David MacKenzie and Tom McConnell.
2912         * m4.h: Replace the enum debug_info declaration with a series of
2913         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2914         (int) to most references, when used in expressions.
2915         Reported by Tom McConnell.
2917 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2919         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2920         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2921         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2922         the preprocessor; by not being subject to CFLAGS, this was
2923         discouraging those flags asking for ANSI compilation.
2924         * acconfig.h: Document HAVE_PROTOTYPES.
2925         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2926         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2927         Reported by Eric Backus.
2929         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2930         from the environment.  Default CFLAGS to -g if not set.
2931         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2932         * lib/Makefile.in: Have CFLAGS substituted from configure.
2933         Reported by Eric Backus and Tom McConnell.
2935         * configure.in: m4_undefine changeword before using AC_ENABLE.
2937         * m4.h: Declare prototypes for error (for ANSI compilers only),
2938         prefix_all_builtins and reference_error.
2939         Reported by Tom McConnell.
2941         * input.c (set_word_regexp): Do not try to initialize the array
2942         test from a string, this does not work with non-ANSI compilers.
2943         Reported by Eric Backus.
2945         * Makefile.in (dist): Clean examples/ before saving it.
2946         (distclean-local): Also remove stamp-h.
2947         Reported by Eric Backus.
2949         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2950         non ANSI compilers.
2951         Reported by Tom McConnell.
2953         * checks/Makefile.in (clean): Depends on mostlyclean.
2954         (mostlyclean): New goal.
2956 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
2958         * Makefile.in (DISTFILES): Distribute install.sh.
2959         * install.sh: New file, copied from elsewhere.
2960         Reported by Assar Westerlund and Kaveh R. Ghazi.
2962 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
2964         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2965         * acconfig.h: Explain ENABLE_CHANGEWORD.
2967         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2968         from code provided by Pete Chown]
2969         * m4.h: Add original_text field to u_t variant of union u.
2970         Declare TOKEN_DATA_FUNC macro.
2971         * builtin.c: Declare changeword.
2972         (m4_changeword): New function.
2973         * input.c: Include "regex.h", define variables with word regexps.
2974         (input_init): Initialize the word regexp.
2975         (set_word_regexp): New.
2976         (next_token): Declare local variables, use the previous code if
2977         default_word_regexp is true.  Else, match using a new code.  Save
2978         the original text.
2979         * macro.c (expand_token): Ship out original text if not a macro
2980         name.
2981         Reported by Krste Asanovic and Pete Chown.
2983         [These modifs all depend upon ENABLE_CHANGEWORD]
2984         * m4.h: Declare external user_word_regexp.
2985         * m4.c: Declare user_word_regexp, and initialize it from
2986         --word-regexp or -W, or NULL if not specified.
2987         * input.c: Use user_word_regexp if specified, instead of
2988         DEFAULT_WORD_REGEXP.
2990         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
2991         agree with it.
2993         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2994         * checks/Makefile.in: Empty the suffix list.
2995         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2997         * m4.c: Declare nesting_limit and initialize it to 250.
2998         Implement -LNUMBER or --nesting-limit=NUMBER to change its
2999         value.
3000         * m4.h: Declare nesting_limit as external.
3001         * macro.c (expand_macro): Stop execution whenever nesting limit
3002         is exceeded.
3003         Reported by Bengt Mertensson.
3005         * eval.c (evaluate): Diagnose excess characters in eval input.
3006         Things like `eval(08)' used to return 0 with no diagnostic.
3008         * m4.h: Capitalize first letter of all macro arguments in
3009         definitions.
3011         * m4.c: Declare warning_status, initialize it to 0.  Add new
3012         option -E, or --fatal-warnings, which sets warning_status to
3013         EXIT_FAILURE instead.
3014         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
3015         EXIT_FAILURE if not otherwise done by header files.
3016         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
3017         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
3018         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
3019         argument of all M4ERROR calls.
3020         Reported by Noah Friedman.
3022         * examples/incl-test.m4: Renamed from incl_test.m4.
3023         * examples/include.m4: Include incl-test.m4 instead of
3024         incl_test.m4.
3025         * examples/multiquotes.m4: Renamed from multi-quotes.m.
3027 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
3029         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
3030         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
3031         also tested it on a Sun Sparc workstation running SunOS 4.x.
3033         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
3034         49.format check, abusing a `union values' argument with sprintf
3035         without selecting the proper field.  Now, save the formatting type
3036         first, delaying the fetch of the corresponding argument.
3037         Reported by Joseph E. Sacco and Tom Quinn.
3039         * format.c (format): Remove const from char *fmt declaration when
3040         not HAVE_EFGCVT, because a NUL may be forced into it.
3042         * m4.h: Declare atof() when not STDC_HEADERS.
3043         Reported by Joseph E. Sacco.
3045         * Regenerate configure using Autoconf 1.11, this corrects a
3046         problem about an incorrect cpp seting on NeXT 3.1.
3047         Reported by Alexander Lehmann.
3049 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
3051         * m4.h (_): Change argument from `x' to `Args'.
3053 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
3055         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
3056         bringing more evil than good on a few systems.
3057         Reported by Greg A. Woods.
3059 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
3061         * m4.h: Rename Args() to _().
3062         * m4.h: Remove extern specifier from all function declarations.
3064 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
3066         * stackovf.c: New file implementing stack-overflow detection.
3067         * configure.in: Check for getrlimit, sigaction.  If all of
3068         standard headers, getrlimit and sigaction, define USE_STACKOVF and
3069         substitute ${U}stackovf.o for STACKOVF.
3070         * acconfig.h: Declare USE_STACKOVF.
3071         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
3072         * m4.h: Declare setup_stackovf_trap().
3073         * m4.c: Call setup_stackovf_trap().
3074         * tests/stackovf_test.sh: New file.
3076 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
3078         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
3080         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
3082 Sun Jan 30 14:24:19 1994    (pinard at icule)
3084         * m4.h: Remove definition of volatile, not used anymore.
3085         Reported by Jim Meyering and Joseph E. Sacco.
3087         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
3088         of `if ... else /* nothing */' for if macros.
3089         Reported by Jim Meyering.
3091         * builtin.c (m4_regexp): Reorganize the code for avoiding a
3092         warning from gcc about `repl' possibly used before defined.
3093         Reported by Jim Meyering.
3095         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
3096         Reported by Jim Meyering.
3098 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
3100         * m4.h: Move the conditional definition of volatile after the
3101         inclusion of system files, because they may define it first.
3103 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
3105         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
3106         get around a problem with Alpha make seeing a syntax error, there.
3107         Reported by Vern Paxson.
3109 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
3111         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
3112         Reported by Richard Stallman.
3114 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
3116         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
3117         instead of AC_HAVE_FUNCS.
3118         Reported by Noah Friedman.
3120 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
3122         * m4.c: Initialize show_help and show_version to zero.
3124         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
3125         Use them in exit() and usage() calls.
3127 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
3129         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
3130         syserr() macro.  Delete errref, add reference_error and M4ERROR.
3131         * m4.c: Replace errref, which was returning an input reference
3132         string, with reference_error, which prints it on standard error.
3133         * builtin.c, output.c: Use errno as second parameter to error,
3134         instead of using syserr() with %s.
3135         * *.c: Use M4ERROR instead of error: no more errref() with %s.
3136         Doing so, the program name appears after the input reference
3137         instead of before, which eases M-x next-error processing.
3139 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
3141         * checks/get-them: Escape braces with backslashes in patterns,
3142         because HPUX-9.01 awk needs this.
3143         Reported by Jim Meyering.
3145 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
3147         * builtin.c: Declare "FILE *popen ();".
3149         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
3150         macros, replace error_message_prefix() declaration by errref()'s.
3151         Declare xrealloc, for use in errref().
3152         * m4.c: Delete error_message_prefix() function, add errref().
3153         * *.c: Use error() systematically in place of all error macros,
3154         now that error() flushes stdout first.  Make needed adjustments.
3156         * m4.h: Remove const in sys_errlist[] declaration, it creates
3157         conflicts on SGI and Alpha.
3158         Reported by Kaveh R. Ghazi.
3160 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
3162         * m4.c: Include <getopt.h> instead of "getopt.h".
3164         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
3165         * acconfig.h: New, for documenting HAVE_EFGCVT.
3166         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
3167         use them wherever appropriate.  Also use -I. for compilations.
3168         * lib/Makefile.in: Use -I.. for compilations.
3169         * *.c: Include <config.h> or "config.h".
3171         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
3172         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
3174 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
3176         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
3178         * input.c (input_init): Initialize quote and comment strings
3179         explicitely instead of calling set_quotes and set_comment: by
3180         doing so, we ensure we do not free uninitialized variables.
3182         * checks/check-them: Reverse arguments to both diff, so the
3183         expected is on the left and the obtained on the right.
3185         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
3186         macros. Delete declarations for m4error, warning, fatal and
3187         internal_error, add declaration for error_message_prefix.
3188         * m4.c:  Delete m4error, warning, fatal and internal_error
3189         routines, add error_message_prefix routine.
3190         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
3191         warning with WARNING*, fatal with FATAL* and internal_error with
3192         INTERNAL_ERROR*.
3193         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
3194         this is not needed anymore.
3196         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
3197         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
3198         and debug_message, add declaration for debug_message_prefix.
3199         * debug.c: Remove static specifier for FILE *debug declaration.
3200         Delete debug_print and debug_message routines, add
3201         debug_message_prefix routine.
3202         * builtin.c, debug.c: Replace debug_print routine calls with
3203         DEBUG_PRINT* macro calls.
3204         * input.c, path.c: Replace debug_message routine calls with
3205         DEBUG_MESSAGE* macro calls.
3207         * m4.h: Remove inclusion of <varargs.h>.
3208         * debug.c: Include <stdarg.h> or <varargs.h>.
3209         (trace_format): Use stdarg instead of varargs if __STDC__.
3211         * configure.in: Remove checks for vfprintf and _doprnt.  These
3212         implementations use varargs tricks which are not portable enough.
3213         * lib/vfprintf.c: Deleted.
3214         * lib/_doprnt.c: Deleted.
3215         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
3216         Reported by Joel Sherrill.
3218         * path.c (add_include_directory): Use xstrdup.
3220         * builtin.c (find_builtin_by_name): Declare static.
3222         * *.[ch]: Add const to a few "char *" declarations.
3224         * configure.in: Remove commented tests for fileno() and fstat().
3225         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
3227         * debug.c (debug_flush_files): New.
3228         * m4.h: Declares it.
3229         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
3230         Reported by Nicolas Pioch.
3232 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
3234         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
3235         Reported by Joel Sherrill.
3237         * builtin.c (prefix_all_builtins): Instead of the table size, use
3238         the null entry at end for stopping the loop.  It was overwritten.
3239         Reported by Andreas Schwab and Jim Meyering.
3241         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
3242         Reported by Kaveh R. Ghazi.
3244         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
3245         Reported by Karl Vogel.
3247 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
3249         * m4.h: Do not define volatile if already defined.
3250         Reported by Rene' Seindal.
3252         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
3254         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
3255         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
3257 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
3259         * m4.h: Define strchr and strrchr in terms of index and rindex,
3260         instead of the other way around.
3261         * builtin.c, m4.c, path.c: Use strchr instead of index.
3263         * input.c (next_char): Remove a "break;" after a "return ...;".
3264         Reported by Tom McConnell.
3266 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
3268         * Release 1.1
3270         * configure.in: Do not copy check files in the build hierarchy.
3271         * checks/check-them: Identify the m4 version being checked.  For
3272         finding m4, look in $PATH instead of in the parent directory.
3273         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
3274         * checks/Makefile.in (.all-stamp): Always create check files in
3275         the source hierarchy, not anymore in the build hierarchy.
3276         (check): cd to the source hierarchy before performing checks.
3277         Do not copy nor clean COPYING anymore, take it from `..'.
3278         Reported by Tom McConnell.
3280         * Makefile.in (Makefile): Use $(SHELL).
3281         (config.status): Use $(SHELL).  Use "config.status --recheck"
3282         instead of "configure --no-create", which is obsolete.
3283         Reported by Tom McConnell.
3285 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
3287         * m4.c (usage): Use "%s" instead of "m4" in format string.
3288         Reported by Jim Meyering.
3290         * Makefile.in: Distribute mkinstalldirs.
3291         Reported by Pierre Gaumond.
3292         Reported by Jim Meyering.
3293         Reported by Tom McConnell.
3294         Reported by Andreas Gustafsson.
3296         * checks/check-them: Renamed from checks/check_them.
3297         * checks/get-them: Renamed from checks/get_them.
3298         * checks/.all-stamp: Renamed from checks/.all_stamp.
3299         * checks/Makefile.in: Changed accordingly.
3300         Reported by Jim Meyering.
3302 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
3304         * lib/Makefile.in (dist): Correct permissions on files.
3306         * output.c: Declare tmpfile, some systems don't.
3308 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
3310         * checks/Makefile.in (dist): Correct permissions on files.
3312         * Makefile.in (dist): Ensure recursive linking for subdirectory
3313         `examples', also set read/write permissions on all its files.
3315         * mkinstalldirs: New, from elsewhere.
3316         * Makefile.in: Use it.
3318         * debug.c: Synchronize debug messages and regular output when
3319         the debug file and stdout are redirected to the same file.
3320         * configure.in: Add (commented) checks for fileno and fstat.
3321         Reported by Jim Avera.
3323         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
3324         etc., arguments, then ignore the superfluous one.  m4 used to
3325         diagnose missing arguments and return the empty string.
3326         Reported by Nick S. Kanakakorn.
3328 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
3330         * m4.c (main): At end of all input, ensure all undiverted text
3331         goes to the main output stream.
3332         Reported by Andreas Gustafsson.
3334         * m4.c (main): exit (0), instead of return 0.
3336         * m4.c: Implement -P and --prefix-builtins.
3337         * builtin.c: Delete const specifier on builtin_tab.
3338         (prefix_all_builtins): New.
3339         Reported by Noah Friedman.
3340         Reported by Scott Bartram.
3342         * c-boxes.el: New, from elsewhere.
3343         * Makefile.in: Distribute it.
3345         * m4.h: Do not define bcopy if <string.h> defines it.
3346         Reported by Stephen Perkins.
3348         * builtin.c (define_macro): Allow a missing second argument, in
3349         which case it is implied empty.  Affects define and pushdef.
3350         Reported by Eric Allman.
3352 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3354         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3355         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3356         * builtin.c: Initialize all the blindness fields in builtin_tab.
3357         (define_builtin): Copy the blindness of a builtin into its symbol.
3358         * macro.c (expand_token): Avoid processing a blind builtin if the
3359         next character is not an opening parenthesis.
3360         Reported by David MacKenzie.
3361         Reported by Noah Friedman.
3363         * configure.in: Ensure an exit status of 0 on completion.
3364         Reported by Vivek P. Singhal.
3366         * eval.c (eval_lex): Admit both lower and upper case letters for
3367         bases greater than 10.  Only lower case letters were accepted.
3369         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3370         Reported by Krste Asanovic.
3372         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3373         * eval.c (logical_not_term): New name for not_term.
3374         * eval.c (xor_term): New, between or_term and and_term.
3375         * eval.c (not_term): New, between and_term and logical_not_term.
3376         * eval.c (shift_term): New, between cmp_term and add_term.
3377         Reported by Krste Asanovic: ~, ^, <<, >>.
3378         Reported by Ben A. Mesander: ** vs ^.
3380         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3381         * m4.h: Delete xrealloc.c.
3382         * lib/xmalloc.c: New, from elsewhere.
3383         * lib/xstrdup.c: New, from elsewhere.
3384         * lib/Makefile.in: Distribute and compile them.
3386         * m4.c: Change progname to program_name.
3387         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3388         * lib/error.c: New, from elsewhere.
3389         * lib/Makefile.in: Distribute and compile error.c.
3390         * configure.in: Check AC_VPRINTF and for strerror.
3391         * m4.c: Delete cmd_error.  Use error instead.
3392         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3394         * m4.h: Delete #define const, let Autoconf takes care of this.
3396         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3397         Merge parse_args into main.  Declare argv to be `char *const *',
3398         then remove superfluous casts.
3400         * m4.c: Rename --no-gnu-extensions to --traditional.
3401         Reported by Ben A. Mesander.
3403         * m4.c (usage): Add a status parameter.  Supply one in various
3404         calls.  Add --help processing.  Remove -V for --version.
3406         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3408         * lib/Makefile.in: Have an AR=ar declaration.
3409         Reported by Eric Backus.
3410         Reported by Bjorn R. Bjornsson.
3411         Reported by Tom Tromey.
3412         Reported by Kristine Lund.
3413         Reported by Marion Hakanson.
3415 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3417         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3418         Reported by Noah Friedman.
3420 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3422         * Makefile.in: Remove MDEFINES and cleanup.
3424 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3426         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3427         Create a gzip file.
3429 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3431         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3432         ensure 777 mode for directories, so older tar's will restore file
3433         modes properly.
3435 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3437         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3438         so the installer can override automatically configured choices.
3439         Reported by Karl Berry.
3441 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3443         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3444         previous version was not working properly on m68k-hp-bsd4.3.
3445         Reported by Roland McGrath.
3447         * lib/_doprnt.c: Stolen from Oleo distribution.
3448         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3449         * lib/Makefile.in: Distribute _doprnt.c.
3450         Do not distribute regex.[ch].old anymore.
3452 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3454         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3455         Richard wants it there.
3457 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3459         * Makefile.in: Add DEFS to MDEFINES.
3460         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3461         (libm4.a): Remove the library before creating it.
3462         (distclean): Remove tags and TAGS too.
3464 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3466         * Makefile.in (dvi, m4.dvi): New goals.
3468         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3469         macro.c, output.c, path.c, symtab.c: Change Copyright from
3470         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3472         * examples/divert.m4: Deleted, this bug has been corrected.
3474         * Makefile.in (texclean, mostlyclean): New goals.
3476         * Makefile.in (clean): Remove clutter from ansi2knr.
3477         Reported by Pierre Gaumond.
3478         Reported by Greg A. Woods.
3480 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
3482         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
3483         might well use CFLAGS is s/he needs it.
3485         * Makefile.in: Allow installation of info files from a separate
3486         build directory.
3487         Reported by Jason Merrill.
3488         Reported by David MacKenzie.
3489         Reported by Skip Montanaro.
3490         Reported by Erez Zadok.
3491         Reported by Assar Westerlund.
3493 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
3495         * Release 1.0.3
3496         This is still a beta release for the future GNU m4 version 1.1.
3498         * lib/alloca.c: New, from elsewhere.
3499         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
3501         * m4.h: Do not define index/rindex if already defined.  If
3502         FALSE/TRUE are already defined, do not redefine them, but merely
3503         define boolean typedef to int.
3505         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3506         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3507         because some C compilers do not like connectives with #ifdef.
3508         * m4.h: Define `volatile' only if __GNUC__, instead of once for
3509         __GNUC__ and once for __STDC__.
3510         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3512         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3513         Makefile dependencies.  Without it, make keeps destroying and
3514         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
3516         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3517         to diversion/DIVERSION, this was a spelling error.
3519         * m4.c: Declare version[], remove #include "version.h".
3520         * version.h: Deleted.
3521         * Makefile.in: Remove references to version.h.
3523         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3524         production, by using a simpler and more robust algorithm.  This
3525         solves the problem of synclines sometimes written in the middle of
3526         an output line.  Delete sync_line() and output_lines variable.
3527         * m4.h: Remove sync_line prototype and output_lines declaration.
3528         * input.c (next_char), output.c (shipout_text): Remove references
3529         to output_lines.
3530         * input.c (push_file, pop_file): Merely put the value -1 in
3531         output_current_line instead of calling sync_line, for delaying a
3532         single `#line NUM FILE' before next output line.  Do not test
3533         for sync_output, because this is unnecessary clutter.
3534         * output.c (make_divertion, insert_divertion): Idem.
3535         * input.c: Rename must_advance_line to start_of_input_line, for
3536         consistency.
3538         * debug.c (trace_header): Select a new debug line format, which
3539         better complies with GNU standards for formatting error messages.
3540         With option `-dfl', M-x next-error might be used on the output.
3541         * m4.c (vmesg): Adjust format of error output to GNU standards.
3542         * m4.texinfo: Adjust examples for `make check' to work.
3544         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3545         case for enum debug_info constants, which were all lower case.
3547         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3548         re_search_2.
3549         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3550         collected patches.  I tried a few times using newer regex.[ch], it
3551         mysteriously stopped aborting with this one.  Insecure feeling...
3552         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3554 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
3556         * m4.c: Change `--no-warnings' to `--silent'.
3557         Reported by David MacKenzie.
3559         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3560         leave it off for now.  See comment in m4.c for justification.
3561         Reported by David MacKenzie.
3563         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3564         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3566         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
3568         * Makefile.in: Ensure recursive cleaning is done before local
3569         cleaning for all clean goals.
3571         * builtin.c (ntoa): Ensure the value is always interpreted as a
3572         signed quantity, whatever the radix is.
3574 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
3576         * builtin.c, format.c, input.c: Split long lines.
3577         * m4.c: Use typedef macro_definition instead of struct
3578         macro_definition.
3579         * symtab.c: Use typedef symbol instead of struct symbol.
3581 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
3583         * *.[ch]: Remove all trailing whitespace, in code and comments.
3585         * configure.in: Find some awk.
3586         * Makefile.in: Add $(AWK) to MDEFINES.
3587         * checks/Makefile.in: Transmit $(AWK) to get_them.
3588         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3589         awk script when switching files, because without this, mawk runs
3590         out of file descriptors.
3592 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3594         * Makefile.in (realclean): Delete m4.info*.
3595         Reported by Jim Meyering.
3597         * Makefile.in: Adjust and link with checks/Makefile.
3598         * checks/Makefile.in: New.
3599         * configure.in: Output checks/Makefile.
3601         * checks/get_them: Have the dnl header of each test more
3602         recognizable by next-error, also use a better message.
3604 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3606         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3607         And use that only if __GNUC__ since we're using it's GCC-specific
3608         semantics that tell the compiler the associated function doesn't
3609         return.
3611         * builtin.c (substitute): Don't use character as an array index.
3612         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3613         warnings with gcc -W -Wall on systems with qsort prototype.
3614         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3615         from gcc -W -Wall.
3617         * eval.c (most functions): Add parentheses to assignments used
3618         as truth values go avoid warnings from gcc -Wall.
3620         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3621         any functions that don't need external scope.
3623         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3624         (many functions and arrays): Declare `const'.
3626 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3628         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3629         removing the declaration from m4.h.  Also rename false to FALSE
3630         and true to TRUE.
3632         * lib/Makefile.in (Makefile): New goal.
3634         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3635         so heavily loaded.  It gets more easily overridable, calling make.
3636         Reported by Jim Meyering.
3638         * Makefile.in (dist): Get .fname from the current directory name,
3639         instead of from version.h.  I need updating many files manually,
3640         when the version changes, version.h is just one of them.
3642 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3644         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3645         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3646         Reported by Tom McConnell.
3648 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3650         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3651         39.cleardiv, which were describing missing or spurious newlines.
3652         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3653         do not depend on machine word size, `/bin/false' implementation,
3654         or `wc' output format.  `make check' is more dependable, now.
3656         * checks/check_them: Summarize the failed tests by listing their
3657         name, at end.  If none, issue `All checks successful'.  Output
3658         `Checking' instead of `Input file:'.
3660         * checks/get_them, checks/check_them: Reindented.
3662         * Makefile.in (dist): chmod a+r before making the tar file.
3664 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3666         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3668         * input.c (next_token): Reinitialize token_buttom just after using
3669         it as a watermark with obstack_free.  Or else, a future token, big
3670         enough for triggering reallocation of the obstack chunk, could
3671         void the initialized value of token_buttom, later causing panic in
3672         obstack_free.  Rename token_buttom to token_bottom everywhere.
3674         * m4.h: Before declaring errno, first include <errno.h> and
3675         ensure that it does not define errno.
3676         Reported by Richard Stallman.
3678 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3680         * builtin.c: Define and use DECLARE macro for builtins.
3682         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3683         argument, this is a common idiom for introducing long comments.
3685         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3686         arguments.  The last argument was silently ignored.
3688         * m4.c (cmd_error): Add a missing semicolon before va_end().
3690 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3692         * Makefile.in: Now handle protoized sources.  Define and use U.
3693         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3694         Add `aclocal.m4' to `configure' dependencies.
3695         * ansi2knr.c: New, from Ghostscript distribution.
3696         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3697         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3698         * aclocal.m4: New, provide FP_PROTOTYPES.
3699         * m4.h: Conditionnaly protoized through Args, save for varags.
3700         * builtin.c: Protoized.  Then:
3701         Include <sys/types.h> if size_t is not defined, before "regex.h".
3702         (m4_ifelse): Fetch built-in name properly for diagnostic.
3703         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3704         (m4_regexp): Add const to `msg' declaration.
3705         (m4_patsubst): Add const to `msg' declaration.
3706         * debug.c: Protoized, save for varargs.
3707         * eval.c: Protoized.
3708         * format.c: Protoized.
3709         * input.c: Protoized.
3710         * m4.c: Protoized, save for varargs.  Then:
3711         (xfree): Accept void * instead of char *.
3712         (xmalloc): Return void * instead of char *.
3713         (xrealloc): Accept and return void * instead of char *.
3714         * macro.c: Protoized.
3715         * output.c: Protoized.
3716         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3717         * symtab.c: Protoized.
3719 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3721         * m4.texinfo: Remove directory from diagnostics in 30.include,
3722         51.eval, 56.errprint and 57.m4exit tests.
3724         * m4.h: Remove declarations for int or void system functions, they
3725         cause more conflicting trouble than they make good.
3727         * configure.in: Avoid configuration header file.  Add some tests.
3728         * m4.h: Remove #include "config.h".
3729         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3730         Then, rewritten for better compliance with GNU standards.
3732 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3734         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3735         because of a misplaced #endif.
3737         * Many *.[hc] files: Correct intra-line spacing here and there,
3738         according to GNU indent 1.6 advice.
3740         * configure.in: New, using Autoconf 1.2.
3741         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3742         * Delete old configure.in, configure, etc/configure.in,
3743         etc/configure, lib/configure.in, lib/configure and config/*.
3744         Reported by Jason Merrill.
3746         * symtab.c (hash): Change (char) NULL to '\0'.
3747         Reported by Jason Merrill.
3749         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3750         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3751         * version.h: De-automatize, force value in.
3753         * m4.c: Changes in order to use a newer getopt.h.
3754         Reported by David MacKenzie.
3756         * checks/: New name for examples/.
3757         * checks/get_them: New location for etc/get_examples.
3758         * checks/check_them: New location for etc/check_examples.
3759         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3760         * lib/vfprintf.c: New location for etc/vfprintf.c.
3761         * Delete empty etc/.
3762         * examples/: New name for test/.
3764 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3766         * Makefile.in (check): Add m4 as dependency.
3768         * m4.c: Accept --no-warnings instead of --no_warnings, and
3769         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3770         usage message more informative.
3771         Reported by David MacKenzie.
3773 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3775         * etc/check_examples: New name for check_examples.sh.
3776         * etc/get_examples: New name for get_examples.sh.
3777         * Makefile.in, etc/Makefile.in: Use new names.
3779         * Makefile.in: Transmit $(CC) while making in lib.
3781         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3782         code disposition by hand.
3784 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3786         * m4.h: Delete definitions for abort() and exit().
3787         Reported by Richard Stallman.
3789         * config/hmake-unicos, config/s-unicos.h: New files.
3790         Reported by Hal Peterson.
3792         * eval.c (exp_term): Have N^0 return 1.
3793         Reported by Michael Fetterman.
3795         * eval.c, input.c, m4.h: Remove last comma in enums.
3796         Reported by Mike Lijewski.
3798         * Transfer of maintenance duties from Rene' to Franc,ois.
3800 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3802         * Release 1.0.  Many thanks to those, who provided me with bug
3803         reports and feedback.
3805         * Uses GNU configure, taken from the gdb distribution.
3807         * Uses GNU getopt(), with long option names.
3809         * The -Q/+quiet option is added, which suppresses warnings about
3810         missing or superflous arguments to built-in macros.
3812         * Added default options via the M4OPTS environment variable.
3814         * The built-in format can now be configured to use sprintf as
3815         the formatting engine, for systems without [efg]cvt(3).
3817         * GNU library code is moved to the ./lib subdirectory; other
3818         utility files are now in ./etc.
3820         * Several minor bugs have been fixed.
3822 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3824         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3825         Francois Pinard and Roland H. Pesch for providing me with reports.
3827         * The builtins incr and decr are now implemented without use of
3828         eval.
3830         * The builtin indir is added, to allow for indirect macro calls
3831         (allows use of "illegal" macro names).
3833         * The debugging and tracing facilities has been enhanced
3834         considerably.  See the manual for details.
3836         * The -tMACRO option is added, marks MACRO for tracing as soon
3837         as it is defined.
3839         * Builtins are traced after renaming iff they were before.
3841         * Named files can now be undiverted.
3843         * The -Nnum option can be used to increase the number of
3844         divertions available.
3846         * Calling changecom without arguments now disables all comment
3847         handling.
3849         * The function m4_patsubst() is now consistently declared
3850         static.
3852         * A bug in dnl is fixed.
3854         * A bug in the multi-character quoting code is fixed.
3856         * Several typos in the manual has been corrected.  More probably
3857         persist.
3859         * The m4.info file is now installed along with the program.
3861 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3863         * Updated and enhanced version.  Release 0.75, manual 0.07.
3865         * Implemented search path for include files (-I option and
3866         M4PATH envronment variable).
3868         * Implemented builtin "format" for printf-like formatting.
3870         * Implemented builtin "regexp" for searching for regular
3871         expressions.
3873         * Implemented builtin "patsubst" for substitution with regular
3874         expressions.
3876         * Implemented builtin "esyscmd", which expands to a shell
3877         commands output.
3879         * Implemented "__file__" and "__line__" for use in error
3880         messages.
3882         * Implemented character ranges in "translit".
3884         * Implemented control over debugging output.
3886         * Implemented multi-character quotes.
3888         * Implemented multi-character comment delimiters.
3890         * Changed predefined macro "gnu" to "__gnu__".
3892         * Changed predefined macro "unix" to "__unix__", when the -G
3893         option is not used.  With -G, "unix" is still defined.
3895         * Changed "shift", "$@" and "$*" to not insert spaces afters
3896         commas.
3898         * Added program name to error messages.
3900         * Fixed two missing null bytes bugs.
3902 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3904         * Initial beta release.  Release 0.50, manual 0.05.
3906         -----
3908         $Revision$ $Date$
3910         Local Variables:
3911         coding: utf-8
3912         End:
3914         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3915         2005, 2006, 2007 Free Software Foundation, Inc.
3917         Copying and distribution of this file, with or without
3918         modification, are permitted provided the copyright notice
3919         and this notice are preserved.