* doc/m4.texinfo: Pick up more index entries from head. Follow
[m4/ericb.git] / ChangeLog
bloba551dbdb116accbeafdfecf5d18c7a00d4efde4d
1 2007-03-01  Eric Blake  <ebb9@byu.net>
3         * doc/m4.texinfo: Pick up more index entries from head.  Follow
4         more texinfo recommendations.
5         (Sysval): Improve tests.
7         Avoid overfull \vbox warning from texinfo, due to indices that
8         weren't quite big enough to split across page boundaries.
9         * doc/m4.texinfo: Add lots of concept index entries.
10         (Concept Index): Move to be last, as recommended by texinfo
11         manual.
12         (Define, Arguments, Pseudo Arguments): Add more function entries.
14 2007-02-28  Eric Blake  <ebb9@byu.net>
16         * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
17         137.
18         (Pseudo Arguments): Add useful example.
20         * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
21         reflect POSIX XCU ERN 118.
23         * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
24         * src/m4.c (usage): ...here,...
25         * src/builtin.c (set_macro_sequence): ...and here.
26         (define_user_macro): Fix typo.
27         * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
28         inaccuracies.
29         (Shift): Document composite macro argn for portably getting at
30         positional parameters beyond 9.
31         * configure.ac (AC_INIT): Bump version number.
32         * NEWS: Start changes of 1.4.8c.
34 2007-02-24  Eric Blake  <ebb9@byu.net>
36         Beta Release 1.4.8b:
37         * configure.ac (AC_INIT): Bump version number.
38         * NEWS: Describe changes since 1.4.8.
40         Reserve all uses of raw ${} in macro definitions, not just
41         ${<digit>}.
42         * src/builtin.c (set_macro_sequence): Change default macro
43         sequence.
44         * doc/m4.texinfo (Operation modes): Update to match.
45         * src/m4.c (usage): Likewise.
46         * NEWS: Likewise.
48 2007-02-23  Eric Blake  <ebb9@byu.net>
50         * src/m4.h (includes): Update to latest gnulib.
52 2007-02-08  Eric Blake  <ebb9@byu.net>
54         Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
55         more flexible, and so that autoconf can use it.
56         * src/m4.h (set_macro_sequence, free_macro_sequence): New
57         prototypes.
58         * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
59         (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
60         New variables and functions.
61         (define_user_macro): Allow flexibility in regular expression used
62         to trigger warning.
63         * src/m4.c (warn_syntax): Delete.
64         (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
65         spelling of option, along with optional argument.
66         * doc/m4.texinfo (Operation modes, Arguments): Document this
67         change.
68         * NEWS: Document this change.
70 2007-02-05  Eric Blake  <ebb9@byu.net>
72         * m4/gnulib-cache.m4: Module strstr no longer exists.
74         Avoid bool bitfields, as they don't work on AIX.
75         * src/m4.h (bool_bitfield): New typedef.
76         (struct symbol, struct builtin): Use it.
77         * src/input.c (struct input_block): Likewise.
78         Reported by Albert Chin.
80         * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
81         Reported by Albert Chin.
82         * THANKS: Update.
84 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
86         * doc/m4.texinfo (Input processing): Further clarifications.
88 2007-02-03  Eric Blake  <ebb9@byu.net>
90         * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
91         the examples.
92         Reported by Bruno Haible.
94 2007-02-01  Eric Blake  <ebb9@byu.net>
96         * src/m4.c (fatal_warnings): New variable.
97         (usage): Document new -E behavior.
98         (main): Make -E an additive option.
99         (m4_error, m4_error_at_line): Change exit status when required.
100         * NEWS: Document this change.
101         * doc/m4.texinfo (Operation modes): Likewise.
102         Reported by Ralf Wildenhues.
104 2007-01-27  Eric Blake  <ebb9@byu.net>
106         * src/m4.h (warn_syntax): Declare.
107         (init_pattern_buffer): Export.
108         * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
109         (long_options, main): Implement new option.
110         * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
111         (define_user_macro): Warn on $11 and ${1} if requested.
112         * src/input.c (init_pattern_buffer): Delete duplicate method.
113         * doc/m4.texinfo (Operation modes): Document it.
114         (Arguments): Document future direction of ${11} vs. $11.
115         (Incompatibilities): Fix wording on POSIX limitations.
116         * checks/get-them: Parse @{ and @} correctly.
117         * NEWS: Document this change.
119 2007-01-26  Eric Blake  <ebb9@byu.net>
121         * src/builtin.c (includes): Adjust to gnulib changes.
123 2007-01-15  Eric Blake  <ebb9@byu.net>
125         * doc/m4.texinfo: Pull in various improvements from head.
126         * src/builtin.c (include): Alter exit status on failure.
127         * NEWS: Document this fix.
129 2007-01-13  Eric Blake  <ebb9@byu.net>
131         * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
132         assume the fallback of ss_base for BSDI 4.0.1.
133         * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
134         ! HAVE_STACK_T_SS_SP]: Use this check.
135         Reported by Chris McGuire.
136         * THANKS: Update.
137         * NEWS: Document the improvement.
139 2007-01-09  Eric Blake  <ebb9@byu.net>
141         * src/eval.c (ASSIGN): New enumerator.
142         (eval_lex): Recognize '='.
143         (equality_term): Treat '=' like '==', but warn that it is
144         deprecated.
145         * doc/m4.texinfo (Eval): Document and test this.
146         (Incompatibilities): Document the POSIX incompatibility.
147         * NEWS: Document this change.
149 2007-01-06  Eric Blake  <ebb9@byu.net>
151         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
152         * checks/check-them: Record expected exit status.
153         * checks/get-them: Check exit status.
154         * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
155         instead.
156         * src/builtin.c: All users changed.
157         * src/eval.c: Likewise.  Also document where we are triggering
158         undefined or implementation-defined behavior.
159         (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
160         (logical_or_term, logical_and_term, logical_not_term, not_term)
161         (equality_term, unary_term): Port from head to follow POSIX
162         semantics.
163         (exp_term): Reject 0**0 as undefined.
164         * doc/m4.texinfo (History): Mention 1.4.9.
165         (Format, Incompatibilities): Update to document POSIX compliance.
166         * NEWS: Document this change.
168 2007-01-04  Eric Blake  <ebb9@byu.net>
170         * NEWS: Document previous fix.
171         * THANKS: Update.
173 2007-01-04  Sami Liedes  <sliedes@cc.hut.fi>  (tiny change)
175         Fix Debian bug 405594, introduced 2006-11-01 from a bad
176         copy-n-paste from head.
177         * src/m4.c (main): Use correct file name after --.
179 2007-01-04  Eric Blake  <ebb9@byu.net>
181         Fix regression from 1.4.7 in large file handling on some
182         platforms, introduced on 2006-10-13.
183         * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
184         will be handled.
185         * NEWS: Document this fix.
187 2007-01-03  Eric Blake  <ebb9@byu.net>
189         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
190         version-etc-fsf'.
191         * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
192         it bumps the copyright year).
194 2006-12-27  Eric Blake  <ebb9@byu.net>
196         * doc/m4.texinfo (Patsubst): Fix typo.
198 2006-12-16  Eric Blake  <ebb9@byu.net>
200         * src/m4.c (main): Check for errors when closing stdin.
202 2006-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
204         * doc/m4.texinfo: Fix some typos.
206 2006-12-09  Eric Blake  <ebb9@byu.net>
208         * configure.ac (AC_INIT): Bump version number.
209         * NEWS: Start changes of 1.4.8a.
211 2006-11-20  Eric Blake  <ebb9@byu.net>
213         Release 1.4.8:
214         * configure.ac (AC_INIT): Bump version number.
215         * NEWS: Describe changes since 1.4.7.
217 2006-11-16  Eric Blake  <ebb9@byu.net>
219         * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
220         Minor tweaks noticed while porting to head.
222 2006-11-14  Eric Blake  <ebb9@byu.net>
224         * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
225         spent iterators.
226         (m4_tmpname): Avoid memory leak.
228 2006-11-13  Eric Blake  <ebb9@byu.net>
230         * src/output.c (cleanup_tmpfile): Avoid double error message when
231         umask is prohibitive.
232         (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
233         functions.
234         (m4_tmpfile): Add parameter, move cloexec action here.
235         (make_room_for): Adjust caller.  Don't keep too many files open.
236         (insert_diversion_helper): Unlink emptied temp files.
237         (make_diversion): Don't keep too many files open.
238         * doc/m4.texinfo (Diversions): Tweak wording, now that open file
239         descriptors are no longer a limiting factor.
240         * NEWS: Document this change.
242         Backport sparse diversion handling from head.
243         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
244         avltree-oset'.
245         * src/output.c (struct m4_diversion): Rename from struct
246         diversion, and update members.  All users changed.
247         (diversion_table): Change to an ordered set, instead of an array.
248         (div0): New storage for diversion 0.
249         (diversions): No longer needed.
250         (free_list): New list to allow recycling diversion storage.
251         (diversion_storage): New storage to reduce malloc overhead.
252         (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
253         (output_init, output_exit, cleanup_tmpfile, make_room_for)
254         (make_diversion): Handle new diversion storage scheme.
255         (insert_diversion_helper): New function.
256         (insert_diversion, undivert_all, freeze_diversions): Use it.
257         * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
258         exhaustion to visible test of large diversion numbers.
259         * NEWS: Document this fix.
261 2006-11-11  Eric Blake  <ebb9@byu.net>
263         * src/builtin.c (m4_translit): Slight optimization.
265         * src/m4.h (to_uchar): Depend on HAVE_INLINE.
267         * src/builtin.c: Remove unnecessary casts.
268         (expand_ranges): Make 8-bit clean.
269         * doc/m4.texinfo (Translit): Add tests and wording.
270         * NEWS: Document this fix.
272 2006-11-07  Eric Blake  <ebb9@byu.net>
274         * src/m4.h (output_exit): New prototype.
275         * src/m4.c (main): Use it.
276         * src/output.c (cleanup_tmpfile): Close files before removing
277         directory.
278         (insert_diversion): Check for failure.
279         (output_exit): Avoid memory leak.
280         * doc/m4.texinfo (Diversions): Test this bug.
282         * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
284 2006-11-01  Eric Blake  <ebb9@byu.net>
286         Allow C++ compilation on Linux, as a safety measure in type
287         checking.
288         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
289         stdbool'.
290         * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
291         (boolean): Kill this, and use stdbool.h instead.
292         * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
293         * src/output.c, src/symtab.c: All users changed.
294         * src/symtab.c (hack_all_symbols): Update prototype.
295         * src/builtin.c (dump_symbol, set_trace): Update signature.
296         (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
297         (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
298         C++ compilation.
299         * src/debug.c (trace_flush): Likewise.
300         * src/freeze.c (reload_frozen_state): Likewise.
301         * src/input.c (push_file, push_string_finish, push_wrapup):
302         (token_bottom, next_token): Likewise.
303         * src/m4.c (main): Likewise.
305         * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
306         draft wording.
307         * src/m4.h (m4_path_search): Tweak signature.
308         * src/path.c (m4_path_search): Likewise.
309         * src/builtin.c (include): Update caller.
310         * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
311         with file names.  Don't write to **argv.
312         (process_file): New helper method.
313         * NEWS: Document this fix.
315 2006-10-31  Eric Blake  <ebb9@byu.net>
317         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
318         * doc/m4.texinfo (Translit): Improve the documentation.
319         * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
320         algorithm.
321         (m4_index): Simplify, and speed up slightly.
322         * NEWS: Document this fix.
324 2006-10-28  Eric Blake  <ebb9@byu.net>
326         * src/input.c (set_quotes): Don't allow empty end-quote with
327         non-empty start-quote.
328         (set_comment): Likewise for end-comment.
329         * src/builtin.c (m4_changecom): Adjust caller.
330         * doc/m4.texinfo (Changequote, Changecom): Update documentation to
331         match behavior.
332         (Incompatibilities): Document another POSIX bug.
333         * NEWS: Mention this change.
335 2006-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
337         * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
338         files.
340 2006-10-26  Eric Blake  <ebb9@byu.net>
342         Silence -Wwrite-strings -Wpointer-arith warnings.
343         * src/builtin.c (define_user_macro): Allow NULL argument.
344         (m4_builtin, m4_indir): Cast away const of "".
345         * src/format.c (format): Likewise.
346         * src/macro.c (collect_arguments): Likewise.
347         (expand_macro): Avoid math on void*.
348         * src/m4.c (main): Adjust caller.
349         * src/output.c (freeze_diversions): Detect off_t overflow.
351         * src/input.c (pop_input): Remove unnecessary code.
353 2006-10-25  Eric Blake  <ebb9@byu.net>
355         * src/symtab.c (symtab_init): Avoid size_t overflow.
356         * src/output.c (make_diversion): Avoid size_t overflow.
357         * doc/m4.texinfo (Diversions): Test this fix.
358         * src/input.c (input_block): Remove unused member.  Reduce size
359         of struct.
360         (push_file, pop_input): Avoid useless assignment.
361         * NEWS: Document the bug fix.
363         Redo location tracking.  Instead of having just files track the
364         line to return to when popping input, now all input blocks track
365         their current line.
366         * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
367         needed.
368         (input_block): Have line and file storage for all input types, and
369         rename some members.
370         (input_change): New global flag.
371         (push_file, push_macro, push_string_init, push_wrapup): Store
372         location.
373         (push_string_finish, pop_input, pop_wrapup): Notice changes in
374         input blocks.
375         (peek_input): Adjust to new member names.
376         (next_char, next_char1): Adjust location if needed.
377         (skip_line): Simplify restoring location.
378         * doc/m4.texinfo (Location): Augment the test to catch line
379         location of expansion of multi-line arguments.
380         Reported by Stepan Kasal.
382 2006-10-23  Eric Blake  <ebb9@byu.net>
384         * doc/m4.texinfo (Macro Arguments): Document that leading space
385         in argument collection stops at macro expansion.
386         (Incompatibilities): Document POSIX whitespace wording issue.
388 2006-10-20  Eric Blake  <ebb9@byu.net>
390         * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
391         TeX, so recognize '@w{ }' instead.  Likewise, @code{_name} at the
392         end of a TeX line splits incorrectly.
393         (Foreach, Improved foreach): Write these sections, borrowing ideas
394         from CVS head and from m4sugar.
395         * checks/get-them: Accomodate new way to show trailing space in
396         examples.
397         * examples/foreach.m4: Make usable in documentation.
398         * examples/foreachq.m4: New file.
399         * examples/foreachq2.m4: New file.
400         * examples/foreach2.m4: New file.
401         * NEWS: Document the documentation updates.
403 2006-10-19  Eric Blake  <ebb9@byu.net>
405         * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
406         (m4_maketemp): Provide traditional behavior.
407         * doc/m4.texinfo (Mkstemp): Rename from Maketemp.  Document the
408         new `mkstemp' macro and the flaws of the old `maketemp'.
409         (Incompatibilities): Move maketemp discussion to...
410         (Extensions): ...here, since -G now supresses the GNU extension.
411         * NEWS: Document this.
413         * examples/forloop.m4: Simplify.
414         * examples/forloop2.m4: New file.
415         * examples/quote.m4: New file.
416         * doc/m4.texinfo (Loops): Rename to...
417         (Shift): ...this node.
418         (Forloop, Foreach, Improved forloop, Improved foreach): New
419         nodes.
421 2006-10-17  Eric Blake  <ebb9@byu.net>
423         * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
424         config-h'.
425         * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
426         gnulib headers, rather than in top directory.
427         * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
428         output clutter.
430 2006-10-16  Eric Blake  <ebb9@byu.net>
432         * doc/m4.texinfo: Backport some minor cleanups from head.
433         (Cleardivert): Rename from cleardiv.
435         * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
436         a section of Preliminaries.
437         (Operation modes, Preprocessor features, Limits control)
438         (Frozen state, Debugging options, Command line files): Subdivide
439         into new sections.
440         (Input processing, Quoting Arguments, Define, Arguments)
441         (Cleardiv, Format, M4exit): Fix grammar of references.
442         (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
443         (Debug Levels, Debug Output, Include, Search Path, Divert)
444         (Platform macros, Syscmd, Location, Extensions): Point to new
445         sections.
446         (Top, Loops, Include, Undivert, Location, Incompatibilities):
447         Improve file references.
449 2006-10-14  Eric Blake  <ebb9@byu.net>
451         * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
452         is not portable.
453         Reported by Ralf Wildenhues.
455         * src/builtin.c (m4_undivert): Check for read error.
457 2006-10-13  Eric Blake  <ebb9@byu.net>
459         * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
460         header files are included, since <unistd.h> can affect the tests.
461         * THANKS: Updated.
462         Reported by Martin Koeppe.
464         Backport head's usage of clean-temp module, as it is cleaner than
465         using tmpfile-safer.
466         * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
467         clean-temp closeout', and remove tmpfile-safer.
468         * src/m4.h (includes): Adjust.
469         (m4_path_search): Rename from path_search, to avoid collision
470         with gnulib.
471         * src/m4.c (main): Install closeout handler.  Adjust caller.
472         (usage): Now done by closeout module.
473         * src/builtin.c (m4_m4exit): Likewise.
474         (m4_undivert, include): Adjust callers.
475         * src/freeze.c (reload_frozen_state): Likewise.
476         * src/path.c (m4_path_search): Rename from path_search.
477         * src/output.c (output_temp_dir): New variable.
478         (cleanup_tmpfile, m4_tmpfile): New functions, from head.
479         (insert_diversion, make_room_for): Use them.
480         * doc/m4.texinfo (Diversions): Document this, and add a test.
481         (Improved fatal_error): Fix typo.
482         (Maketemp): Port test to mingw, and no longer hide from
483         documentation.
484         * NEWS: Document the change in TMPDIR behavior.
486         * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
487         macros, to work with recent gnulib-tool update.
489         * src/builtin.c (m4_builtin, m4_indir): Allow transparent
490         handling of defn results.
491         * doc/m4.texinfo (Builtin, Indir): Add test cases.
492         * NEWS: Document this.
494 2006-10-12  Eric Blake  <ebb9@byu.net>
496         * doc/m4.texinfo (Location): Fix typo in previous commit.
497         (Changeword): Catch one more case.
498         * src/input.c (skip_line): Fix case when outer file used macro to
499         supply the \n.
501 2006-10-11  Eric Blake  <ebb9@byu.net>
503         * src/input.c (enum input_type): Add additional types, to shave
504         time off the common case.
505         (push_wrapup): Wrapped strings remember location.
506         (push_string_finish): Normal strings carry no location.
507         (push_file): Start new files uninitialized.
508         (peek_input, next_char_1): Optimize common cases by updating
509         location only on new input types.
510         (pop_input): Update to honor new input types.
511         (skip_line, push_string_finish): Fix regression in previous patch
512         when dnl is not followed by newline in included file.
513         (push_string_init): Initialize all fields of INPUT_STRING sooner.
514         (peek_token): Simplify.
515         (peek_input): Don't pop input files on peek, so that __file__ and
516         __line__ as last token of include file work correctly.
517         * doc/m4.texinfo (History): Mention 1.4.8.
518         (Answers): Split into sections, one per answer.
519         (Improved exch, Improved cleardivert, Improved fatal_error): New
520         nodes.
521         (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
522         new m4wrap location semantics.
523         (Changeword): Add test that caught the regression.
524         * NEWS: Document this.
526         * src/macro.c (expand_macro): In macro expansion errors, report
527         line number at open parenthesis.
528         * src/input.c (next_token): Fix off-by-one bug in reporting end
529         of file in unterminated comment and string.
530         (file_names): New obstack, necessary since expand_macro now hangs
531         on to file names longer than the files remain open.
532         (input_init): Initialize new obstack.
533         (push_file): Use new obstack.  Delay updates to current_file
534         until after expand_macro has restored state.
535         (peek_input, next_char_1): Update current_file if necessary.
536         (pop_wrapup): Release memory.
537         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
538         the off-by-one bug.
539         (Dnl): Update to the new location reporting rules.
540         * NEWS: Document these changes.
542 2006-10-10  Eric Blake  <ebb9@byu.net>
544         * src/macro.c (argc_stack, argv_stack): New variables for sharing
545         obstacks across multiple macro calls.
546         (expand_input): Initialize and tear down stack once per input
547         file, instead of once per macro.
548         (expand_macro): Reuse existing stacks when possible.
549         (collect_arguments): Simplify slightly.
551         * src/path.c (include_env_init): Fix botched patch application.
552         Reported by Ralf Wildenhues.
554 2006-10-09  Eric Blake  <ebb9@byu.net>
556         * src/m4.c (usage, main): Detect write failures to stderr.
557         * src/builtin.c (m4_m4exit): Likewise.
558         * NEWS: Document this.
560         * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
561         the limit.
562         * NEWS: Document this.
563         * doc/m4.texinfo (Invoking m4): Likewise.
565 2006-10-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
567         * src/path.c (include_env_init): Copy the string returned
568         by getenv before overwriting it; POSIX disallows this.
570 2006-10-09  Eric Blake  <ebb9@byu.net>
572         * src/m4.c (main): Defer debugfile until after --help.
573         * configure.ac (AC_INIT): Bump version number.
574         * NEWS: Start changes of 1.4.7a.
576 2006-09-25  Eric Blake  <ebb9@byu.net>
578         Release 1.4.7:
579         * configure.ac (AC_INIT): Bump version number.
580         * NEWS: Describe changes since 1.4.6.
582 2006-09-21  Eric Blake  <ebb9@byu.net>
584         * doc/m4.texinfo (Invoking m4): Add clarification on option
585         processing behavior.
586         * THANKS: Update.
587         Reported by Mikhail Teterin.
589         * bootstrap: Add --force option, based on idea from coreutils.
590         * README: Document that ./bootstrap and autoreconf are for
591         developers, and not lightly done in tarballs.
593 2006-09-20  Eric Blake  <ebb9@byu.net>
595         * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
596         deprecation warning on -e.
597         * doc/m4.texinfo (Invoking m4, Extensions): Document this.
598         * NEWS: Document this.
600 2006-09-19  Eric Blake  <ebb9@byu.net>
602         * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
603         -o/--error-output to --debugfile, and deprecate the former.  This
604         will allow a future release to be more consistent with other GNU
605         tools, with -o/--output affecting stdout, not debug.
606         * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
607         * NEWS: Document this.
609 2006-09-14  Eric Blake  <ebb9@byu.net>
611         * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
612         --diversions. `m4 --help --version' now displays help, not
613         version.
614         (interactive, frozen_file_to_read, frozen_file_to_write): Move to
615         smaller scope.
616         (show_help, show_version): No longer needed.
617         (long_options, DIVERSIONS_OPTION): Backport patch from head to
618         distinguish between -N and --diversions in warning.
619         * doc/m4.texinfo (Invoking m4): Document this.
620         * NEWS: Likewise.
622 2006-09-11  Eric Blake  <ebb9@byu.net>
624         * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
625         * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
626         seekable.
627         (debug_set_file): Use STDOUT_FILENO.
628         * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
629         with POSIX in regards to unread input.
630         * NEWS: Document this fix.
631         * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
633 2006-09-07  Eric Blake  <ebb9@byu.net>
635         * m4/gnulib-cache.m4: Update to newer gnulib-tool.
636         * src/m4.h (push_file): Change prototype.
637         * src/input.c (push_file, peek_input, next_char_1): Only call getc
638         once at EOF, to avoid double ^D on terminal stdin; regression from
639         2006-09-04.
640         (push_file, pop_file): Allow reading stdin twice.
641         * src/m4.c (main): Likewise.
642         * src/builtin.c (include): Update caller.
643         * NEWS: Document this change.
644         * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
645         (Syscmd): Add a test that failed before this patch.
647 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
649         * checks/check-them: Quote $pwd.
651 2006-09-05  Eric Blake  <ebb9@byu.net>
653         * src/builtin.c (define_macro): Warn on invalid macro name.
654         * NEWS: Document this change.
655         * doc/m4.texinfo: Fix typos.
656         (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
657         (Ifelse): Backport some improvements from head.
659 2006-09-04  Eric Blake  <ebb9@byu.net>
661         * doc/m4.texinfo (Changeword): Skip test on mingw, where the
662         native echo is braindead.
663         * checks/check-them (strip_needed): Ignore \r in output.  Now the
664         testsuite will pass when cross-compiling from cygwin to mingw.
666         * src/input.c (peek_input): Fix regression in handling macro
667         without arguments as last token in file; debian bug 385720.
668         (next_token): Always consume an input character.
669         Reported by Andreas Schultz.
670         * configure.ac (AC_INIT): Bump version number.
671         * NEWS: Document this fix.
672         * doc/m4.texinfo (History): Mention next version.
673         (Changeword): Add example that exposes this bug.
674         * THANKS: Update.
676 2006-08-25  Eric Blake  <ebb9@byu.net>
678         Release 1.4.6:
679         * configure.ac (AC_INIT): Bump version number.
680         * NEWS: Describe changes since 1.4.5.
682         * Makefile.maint (web-manual): Give up on VPATH build during
683         distribution.  But distributions are made so infrequently that
684         this is not too much of a hardship.
685         * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
686         exists.
688 2006-08-24  Eric Blake  <ebb9@byu.net>
690         * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
691         Solaris, produce output on just one argument.
692         (m4_regexp, m4_patsubst): For consistency, do likewise.
693         (m4_patsubst): Allow zero-length match at end of string.
694         * doc/m4.texinfo (Sysval): Fix overfull hbox.
695         (Bugs, Macro Arguments): Minor fixes.
696         (Other tokens): Rearrange node order.
697         (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
698         * NEWS: Document these fixes.
700 2006-08-22  Eric Blake  <ebb9@byu.net>
702         * src/input.c (pop_input): Avoid empty filename with -di option.
703         * src/debug.c (debug_message_prefix): Put space before message.
705         * m4/gnulib-cache.m4: We don't explicitly use alloca module.
707         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
708         * Makefile.maint (fetch): Simplify, now that we can use gnupload.
710         * checks/check-them: State why a test is skipped.
711         * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
713         * ChangeLog: Add copyright.
714         * AUTHORS: Likewise.
715         * BACKLOG: Likewise.
716         * README: Likewise.
717         * THANKS: Likewise.
718         * TODO: Likewise.
719         * examples/COPYING: New file, add copyright for all the examples.
720         * checks/get-them: Put copyright on testsuite files.
722 2006-08-18  Eric Blake  <ebb9@byu.net>
724         Don't let unrelated child processes see too many files.
725         * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
726         * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
727         spelling in error message.
728         * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
729         (debug_set_output): Close debug file on exec.
730         * src/m4.h (includes): Add cloexec.h.
731         * src/output.c (make_room_for): Close diversions on exec.
732         * src/path.c (path_search): Close include files on exec.
733         * NEWS: Document this.
735         Regular expressions were leaking memory.
736         * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
737         helper methods.
738         (m4_regexp, m4_patsubst): Avoid memory leak.
739         * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
740         static.
741         (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak.  Change
742         from O(n^2) to O(n) for calculating word_start.
743         (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
744         O(1) bitmap, not O(n) search string.
745         * NEWS: Document this fix.
747 2006-08-17  Eric Blake  <ebb9@byu.net>
749         * NEWS: Document previous checkin.
751         * src/builtin.c (substitute): Avoid core dump when accessing
752         beyond bound of regular expression.
753         Reported by Karl Nelson.
754         * doc/m4.texinfo (Regexp): Add example that causes core dump on
755         some architectures prior to this patch.
756         * THANKS: Updated.
758 2006-08-16  Eric Blake  <ebb9@byu.net>
760         * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
761         clear that dumpdef does not always go to stderr.
763         * src/builtin.c (m4_errprint): Flush buffers before printing to
764         stderr.
765         * THANKS: Updated.
767 2006-08-15  Eric Blake  <ebb9@byu.net>
769         * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
770         per debian bug 96075.
771         * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
772         (Changeword): Don't use shift as an example of a swallowed word.
773         (Divert): Discuss fact that divert is an English word.
774         Reported by Richard A Nelson.
776 2006-08-14  Eric Blake  <ebb9@byu.net>
778         * doc/m4.texinfo (Invoking m4): Minor fixes.
780 2006-08-12  Eric Blake  <ebb9@byu.net>
782         * doc/m4.texinfo (Arguments): Hint at better exch macro.
783         (Answers): Provide a better definition.
785 2006-08-09  Eric Blake  <ebb9@byu.net>
787         * doc/m4.texinfo (Incompatibilities): Document that m4 does not
788         yet understand locales.
789         * NEWS: Fix wording of a few items.
791 2006-08-08  Eric Blake  <ebb9@byu.net>
793         Avoid printing `NONE:0:' in error messages.
794         * src/m4.h (m4_error_at_line): New function.
795         * src/m4.c (m4_error_at_line): Implement.
796         * src/input.c (skip_line, input_init, next_token): Use "", not
797         "NONE", for no file, since NONE can be a real file name.
798         * src/macro.c (expand_argument): Likewise.
799         * src/debug.c (debug_message_prefix, trace_header): Check for
800         current file.
801         * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
802         (Location): Document that synclines and internal message format
803         are not impacted by redefining these macros.
804         (M4exit): Hint at bug in fatal_error.
805         (Answers): Provide workaround to match m4 output.
807         * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
808         * src/m4.h (m4_error): New function.
809         (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
810         error module deficiencies.
811         (reference_error, suppress_line): No longer needed.
812         * src/m4.c (m4_error): Implement.
813         (main): No longer need to install error callback.
815 2006-08-04  Eric Blake  <ebb9@byu.net>
817         * src/m4.h (program_name): Declare.
818         (suppress_line): New variable.
819         (M4ERROR_AT_LINE): New macro.
820         * src/m4.c (reference_error, main): Follow GNU Coding Standards
821         for error message format.
822         * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
823         * src/macro.c (expand_argument): Likewise.
824         * checks/check-them (examples): Adjust to new message format.
825         * src/builtin.c (m4___program__): New builtin.
826         * doc/m4.texinfo (Location): Split from Errprint into new node,
827         and document __program__.
828         (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
829         (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
830         format.
831         (Extensions): Document __program__.
832         * NEWS: Document this change.
834 2006-08-03  Eric Blake  <ebb9@byu.net>
836         Don't confuse leading `(' in comment or quote with start of
837         argument collection.
838         * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
839         TOKEN_CLOSE.
840         (peek_input): Make private to input.c.
841         (peek_token): New prototype.
842         * src/input.c (default_word_regexp): Reduce ifdefs.
843         (peek_input): Make static.
844         (next_token): Return new token types.
845         (match_input, MATCH): Add argument consume, which controls
846         whether match should be pushed back.
847         (peek_token): New function.
848         (token_type_string) [DEBUG_INPUT]: New function.
849         * src/macro.c (expand_token, expand_argument, collect_arguments):
850         Handle new token types.
851         * doc/m4.texinfo (Changequote, Changecom): Document this.
852         * NEWS: Document this.
854         * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
856         * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
857         overflow detection when sigstack exists but is not implemented.
858         Fixes debian bug 154053.
859         * THANKS: Updated.
860         Reported by David Perlin.
862 2006-08-02  Eric Blake  <ebb9@byu.net>
864         * src/input.c (MATCH): Fix EOF detection on multi-byte comment
865         close.
867 2006-08-01  Eric Blake  <ebb9@byu.net>
869         * src/input.c (skip_line, next_token): Remember current file in
870         case input file ends abruptly.  Addresses debian bug 175365.
871         (pop_input): Defer freeing storage that holds previous file
872         name...
873         (pop_wrapup): to here, after error message is issued.
874         * src/macro.c (expand_argument): Remember current file in case
875         input file ends abruptly.
876         * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
877         (M4wrap): Adjust testsuite accordingly.
878         (Errprint): Document line number limitation of m4wrap.
879         * NEWS: Document this fix.
880         * THANKS: Update.
882 2006-07-31  Eric Blake  <ebb9@byu.net>
884         * src/input.c (peek_input, next_char, match_input): Be eight-bit
885         clean; fixes debian bug 311378.
886         * doc/m4.texinfo (Syntax): Describe eight-bit handling.
887         (Changequote, Changecom): Add examples to test this.
888         * NEWS: Document this fix.
889         * THANKS: Update.
890         Reported by Steven Augart.
892         * doc/m4.texinfo: Whitespace fix.
893         * checks/get-them: Avoid exceeding 14-char file name limit.
894         * THANKS: Update.
896 2006-07-30  Eric Blake  <ebb9@byu.net>
898         * src/path.c (path_search): Detect allocation failure.
900         Use native free when it is good enough.
901         * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
902         * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
903         Adjust calls.
904         * src/symtab.c (free_symbol): Likewise.
905         * src/m4.c (xfree, main): Likewise.
906         * src/m4.h (obstack_chunk_free): Likewise.
907         * src/path.c (path_search): Likewise.
908         * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
910         * doc/m4.texinfo (Errprint): Add example for last patch.
911         * checks/check-them: Account for VPATH in latest example.
913 2006-07-29  Eric Blake  <ebb9@byu.net>
915         * src/path.c (path_search): Add result parameter, so that
916         -I can be accounted for.  Debian bug 53685.
917         * src/m4.h (path_search): Update prototype.
918         * src/m4.c (main): Adjust callers.
919         * src/freeze.c (reload_frozen_state): Likewise.
920         * src/builtin.c (include, m4_undivert): Likewise.
921         * NEWS: Document this change.
922         Reported by Nicolas Lichtmaier.
924 2006-07-28  Eric Blake  <ebb9@byu.net>
926         * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
927         several non-GNU makes.
928         * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
929         * src/m4.h: Likewise.
930         * src/input.c (push_wrapup): Avoid compiler warning with Solaris
931         /usr/ccs/bin/ucbcc.
933 2006-07-27  Eric Blake  <ebb9@byu.net>
935         * doc/m4.texinfo: Use @acronym{GNU} throughout.
936         (History): Update for 1.4.6.
938         * src/m4.h (_): Remove K&R cruft.
939         * src/builtin.c: Likewise.
940         * src/debug.c: Likewise.
941         * src/eval.c: Likewise.
942         * src/macro.c: Likewise.
943         * src/stackovf.c: Likewise.
945         * doc/Makefile.am (m4.1): Improve man page.
946         * src/m4.c (usage): Improve --help output, including adding the
947         bug reporting address.
948         (main): Follow GNU Coding Standards for --version output.
950 2006-07-26  Eric Blake  <ebb9@byu.net>
952         * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
953         end-comment consistently, to match POSIX.
955         * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
956         (Dnl, M4wrap, Include): Document EOF issues, and add examples.
957         (Incompatibilities): Document incompatibility of changecom
958         vs. macro names, and of EOF in include.
959         * src/input.c (next_token): Reject unterminated comments at EOF.
960         (skip_line): Warn on unterminated dnl at EOF.
961         * NEWS: Document these changes.
963 2006-07-25  Eric Blake  <ebb9@byu.net>
965         * m4/gnulib-cache.m4: Update to reflect gnulib's split of
966         stdio-safer into fopen-safer and tmpfile-safer.
967         * src/m4.c: Remove redundant include.
969 2006-07-24  Eric Blake  <ebb9@byu.net>
971         Fix bugs related to stream handling.
972         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
973         unlocked-io stdio-safer stdlib-safer close-stream.
974         * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
975         provided by gnulib if needed.
976         * src/output.c [! HAVE_TMPFILE]: Likewise.
977         * src/m4.h (includes): Replace unistd, stdio, and stdlib with
978         their safer counterparts.
979         (retcode): New global variable.
980         * src/input.c (pop_input): Check for read failure.
981         * src/freeze.c (reload_frozen_state): Likewise.
982         (produce_frozen_state): Check for write failure.
983         * src/debug.c (debug_set_file): Likewise.
984         * src/m4.c (usage, main): Likewise.
985         (retcode): Make global.
986         * src/builtin.c (m4_m4exit): Likewise.  Ensure that the exit
987         status is non-zero except when everything succeeds.
988         * doc/m4.texinfo (M4exit): Document these changes.
989         (Incompatibilities): Remove documentation of bug now fixed.
990         * NEWS: Document these fixes.
992 2006-07-22  Eric Blake  <ebb9@byu.net>
994         * src/format.c (format): Avoid compiler warning that str may be
995         used uninitialized.
997 2006-07-21  Eric Blake  <ebb9@byu.net>
999         * src/m4.h [UNIX]: Add more platforms that are close enough to
1000         categorize as UNIX, but which don't predefine __unix__.
1001         Reported by Nelson H. F. Beebe.
1003 2006-07-20  Eric Blake  <ebb9@byu.net>
1005         * m4/gnulib-cache.m4: gnulib-tool has changed again.  Regenerate
1006         to explicitly ask for --assume-autoconf=2.60.
1008 2006-07-19  Eric Blake  <ebb9@byu.net>
1010         * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
1011         and exits normally with 129.
1012         Reported by Nelson H. F. Beebe.
1013         * THANKS: Update.
1015         * src/m4.h (EXIT_MISMATCH): Define.
1016         * src/freeze.c (reload_frozen_state): Detect version mismatch, by
1017         exiting with status 63.
1018         * src/m4.c (usage): Document this.
1019         * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
1020         * NEWS: Likewise.
1022         * doc/m4.texinfo (copying): Relax restriction on front-cover and
1023         back-cover texts.
1025 2006-07-17  Eric Blake  <ebb9@byu.net>
1027         * src/format.c (format): Support F, g, and G specifiers.
1028         * doc/m4.texinfo (Format): Document this.
1029         * NEWS: Document this addition.
1031         * doc/m4.texinfo (Builtin): Delete redundant text.
1033         * configure.ac (AC_INIT): Bump version number.
1034         * src/builtin.c (substitute): Bah.  Fix buffer overrun.
1035         * NEWS: Document this fix.
1037 2006-07-15  Eric Blake  <ebb9@byu.net>
1039         Release 1.4.5:
1040         * configure.ac (AC_INIT): Bump version number.
1041         * NEWS: Describe changes since 1.4.4.
1043         * src/m4.c (usage): Document exit status.
1044         * doc/m4.texinfo: Use `exit status', not `exit code'.
1045         (Invoking m4): Document exit status.
1047         * bootstrap: Backport --help, --version from head.
1048         (func_update): New function, for easily grabbing up-to-date files
1049         from gnulib.
1050         * Makefile.maint (web-manual): Fix for VPATH builds.
1052 2006-07-14  Eric Blake  <ebb9@byu.net>
1054         * doc/m4.texinfo: Global cleanup.  Avoid @code{...}'d, as it
1055         looks bad in info.  Use @deffn rather than @example for
1056         describing prototypes.  Fix awkward wording and grammar.
1058         * src/builtin.c (substitute): Warn on bad escape sequences.
1059         Ignore trailing backslash.
1060         * doc/m4.texinfo (Regexp): Add documentation for this.
1061         * NEWS: Document this change.
1063         * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
1064         * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
1065         more examples.
1066         (Dnl): Update example to show side effects.
1067         * checks/get-them: Generate three digit test names.
1068         * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
1070 2006-07-13  Eric Blake  <ebb9@byu.net>
1072         * src/input.c (input_init): Simplify.
1073         (set_word_regexp): Treat empty string as default, since empty
1074         regexp would disable word parsing.
1075         * src/m4.c (user_word_regexp): Default to empty string.
1076         * src/builtin.c (builtin_tab): Make changeword blind.
1077         * doc/m4.texinfo (Changeword): Document this.
1078         * NEWS: Document this.
1079         * TODO: Knock off completed items.
1081         * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
1082         just the first.
1083         * doc/m4.texinfo (Undefine, Pushdef): Test this.
1084         * NEWS: Document this change.
1086         * src/builtin.c (numeric_arg): Treat empty string as 0, with a
1087         warning.  Detect quoted leading space and overflow as warnings.
1088         (m4_eval): Treat empty radix as 10, and allow output in radix 1.
1089         Treat width as minimum number of digits, as required by POSIX.
1090         (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
1091         arguments.
1092         (m4_substr): Likewise.  Silently treat empty start as 0.
1093         (m4_undivert): Treat ` 1a' as file, not diversion 1.
1094         * src/eval.c (eval_lex): Parse radix 1 numbers.
1095         * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
1096         one type of warning.
1097         (Manual): Document behavior of numeric parsing of empty string.
1098         (Divert, Incr): Document error handling.
1099         (Eval): Document radices better.
1100         (Incompatibilities): Document translit incompatibility.
1101         * NEWS: Document these changes.
1103         * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
1104         (web-manual): Simplify.
1105         * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
1106         * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
1107         (MAINTAINERCLEANFILES): Clean it as well.
1108         * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
1109         (MAINTAINERCLEANFILES): Clean it as well.
1111 2006-07-12  Eric Blake  <ebb9@byu.net>
1113         * doc/m4.texinfo (Extensions): Document how to overcome
1114         implementation difference in > 9 positional parameters.
1116         * src/m4.c (usage): Sort within sections.
1117         (nesting_limit): Raise default from 250 to 1024.
1118         * doc/m4.texinfo: Use file name, not filename, per GNU coding
1119         standard.  Use @option where appropriate.
1120         (Invoking m4): Sort to match --help output.
1121         (Debug Levels): Sort.
1122         (Frozen files): Sort and break into two nodes.
1124         * src/m4.c (nesting_limit): Raise default from 250 to 1024.
1125         * NEWS: Document raised -L limit.
1127 2006-07-11  Eric Blake  <ebb9@byu.net>
1129         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
1130         stress-test changeword before a release.
1131         * doc/m4.texinfo: More doc cleanups.
1132         (Copying This Manual): New node; actually include the FDL in the
1133         documentation.
1134         * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
1135         * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
1136         * NEWS: Mention documentation improvements.
1138         * src/m4.h (OS2): New platform macro.
1139         * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
1140         platform macro.
1141         * doc/m4.texinfo (Platform macros): Document it.
1142         (Sysval): Remove non-portable test of system("").
1143         * NEWS: Document this change.
1144         Reported by Andreas Buening.
1146 2006-07-09  Eric Blake  <ebb9@byu.net>
1148         * doc/m4.texinfo (Undivert): Fix typo in last commit.
1149         * src/m4.c (usage): Document M4PATH.
1150         * src/path.c (path_search): Reject empty string.
1151         * src/output.c (insert_diversion): Ignore diversion 0.
1152         * src/builtin.c (m4_undivert): Ignore empty string.
1153         * NEWS: Document this fix.
1155 2006-07-08  Eric Blake  <ebb9@byu.net>
1157         * checks/get-them: Make filtering easier.
1158         * checks/check-them: Filter non-input lines, so line counts are
1159         more realistic in the documentation, and so changeword tests work
1160         even when dnl is disabled.
1161         * doc/m4.texinfo: Adjust example line numbers.  Clean up
1162         front-matter, following autoconf's example.
1163         (Changeword): Enable tests, skipping if changeword not supported.
1164         (Define, Defn, Ifelse): Backport more examples from head.
1165         (Input processing, Answers): New nodes, backported from head.
1166         (Include): Expand test to cover empty filename.
1167         (Undivert): Add test of undivert(0).
1169 2006-07-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1171         * doc/m4.texinfo: Fix spelling errors.
1173 2006-07-07  Eric Blake  <ebb9@byu.net>
1175         * THANKS: Update.
1177         * doc/Makefile.am (m4.1): No need to go through a temporary file;
1178         this also ensures timestamps are updated.
1179         * src/m4.h (includes): Require config.h.  Assume string.h,
1180         stdlib.h, errno.  Include error.h, exit.h, and xalloc.h rather
1181         than prototyping ourselves.
1182         (builtin_func): Add parameter type-checking.
1183         (voidstar): Delete, now that we assume C89.
1184         * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1185         voidstar changed.
1186         * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1187         xfree.
1189 2006-07-06  Eric Blake  <ebb9@byu.net>
1191         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1192         binary-io.
1193         * src/m4.h (includes): Add binary-io.h for O_BINARY.
1194         * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1195         #ifdef.  Fixes patch from 2005-02-03 for cygwin.
1196         * NEWS: Mention this fix.
1198         * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1199         * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1201         * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1202         runs first when needed.
1203         * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1204         once in srcdir rather than multiple times in VPATH builds.
1206 2006-07-03  Eric Blake  <ebb9@byu.net>
1208         * checks/check-them: Use portable = in test.
1209         * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1210         directory, as required by Solaris cc.  Include built headers, as
1211         required by Solaris make in VPATH build.
1212         * checks/Makefile.in: Use $(srcdir) where needed.
1213         (CHECKS): Factor $(srcdir) into macro.
1214         (DISTFILES): Likewise.  Automake takes care of distributing
1215         Makefile.in.
1216         (dist): Simplify.
1217         (Makefile): Use modern syntax of config.status.
1218         * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1219         Avoid overfull and underfull hboxes in dvi.
1221         Fix 'make check' in VPATH build.  All files included by testsuite
1222         now live in a single directory.  Use forloop.m4 in testsuite.
1223         * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1224         here...
1225         * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1226         here.
1227         * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1228         * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1229         * checks/check-them: Avoid s/// when filename is in pattern.
1230         * examples/forloop.m4: Fix to match documentation.
1231         * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1232         new locations.
1233         (Loops, Format): Actually use forloop.m4 in tests.
1235 2006-07-02  Eric Blake  <ebb9@byu.net>
1237         * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1238         $(bindir) works in installcheck.
1239         (check, installcheck): No longer change directory, so that
1240         distcheck works with a read-only builddir.
1241         * checks/check-them: Work when pwd is no longer builddir.
1243 2006-07-01  Eric Blake  <ebb9@byu.net>
1245         * GNUmakefile: New file, borrowed from coreutils.
1246         * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1247         * Makefile.maint (Makefile): Delete this rule, now that
1248         GNUmakefile includes Makefile.
1250 2006-06-30  Eric Blake  <ebb9@byu.net>
1252         For compatibility with other m4 implementations, sysval returns
1253         signal<<8 rather than 0 if syscmd is terminated by a signal.
1254         * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1255         * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1256         not provide wait macros.
1257         (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1258         (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1259         (m4_esyscmd): Set sysval to -1 on failure.
1260         (m4_sysval): Print 127 on failure, and accomodate signals if they
1261         are detectable.
1262         * NEWS: Document this change.
1263         * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1264         last commit.
1265         * checks/check-them: Likewise.
1266         * src/debug.c (debug_set_file): Work around mingw fstat bug.
1268         * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1269         * src/freeze.c (produce_frozen_state): Use new spelling of
1270         platform macro.
1271         * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1272         platforms.
1273         (m4_syscmd, m4_esyscmd): The empty command is successful.
1274         * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1275         Document platform-dependence of system().
1276         (Syscmd): Add example.
1277         (Esyscmd): Make example more robust, and actually demonstrate
1278         rescanning.
1279         (Sysval): Expand test to cover esyscmd code path, and to check
1280         that empty command is successful.  Add conditional check for
1281         signal behavior.
1282         (Other Incompatibilities): Move platform macros from here...
1283         (Platform macros): ...to this new node.  Add windows macro.
1284         Check that exactly one platform macro is provided.
1285         * checks/check-them: Improve trap cleanup.  Tolerate dirname and
1286         .exe in error messages.  Allow for skipping checks.
1287         * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1288         * NEWS: Document platform macros.
1290 2006-06-29  Eric Blake  <ebb9@byu.net>
1292         Fix buffer overrun bug.
1293         * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1294         xvasprintf.
1295         * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1296         variant instead, since [efg]cvt are obsolete and our use of them
1297         was buggy (savannah sr #104303).
1298         (format): Fix buffer overflow by using xasprintf.
1299         * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1300         * NEWS: Document this fix.
1302         * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1303         cross-compilation.
1304         (AC_CACHE_CHECK): Cache search for ecvt.
1306 2006-06-27  Eric Blake  <ebb9@byu.net>
1308         * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1309         required by POSIX, and add example that exposed core dump on x86
1310         architectures.
1311         (Incompatibilities): Document incompatibility in eval precedence.
1312         * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1313         behavior.
1314         (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1315         * NEWS: Document this change.
1317         * doc/m4.texinfo: Use @noindent consistently.
1318         (Quoting Arguments): Document that unquoted parentheses group
1319         arguments.
1320         (Pseudo Arguments): Expand tests to show this.
1321         (Incompatibilities): Contrast traditional behavior of
1322         changequote.
1324 2006-06-24  Eric Blake  <ebb9@byu.net>
1326         * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1327         (AC_CHECK_HEADERS_ONCE): Use this new feature.
1328         (AC_CHECK_FUNCS_ONCE): Likewise.
1330 2006-06-23  Eric Blake  <ebb9@byu.net>
1332         * doc/m4.texinfo: Quoting cleanup throughout - follow
1333         autoconf-recommended style of one level of quote per parenthesis
1334         in the normal case.  Adjust error messages to match GNU coding
1335         standards (and to allow 'make check' to pass again).
1336         (Quoted strings, Inhibiting Invocation): Turn more examples into
1337         tests.
1338         (Comments): Resolve FIXME by adding example.
1339         (Define): Add example about underquoting.
1340         (Defn): Add example about use of $0.
1341         (Indir, Format): Resolve FIXME done in last commit.
1342         (Ifelse): Add example about creating blind macro.
1343         (Debugging): Fix grammar.
1344         (Dnl): Add example about dnl with arguments.
1345         (M4wrap): Be explicit that LIFO order is non compliant, and will
1346         change in m4 2.0.
1347         (Undivert): Resolve FIXME by adding example.
1348         (Frozen files): Document that m4wrap and sysval will not work
1349         consistently until m4 2.0.
1350         (Incompatibilities): Document another POSIX compliance bug, this
1351         time with changequote.  Document a traditional incompatibility
1352         with partial input spanning file boundaries.
1354         Make error messages more consistent with GNU coding standards -
1355         start with lower case, and don't end sentence with punctuation.
1356         * src/debug.c (trace_pre): Update message wording.
1357         * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1358         Likewise.
1359         * src/freeze.c (produce_frozen_state, issue_expect_message),
1360         (reload_frozen_state): Likewise.
1361         * src/input.c (push_string_init, pop_init, init_macro_token),
1362         (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1363         * src/m4.c (stackovf_handler, main): Likewise.
1364         * src/macro.c (expand_token, expand_argument, call_macro),
1365         (expand_macro): Likewise.
1366         * src/output.c (make_room_for, output_text, insert_file),
1367         (freeze_diversions): Likewise.
1368         * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1370         * src/builtin.c (builtin_tab): Make format and indir blind.
1371         (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1372         * NEWS: Mention the change to builtins.
1374 2006-06-22  Eric Blake  <ebb9@byu.net>
1376         Robustify frozen file format.
1377         * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1378         macro.  Require V first, and only accept it once.  For F, use
1379         placeholder if builtin is not found, rather than warning.
1380         * src/m4.h (m4_placeholder): New prototype.
1381         * src/builtin.c: Unify error message style.
1382         (m4_placeholder): New function, warn if invoked.
1383         (builtin_tab): Add m4_placeholder.
1384         (m4_defn): Warn if placeholder is encountered.
1385         (find_builtin_by_addr): Handle placeholder.
1386         (find_builtin_by_name): Return placeholder on failure.
1387         (m4_builtin): Treat placeholder as undefined.
1388         * doc/m4.texinfo (Frozen files): Document changes in V and F.
1389         * NEWS: Document this change.
1390         Reported by Bruno Haible.
1392         * doc/m4.texinfo: Whitespace cleanup.  TABs are evil in texinfo.
1393         (tabchar): New macro, so that 'make check' still works.
1394         (Invoking m4): Document that ignored compatibility options -B, -S,
1395         and -T each consume an argument.
1396         * checks/get-them: Honor @tabchar{}.
1398         Avoid compiler warnings during -DDEBUG.
1399         * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1400         [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1401         * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1402         (lex_debug) [DEBUG_INPUT]: Fix to compile.  Mark unused.
1403         (next_token) [DEBUG_INPUT]: Print before returning.
1404         * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1405         * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1407         Avoid mkstemp bugs on various platforms.
1408         * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1409         * src/output.c [! HAVE_MKSTEMP]: Delete.
1410         * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1411         * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1412         * NEWS: Document this.
1414         * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1415         Reported by Bruno Haible.
1417 2006-06-21  Eric Blake  <ebb9@byu.net>
1419         Avoid obsolete sigstack when POSIX sigaltstack is available.
1420         * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1421         do likewise.
1422         * configure.ac (AC_CHECK_HEADERS): Likewise.
1423         (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1424         obsolete and most hosts now have it in signal.h.
1425         (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1426         (AC_CACHE_CHECK): Cache decision to use stackovf.
1427         (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1428         * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1429         (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1430         simplify later code.
1431         (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1432         in case of dereferencing a member of a NULL pointer.
1433         (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1434         POSIX handler.
1435         (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1436         EXIT_FAILURE in error, indent preprocessor directives.
1437         [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1438         siginfo.h.
1439         [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1440         Reported by Santiago Vila.
1442 2006-06-19  Eric Blake  <ebb9@byu.net>
1444         * THANKS: Update.
1446 2006-06-18  Andreas Buening  <andreas.buening@nexgo.de>  (tiny change)
1448         * checks/Makefile.in (PATH_SEPARATOR): New macro.
1449         (check, installcheck): Use it, for OS/2.
1451 2006-06-18  Eric Blake  <ebb9@byu.net>
1453         Consistently use "GNU M4" as package name, "m4" as executable
1454         name.
1455         * NEWS: Document previous fix.
1456         * THANKS: Update.
1457         * README: Fix grammar.  Document that --enable-changeword is on
1458         its last leg.
1459         * doc/m4.texinfo (Top, Changeword): Likewise.
1460         (Sysval): Enhance this test.
1461         (History): Backport this section from CVS head, and update.
1463 2006-06-18  Bruno Haible  <bruno@clisp.org>  (tiny change)
1464             Eric Blake  <ebb9@byu.net>
1466         * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1467         (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1468         big-endian and little-endian wait status definitions.
1469         (m4_sysval): Use WEXITSTATUS.
1470         Reported by Andreas Buening.
1472 2006-06-18  Eric Blake  <ebb9@byu.net>
1474         * configure.ac (AC_INIT): Bump version number.
1475         * NEWS: Describe changes in 1.4.4c.
1477 2006-06-17  Eric Blake  <ebb9@byu.net>
1479         Beta Release 1.4.4b:
1480         * configure.ac (AC_INIT): Bump version number.
1481         * NEWS: Describe changes since 1.4.4.
1482         * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1484         * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1485         bootstrap.
1486         * checks/Makefile.in (maintainer-clean): Add missing target.
1487         * COPYING: Remove generated file from CVS.
1489 2006-06-16  Eric Blake  <ebb9@byu.net>
1491         * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1493 2006-06-15  Eric Blake  <ebb9@byu.net>
1495         * checks/wrapfifo.m4: New file.  Use it...
1496         * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1497         demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1499         * src/m4.h (to_uchar): New function.
1500         * src/eval.c (eval_lex): Use it to avoid passing signed char to
1501         isdigit, isalpha, isupper, islower, isspace, isalnum.
1502         * src/builtin.c (expand_user_macro): Likewise.
1503         * src/format.c (format): Likewise.
1504         * src/macro.c (expand_argument): Likewise.
1505         * NEWS: Document this security fix.
1507         Message cleanup.
1508         * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1509         * src/freeze.c (reload_frozen_state): Fix typo in message.
1510         (produce_frozen_state): Standardize on builtin, not built-in.
1511         * src/builtin.c (numeric_arg, bad_argc): Likewise.
1513         * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1514         (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1515         (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1516         gnulib.
1517         * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1518         * m4/gnulib-cache.m4: New file, from gnulib.
1519         * bootstrap: Invoke gnulib-tool --update.
1520         * src/m4.c (main): Cast away const.
1521         * NEWS: Document that regex is updated.
1522         * THANKS: Update.
1524 2006-06-08  Eric Blake  <ebb9@byu.net>
1526         * configure.ac (changeword): Work even when changeword is not a
1527         macro.
1528         (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1529         Delete; now done by automake.
1530         (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1532 2006-06-07  Eric Blake  <ebb9@byu.net>
1534         * lib/regex.c (bcmp_translate): Canonicalize type name.
1535         * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1536         * configure.ac (changeword): Disable changeword for the creation
1537         of configure, in case of bootstrapping with an m4 configured with
1538         --enable-changeword.
1540         Distribute a rudimentary man page.
1541         * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1542         can feed help2man.
1543         * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1544         (SUFFIXES, m4.1): New macros and rules to build m4.1.
1546 2006-06-06  Eric Blake  <ebb9@byu.net>
1548         * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1549         compiler warnings at -O2.
1550         * lib/getopt.c (_getopt_internal): Likewise.
1552         Cleanup of previous patches.
1553         * src/input.c (struct input_block): Remove traced member.
1554         (push_macro, init_macro_token): Don't pass trace status around.
1555         * src/m4.h (struct token_data): Remove traced member.
1556         (struct symbol, struct builtin): Reduce unused space.
1557         (TOKEN_DATA_FUNC): Simplify.
1558         (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1559         (push_macro, define_builtin): Remove unused parameter.
1560         * src/builtin.c (define_builtin, builtin_init, define_macro),
1561         (m4_defn): Don't pass trace status around.
1562         * src/macro.c (expand_argument): Likewise.
1563         * src/freeze.c (reload_frozen_state): Likewise.
1564         * src/symtab.c: Whitespace cleanup.
1565         * NEWS: Clean up wording.
1566         * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1567         ensure tests actually expose bugs prior to today's patches.
1569         Trace status of builtins is no longer inherited across
1570         define(...,defn(...)).  Fixes bug that autom4te had been working
1571         around.
1572         * src/builtin.c (define_builtin): Don't override trace status.
1573         * doc/m4.texinfo (Trace): Add test for this.
1574         * NEWS: Document this.
1576         When changing macro definitions inside the arguments to the macro,
1577         consistently preserve the old definition that was in effect before
1578         argument collection, similar to the C pre-processor.
1579         Reported by John Brzustowski.
1580         * NEWS: Document this change.
1581         * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1582         this policy, and add tests that expose core dumps prior to this
1583         patch.
1584         * src/m4.h (struct symbol): New members to track when a symbol is
1585         still in use after removal from the symbol table.
1586         (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1587         (free_symbol): Prototype.
1588         * src/macro.c (expand_macro): Track pending expansions of a
1589         symbol.  On completion, if a symbol is deleted and no longer
1590         pending, free its memory.
1591         * src/symtab.c (free_symbol): Export.  Don't free memory if symbol
1592         is still in use.
1593         (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1594         is still in use.
1595         (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1596         in use as deleted and remove from the table without freeing
1597         memory.
1598         (symtab_print_list) [DEBUG_SYM]: More debug output.
1600         * src/symtab.c (hack_all_symbols): Allow certain modifications of
1601         the symbol table during traversal.
1602         * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1603         SYMBOL_POPDEF, since only the latter is safe with
1604         hack_all_symbols.
1606         Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1607         * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1608         Preserve placeholder when macro is being traced.
1609         * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1610         symbol is not defined.
1611         (set_trace): Remove placeholder when no longer traced.
1612         (m4_traceon): On named traces, always reserve a slot in the
1613         symbol table.
1614         (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1615         * NEWS: Document new trace behavior.
1616         * doc/m4.texinfo (Trace): Tracing by name now consistently works
1617         no matter whether that macro is currently defined.
1618         (Incompatibilities): Document differences between traditional and
1619         GNU trace.
1621 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1622             Eric Blake  <ebb9@byu.net>
1624         * src/m4.h (hash_table_size): Now size_t instead of int.
1625         * src/m4.c (hash_table_size): Likewise.
1626         (main): Adjust to this; use atol rather than atoi.
1627         * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1628         (symtab_init, lookup_symbol, hack_all_symbols):
1629         Use size_t for sizes and indexes, not int.
1630         (symtab_print_list) [DEBUG_SYM]: Likewise.
1631         (hash): Likewise.  Don't case-fold in the hash function.
1632         Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1633         Don't assume hash word is 32 bits.
1634         * NEWS: Document this change.
1636 2006-06-04  Eric Blake  <ebb9@byu.net>
1638         * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1639         to allow compilation, for use in debugger.
1640         (profiles, current_mode) [DEBUG_SYM]: New variables.
1641         (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1642         determining hash table performance.
1644 2006-05-31  Eric Blake  <ebb9@byu.net>
1645             John Brzustowski  <jbrzusto@fastmail.fm>
1647         * src/input.c (input_stack): Delete; use current_input instead.
1648         (wrapup_stack): Dynamically allocate, so that recursion is handled
1649         properly.
1650         (push_wrapup): Use current wrapup stack.
1651         (pop_wrapup): Rotate wrapup stack to current, and create new
1652         wrapup stack.
1653         (input_init): Dynamically allocate stacks.
1654         * NEWS: Update, now that recursive m4wrap can no longer cause
1655         core dump.
1657 2006-05-31  Eric Blake  <ebb9@byu.net>
1659         * lib/getopt.c: Fix copyright year.
1660         * lib/obstack.c: Ditto.
1661         * src/builtin.c: Ditto.
1663 2006-05-30  Eric Blake  <ebb9@byu.net>
1665         * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
1666         Reported by John Brzustowski.
1667         (Incompatibilities): Document known POSIX incompatibilities.
1668         * THANKS: Update.
1670 2006-05-29  Eric Blake  <ebb9@byu.net>
1672         * doc/m4.texinfo (Maketemp): Work even when running 'make check'
1673         in read-only dir.
1675         Use automake.
1676         * Makefile.am: New file.
1677         * doc/Makefile.am: Ditto.
1678         * examples/Makefile.am: Ditto.
1679         * lib/Makefile.am: Ditto.
1680         * src/Makefile.am: Ditto.
1681         * acinclude.m4: New file, renamed from aclocal.m4.
1682         * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
1683         (AC_ARG_PROGRAM): Now redundant.
1684         (STACKOVF): Turn into automake conditional.
1685         (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
1686         * checks/Makefile.in: Converting this dir to automake was not
1687         trivial; for now, just add missing targets demanded by top-level.
1688         * INSTALL: Remove files that are now generated from CVS.
1689         * Makefile.in: Ditto.
1690         * aclocal.m4: Ditto.
1691         * install-sh: Ditto.
1692         * mkinstalldirs: Ditto.
1693         * doc/Makefile.in: Ditto.
1694         * doc/texinfo.tex: Ditto.
1695         * examples/Makefile.in: Ditto.
1696         * lib/Makefile.in: Ditto.
1697         * src/Makefile.in: Ditto.
1699         * AUTHORS: Backport from CVS head, and update.
1700         * doc/m4.texinfo (Changeword): Fix examples to match behavior.
1702 2006-05-27  Eric Blake  <ebb9@byu.net>
1704         * lib/regex.c (regex_compile): Kill compiler warnings.
1705         * lib/getopt.c: Likewise.
1706         * lib/obstack.c: Likewise.
1707         * src/builtin.c (builtin_init): Likewise.
1708         * src/path.c (path_search): Likewise.
1710         * doc/m4.texinfo: Fix usage of a vs. an.
1711         (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
1712         overfull hbox warnings.
1713         (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
1715         * configure.ac: Update to autoconf 2.59.  Forbid ^M4_.  Fix
1716         quoting.
1717         * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
1718         (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
1719         assume C89.
1720         (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
1721         * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
1722         * src/Makefile.in: Delete remains of ansi2knr.
1723         * src/ansi2knr.1: Delete.
1724         * src/ansi2knr.c: Delete.
1726 2006-05-25  Eric Blake  <ebb9@byu.net>
1728         * doc/m4.texinfo: Fix spelling errors.  Use `invalid' instead of
1729         `illegal'.
1731         * doc/m4.texinfo (Francois): No longer needed as a tex variable.
1732         Reported by Karl Berry.
1734 2006-05-24  Eric Blake  <ebb9@byu.net>
1736         * Makefile.in (html): New target.
1737         * doc/Makefile.in (html, m4.html): Likewise.
1738         (MAKEINFOHTML): New macro.
1739         * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
1740         rendering.
1741         (Regexp) [ifhtml]: Make cross-reference to emacs manual an
1742         absolute URL.
1743         Reported by Bob Badour.
1745         * THANKS: Update.  Move reporter's email addresses here, instead
1746         of in ChangeLog.
1748 2006-05-11  Eric Blake  <ebb9@byu.net>
1750         * THANKS: Update.
1751         * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
1752         patched on 2005-12-04.
1753         Reported by Ilya N. Golubev.
1755         * bootstrap: New file, so that generated files need not be stored
1756         in CVS.
1757         * Makefile.in (DISTFILES): Add bootstrap.
1759         Make testsuite less sensitive to doc changes.
1760         * doc/m4.texinfo: Use m4.input instead of filename.
1761         * checks/check-them (xerr): Turn m4.input into filename.
1762         * checks/Makefile.in (dist): Depend on stamp-checks.
1764         Portability updates for OS/2.
1765         * src/Makefile.in (EXEEXT, OBJEXT): Define.
1766         (LINK): Use CFLAGS.
1767         (.c.obj): Define.
1768         * lib/Makefile.in (OBJEXT): Define.
1769         (.c.obj): Define.
1770         * doc/Makefile.in (install, uninstall): Install info files into
1771         the dir listing.
1772         Reported by Andreas Buening.
1774 2006-05-09  Eric Blake  <ebb9@byu.net>
1776         * install-sh: Update to newer upstream version.
1777         * mkinstalldirs: Likewise.
1778         Reported by Andreas Buening.
1780         * src/m4.c (main): Bump copyright year.
1781         * Makefile.in (datarootdir): Define, for autoconf 2.59c.
1782         * doc/Makefile.in (datarootdir): Likewise.
1784 2006-05-08  Eric Blake  <ebb9@byu.net>
1786         * THANKS: Update.
1787         * doc/m4.texinfo (Bugs): Backport bug email address from head.
1788         Reported by Stepan Kasal.
1790 2005-12-04  Ilya N. Golubev  <gin@mo.msk.ru>  (tiny change)
1792         * input.c (match_input): Do not pass expression with side effect
1793         to `obstack_grow'.  Fix <INTERNAL ERROR: Recursive push_string!>.
1794         * NEWS: Updated.
1796 2005-12-04  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1798         * doc/m4.texinfo (How to debug macros and input): s/woould/would/
1799         Reported by Damian Menscher.
1801 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1803         * configure.ac (AC_INIT): Bump to 1.4.4a.
1805 2005-10-19  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1807         Release 1.4.4:
1808         * configure.ac (AC_INIT): Bump to 1.4.4.
1809         * NEWS: Describe 1.4.4's changes.
1810         * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
1812 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
1814         * src/m4.c: fix return code when non-existent files are processed
1816 2005-10-17  John Gatewood Ham  <zappaman@buraphalinux.org>  (tiny change)
1818         * README: update email address for bug reports.
1820 2005-10-17  Gary V. Vaughan  <gary@gnu.org>
1822         * doc/m4.info: Generated files are not kept in the repository.
1824 2005-05-01  Gary V. Vaughan  <gary@gnu.org>
1826         The FSF are moving offices today.  Changed their contact address
1827         in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
1828         `51 Franklin Street, Fifth Floor, MA 02110-1301'.
1830         Also, some of the files here were never updated from the previous
1831         '675 Mass Ave, Cambridge, MA 02139', so changed those to the
1832         '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
1834 2005-03-31  Mike Frysinger  <vapier@gentoo.org>
1836         * Makefile.in (bindir, infodir): Substitute from configure rather
1837         than hardcode.
1838         * doc/Makefile.in (infodir): Ditto.
1839         * src/Makefile.in (bindir): Ditto.
1840         * NEWS: Updated.
1842 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
1844         Changes needed to automate the release process for 1.4.3:
1846         * Makefile.in (dist): Make .tar.bz2 tarball too.
1847         * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
1848         (cvs-news): Look 1 line further down for NEWS release number.
1849         (cvs-dist): We don't use automake, so make dist is fine.
1850         Remove double . before suffixes.
1851         (cvs-release): Don't mention manual.html.
1852         (fetch): Get latest gendocs files.
1853         (web-manual): Rewritten to use gendoc for multiformat manuals.
1854         * doc/gendocs.sh: Don't save an old version in m4 CVS!
1855         * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
1856         preserving, but case insensitive, so generating html docs per node
1857         clashes between Index.html, the node file, and index.html, the
1858         top-level of the document tree...
1859         (Index macro): ...so renamed to this.  Changed all references.
1861 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1863         * configure.ac (AC_INIT): Bump to 1.4.3a.
1865 2005-03-31  Gary V. Vaughan  <gary@gnu.org>  (tiny change)
1867         Release 1.4.3:
1868         * configure.in (AC_INIT): Bump to 1.4.3.
1869         * NEWS: Describe 1.4.3's changes.
1871 2005-03-31  Gary V. Vaughan  <gary@gnu.org>
1873         * Makefile.maint: New file with release rules, from CVS libtool.
1874         * Makefile.in (DISTFILES): Add Makefile.maint.
1875         * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
1876         canonical versions.
1878 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
1880         * doc/m4.texinfo (Patsubst): Re-add trailing space required by
1881         checks/47.patsubst, with a redundant @comment to prevent emacs
1882         from removing it accidentally again.
1883         * checks/get-them: Allow for trailing spaces tucked behind
1884         @comment marks.
1886 2005-03-31  Eric Blake  <ebb9@byu.net>  (tiny change)
1888         * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
1889         * src/Makefile.in (install, uninstall): Likewise.
1891 2005-02-07  Gary V. Vaughan  <gary@gnu.org>
1893         * lib/regex.c, lib/regex.h:  Reverted gnulib update, which broke
1894         on Cygwin.
1895         Reported by Eric Blake.
1897 2005-02-04  Gary V. Vaughan  <gary@gnu.org>
1899         * lib/regex.c, lib/regex.h: Updated from gnulib.
1900         * src/input.c (set_word_regexp):  Don't change the word_regexp
1901         unless it compiles correctly.
1902         * NEWS: Updated.
1903         Reported by Frank Schwidom.
1905         * Makefile.in (stamp-h): Regenerate config.h properly.
1907 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
1909         * configure.ac (AC_DEFINE): Fix overquoting of description
1910         argument.
1912         * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
1913         recognition macros.
1914         * src/freeze.c (produce_frozen_state): Use \n line-endings even
1915         on Windows, so that the frozen file reader will work.
1916         Reported by Josef T. Burger.
1918         * src/m4.c (main): Modernise the --version output.
1920 2005-02-03  Gary V. Vaughan  <gary@gnu.org>
1922         Modernise the configury a little to prevent spurious errors from
1923         Autoconf-2.59's autoreconf:
1925         * config.h.in: Renamed to...
1926         * config-h.in: ...this to better support DOS 8.3 file systems.
1927         * acconfig.h: Removed.
1928         * configure.in: Renamed to...
1929         * configure.ac: ...this, and AC_DEFINE used to declare config.h
1930         entry comments.  Slight reorganisation and reformatting.
1931         * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
1932         entry comments.
1933         (AC_INIT): Use a modern 3 argument call.
1934         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1935         examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
1936         s/PRODUCT/PACKAGE/g.
1937         * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
1938         config.h.in.  Added configure.ac, config-h.in.
1939         (stamp-h.in): Removed acconfig.h from dependencies.
1940         (configure): Depends on configure.ac, not configure.in.
1941         * doc/Makefile.in (stamp-vti): Ditto.
1942         * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
1943         difference between PRODUCT="m4" and PACKAGE="GNU M4".
1944         * configure: Regenerated.
1946 2005-02-03  Noah Misch  <noah@cs.caltech.edu>
1948         * src/output.c (mkstemp): Make non-static, and build regardless of
1949         HAVE_TMPFILE; src/builtin.c also needs this replacement.
1950         * NEWS: Update.
1952 2004-09-09  Vincent Lonngren  <Vincent.lonngren.759@student.lu.se>
1954         * configure.in (AC_CHECK_HEADERS): Commit works best when you save
1955         changes from your editor buffer first.
1957         * configure.in (AC_CHECK_HEADERS):  Add signal.h, sys/signal.h.
1958         * src/m4.c: And include them as appropriate.
1959         * NEWS: Updated.
1961 2004-09-09  Andreas Schwab  <schwab@suse.de>
1963         Refactoring of the string read case in next_char provides about a
1964         20% speedup of M4 as typically used by autoconf:
1966         * src/input.c (next_char_1): Renamed from next_char.
1967         (next_char): New macro.
1968         * NEWS: Updated.
1970 2004-08-21  Gary V. Vaughan  <gary@gnu.org>
1972         * configure.in (VERSION): Bump to 1.4.2a.
1974 2004-08-19  Paul Eggert  <eggert@twinsun.com>
1976         Release 1.4.2.
1977         * configure.in (VERSION): Bump to 1.4.2.
1978         * News: Describe 1.4.2's changes.
1980         * src/m4.c (reference_error): Preserve errno, since M4ERROR
1981         relies on this.
1982         * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
1983         (m4_maketemp): Clear errno before calling mkstemp.
1984         * src/path.c (path_search): Don't let "free" trash errno when
1985         returning NULL.
1986         * src/output.c (insert_file): Don't assume errno has a valid
1987         value simply because fread returns zero.  This fixes a
1988         portability bug reported by Marion Hakanson in
1989         <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
1991 2004-06-09  Gary V. Vaughan  <gary@gnu.org>
1993         * configure.in (VERSION): Bump to 1.4.1a.
1994         * NEWS: Place holder for next stable release.
1996 2004-06-03  Paul Eggert  <eggert@cs.ucla.edu>
1998         Release 1.4.1.
1999         * configure.in (VERSION): Bump to 1.4.1.
2000         * NEWS: Describe 1.4.1's changes.
2002         * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
2003         pacify Autoconf 2.59.
2005         * doc/m4.texinfo: Insert commas after @xref's that lack them,
2006         to pacify Texinfo 4.7.
2007         * doc/Makefile.in (info): Remove info-1, info-2, info-3.
2009         * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
2010         pacify Sun C compilers.
2012 2003-09-28  Akim Demaille  <akim@epita.fr>
2014         * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
2015         botch.
2017 2003-09-03  Santiago Vila  <sanvila@debian.org>
2019         * examples/stackovf.sh: Use tempfile if available.
2021 2001-04-02  Robert Bihlmeyer  <robbe@orcus.priv.at>
2023         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
2024         * src/output.c (m4_insert_file): Do not mix buffered and
2025         unbuffered I/O, as this breaks on the Hurd.  (trivial change)
2027 2001-02-01  Santiago Vila  <sanvila@debian.org>
2029         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
2030         * src/m4.c (main): Fix format vulnerabilities.  (trivial change)
2032 2001-02-01  Matt Kraai  <kraai@debian.org>
2034         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
2035         * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
2036         empty file rather than to a nonexistent file.  This closes a common
2037         security hole.
2038         * src/builtin.c (m4_maketemp): Implement the above, by using
2039         mkstemp rather than mktemp.  (trivial change)
2041 2000-01-09  Akim Demaille  <demaille@inf.enst.fr>
2043         * src/builtin.c (expand_ranges): Added break after trailing dash.
2044         This caused misbehaviors on some systems.
2046 Sat Nov  5 15:52:47 1994  Francois Pinard  (pinard@icule)
2048         Release 1.4.
2049         * doc/Makefile.in (realclean): Also remove stamp-vti.
2050         Reported by Eric Backus.
2052 Wed Nov  2 00:47:53 1994  Francois Pinard  (pinard@icule)
2054         * src/freeze.c (produce_frozen_state): If the frozen file cannot
2055         be opened, return immediately after producing the error message.
2056         Reported by Andreas Schwab.
2058         * configure.in: Check for const only after having found possible
2059         ANSIfying compiler flags, this is of no use to check it before.
2060         Reported by Alexander Lehmann.
2062 Tue Nov  1 22:02:37 1994  Francois Pinard  (pinard@icule)
2064         * src/macro.c (collect_arguments): Cast obstack arguments to
2065         (voidstar), so avoiding compiler warnings.
2066         Reported by Joseph E. Sacco.
2068         * src/freeze.c (produce_frozen_state): Cast printed lengths to
2069         (int) so they correspond to %d format items.
2070         Reported by Joseph E. Sacco.
2072         * src/m4.c (main): Cast the argument to xfree to (voidstar).
2073         * src/symtab.c (free_symbol): Idem.
2074         Reported by Karl Vogel.
2076 Mon Oct 31 02:11:19 1994  Francois Pinard  (pinard@icule)
2078         * Makefile.in (DISTFILES): Distribute BACKLOG.
2080         * configure.in: Define PRODUCT and VERSION.
2081         * acconfig.h: Document PRODUCT and VERSION.
2082         * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
2083         constant string m4 and variable or parameter named version.
2085 Sun Oct 30 08:13:03 1994  Francois Pinard  (pinard@icule)
2087         * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
2088         __STDC__.  Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
2089         defines __STDC__ to 0, for indicating it is *not* ANSI!
2090         Reported by Kaveh R. Ghazi.
2092         * configure.in: Added obsolescent tests for AIX and Minix.
2094         * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
2095         which texclean does not exist anymore.
2096         Reported by Eric Backus, Jim Meyering, John David Anglin and
2097         Joseph E. Sacco.
2099 Sat Oct 29 05:10:03 1994  Francois Pinard  (pinard@icule)
2101         * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
2102         Reported by John David Anglin.
2104         * src/ansi2knr.c: New version, sent by Peter Deutsch.
2105         * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
2106         ANSI2KNR, depending on the fact the compiler is ANSI or not.
2107         * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
2108         Remove the sed filter after ansi2knr for debug.c.  Use $O instead
2109         of $U, put underline in extensions rather than in basenames.  Use
2110         implicit rules, now that regularity makes this possible.
2111         Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
2112         of ansi2knr whenever it is needed.
2113         * configure.in: Adjusted for correct STACKOVF substitution.
2114         * src/debug.c (trace_format): When not __STDC__, use (...) as a
2115         parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
2116         Reported by David MacKenzie.
2118         * Makefile.in: Remove binprefix.  Use transform_name instead.
2119         Reported by David MacKenzie.
2121         * doc/Makefile.in: Create version.texi, use it, clean it.
2122         Reported by Jim Meyering.
2124 Fri Oct 28 20:33:55 1994  Francois Pinard  (pinard@icule)
2126         * Makefile.in (all, install, uninstall): Depend on Makefile.
2128         * Makefile.in: For actions invoking $(MAKE) from within compound
2129         sh statements, exit non-zero if the sub-make fails.  Otherwise,
2130         the top-level make may exit successfully when it should fail.
2131         Reported by Jim Kingdon.
2133         * {,/*}Makefile.in: Use && after all cd, in case they fail.
2135         * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
2136         (dist): Use PRODUCT and VERSION instead of tricks on .fname.
2137         * configure.in: Substitute PRODUCT and VERSION.
2139         * {,*/}Makefile.in (dist): Always try a hard link before a copy.
2141 Thu Oct 27 22:32:58 1994  Francois Pinard  (pinard@icule)
2143         * Makefile.in (mostlyclean-local): Do not remove *~.
2144         * */Makefile.in (mostlyclean): Idem.
2145         Reported by Robert E. Brown and Richard Stallman.
2147 Sun Oct  9 08:30:13 1994  Francois Pinard  (pinard@icule)
2149         * src/m4.h: Get rid of CONFIG_BROKETS.
2151 Sun Oct  2 16:48:10 1994  Francois Pinard  (pinard@icule)
2153         * configure.in: Use AC_ARG_PROGRAM.
2154         * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
2155         Reported by David MacKenzie.
2157 Sat Oct  1 11:22:42 1994  Francois Pinard  (pinard@icule)
2159         * configure.in: Do not add -O to CFLAGS for GNU C, now that
2160         configure does it automatically.
2161         Reported by Jim Meyering.
2163 Fri Sep 23 08:16:58 1994  Francois Pinard  (pinard@icule)
2165         * src/stackovf.c: Declare the handler_t typedef earlier in the
2166         code, use it for stackovf_handler.
2167         (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2168         casting sigsegv_handler.
2169         Reported by Robert Bernstein.
2171         * src/m4.c (main): Initialize program_name to argv[0] without
2172         basename'ing it.
2173         Reported by Karl Berry.
2175 Sun Sep 18 11:42:50 1994  Francois Pinard  (pinard@icule)
2177         * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2178         Reported by Karl Berry.
2180 Wed Sep 14 10:00:22 1994  Francois Pinard  (pinard@icule)
2182         * lib/Makefile.in (mostlyclean): Added.
2183         (TAGS): Make in $(srcdir).
2185         * configure.in: Use `choke me' in test, like everywhere!
2187         * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2188         unreacheable and useless.
2190         * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2192         * lib/Makefile.in (DISTFILES): Distribute TAGS.
2193         (distclean): Do not remove TAGS.
2194         (realclean): Remove it.
2195         * Makefile.in: Make TAGS in lib also, not just in src.
2196         Reported by Karl Berry.
2198         * Makefile.in (distclean, realclean): Instead of recursively
2199         calling $(MAKE) for the -local part, allow parallel execution of
2200         -recursive and -local, only delay the removal of config.status,
2201         which is repeated in both goals.
2203 Tue Sep 13 19:21:05 1994  Francois Pinard  (pinard@icule)
2205         Release 1.3.
2206         * Makefile.in: Group all *clean-recursive goals in one, using sed
2207         to remove `-recursive' while calling make recursively.  Also, use
2208         a subshell for each recursive $(MAKE).
2209         Reported by Jim Meyering.
2211         * src/m4.h (memcpy): Define with bcopy for BSD systems.
2212         Reported by Kaveh R. Ghazi.
2214         * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2215         4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2216         specify it.
2218         * configure.in: Use date instead of touch for stamp-h.
2219         * Makefile.in (stamp-h.in): Idem.
2221         * Makefile.in (distclean, realclean): Force serial execution of
2222         both goals, in case parallel makes are being used.
2223         Reported by Jim Meyering.
2225         * src/Makefile.in (DISTFILES): Distribute TAGS.
2226         (distclean): Do not remove TAGS.
2227         (realclean): Remove it.
2228         Reported by Karl Berry.
2230 Sat Sep 10 12:34:04 1994  Francois Pinard  (pinard@icule)
2232         * configure.in: Use fp_ to match aclocal.m4.  Revert _OS_ macros
2233         to old names, for following Autoconf.
2235 Thu Sep  8 15:07:27 1994  Francois Pinard  (pinard@icule)
2237         * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2238         ./install.sh will not be correctly referred to in sub-Makefiles.
2239         Reported by John David Anglin.
2241         * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2242         Reported by Eric Backus.
2244         * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2245         examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2246         config.status into remaking this directory's Makefile only.
2247         * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2248         * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2249         Reported by Jim Meyering.
2251 Tue Sep  6 12:07:33 1994  Francois Pinard  (pinard@icule)
2253         * configure.in: Correct stack overflow detection logic, taking
2254         care of systems having only incomplete implementations (like for
2255         Pyramid 9820 OSx 5.0d).
2256         Reported by Kaveh R. Ghazi.
2258         * src/Makefile.in (TAGS): Remote -t from etags call.
2260 Fri Sep  2 10:37:10 1994  Francois Pinard  (pinard@icule)
2262         * lib/Makefile.in (install): Depend on all.
2264 Wed Aug 31 11:17:21 1994  Francois Pinard  (pinard@icule)
2266         * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2267         Reported by Jim Meyering and John David Anglin.
2269         * Makefile.in (distclean-local): Delete config.log.
2270         Reported by Jim Meyering.
2272         Solidify frozen files with respect to -P:
2273         * src/m4.c: Have -P set prefix_all_buitins variable instead of
2274         calling a function by that name.  Declare the variable.
2275         * src/m4.h: Adjust declaration for prefix_all_buitins.
2276         * src/builtin.c (builtin_init): Merge in functionality from
2277         previous prefix_all_buitins function, while making entries in the
2278         symbol table, but not modifying the builtin description itself.
2280         * src/freeze.c (reload_frozen_state): Add a useless `break;',
2281         because *many* compilers do not accept an empty `default:'.
2282         Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2283         Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2285         * configure.in: Use AC_TYPE_SIGNAL.
2286         * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2287         Reported by Robert Bernstein.
2289         * checks/Makefile.in (check): Modify PATH so check-them will find
2290         m4 in the src directory.
2291         * Makefile.in (check): Don't.
2292         Reported by Akiko Matsushita and Jim Meyering.
2294         * src/output.c (make_room_for, output_character_helper): New
2295         functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2296         a per buffer MAXIMUM_BUFFER_SIZE.
2298         * src/output.c (output_text): New function, for optimizing the
2299         output of strings of characters.  Use it.
2301 Tue Aug 30 01:44:29 1994  Francois Pinard  (pinard@icule)
2303         * doc, src: New directories reorganizing the distribution.
2304         * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2305         files.
2306         * Makefile.in: Adjusted.
2307         * configure.in: Configure new Makefiles.
2309         * m4.h: Declare STRING typedef.  Use it for comment and quote
2310         strings, adjusting all references.  (This is the rudiments of a
2311         beginning for the eventual withdrawal of NUL terminated strings.)
2312         * output.c (shipout_text): Accept a length parameter, and use it.
2313         All callers adjusted.
2315 Mon Aug 29 12:27:19 1994  Francois Pinard  (pinard@icule)
2317         * m4.h: Include <unistd.h> if it exists.
2318         * stackovf.c: Don't.
2320         Clean up for current_diversion variable:
2321         * output.c: Move current_diversion from builtin.c.
2322         * m4.h: Declare current_diversion so builtin.c can access it.
2323         * output.c (output_init, make_diversion): Initialize or update
2324         current_diversion.
2325         * builtin.c (builtin_init, m4_divert): Leave current_diversion
2326         alone.
2328         Remove limit on number of diversions:
2329         * output.c: Replace ndiversion by diversions, declare it.
2330         (output_init): Allocate only diversion 0.
2331         (make_diversion): Allocate new diversions as needed.
2332         * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2333         * m4.c: Still accept -N, but do nothing with it.
2334         Reported by David MacKenzie.
2336         Freeze diversions:
2337         * output.c (freeze_diversions): New function.
2338         * m4.h: Declare freeze_diversions.
2339         * freeze.c: Document frozen file format, revise it, call
2340         freeze_diversions to add diversions to frozen format, and code to
2341         reload them properly.
2342         * m4.c: Do not undivert automatically at end when status being
2343         frozen.  Do not call builtin_init when reloading frozen state.
2345         Speed up diversion processing:
2346         * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2347         COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2348         structure and variables, cached variables out of output_diversion,
2349         reallocate_diversion_for and OUTPUT_CHARACTER.
2350         (shipout_text, make_diversion, insert_diversion): Adapted to new
2351         structures.
2352         (insert_file): Use better buffering.
2353         Reported by David MacKenzie.
2355 Sun Aug 28 05:20:02 1994  Francois Pinard  (pinard@icule)
2357         * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2358         dist works from another build directory.
2360 Sat Aug 27 14:32:45 1994  Francois Pinard  (pinard@icule)
2362         * symtab.c (hack_all_symbols): Use hash_table_size instead of
2363         constant HASHMAX, for -H option to work better.
2365         * builtin.c (DECLARE): Simplify by using _ ().
2367         * freeze.c: New file.
2368         * Makefile.in: Compile it, distribute it.
2369         * m4.c: Recognize, document and process --freeze-state (-F) and
2370         --reload-state (-R) options.  Pass a true flag to builtin_init
2371         only if no reloading some state.
2372         * builtin.c (define_builtin): Remove static specifier.
2373         (find_builtin_by_name): Remove static specifier.
2374         (builtin_init): Accept and obey a flag argument.
2375         * m4.h: Add declarations for freeze.c, changes for builtin.c.
2377 Wed Aug 24 16:14:19 1994  Francois Pinard  (pinard@icule)
2379         * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2380         specifier.
2382         * configure.in: Implement --with-dmalloc.
2383         * acconfig.h: Document WITH_DMALLOC.
2384         * m4.h: Add code for when WITH_DMALLOC.
2386 Mon Aug 15 12:38:05 1994  Francois Pinard  (pinard@icule)
2388         * m4.c (long_options): Use "error-output", the dash was missing.
2389         Reported by Akiko Matsushita.
2391 Fri Aug 12 16:38:01 1994  Francois Pinard  (pinard@icule)
2393         * m4.h: Include <sys/types.h>.
2394         * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2395         * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2396         int.
2397         * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2398         as size_t, not int.
2399         * builtin.c (dump_args): Declare len as size_t, not int.
2401         * debug.c: Prototype the forward declaration of debug_set_file.
2403         * builtin.c (m4_undivert):  Replace div by file, for avoiding the
2404         shadowing of this variable.
2405         * output.c (insert_diversion): Idem.
2407         * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2408         (input_init): Duplicate default quote and comment strings.
2409         (set_quotes): Free previous quote strings in all cases.  Duplicate
2410         even default quote strings.
2411         (set_comment): Free previous comment strings in all cases.
2412         Duplicate even default comment strings.
2414         * configure.in: Updated for Autoconf 2.0.
2415         * Makefile.in (distclean-local): Also delete config.cache.
2417         * m4.c (usage): Reorganize the --help output by topic.  Include a
2418         description for debugging flags.
2420 Fri Jul 29 10:15:52 1994  Francois Pinard  (pinard@icule)
2422         * configure.in: If sigaction is available and SA_ONSTACK defined,
2423         use sigaction.  Otherwise, if sigvec is available and SV_ONSTACK
2424         defined, use sigvec.  Else don't compile stackovf.c.
2425         * stackovf.c (setup_stackovf_trap): Idem.
2426         Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2427         and Simon Leinen.
2429 Thu Jul 21 22:43:17 1994  Francois Pinard  (pinard@icule)
2431         * m4.c (usage): Replace printf par fputs.
2433 Mon Jul 18 23:48:23 1994  Francois Pinard  (pinard@icule)
2435         * Release 1.2
2437 Sun Jul 17 08:08:25 1994  Francois Pinard  (pinard@icule)
2439         * configure.in: Check for sigaction and sigvec.  Add a new delayed
2440         check for RLIMIT_STACK, combine in the checking for getrlimit.
2441         All those things are not universally available.
2442         * stackovf.c: Split setting up the trap handler and catching
2443         signals, for better taking care of various configure outcomes.
2444         * examples/stackovf.sh: Correct a typo.
2445         Reported by Eric Backus, Jim Avera and Jim Meyering.
2447 Sat Jul 16 20:36:19 1994  Francois Pinard  (pinard@icule)
2449         * ansi2knr.c: New version sent by its author, Peter Deutsch.
2451 Fri Jul 15 14:36:21 1994  Francois Pinard  (pinard@icule)
2453         * Makefile.in: Modify so parallel make will not try making
2454         lib/libm4.a twice simultaneously.
2455         Reported by Jim Meyering.
2457 Thu Jul 14 17:23:17 1994  Francois Pinard  (pinard@icule)
2459         * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2460         error message, for when no code possibility exists.  Even if this
2461         line is completely #ifdef'ed out, it brings a syntax error.
2462         Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2464         * Makefile.in (install): Have install depend on all too, for lib
2465         to be remade as needed.
2467         * examples/stackovf.sh: Try ksh, bsh and bash for shells
2468         providing ulimit, instead of using only ksh.
2469         Reported by Jim Avera and Joseph E. Sacco.
2471 Tue Jul 12 06:54:31 1994  Francois Pinard  (pinard@icule)
2473         * Makefile.in (check): Have it depend on all instead of m4.  In
2474         this way, a change in lib will be detected and processed.
2476         * builtin.c (numeric_arg): Use strtol and verify the conversion,
2477         instead of using sscanf which stops as soon as there is a
2478         non-digit in the input.  Previously, incr(1xyzzy), eval(1,2xyzzy)
2479         and divert(1xyzzy) were all accepted without any warning or error
2480         messages.
2481         * m4.h: Declare strtol as long if not including stdlib.h.
2482         * configure.in: Check for limits.h, and replace strtol if missing.
2483         * lib/Makefile.in: Substitute LIBOBJS.  Distribute strtol.c.
2484         * lib/strtol.c: New file, from elsewhere.
2485         Reported by Andreas Schwab.
2487 Thu Jul  7 22:38:10 1994  Francois Pinard  (pinard@icule)
2489         * macro.c (expand_macro): Cast value to (boolean) prior to
2490         assigning it to traced.
2491         Reported by Tom McConnell.
2493         * Makefile.in (m4): Always make all in lib first.
2494         Reported by Jim Meyering.
2496 Wed Jul  6 13:16:31 1994  Jim Avera (jima@netcom.com)
2498         * stackovf.c: Isolated OS-dependent sections; Improved portability,
2499         adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2500         handlers), and a default error message if the fault address is not
2501         available (when neither siginfo.h nor BSD sigcontext are supported).
2502         * configure.in: Changes for stackovf.h: Check for sigcontext,
2503         sigaction, sigstack, and define rlim_t as int if necessary.
2504         * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2505         * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2506         * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2508 Tue Jul  5 19:13:54 1994  Francois Pinard  (pinard@icule)
2510         * configure.in: Use AC_SET_MAKE.
2511         * Makefile.in: Use @SET_MAKE@.
2512         Reported by Jim Meyering.
2514         * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2515         Reported by Ian Taylor.
2517 Sat Jul  2 00:58:47 1994  Francois Pinard  (pinard@icule)
2519         * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2520         because siginfo.h is unrelated to standard headers, and siginfo.h
2521         is already checked for.
2522         Reported by Joseph E. Sacco.
2524         * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2525         PROTOTYPES.
2526         * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2527         AC_PROTOTYPES.
2529 Wed Jun 29 22:41:53 1994  Francois Pinard  (pinard@icule)
2531         * builtin.c (substitute): Use \& to represent this part of the
2532         string which was matched by the whole regexp, instead of
2533         representing the whole string.  Any usage of \0 issues a warning
2534         and acts like \&, it will disappear in some subsequent release.
2536 Mon Jun 27 14:24:23 1994  Francois Pinard  (pinard@icule)
2538         * m4.c: Complete prototype for forwarded declaration of usage.
2540         * input.c (init_macro_token): Correct own reference in error
2541         message.  Previous name get_macro_func was referred to instead.
2542         (next_char):  Correct own reference in error message.  Previous
2543         name advance_input was referred to instead.
2545         * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2546         * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2547         and_term, not_term, logical_not_term, cmp_term, shift_term,
2548         add_term, mult_term, exp_term, unary_term, simple_term): Add
2549         prototype to forwarded declarations.  Declare parameter v1 as
2550         eval_t * instead of int *.  Same for local variable v2 in dyadic
2551         functions.  Same for result in exp_term.
2552         * builtin.c (m4_eval): Declare value as eval_t instead of int.
2553         (ntoa): Declare value as eval_t instead of int.  Declare uvalue as
2554         unsigned_eval_t instead of unsigned int.  Change casts accordingly.
2555         (shipout_int): Cast first argument of ntoa to eval_t.
2556         Reported by Thorsten Ohl.
2558         * macro.c: Complete the prototypes of forwarded expand_macro and
2559         expand_token.
2560         Reported by Thorsten Ohl.
2562         * m4.h: Define voidstar as void * or char * depending on __STDC__.
2563         The Ultrix 3.1 compiler cannot do much with void pointers.
2565         * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2566         * m4.c (xfree):  Replace void * by voidstar.
2567         Reported by Tom McConnell.
2569         * ansi2knr.1: New, from elsewhere.
2570         * Makefile.in (DISTFILES): Distribute ansi2knr.1
2572         * Makefile.in (stamp-h.in): Avoid running ./config.status if
2573         stamp-h does not exist yet.  This avoids running it a second time
2574         just after the initial ./configure.
2575         Reported by David MacKenzie and Tom McConnell.
2577         * m4.h: Replace the enum debug_info declaration with a series of
2578         #define's.  The Ultrix 3.1 compiler would otherwise need casting
2579         (int) to most references, when used in expressions.
2580         Reported by Tom McConnell.
2582 Sat Jun 25 00:10:05 1994  Francois Pinard  (pinard@icule)
2584         * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2585         following an idea from Brook G. Milligan.  AC_HAVE_PROTOTYPES
2586         calls the compiler.  Previously, FP_PROTOTYPES was only calling
2587         the preprocessor; by not being subject to CFLAGS, this was
2588         discouraging those flags asking for ANSI compilation.
2589         * acconfig.h: Document HAVE_PROTOTYPES.
2590         * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2591         * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2592         Reported by Eric Backus.
2594         * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2595         from the environment.  Default CFLAGS to -g if not set.
2596         * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2597         * lib/Makefile.in: Have CFLAGS substituted from configure.
2598         Reported by Eric Backus and Tom McConnell.
2600         * configure.in: m4_undefine changeword before using AC_ENABLE.
2602         * m4.h: Declare prototypes for error (for ANSI compilers only),
2603         prefix_all_builtins and reference_error.
2604         Reported by Tom McConnell.
2606         * input.c (set_word_regexp): Do not try to initialize the array
2607         test from a string, this does not work with non-ANSI compilers.
2608         Reported by Eric Backus.
2610         * Makefile.in (dist): Clean examples/ before saving it.
2611         (distclean-local): Also remove stamp-h.
2612         Reported by Eric Backus.
2614         * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2615         non ANSI compilers.
2616         Reported by Tom McConnell.
2618         * checks/Makefile.in (clean): Depends on mostlyclean.
2619         (mostlyclean): New goal.
2621 Fri Jun 24 23:30:31 1994  Francois Pinard  (pinard@icule)
2623         * Makefile.in (DISTFILES): Distribute install.sh.
2624         * install.sh: New file, copied from elsewhere.
2625         Reported by Assar Westerlund and Kaveh R. Ghazi.
2627 Thu Jun 23 00:00:30 1994  Francois Pinard  (pinard@icule)
2629         * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2630         * acconfig.h: Explain ENABLE_CHANGEWORD.
2632         [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2633         from code provided by Pete Chown]
2634         * m4.h: Add original_text field to u_t variant of union u.
2635         Declare TOKEN_DATA_FUNC macro.
2636         * builtin.c: Declare changeword.
2637         (m4_changeword): New function.
2638         * input.c: Include "regex.h", define variables with word regexps.
2639         (input_init): Initialize the word regexp.
2640         (set_word_regexp): New.
2641         (next_token): Declare local variables, use the previous code if
2642         default_word_regexp is true.  Else, match using a new code.  Save
2643         the original text.
2644         * macro.c (expand_token): Ship out original text if not a macro
2645         name.
2646         Reported by Krste Asanovic and Pete Chown.
2648         [These modifs all depend upon ENABLE_CHANGEWORD]
2649         * m4.h: Declare external user_word_regexp.
2650         * m4.c: Declare user_word_regexp, and initialize it from
2651         --word-regexp or -W, or NULL if not specified.
2652         * input.c: Use user_word_regexp if specified, instead of
2653         DEFAULT_WORD_REGEXP.
2655         * Makefile.in (m4): Revert Jan 3 1994 change.  I'm unable to
2656         agree with it.
2658         * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2659         * checks/Makefile.in: Empty the suffix list.
2660         Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2662         * m4.c: Declare nesting_limit and initialize it to 250.
2663         Implement -LNUMBER or --nesting-limit=NUMBER to change its
2664         value.
2665         * m4.h: Declare nesting_limit as external.
2666         * macro.c (expand_macro): Stop execution whenever nesting limit
2667         is exceeded.
2668         Reported by Bengt Mertensson.
2670         * eval.c (evaluate): Diagnose excess characters in eval input.
2671         Things like `eval(08)' used to return 0 with no diagnostic.
2673         * m4.h: Capitalize first letter of all macro arguments in
2674         definitions.
2676         * m4.c: Declare warning_status, initialize it to 0.  Add new
2677         option -E, or --fatal-warnings, which sets warning_status to
2678         EXIT_FAILURE instead.
2679         * m4.h: Declare external warning_status.  Define EXIT_SUCCESS and
2680         EXIT_FAILURE if not otherwise done by header files.
2681         * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
2682         * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
2683         eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
2684         argument of all M4ERROR calls.
2685         Reported by Noah Friedman.
2687         * examples/incl-test.m4: Renamed from incl_test.m4.
2688         * examples/include.m4: Include incl-test.m4 instead of
2689         incl_test.m4.
2690         * examples/multiquotes.m4: Renamed from multi-quotes.m.
2692 Wed Jun 22 21:58:54 1994  Francois Pinard  (pinard@icule)
2694         * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found.  Note
2695         that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
2696         also tested it on a Sun Sparc workstation running SunOS 4.x.
2698         * format.c (format): When not HAVE_EFGCVT, m4 was failing the
2699         49.format check, abusing a `union values' argument with sprintf
2700         without selecting the proper field.  Now, save the formatting type
2701         first, delaying the fetch of the corresponding argument.
2702         Reported by Joseph E. Sacco and Tom Quinn.
2704         * format.c (format): Remove const from char *fmt declaration when
2705         not HAVE_EFGCVT, because a NUL may be forced into it.
2707         * m4.h: Declare atof() when not STDC_HEADERS.
2708         Reported by Joseph E. Sacco.
2710         * Regenerate configure using Autoconf 1.11, this corrects a
2711         problem about an incorrect cpp seting on NeXT 3.1.
2712         Reported by Alexander Lehmann.
2714 Sun Jun  5 16:25:19 1994  Francois Pinard  (pinard@icule)
2716         * m4.h (_): Change argument from `x' to `Args'.
2718 Wed May  4 23:59:39 1994  Francois Pinard  (pinard@icule)
2720         * Makefile.in: Remove all occurrences of $(MFLAGS), which were
2721         bringing more evil than good on a few systems.
2722         Reported by Greg A. Woods.
2724 Fri Apr 22 15:59:35 1994  Francois Pinard  (pinard@icule)
2726         * m4.h: Rename Args() to _().
2727         * m4.h: Remove extern specifier from all function declarations.
2729 Fri Apr 22 15:51:21 1994  Jim Avera (jima@netcom.com)
2731         * stackovf.c: New file implementing stack-overflow detection.
2732         * configure.in: Check for getrlimit, sigaction.  If all of
2733         standard headers, getrlimit and sigaction, define USE_STACKOVF and
2734         substitute ${U}stackovf.o for STACKOVF.
2735         * acconfig.h: Declare USE_STACKOVF.
2736         * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
2737         * m4.h: Declare setup_stackovf_trap().
2738         * m4.c: Call setup_stackovf_trap().
2739         * tests/stackovf_test.sh: New file.
2741 Wed Apr 13 14:10:30 1994  Francois Pinard  (pinard@icule)
2743         * checks/Makefile.in: Rename .all-stamp to stamp-checks.
2745         * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
2747 Sun Jan 30 14:24:19 1994    (pinard at icule)
2749         * m4.h: Remove definition of volatile, not used anymore.
2750         Reported by Jim Meyering and Joseph E. Sacco.
2752         * m4.h: Consistently use `do { ... } while (0)' in macros, instead
2753         of `if ... else /* nothing */' for if macros.
2754         Reported by Jim Meyering.
2756         * builtin.c (m4_regexp): Reorganize the code for avoiding a
2757         warning from gcc about `repl' possibly used before defined.
2758         Reported by Jim Meyering.
2760         * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
2761         Reported by Jim Meyering.
2763 Tue Jan 25 18:39:37 1994  Francois Pinard  (pinard at icule)
2765         * m4.h: Move the conditional definition of volatile after the
2766         inclusion of system files, because they may define it first.
2768 Tue Jan  4 19:46:50 1994  Francois Pinard  (pinard@icule)
2770         * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
2771         get around a problem with Alpha make seeing a syntax error, there.
2772         Reported by Vern Paxson.
2774 Mon Jan  3 00:21:45 1994  Francois Pinard  (pinard@icule)
2776         * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
2777         Reported by Richard Stallman.
2779 Sat Dec 25 08:06:05 1993  Francois Pinard  (pinard@icule)
2781         * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
2782         instead of AC_HAVE_FUNCS.
2783         Reported by Noah Friedman.
2785 Wed Dec  1 09:37:53 1993  Francois Pinard  (pinard@icule)
2787         * m4.c: Initialize show_help and show_version to zero.
2789         * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
2790         Use them in exit() and usage() calls.
2792 Sat Nov 27 10:43:24 1993  Francois Pinard  (pinard@icule)
2794         * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
2795         syserr() macro.  Delete errref, add reference_error and M4ERROR.
2796         * m4.c: Replace errref, which was returning an input reference
2797         string, with reference_error, which prints it on standard error.
2798         * builtin.c, output.c: Use errno as second parameter to error,
2799         instead of using syserr() with %s.
2800         * *.c: Use M4ERROR instead of error: no more errref() with %s.
2801         Doing so, the program name appears after the input reference
2802         instead of before, which eases M-x next-error processing.
2804 Wed Nov 24 22:16:15 1993  Francois Pinard  (pinard@icule)
2806         * checks/get-them: Escape braces with backslashes in patterns,
2807         because HPUX-9.01 awk needs this.
2808         Reported by Jim Meyering.
2810 Mon Nov 22 10:55:52 1993  Francois Pinard  (pinard@icule)
2812         * builtin.c: Declare "FILE *popen ();".
2814         * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
2815         macros, replace error_message_prefix() declaration by errref()'s.
2816         Declare xrealloc, for use in errref().
2817         * m4.c: Delete error_message_prefix() function, add errref().
2818         * *.c: Use error() systematically in place of all error macros,
2819         now that error() flushes stdout first.  Make needed adjustments.
2821         * m4.h: Remove const in sys_errlist[] declaration, it creates
2822         conflicts on SGI and Alpha.
2823         Reported by Kaveh R. Ghazi.
2825 Sat Nov 20 08:26:15 1993  Francois Pinard  (pinard@icule)
2827         * m4.c: Include <getopt.h> instead of "getopt.h".
2829         * configure.in: Output to config.h.  Use HAVE_FUNCS preferably.
2830         * acconfig.h: New, for documenting HAVE_EFGCVT.
2831         * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
2832         use them wherever appropriate.  Also use -I. for compilations.
2833         * lib/Makefile.in: Use -I.. for compilations.
2834         * *.c: Include <config.h> or "config.h".
2836         * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
2837         * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
2839 Wed Nov 17 09:34:55 1993  Francois Pinard  (pinard@icule)
2841         * builtin.c (m4_eval): Cast strlen to (int) before comparing.
2843         * input.c (input_init): Initialize quote and comment strings
2844         explicitely instead of calling set_quotes and set_comment: by
2845         doing so, we ensure we do not free uninitialized variables.
2847         * checks/check-them: Reverse arguments to both diff, so the
2848         expected is on the left and the obtained on the right.
2850         * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
2851         macros. Delete declarations for m4error, warning, fatal and
2852         internal_error, add declaration for error_message_prefix.
2853         * m4.c:  Delete m4error, warning, fatal and internal_error
2854         routines, add error_message_prefix routine.
2855         * *.c: Replace m4error routine calls with MESSAGE* macro calls,
2856         warning with WARNING*, fatal with FATAL* and internal_error with
2857         INTERNAL_ERROR*.
2858         * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
2859         this is not needed anymore.
2861         * m4.h: Declare extern FILE *debug.  Add DEBUG_PRINT{1,3} and
2862         DEBUG_MESSAGE{,1,2} macros.  Delete declarations for debug_print
2863         and debug_message, add declaration for debug_message_prefix.
2864         * debug.c: Remove static specifier for FILE *debug declaration.
2865         Delete debug_print and debug_message routines, add
2866         debug_message_prefix routine.
2867         * builtin.c, debug.c: Replace debug_print routine calls with
2868         DEBUG_PRINT* macro calls.
2869         * input.c, path.c: Replace debug_message routine calls with
2870         DEBUG_MESSAGE* macro calls.
2872         * m4.h: Remove inclusion of <varargs.h>.
2873         * debug.c: Include <stdarg.h> or <varargs.h>.
2874         (trace_format): Use stdarg instead of varargs if __STDC__.
2876         * configure.in: Remove checks for vfprintf and _doprnt.  These
2877         implementations use varargs tricks which are not portable enough.
2878         * lib/vfprintf.c: Deleted.
2879         * lib/_doprnt.c: Deleted.
2880         * lib/Makefile.in: Adjusted accordingly.  Remove LIBOBJS.
2881         Reported by Joel Sherrill.
2883         * path.c (add_include_directory): Use xstrdup.
2885         * builtin.c (find_builtin_by_name): Declare static.
2887         * *.[ch]: Add const to a few "char *" declarations.
2889         * configure.in: Remove commented tests for fileno() and fstat().
2890         * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
2892         * debug.c (debug_flush_files): New.
2893         * m4.h: Declares it.
2894         * builtin.c (m4_syscmd, m4_esyscmd): Use it.
2895         Reported by Nicolas Pioch.
2897 Fri Nov 12 10:02:26 1993  Francois Pinard  (pinard@icule)
2899         * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
2900         Reported by Joel Sherrill.
2902         * builtin.c (prefix_all_builtins): Instead of the table size, use
2903         the null entry at end for stopping the loop.  It was overwritten.
2904         Reported by Andreas Schwab and Jim Meyering.
2906         * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
2907         Reported by Kaveh R. Ghazi.
2909         * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
2910         Reported by Karl Vogel.
2912 Tue Nov  9 09:31:47 1993  Francois Pinard  (pinard@icule)
2914         * m4.h: Do not define volatile if already defined.
2915         Reported by Rene' Seindal.
2917         * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@.  Grrr!
2919         Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
2920         Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
2922 Mon Nov  8 21:11:44 1993  Francois Pinard  (pinard@icule)
2924         * m4.h: Define strchr and strrchr in terms of index and rindex,
2925         instead of the other way around.
2926         * builtin.c, m4.c, path.c: Use strchr instead of index.
2928         * input.c (next_char): Remove a "break;" after a "return ...;".
2929         Reported by Tom McConnell.
2931 Mon Nov  8 12:45:34 1993  Francois Pinard  (pinard@icule)
2933         * Release 1.1
2935         * configure.in: Do not copy check files in the build hierarchy.
2936         * checks/check-them: Identify the m4 version being checked.  For
2937         finding m4, look in $PATH instead of in the parent directory.
2938         * Makefile.in (check): Prepend `pwd` to $PATH before checking.
2939         * checks/Makefile.in (.all-stamp): Always create check files in
2940         the source hierarchy, not anymore in the build hierarchy.
2941         (check): cd to the source hierarchy before performing checks.
2942         Do not copy nor clean COPYING anymore, take it from `..'.
2943         Reported by Tom McConnell.
2945         * Makefile.in (Makefile): Use $(SHELL).
2946         (config.status): Use $(SHELL).  Use "config.status --recheck"
2947         instead of "configure --no-create", which is obsolete.
2948         Reported by Tom McConnell.
2950 Fri Nov  5 09:49:30 1993  Francois Pinard  (pinard@compy.IRO.UMontreal.CA)
2952         * m4.c (usage): Use "%s" instead of "m4" in format string.
2953         Reported by Jim Meyering.
2955         * Makefile.in: Distribute mkinstalldirs.
2956         Reported by Pierre Gaumond.
2957         Reported by Jim Meyering.
2958         Reported by Tom McConnell.
2959         Reported by Andreas Gustafsson.
2961         * checks/check-them: Renamed from checks/check_them.
2962         * checks/get-them: Renamed from checks/get_them.
2963         * checks/.all-stamp: Renamed from checks/.all_stamp.
2964         * checks/Makefile.in: Changed accordingly.
2965         Reported by Jim Meyering.
2967 Thu Nov  4 13:50:52 1993  Francois Pinard  (pinard@lagrande.IRO.UMontreal.CA)
2969         * lib/Makefile.in (dist): Correct permissions on files.
2971         * output.c: Declare tmpfile, some systems don't.
2973 Wed Nov  3 09:09:16 1993  Francois Pinard  (pinard@icule)
2975         * checks/Makefile.in (dist): Correct permissions on files.
2977         * Makefile.in (dist): Ensure recursive linking for subdirectory
2978         `examples', also set read/write permissions on all its files.
2980         * mkinstalldirs: New, from elsewhere.
2981         * Makefile.in: Use it.
2983         * debug.c: Synchronize debug messages and regular output when
2984         the debug file and stdout are redirected to the same file.
2985         * configure.in: Add (commented) checks for fileno and fstat.
2986         Reported by Jim Avera.
2988         * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
2989         etc., arguments, then ignore the superfluous one.  m4 used to
2990         diagnose missing arguments and return the empty string.
2991         Reported by Nick S. Kanakakorn.
2993 Tue Nov  2 00:55:41 1993  Francois Pinard  (pinard@icule)
2995         * m4.c (main): At end of all input, ensure all undiverted text
2996         goes to the main output stream.
2997         Reported by Andreas Gustafsson.
2999         * m4.c (main): exit (0), instead of return 0.
3001         * m4.c: Implement -P and --prefix-builtins.
3002         * builtin.c: Delete const specifier on builtin_tab.
3003         (prefix_all_builtins): New.
3004         Reported by Noah Friedman.
3005         Reported by Scott Bartram.
3007         * c-boxes.el: New, from elsewhere.
3008         * Makefile.in: Distribute it.
3010         * m4.h: Do not define bcopy if <string.h> defines it.
3011         Reported by Stephen Perkins.
3013         * builtin.c (define_macro): Allow a missing second argument, in
3014         which case it is implied empty.  Affects define and pushdef.
3015         Reported by Eric Allman.
3017 Mon Nov  1 07:45:24 1993  Francois Pinard  (pinard@icule)
3019         * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
3020         struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
3021         * builtin.c: Initialize all the blindness fields in builtin_tab.
3022         (define_builtin): Copy the blindness of a builtin into its symbol.
3023         * macro.c (expand_token): Avoid processing a blind builtin if the
3024         next character is not an opening parenthesis.
3025         Reported by David MacKenzie.
3026         Reported by Noah Friedman.
3028         * configure.in: Ensure an exit status of 0 on completion.
3029         Reported by Vivek P. Singhal.
3031         * eval.c (eval_lex): Admit both lower and upper case letters for
3032         bases greater than 10.  Only lower case letters were accepted.
3034         * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
3035         Reported by Krste Asanovic.
3037         * eval.c:  Rename NOT to LNOT.  Add XOR, NOT, LSHIFT and RSHIFT.
3038         * eval.c (logical_not_term): New name for not_term.
3039         * eval.c (xor_term): New, between or_term and and_term.
3040         * eval.c (not_term): New, between and_term and logical_not_term.
3041         * eval.c (shift_term): New, between cmp_term and add_term.
3042         Reported by Krste Asanovic: ~, ^, <<, >>.
3043         Reported by Ben A. Mesander: ** vs ^.
3045         * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
3046         * m4.h: Delete xrealloc.c.
3047         * lib/xmalloc.c: New, from elsewhere.
3048         * lib/xstrdup.c: New, from elsewhere.
3049         * lib/Makefile.in: Distribute and compile them.
3051         * m4.c: Change progname to program_name.
3052         * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
3053         * lib/error.c: New, from elsewhere.
3054         * lib/Makefile.in: Distribute and compile error.c.
3055         * configure.in: Check AC_VPRINTF and for strerror.
3056         * m4.c: Delete cmd_error.  Use error instead.
3057         * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
3059         * m4.h: Delete #define const, let Autoconf takes care of this.
3061         * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
3062         Merge parse_args into main.  Declare argv to be `char *const *',
3063         then remove superfluous casts.
3065         * m4.c: Rename --no-gnu-extensions to --traditional.
3066         Reported by Ben A. Mesander.
3068         * m4.c (usage): Add a status parameter.  Supply one in various
3069         calls.  Add --help processing.  Remove -V for --version.
3071         * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
3073         * lib/Makefile.in: Have an AR=ar declaration.
3074         Reported by Eric Backus.
3075         Reported by Bjorn R. Bjornsson.
3076         Reported by Tom Tromey.
3077         Reported by Kristine Lund.
3078         Reported by Marion Hakanson.
3080 Sat Oct 30 12:51:47 1993  Francois Pinard  (pinard@icule)
3082         * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
3083         Reported by Noah Friedman.
3085 Mon Oct 25 14:58:48 1993  Francois Pinard  (pinard@icule)
3087         * Makefile.in: Remove MDEFINES and cleanup.
3089 Wed Jun  9 14:59:46 1993  Francois Pinard  (pinard@icule)
3091         * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
3092         Create a gzip file.
3094 Sat Feb  6 14:59:22 1993  Francois Pinard  (pinard@icule)
3096         * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
3097         ensure 777 mode for directories, so older tar's will restore file
3098         modes properly.
3100 Sun Jan 17 15:38:05 1993  Francois Pinard  (pinard@icule)
3102         * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
3103         so the installer can override automatically configured choices.
3104         Reported by Karl Berry.
3106 Fri Jan 15 16:07:00 1993  Francois Pinard  (pinard@icule)
3108         * lib/vfprintf.c: Stolen from Oleo distribution and adapted.  The
3109         previous version was not working properly on m68k-hp-bsd4.3.
3110         Reported by Roland McGrath.
3112         * lib/_doprnt.c: Stolen from Oleo distribution.
3113         * configure.in: Check for _doprnt.c if vfprintf.c selected.
3114         * lib/Makefile.in: Distribute _doprnt.c.
3115         Do not distribute regex.[ch].old anymore.
3117 Fri Jan  1 19:42:23 1993  Francois Pinard  (pinard at icule)
3119         * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
3120         Richard wants it there.
3122 Sun Dec 27 07:01:54 1992  Francois Pinard  (pinard at icule)
3124         * Makefile.in: Add DEFS to MDEFINES.
3125         * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
3126         (libm4.a): Remove the library before creating it.
3127         (distclean): Remove tags and TAGS too.
3129 Wed Dec 23 12:46:55 1992  Francois Pinard  (pinard at icule)
3131         * Makefile.in (dvi, m4.dvi): New goals.
3133         * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
3134         macro.c, output.c, path.c, symtab.c: Change Copyright from
3135         1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
3137         * examples/divert.m4: Deleted, this bug has been corrected.
3139         * Makefile.in (texclean, mostlyclean): New goals.
3141         * Makefile.in (clean): Remove clutter from ansi2knr.
3142         Reported by Pierre Gaumond.
3143         Reported by Greg A. Woods.
3145 Sun Dec 20 10:40:20 1992  Francois Pinard  (pinard at icule)
3147         * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule.  The user
3148         might well use CFLAGS is s/he needs it.
3150         * Makefile.in: Allow installation of info files from a separate
3151         build directory.
3152         Reported by Jason Merrill.
3153         Reported by David MacKenzie.
3154         Reported by Skip Montanaro.
3155         Reported by Erez Zadok.
3156         Reported by Assar Westerlund.
3158 Sat Dec 19 08:21:34 1992  Francois Pinard  (pinard at icule)
3160         * Release 1.0.3
3161         This is still a beta release for the future GNU m4 version 1.1.
3163         * lib/alloca.c: New, from elsewhere.
3164         * lib/Makefile.in: Distribute it.  Define and use $(ALLOCA).
3166         * m4.h: Do not define index/rindex if already defined.  If
3167         FALSE/TRUE are already defined, do not redefine them, but merely
3168         define boolean typedef to int.
3170         * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3171         * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3172         because some C compilers do not like connectives with #ifdef.
3173         * m4.h: Define `volatile' only if __GNUC__, instead of once for
3174         __GNUC__ and once for __STDC__.
3175         * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3177         * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3178         Makefile dependencies.  Without it, make keeps destroying and
3179         remaking $(CHECKS) in a loop (why?).  Distribute .all_stamp.
3181         * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3182         to diversion/DIVERSION, this was a spelling error.
3184         * m4.c: Declare version[], remove #include "version.h".
3185         * version.h: Deleted.
3186         * Makefile.in: Remove references to version.h.
3188         * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3189         production, by using a simpler and more robust algorithm.  This
3190         solves the problem of synclines sometimes written in the middle of
3191         an output line.  Delete sync_line() and output_lines variable.
3192         * m4.h: Remove sync_line prototype and output_lines declaration.
3193         * input.c (next_char), output.c (shipout_text): Remove references
3194         to output_lines.
3195         * input.c (push_file, pop_file): Merely put the value -1 in
3196         output_current_line instead of calling sync_line, for delaying a
3197         single `#line NUM FILE' before next output line.  Do not test
3198         for sync_output, because this is unnecessary clutter.
3199         * output.c (make_divertion, insert_divertion): Idem.
3200         * input.c: Rename must_advance_line to start_of_input_line, for
3201         consistency.
3203         * debug.c (trace_header): Select a new debug line format, which
3204         better complies with GNU standards for formatting error messages.
3205         With option `-dfl', M-x next-error might be used on the output.
3206         * m4.c (vmesg): Adjust format of error output to GNU standards.
3207         * m4.texinfo: Adjust examples for `make check' to work.
3209         * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3210         case for enum debug_info constants, which were all lower case.
3212         * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3213         re_search_2.
3214         * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3215         collected patches.  I tried a few times using newer regex.[ch], it
3216         mysteriously stopped aborting with this one.  Insecure feeling...
3217         * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3219 Fri Dec 18 11:08:03 1992  Francois Pinard  (pinard at icule)
3221         * m4.c: Change `--no-warnings' to `--silent'.
3222         Reported by David MacKenzie.
3224         * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3225         leave it off for now.  See comment in m4.c for justification.
3226         Reported by David MacKenzie.
3228         * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3229         * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3231         * Makefile.in: Add a new `info' goal.  Use macro MAKEINFO.
3233         * Makefile.in: Ensure recursive cleaning is done before local
3234         cleaning for all clean goals.
3236         * builtin.c (ntoa): Ensure the value is always interpreted as a
3237         signed quantity, whatever the radix is.
3239 Wed Nov 18 07:57:19 1992  Jim Meyering  (meyering@idefix)
3241         * builtin.c, format.c, input.c: Split long lines.
3242         * m4.c: Use typedef macro_definition instead of struct
3243         macro_definition.
3244         * symtab.c: Use typedef symbol instead of struct symbol.
3246 Tue Nov 17 01:58:40 1992  Francois Pinard  (pinard at icule)
3248         * *.[ch]: Remove all trailing whitespace, in code and comments.
3250         * configure.in: Find some awk.
3251         * Makefile.in: Add $(AWK) to MDEFINES.
3252         * checks/Makefile.in: Transmit $(AWK) to get_them.
3253         * checks/get_them: Use $AWK instead of gawk.  Add a close in the
3254         awk script when switching files, because without this, mawk runs
3255         out of file descriptors.
3257 Mon Nov 16 20:42:56 1992  Francois Pinard  (pinard at icule)
3259         * Makefile.in (realclean): Delete m4.info*.
3260         Reported by Jim Meyering.
3262         * Makefile.in: Adjust and link with checks/Makefile.
3263         * checks/Makefile.in: New.
3264         * configure.in: Output checks/Makefile.
3266         * checks/get_them: Have the dnl header of each test more
3267         recognizable by next-error, also use a better message.
3269 Mon Nov 16 07:48:52 1992  Jim Meyering  (meyering@idefix)
3271         * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3272         And use that only if __GNUC__ since we're using it's GCC-specific
3273         semantics that tell the compiler the associated function doesn't
3274         return.
3276         * builtin.c (substitute): Don't use character as an array index.
3277         (dumpdef_cmp): Make formal arguments `const void *' to avoid
3278         warnings with gcc -W -Wall on systems with qsort prototype.
3279         (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3280         from gcc -W -Wall.
3282         * eval.c (most functions): Add parentheses to assignments used
3283         as truth values go avoid warnings from gcc -Wall.
3285         * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3286         any functions that don't need external scope.
3288         * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3289         (many functions and arrays): Declare `const'.
3291 Sun Nov 15 09:42:09 1992  Francois Pinard  (pinard at icule)
3293         * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3294         removing the declaration from m4.h.  Also rename false to FALSE
3295         and true to TRUE.
3297         * lib/Makefile.in (Makefile): New goal.
3299         * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3300         so heavily loaded.  It gets more easily overridable, calling make.
3301         Reported by Jim Meyering.
3303         * Makefile.in (dist): Get .fname from the current directory name,
3304         instead of from version.h.  I need updating many files manually,
3305         when the version changes, version.h is just one of them.
3307 Sat Nov 14 11:01:20 1992  Francois Pinard  (pinard at icule)
3309         * m4.h: Remove the tag `boolean' on the enum introducing typedef
3310         `boolean'.  This tag conflicts with <sys/types.h> on SVR4.
3311         Reported by Tom McConnell.
3313 Fri Nov 13 00:12:50 1992  Francois Pinard  (pinard at icule)
3315         * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3316         39.cleardiv, which were describing missing or spurious newlines.
3317         Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3318         do not depend on machine word size, `/bin/false' implementation,
3319         or `wc' output format.  `make check' is more dependable, now.
3321         * checks/check_them: Summarize the failed tests by listing their
3322         name, at end.  If none, issue `All checks successful'.  Output
3323         `Checking' instead of `Input file:'.
3325         * checks/get_them, checks/check_them: Reindented.
3327         * Makefile.in (dist): chmod a+r before making the tar file.
3329 Thu Nov 12 14:42:57 1992  Francois Pinard  (pinard at icule)
3331         * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3333         * input.c (next_token): Reinitialize token_buttom just after using
3334         it as a watermark with obstack_free.  Or else, a future token, big
3335         enough for triggering reallocation of the obstack chunk, could
3336         void the initialized value of token_buttom, later causing panic in
3337         obstack_free.  Rename token_buttom to token_bottom everywhere.
3339         * m4.h: Before declaring errno, first include <errno.h> and
3340         ensure that it does not define errno.
3341         Reported by Richard Stallman.
3343 Wed Nov 11 17:40:35 1992  Francois Pinard  (pinard at icule)
3345         * builtin.c: Define and use DECLARE macro for builtins.
3347         * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3348         argument, this is a common idiom for introducing long comments.
3350         * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3351         arguments.  The last argument was silently ignored.
3353         * m4.c (cmd_error): Add a missing semicolon before va_end().
3355 Tue Nov 10 08:57:05 1992  Francois Pinard  (pinard at icule)
3357         * Makefile.in: Now handle protoized sources.  Define and use U.
3358         Compile and use ansi2knr with old compilers.  Update DISTFILES.
3359         Add `aclocal.m4' to `configure' dependencies.
3360         * ansi2knr.c: New, from Ghostscript distribution.
3361         * configure.in: Define U through FP_PROTOTYPES for old compilers.
3362         Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3363         * aclocal.m4: New, provide FP_PROTOTYPES.
3364         * m4.h: Conditionnaly protoized through Args, save for varags.
3365         * builtin.c: Protoized.  Then:
3366         Include <sys/types.h> if size_t is not defined, before "regex.h".
3367         (m4_ifelse): Fetch built-in name properly for diagnostic.
3368         (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3369         (m4_regexp): Add const to `msg' declaration.
3370         (m4_patsubst): Add const to `msg' declaration.
3371         * debug.c: Protoized, save for varargs.
3372         * eval.c: Protoized.
3373         * format.c: Protoized.
3374         * input.c: Protoized.
3375         * m4.c: Protoized, save for varargs.  Then:
3376         (xfree): Accept void * instead of char *.
3377         (xmalloc): Return void * instead of char *.
3378         (xrealloc): Accept and return void * instead of char *.
3379         * macro.c: Protoized.
3380         * output.c: Protoized.
3381         * path.c: Protoized.  Then cast some (char *) over xmalloc's.
3382         * symtab.c: Protoized.
3384 Fri Nov  6 02:05:21 1992  Francois Pinard  (pinard at icule)
3386         * m4.texinfo: Remove directory from diagnostics in 30.include,
3387         51.eval, 56.errprint and 57.m4exit tests.
3389         * m4.h: Remove declarations for int or void system functions, they
3390         cause more conflicting trouble than they make good.
3392         * configure.in: Avoid configuration header file.  Add some tests.
3393         * m4.h: Remove #include "config.h".
3394         * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3395         Then, rewritten for better compliance with GNU standards.
3397 Thu Nov  5 12:37:13 1992  Francois Pinard  (pinard at icule)
3399         * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3400         because of a misplaced #endif.
3402         * Many *.[hc] files: Correct intra-line spacing here and there,
3403         according to GNU indent 1.6 advice.
3405         * configure.in: New, using Autoconf 1.2.
3406         * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3407         * Delete old configure.in, configure, etc/configure.in,
3408         etc/configure, lib/configure.in, lib/configure and config/*.
3409         Reported by Jason Merrill.
3411         * symtab.c (hash): Change (char) NULL to '\0'.
3412         Reported by Jason Merrill.
3414         * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3415         etc/nextvers.sh.  Release numbers will be edited `by hand'.
3416         * version.h: De-automatize, force value in.
3418         * m4.c: Changes in order to use a newer getopt.h.
3419         Reported by David MacKenzie.
3421         * checks/: New name for examples/.
3422         * checks/get_them: New location for etc/get_examples.
3423         * checks/check_them: New location for etc/check_examples.
3424         * Makefile.in, checks/get_them, checks/check_them: Adjust.
3425         * lib/vfprintf.c: New location for etc/vfprintf.c.
3426         * Delete empty etc/.
3427         * examples/: New name for test/.
3429 Tue Mar 10 00:29:46 1992  Francois Pinard  (pinard at icule)
3431         * Makefile.in (check): Add m4 as dependency.
3433         * m4.c: Accept --no-warnings instead of --no_warnings, and
3434         --no-gnu-extensions instead of --no_gnu_extensions.  Make the
3435         usage message more informative.
3436         Reported by David MacKenzie.
3438 Mon Mar  9 14:53:40 1992  Francois Pinard  (pinard at icule)
3440         * etc/check_examples: New name for check_examples.sh.
3441         * etc/get_examples: New name for get_examples.sh.
3442         * Makefile.in, etc/Makefile.in: Use new names.
3444         * Makefile.in: Transmit $(CC) while making in lib.
3446         * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3447         code disposition by hand.
3449 Sun Mar  8 11:01:55 1992  Francois Pinard  (pinard at icule)
3451         * m4.h: Delete definitions for abort() and exit().
3452         Reported by Richard Stallman.
3454         * config/hmake-unicos, config/s-unicos.h: New files.
3455         Reported by Hal Peterson.
3457         * eval.c (exp_term): Have N^0 return 1.
3458         Reported by Michael Fetterman.
3460         * eval.c, input.c, m4.h: Remove last comma in enums.
3461         Reported by Mike Lijewski.
3463         * Transfer of maintenance duties from Rene' to Franc,ois.
3465 Thu Oct 24 15:18:46 1991  Rene' Seindal (seindal at diku.dk)
3467         * Release 1.0.  Many thanks to those, who provided me with bug
3468         reports and feedback.
3470         * Uses GNU configure, taken from the gdb distribution.
3472         * Uses GNU getopt(), with long option names.
3474         * The -Q/+quiet option is added, which suppresses warnings about
3475         missing or superflous arguments to built-in macros.
3477         * Added default options via the M4OPTS environment variable.
3479         * The built-in format can now be configured to use sprintf as
3480         the formatting engine, for systems without [efg]cvt(3).
3482         * GNU library code is moved to the ./lib subdirectory; other
3483         utility files are now in ./etc.
3485         * Several minor bugs have been fixed.
3487 Fri Jul 26 15:28:42 1991  Rene' Seindal (seindal at diku.dk)
3489         * Fixed various bugs.  Release 0.99, manual 0.09.  Many thanks to
3490         Francois Pinard and Roland H. Pesch for providing me with reports.
3492         * The builtins incr and decr are now implemented without use of
3493         eval.
3495         * The builtin indir is added, to allow for indirect macro calls
3496         (allows use of "illegal" macro names).
3498         * The debugging and tracing facilities has been enhanced
3499         considerably.  See the manual for details.
3501         * The -tMACRO option is added, marks MACRO for tracing as soon
3502         as it is defined.
3504         * Builtins are traced after renaming iff they were before.
3506         * Named files can now be undiverted.
3508         * The -Nnum option can be used to increase the number of
3509         divertions available.
3511         * Calling changecom without arguments now disables all comment
3512         handling.
3514         * The function m4_patsubst() is now consistently declared
3515         static.
3517         * A bug in dnl is fixed.
3519         * A bug in the multi-character quoting code is fixed.
3521         * Several typos in the manual has been corrected.  More probably
3522         persist.
3524         * The m4.info file is now installed along with the program.
3526 Thu Nov 15 21:51:06 1990  Rene' Seindal (seindal at diku.dk)
3528         * Updated and enhanced version.  Release 0.75, manual 0.07.
3530         * Implemented search path for include files (-I option and
3531         M4PATH envronment variable).
3533         * Implemented builtin "format" for printf-like formatting.
3535         * Implemented builtin "regexp" for searching for regular
3536         expressions.
3538         * Implemented builtin "patsubst" for substitution with regular
3539         expressions.
3541         * Implemented builtin "esyscmd", which expands to a shell
3542         commands output.
3544         * Implemented "__file__" and "__line__" for use in error
3545         messages.
3547         * Implemented character ranges in "translit".
3549         * Implemented control over debugging output.
3551         * Implemented multi-character quotes.
3553         * Implemented multi-character comment delimiters.
3555         * Changed predefined macro "gnu" to "__gnu__".
3557         * Changed predefined macro "unix" to "__unix__", when the -G
3558         option is not used.  With -G, "unix" is still defined.
3560         * Changed "shift", "$@" and "$*" to not insert spaces afters
3561         commas.
3563         * Added program name to error messages.
3565         * Fixed two missing null bytes bugs.
3567 Mon Jan 22 21:08:52 1990  Rene' Seindal (seindal at diku.dk)
3569         * Initial beta release.  Release 0.50, manual 0.05.
3571         -----
3573         $Revision$ $Date$
3575         Local Variables:
3576         coding: utf-8
3577         End:
3579         Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3580         2005, 2006, 2007 Free Software Foundation, Inc.
3582         Copying and distribution of this file, with or without
3583         modification, are permitted provided the copyright notice
3584         and this notice are preserved.