1 2006-10-26 Eric Blake <ebb9@byu.net>
3 * src/input.c (pop_input): Remove unnecessary code.
5 2006-10-25 Eric Blake <ebb9@byu.net>
7 * src/symtab.c (symtab_init): Avoid size_t overflow.
8 * src/output.c (make_diversion): Avoid size_t overflow.
9 * doc/m4.texinfo (Diversions): Test this fix.
10 * src/input.c (input_block): Remove unused member. Reduce size
12 (push_file, pop_input): Avoid useless assignment.
13 * NEWS: Document the bug fix.
15 Redo location tracking. Instead of having just files track the
16 line to return to when popping input, now all input blocks track
18 * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
20 (input_block): Have line and file storage for all input types, and
22 (input_change): New global flag.
23 (push_file, push_macro, push_string_init, push_wrapup): Store
25 (push_string_finish, pop_input, pop_wrapup): Notice changes in
27 (peek_input): Adjust to new member names.
28 (next_char, next_char1): Adjust location if needed.
29 (skip_line): Simplify restoring location.
30 * doc/m4.texinfo (Location): Augment the test to catch line
31 location of expansion of multi-line arguments.
32 Reported by Stepan Kasal.
34 2006-10-23 Eric Blake <ebb9@byu.net>
36 * doc/m4.texinfo (Macro Arguments): Document that leading space
37 in argument collection stops at macro expansion.
38 (Incompatibilities): Document POSIX whitespace wording issue.
40 2006-10-20 Eric Blake <ebb9@byu.net>
42 * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
43 TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
44 end of a TeX line splits incorrectly.
45 (Foreach, Improved foreach): Write these sections, borrowing ideas
46 from CVS head and from m4sugar.
47 * checks/get-them: Accomodate new way to show trailing space in
49 * examples/foreach.m4: Make usable in documentation.
50 * examples/foreachq.m4: New file.
51 * examples/foreachq2.m4: New file.
52 * examples/foreach2.m4: New file.
53 * NEWS: Document the documentation updates.
55 2006-10-19 Eric Blake <ebb9@byu.net>
57 * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
58 (m4_maketemp): Provide traditional behavior.
59 * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
60 new `mkstemp' macro and the flaws of the old `maketemp'.
61 (Incompatibilities): Move maketemp discussion to...
62 (Extensions): ...here, since -G now supresses the GNU extension.
63 * NEWS: Document this.
65 * examples/forloop.m4: Simplify.
66 * examples/forloop2.m4: New file.
67 * examples/quote.m4: New file.
68 * doc/m4.texinfo (Loops): Rename to...
69 (Shift): ...this node.
70 (Forloop, Foreach, Improved forloop, Improved foreach): New
73 2006-10-17 Eric Blake <ebb9@byu.net>
75 * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
77 * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
78 gnulib headers, rather than in top directory.
79 * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
82 2006-10-16 Eric Blake <ebb9@byu.net>
84 * doc/m4.texinfo: Backport some minor cleanups from head.
85 (Cleardivert): Rename from cleardiv.
87 * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
88 a section of Preliminaries.
89 (Operation modes, Preprocessor features, Limits control)
90 (Frozen state, Debugging options, Command line files): Subdivide
92 (Input processing, Quoting Arguments, Define, Arguments)
93 (Cleardiv, Format, M4exit): Fix grammar of references.
94 (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
95 (Debug Levels, Debug Output, Include, Search Path, Divert)
96 (Platform macros, Syscmd, Location, Extensions): Point to new
98 (Top, Loops, Include, Undivert, Location, Incompatibilities):
99 Improve file references.
101 2006-10-14 Eric Blake <ebb9@byu.net>
103 * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
105 Reported by Ralf Wildenhues.
107 * src/builtin.c (m4_undivert): Check for read error.
109 2006-10-13 Eric Blake <ebb9@byu.net>
111 * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
112 header files are included, since <unistd.h> can affect the tests.
114 Reported by Martin Koeppe.
116 Backport head's usage of clean-temp module, as it is cleaner than
118 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
119 clean-temp closeout', and remove tmpfile-safer.
120 * src/m4.h (includes): Adjust.
121 (m4_path_search): Rename from path_search, to avoid collision
123 * src/m4.c (main): Install closeout handler. Adjust caller.
124 (usage): Now done by closeout module.
125 * src/builtin.c (m4_m4exit): Likewise.
126 (m4_undivert, include): Adjust callers.
127 * src/freeze.c (reload_frozen_state): Likewise.
128 * src/path.c (m4_path_search): Rename from path_search.
129 * src/output.c (output_temp_dir): New variable.
130 (cleanup_tmpfile, m4_tmpfile): New functions, from head.
131 (insert_diversion, make_room_for): Use them.
132 * doc/m4.texinfo (Diversions): Document this, and add a test.
133 (Improved fatal_error): Fix typo.
134 (Maketemp): Port test to mingw, and no longer hide from
136 * NEWS: Document the change in TMPDIR behavior.
138 * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
139 macros, to work with recent gnulib-tool update.
141 * src/builtin.c (m4_builtin, m4_indir): Allow transparent
142 handling of defn results.
143 * doc/m4.texinfo (Builtin, Indir): Add test cases.
144 * NEWS: Document this.
146 2006-10-12 Eric Blake <ebb9@byu.net>
148 * doc/m4.texinfo (Location): Fix typo in previous commit.
149 (Changeword): Catch one more case.
150 * src/input.c (skip_line): Fix case when outer file used macro to
153 2006-10-11 Eric Blake <ebb9@byu.net>
155 * src/input.c (enum input_type): Add additional types, to shave
156 time off the common case.
157 (push_wrapup): Wrapped strings remember location.
158 (push_string_finish): Normal strings carry no location.
159 (push_file): Start new files uninitialized.
160 (peek_input, next_char_1): Optimize common cases by updating
161 location only on new input types.
162 (pop_input): Update to honor new input types.
163 (skip_line, push_string_finish): Fix regression in previous patch
164 when dnl is not followed by newline in included file.
165 (push_string_init): Initialize all fields of INPUT_STRING sooner.
166 (peek_token): Simplify.
167 (peek_input): Don't pop input files on peek, so that __file__ and
168 __line__ as last token of include file work correctly.
169 * doc/m4.texinfo (History): Mention 1.4.8.
170 (Answers): Split into sections, one per answer.
171 (Improved exch, Improved cleardivert, Improved fatal_error): New
173 (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
174 new m4wrap location semantics.
175 (Changeword): Add test that caught the regression.
176 * NEWS: Document this.
178 * src/macro.c (expand_macro): In macro expansion errors, report
179 line number at open parenthesis.
180 * src/input.c (next_token): Fix off-by-one bug in reporting end
181 of file in unterminated comment and string.
182 (file_names): New obstack, necessary since expand_macro now hangs
183 on to file names longer than the files remain open.
184 (input_init): Initialize new obstack.
185 (push_file): Use new obstack. Delay updates to current_file
186 until after expand_macro has restored state.
187 (peek_input, next_char_1): Update current_file if necessary.
188 (pop_wrapup): Release memory.
189 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
191 (Dnl): Update to the new location reporting rules.
192 * NEWS: Document these changes.
194 2006-10-10 Eric Blake <ebb9@byu.net>
196 * src/macro.c (argc_stack, argv_stack): New variables for sharing
197 obstacks across multiple macro calls.
198 (expand_input): Initialize and tear down stack once per input
199 file, instead of once per macro.
200 (expand_macro): Reuse existing stacks when possible.
201 (collect_arguments): Simplify slightly.
203 * src/path.c (include_env_init): Fix botched patch application.
204 Reported by Ralf Wildenhues.
206 2006-10-09 Eric Blake <ebb9@byu.net>
208 * src/m4.c (usage, main): Detect write failures to stderr.
209 * src/builtin.c (m4_m4exit): Likewise.
210 * NEWS: Document this.
212 * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
214 * NEWS: Document this.
215 * doc/m4.texinfo (Invoking m4): Likewise.
217 2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
219 * src/path.c (include_env_init): Copy the string returned
220 by getenv before overwriting it; POSIX disallows this.
222 2006-10-09 Eric Blake <ebb9@byu.net>
224 * src/m4.c (main): Defer debugfile until after --help.
225 * configure.ac (AC_INIT): Bump version number.
226 * NEWS: Start changes of 1.4.7a.
228 2006-09-25 Eric Blake <ebb9@byu.net>
232 * configure.ac (AC_INIT): Bump version number.
233 * NEWS: Describe changes since 1.4.6.
235 2006-09-21 Eric Blake <ebb9@byu.net>
237 * doc/m4.texinfo (Invoking m4): Add clarification on option
240 Reported by Mikhail Teterin.
242 * bootstrap: Add --force option, based on idea from coreutils.
243 * README: Document that ./bootstrap and autoreconf are for
244 developers, and not lightly done in tarballs.
246 2006-09-20 Eric Blake <ebb9@byu.net>
248 * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
249 deprecation warning on -e.
250 * doc/m4.texinfo (Invoking m4, Extensions): Document this.
251 * NEWS: Document this.
253 2006-09-19 Eric Blake <ebb9@byu.net>
255 * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
256 -o/--error-output to --debugfile, and deprecate the former. This
257 will allow a future release to be more consistent with other GNU
258 tools, with -o/--output affecting stdout, not debug.
259 * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
260 * NEWS: Document this.
262 2006-09-14 Eric Blake <ebb9@byu.net>
264 * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
265 --diversions. `m4 --help --version' now displays help, not
267 (interactive, frozen_file_to_read, frozen_file_to_write): Move to
269 (show_help, show_version): No longer needed.
270 (long_options, DIVERSIONS_OPTION): Backport patch from head to
271 distinguish between -N and --diversions in warning.
272 * doc/m4.texinfo (Invoking m4): Document this.
275 2006-09-11 Eric Blake <ebb9@byu.net>
277 * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
278 * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
280 (debug_set_file): Use STDOUT_FILENO.
281 * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
282 with POSIX in regards to unread input.
283 * NEWS: Document this fix.
284 * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
286 2006-09-07 Eric Blake <ebb9@byu.net>
288 * m4/gnulib-cache.m4: Update to newer gnulib-tool.
289 * src/m4.h (push_file): Change prototype.
290 * src/input.c (push_file, peek_input, next_char_1): Only call getc
291 once at EOF, to avoid double ^D on terminal stdin; regression from
293 (push_file, pop_file): Allow reading stdin twice.
294 * src/m4.c (main): Likewise.
295 * src/builtin.c (include): Update caller.
296 * NEWS: Document this change.
297 * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
298 (Syscmd): Add a test that failed before this patch.
300 2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
302 * checks/check-them: Quote $pwd.
304 2006-09-05 Eric Blake <ebb9@byu.net>
306 * src/builtin.c (define_macro): Warn on invalid macro name.
307 * NEWS: Document this change.
308 * doc/m4.texinfo: Fix typos.
309 (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
310 (Ifelse): Backport some improvements from head.
312 2006-09-04 Eric Blake <ebb9@byu.net>
314 * doc/m4.texinfo (Changeword): Skip test on mingw, where the
315 native echo is braindead.
316 * checks/check-them (strip_needed): Ignore \r in output. Now the
317 testsuite will pass when cross-compiling from cygwin to mingw.
319 * src/input.c (peek_input): Fix regression in handling macro
320 without arguments as last token in file; debian bug 385720.
321 (next_token): Always consume an input character.
322 Reported by Andreas Schultz.
323 * configure.ac (AC_INIT): Bump version number.
324 * NEWS: Document this fix.
325 * doc/m4.texinfo (History): Mention next version.
326 (Changeword): Add example that exposes this bug.
329 2006-08-25 Eric Blake <ebb9@byu.net>
333 * configure.ac (AC_INIT): Bump version number.
334 * NEWS: Describe changes since 1.4.5.
336 * Makefile.maint (web-manual): Give up on VPATH build during
337 distribution. But distributions are made so infrequently that
338 this is not too much of a hardship.
339 * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
342 2006-08-24 Eric Blake <ebb9@byu.net>
344 * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
345 Solaris, produce output on just one argument.
346 (m4_regexp, m4_patsubst): For consistency, do likewise.
347 (m4_patsubst): Allow zero-length match at end of string.
348 * doc/m4.texinfo (Sysval): Fix overfull hbox.
349 (Bugs, Macro Arguments): Minor fixes.
350 (Other tokens): Rearrange node order.
351 (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
352 * NEWS: Document these fixes.
354 2006-08-22 Eric Blake <ebb9@byu.net>
356 * src/input.c (pop_input): Avoid empty filename with -di option.
357 * src/debug.c (debug_message_prefix): Put space before message.
359 * m4/gnulib-cache.m4: We don't explicitly use alloca module.
361 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
362 * Makefile.maint (fetch): Simplify, now that we can use gnupload.
364 * checks/check-them: State why a test is skipped.
365 * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
367 * ChangeLog: Add copyright.
373 * examples/COPYING: New file, add copyright for all the examples.
374 * checks/get-them: Put copyright on testsuite files.
376 2006-08-18 Eric Blake <ebb9@byu.net>
378 Don't let unrelated child processes see too many files.
379 * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
380 * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
381 spelling in error message.
382 * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
383 (debug_set_output): Close debug file on exec.
384 * src/m4.h (includes): Add cloexec.h.
385 * src/output.c (make_room_for): Close diversions on exec.
386 * src/path.c (path_search): Close include files on exec.
387 * NEWS: Document this.
389 Regular expressions were leaking memory.
390 * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
392 (m4_regexp, m4_patsubst): Avoid memory leak.
393 * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
395 (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
396 from O(n^2) to O(n) for calculating word_start.
397 (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
398 O(1) bitmap, not O(n) search string.
399 * NEWS: Document this fix.
401 2006-08-17 Eric Blake <ebb9@byu.net>
403 * NEWS: Document previous checkin.
405 * src/builtin.c (substitute): Avoid core dump when accessing
406 beyond bound of regular expression.
407 Reported by Karl Nelson.
408 * doc/m4.texinfo (Regexp): Add example that causes core dump on
409 some architectures prior to this patch.
412 2006-08-16 Eric Blake <ebb9@byu.net>
414 * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
415 clear that dumpdef does not always go to stderr.
417 * src/builtin.c (m4_errprint): Flush buffers before printing to
421 2006-08-15 Eric Blake <ebb9@byu.net>
423 * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
424 per debian bug 96075.
425 * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
426 (Changeword): Don't use shift as an example of a swallowed word.
427 (Divert): Discuss fact that divert is an English word.
428 Reported by Richard A Nelson.
430 2006-08-14 Eric Blake <ebb9@byu.net>
432 * doc/m4.texinfo (Invoking m4): Minor fixes.
434 2006-08-12 Eric Blake <ebb9@byu.net>
436 * doc/m4.texinfo (Arguments): Hint at better exch macro.
437 (Answers): Provide a better definition.
439 2006-08-09 Eric Blake <ebb9@byu.net>
441 * doc/m4.texinfo (Incompatibilities): Document that m4 does not
442 yet understand locales.
443 * NEWS: Fix wording of a few items.
445 2006-08-08 Eric Blake <ebb9@byu.net>
447 Avoid printing `NONE:0:' in error messages.
448 * src/m4.h (m4_error_at_line): New function.
449 * src/m4.c (m4_error_at_line): Implement.
450 * src/input.c (skip_line, input_init, next_token): Use "", not
451 "NONE", for no file, since NONE can be a real file name.
452 * src/macro.c (expand_argument): Likewise.
453 * src/debug.c (debug_message_prefix, trace_header): Check for
455 * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
456 (Location): Document that synclines and internal message format
457 are not impacted by redefining these macros.
458 (M4exit): Hint at bug in fatal_error.
459 (Answers): Provide workaround to match m4 output.
461 * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
462 * src/m4.h (m4_error): New function.
463 (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
464 error module deficiencies.
465 (reference_error, suppress_line): No longer needed.
466 * src/m4.c (m4_error): Implement.
467 (main): No longer need to install error callback.
469 2006-08-04 Eric Blake <ebb9@byu.net>
471 * src/m4.h (program_name): Declare.
472 (suppress_line): New variable.
473 (M4ERROR_AT_LINE): New macro.
474 * src/m4.c (reference_error, main): Follow GNU Coding Standards
475 for error message format.
476 * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
477 * src/macro.c (expand_argument): Likewise.
478 * checks/check-them (examples): Adjust to new message format.
479 * src/builtin.c (m4___program__): New builtin.
480 * doc/m4.texinfo (Location): Split from Errprint into new node,
481 and document __program__.
482 (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
483 (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
485 (Extensions): Document __program__.
486 * NEWS: Document this change.
488 2006-08-03 Eric Blake <ebb9@byu.net>
490 Don't confuse leading `(' in comment or quote with start of
492 * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
494 (peek_input): Make private to input.c.
495 (peek_token): New prototype.
496 * src/input.c (default_word_regexp): Reduce ifdefs.
497 (peek_input): Make static.
498 (next_token): Return new token types.
499 (match_input, MATCH): Add argument consume, which controls
500 whether match should be pushed back.
501 (peek_token): New function.
502 (token_type_string) [DEBUG_INPUT]: New function.
503 * src/macro.c (expand_token, expand_argument, collect_arguments):
504 Handle new token types.
505 * doc/m4.texinfo (Changequote, Changecom): Document this.
506 * NEWS: Document this.
508 * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
510 * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
511 overflow detection when sigstack exists but is not implemented.
512 Fixes debian bug 154053.
514 Reported by David Perlin.
516 2006-08-02 Eric Blake <ebb9@byu.net>
518 * src/input.c (MATCH): Fix EOF detection on multi-byte comment
521 2006-08-01 Eric Blake <ebb9@byu.net>
523 * src/input.c (skip_line, next_token): Remember current file in
524 case input file ends abruptly. Addresses debian bug 175365.
525 (pop_input): Defer freeing storage that holds previous file
527 (pop_wrapup): to here, after error message is issued.
528 * src/macro.c (expand_argument): Remember current file in case
529 input file ends abruptly.
530 * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
531 (M4wrap): Adjust testsuite accordingly.
532 (Errprint): Document line number limitation of m4wrap.
533 * NEWS: Document this fix.
536 2006-07-31 Eric Blake <ebb9@byu.net>
538 * src/input.c (peek_input, next_char, match_input): Be eight-bit
539 clean; fixes debian bug 311378.
540 * doc/m4.texinfo (Syntax): Describe eight-bit handling.
541 (Changequote, Changecom): Add examples to test this.
542 * NEWS: Document this fix.
544 Reported by Steven Augart.
546 * doc/m4.texinfo: Whitespace fix.
547 * checks/get-them: Avoid exceeding 14-char file name limit.
550 2006-07-30 Eric Blake <ebb9@byu.net>
552 * src/path.c (path_search): Detect allocation failure.
554 Use native free when it is good enough.
555 * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
556 * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
558 * src/symtab.c (free_symbol): Likewise.
559 * src/m4.c (xfree, main): Likewise.
560 * src/m4.h (obstack_chunk_free): Likewise.
561 * src/path.c (path_search): Likewise.
562 * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
564 * doc/m4.texinfo (Errprint): Add example for last patch.
565 * checks/check-them: Account for VPATH in latest example.
567 2006-07-29 Eric Blake <ebb9@byu.net>
569 * src/path.c (path_search): Add result parameter, so that
570 -I can be accounted for. Debian bug 53685.
571 * src/m4.h (path_search): Update prototype.
572 * src/m4.c (main): Adjust callers.
573 * src/freeze.c (reload_frozen_state): Likewise.
574 * src/builtin.c (include, m4_undivert): Likewise.
575 * NEWS: Document this change.
576 Reported by Nicolas Lichtmaier.
578 2006-07-28 Eric Blake <ebb9@byu.net>
580 * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
581 several non-GNU makes.
582 * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
583 * src/m4.h: Likewise.
584 * src/input.c (push_wrapup): Avoid compiler warning with Solaris
587 2006-07-27 Eric Blake <ebb9@byu.net>
589 * doc/m4.texinfo: Use @acronym{GNU} throughout.
590 (History): Update for 1.4.6.
592 * src/m4.h (_): Remove K&R cruft.
593 * src/builtin.c: Likewise.
594 * src/debug.c: Likewise.
595 * src/eval.c: Likewise.
596 * src/macro.c: Likewise.
597 * src/stackovf.c: Likewise.
599 * doc/Makefile.am (m4.1): Improve man page.
600 * src/m4.c (usage): Improve --help output, including adding the
601 bug reporting address.
602 (main): Follow GNU Coding Standards for --version output.
604 2006-07-26 Eric Blake <ebb9@byu.net>
606 * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
607 end-comment consistently, to match POSIX.
609 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
610 (Dnl, M4wrap, Include): Document EOF issues, and add examples.
611 (Incompatibilities): Document incompatibility of changecom
612 vs. macro names, and of EOF in include.
613 * src/input.c (next_token): Reject unterminated comments at EOF.
614 (skip_line): Warn on unterminated dnl at EOF.
615 * NEWS: Document these changes.
617 2006-07-25 Eric Blake <ebb9@byu.net>
619 * m4/gnulib-cache.m4: Update to reflect gnulib's split of
620 stdio-safer into fopen-safer and tmpfile-safer.
621 * src/m4.c: Remove redundant include.
623 2006-07-24 Eric Blake <ebb9@byu.net>
625 Fix bugs related to stream handling.
626 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
627 unlocked-io stdio-safer stdlib-safer close-stream.
628 * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
629 provided by gnulib if needed.
630 * src/output.c [! HAVE_TMPFILE]: Likewise.
631 * src/m4.h (includes): Replace unistd, stdio, and stdlib with
632 their safer counterparts.
633 (retcode): New global variable.
634 * src/input.c (pop_input): Check for read failure.
635 * src/freeze.c (reload_frozen_state): Likewise.
636 (produce_frozen_state): Check for write failure.
637 * src/debug.c (debug_set_file): Likewise.
638 * src/m4.c (usage, main): Likewise.
639 (retcode): Make global.
640 * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
641 status is non-zero except when everything succeeds.
642 * doc/m4.texinfo (M4exit): Document these changes.
643 (Incompatibilities): Remove documentation of bug now fixed.
644 * NEWS: Document these fixes.
646 2006-07-22 Eric Blake <ebb9@byu.net>
648 * src/format.c (format): Avoid compiler warning that str may be
651 2006-07-21 Eric Blake <ebb9@byu.net>
653 * src/m4.h [UNIX]: Add more platforms that are close enough to
654 categorize as UNIX, but which don't predefine __unix__.
655 Reported by Nelson H. F. Beebe.
657 2006-07-20 Eric Blake <ebb9@byu.net>
659 * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
660 to explicitly ask for --assume-autoconf=2.60.
662 2006-07-19 Eric Blake <ebb9@byu.net>
664 * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
665 and exits normally with 129.
666 Reported by Nelson H. F. Beebe.
669 * src/m4.h (EXIT_MISMATCH): Define.
670 * src/freeze.c (reload_frozen_state): Detect version mismatch, by
671 exiting with status 63.
672 * src/m4.c (usage): Document this.
673 * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
676 * doc/m4.texinfo (copying): Relax restriction on front-cover and
679 2006-07-17 Eric Blake <ebb9@byu.net>
681 * src/format.c (format): Support F, g, and G specifiers.
682 * doc/m4.texinfo (Format): Document this.
683 * NEWS: Document this addition.
685 * doc/m4.texinfo (Builtin): Delete redundant text.
687 * configure.ac (AC_INIT): Bump version number.
688 * src/builtin.c (substitute): Bah. Fix buffer overrun.
689 * NEWS: Document this fix.
691 2006-07-15 Eric Blake <ebb9@byu.net>
695 * configure.ac (AC_INIT): Bump version number.
696 * NEWS: Describe changes since 1.4.4.
698 * src/m4.c (usage): Document exit status.
699 * doc/m4.texinfo: Use `exit status', not `exit code'.
700 (Invoking m4): Document exit status.
702 * bootstrap: Backport --help, --version from head.
703 (func_update): New function, for easily grabbing up-to-date files
705 * Makefile.maint (web-manual): Fix for VPATH builds.
707 2006-07-14 Eric Blake <ebb9@byu.net>
709 * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
710 looks bad in info. Use @deffn rather than @example for
711 describing prototypes. Fix awkward wording and grammar.
713 * src/builtin.c (substitute): Warn on bad escape sequences.
714 Ignore trailing backslash.
715 * doc/m4.texinfo (Regexp): Add documentation for this.
716 * NEWS: Document this change.
718 * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
719 * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
721 (Dnl): Update example to show side effects.
722 * checks/get-them: Generate three digit test names.
723 * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
725 2006-07-13 Eric Blake <ebb9@byu.net>
727 * src/input.c (input_init): Simplify.
728 (set_word_regexp): Treat empty string as default, since empty
729 regexp would disable word parsing.
730 * src/m4.c (user_word_regexp): Default to empty string.
731 * src/builtin.c (builtin_tab): Make changeword blind.
732 * doc/m4.texinfo (Changeword): Document this.
733 * NEWS: Document this.
734 * TODO: Knock off completed items.
736 * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
738 * doc/m4.texinfo (Undefine, Pushdef): Test this.
739 * NEWS: Document this change.
741 * src/builtin.c (numeric_arg): Treat empty string as 0, with a
742 warning. Detect quoted leading space and overflow as warnings.
743 (m4_eval): Treat empty radix as 10, and allow output in radix 1.
744 Treat width as minimum number of digits, as required by POSIX.
745 (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
747 (m4_substr): Likewise. Silently treat empty start as 0.
748 (m4_undivert): Treat ` 1a' as file, not diversion 1.
749 * src/eval.c (eval_lex): Parse radix 1 numbers.
750 * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
752 (Manual): Document behavior of numeric parsing of empty string.
753 (Divert, Incr): Document error handling.
754 (Eval): Document radices better.
755 (Incompatibilities): Document translit incompatibility.
756 * NEWS: Document these changes.
758 * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
759 (web-manual): Simplify.
760 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
761 * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
762 (MAINTAINERCLEANFILES): Clean it as well.
763 * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
764 (MAINTAINERCLEANFILES): Clean it as well.
766 2006-07-12 Eric Blake <ebb9@byu.net>
768 * doc/m4.texinfo (Extensions): Document how to overcome
769 implementation difference in > 9 positional parameters.
771 * src/m4.c (usage): Sort within sections.
772 (nesting_limit): Raise default from 250 to 1024.
773 * doc/m4.texinfo: Use file name, not filename, per GNU coding
774 standard. Use @option where appropriate.
775 (Invoking m4): Sort to match --help output.
776 (Debug Levels): Sort.
777 (Frozen files): Sort and break into two nodes.
779 * src/m4.c (nesting_limit): Raise default from 250 to 1024.
780 * NEWS: Document raised -L limit.
782 2006-07-11 Eric Blake <ebb9@byu.net>
784 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
785 stress-test changeword before a release.
786 * doc/m4.texinfo: More doc cleanups.
787 (Copying This Manual): New node; actually include the FDL in the
789 * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
790 * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
791 * NEWS: Mention documentation improvements.
793 * src/m4.h (OS2): New platform macro.
794 * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
796 * doc/m4.texinfo (Platform macros): Document it.
797 (Sysval): Remove non-portable test of system("").
798 * NEWS: Document this change.
799 Reported by Andreas Buening.
801 2006-07-09 Eric Blake <ebb9@byu.net>
803 * doc/m4.texinfo (Undivert): Fix typo in last commit.
804 * src/m4.c (usage): Document M4PATH.
805 * src/path.c (path_search): Reject empty string.
806 * src/output.c (insert_diversion): Ignore diversion 0.
807 * src/builtin.c (m4_undivert): Ignore empty string.
808 * NEWS: Document this fix.
810 2006-07-08 Eric Blake <ebb9@byu.net>
812 * checks/get-them: Make filtering easier.
813 * checks/check-them: Filter non-input lines, so line counts are
814 more realistic in the documentation, and so changeword tests work
815 even when dnl is disabled.
816 * doc/m4.texinfo: Adjust example line numbers. Clean up
817 front-matter, following autoconf's example.
818 (Changeword): Enable tests, skipping if changeword not supported.
819 (Define, Defn, Ifelse): Backport more examples from head.
820 (Input processing, Answers): New nodes, backported from head.
821 (Include): Expand test to cover empty filename.
822 (Undivert): Add test of undivert(0).
824 2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
826 * doc/m4.texinfo: Fix spelling errors.
828 2006-07-07 Eric Blake <ebb9@byu.net>
832 * doc/Makefile.am (m4.1): No need to go through a temporary file;
833 this also ensures timestamps are updated.
834 * src/m4.h (includes): Require config.h. Assume string.h,
835 stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
836 than prototyping ourselves.
837 (builtin_func): Add parameter type-checking.
838 (voidstar): Delete, now that we assume C89.
839 * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
841 * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
844 2006-07-06 Eric Blake <ebb9@byu.net>
846 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
848 * src/m4.h (includes): Add binary-io.h for O_BINARY.
849 * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
850 #ifdef. Fixes patch from 2005-02-03 for cygwin.
851 * NEWS: Mention this fix.
853 * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
854 * src/builtin.c (m4_syscmd): Work around OS/2 bug.
856 * Makefile.am (SUBDIRS): Build . before src, so that autoheader
857 runs first when needed.
858 * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
859 once in srcdir rather than multiple times in VPATH builds.
861 2006-07-03 Eric Blake <ebb9@byu.net>
863 * checks/check-them: Use portable = in test.
864 * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
865 directory, as required by Solaris cc. Include built headers, as
866 required by Solaris make in VPATH build.
867 * checks/Makefile.in: Use $(srcdir) where needed.
868 (CHECKS): Factor $(srcdir) into macro.
869 (DISTFILES): Likewise. Automake takes care of distributing
872 (Makefile): Use modern syntax of config.status.
873 * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
874 Avoid overfull and underfull hboxes in dvi.
876 Fix 'make check' in VPATH build. All files included by testsuite
877 now live in a single directory. Use forloop.m4 in testsuite.
878 * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
880 * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
882 * checks/Makefile.in (DISTFILES): Don't distribute moved files.
883 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
884 * checks/check-them: Avoid s/// when filename is in pattern.
885 * examples/forloop.m4: Fix to match documentation.
886 * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
888 (Loops, Format): Actually use forloop.m4 in tests.
890 2006-07-02 Eric Blake <ebb9@byu.net>
892 * checks/Makefile.in (exec_prefix, prefix): New macros, so that
893 $(bindir) works in installcheck.
894 (check, installcheck): No longer change directory, so that
895 distcheck works with a read-only builddir.
896 * checks/check-them: Work when pwd is no longer builddir.
898 2006-07-01 Eric Blake <ebb9@byu.net>
900 * GNUmakefile: New file, borrowed from coreutils.
901 * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
902 * Makefile.maint (Makefile): Delete this rule, now that
903 GNUmakefile includes Makefile.
905 2006-06-30 Eric Blake <ebb9@byu.net>
907 For compatibility with other m4 implementations, sysval returns
908 signal<<8 rather than 0 if syscmd is terminated by a signal.
909 * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
910 * src/builtin.c (include): Include sys/wait.h when stdlib.h does
911 not provide wait macros.
912 (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
913 (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
914 (m4_esyscmd): Set sysval to -1 on failure.
915 (m4_sysval): Print 127 on failure, and accomodate signals if they
917 * NEWS: Document this change.
918 * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
920 * checks/check-them: Likewise.
921 * src/debug.c (debug_set_file): Work around mingw fstat bug.
923 * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
924 * src/freeze.c (produce_frozen_state): Use new spelling of
926 * src/builtin.c (predefined_tab): Add __windows__ on non-unix
928 (m4_syscmd, m4_esyscmd): The empty command is successful.
929 * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
930 Document platform-dependence of system().
931 (Syscmd): Add example.
932 (Esyscmd): Make example more robust, and actually demonstrate
934 (Sysval): Expand test to cover esyscmd code path, and to check
935 that empty command is successful. Add conditional check for
937 (Other Incompatibilities): Move platform macros from here...
938 (Platform macros): ...to this new node. Add windows macro.
939 Check that exactly one platform macro is provided.
940 * checks/check-them: Improve trap cleanup. Tolerate dirname and
941 .exe in error messages. Allow for skipping checks.
942 * configure.ac (HAVE_EFGCVT): Kill dead configure check.
943 * NEWS: Document platform macros.
945 2006-06-29 Eric Blake <ebb9@byu.net>
947 Fix buffer overrun bug.
948 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
950 * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
951 variant instead, since [efg]cvt are obsolete and our use of them
952 was buggy (savannah sr #104303).
953 (format): Fix buffer overflow by using xasprintf.
954 * doc/m4.texinfo (Format): Expand format test to catch both bugs.
955 * NEWS: Document this fix.
957 * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
959 (AC_CACHE_CHECK): Cache search for ecvt.
961 2006-06-27 Eric Blake <ebb9@byu.net>
963 * doc/m4.texinfo (Eval): Document 32-bit signed limitations
964 required by POSIX, and add example that exposed core dump on x86
966 (Incompatibilities): Document incompatibility in eval precedence.
967 * src/eval.c (shift_term): Explicitly mask, to avoid undefined
969 (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
970 * NEWS: Document this change.
972 * doc/m4.texinfo: Use @noindent consistently.
973 (Quoting Arguments): Document that unquoted parentheses group
975 (Pseudo Arguments): Expand tests to show this.
976 (Incompatibilities): Contrast traditional behavior of
979 2006-06-24 Eric Blake <ebb9@byu.net>
981 * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
982 (AC_CHECK_HEADERS_ONCE): Use this new feature.
983 (AC_CHECK_FUNCS_ONCE): Likewise.
985 2006-06-23 Eric Blake <ebb9@byu.net>
987 * doc/m4.texinfo: Quoting cleanup throughout - follow
988 autoconf-recommended style of one level of quote per parenthesis
989 in the normal case. Adjust error messages to match GNU coding
990 standards (and to allow 'make check' to pass again).
991 (Quoted strings, Inhibiting Invocation): Turn more examples into
993 (Comments): Resolve FIXME by adding example.
994 (Define): Add example about underquoting.
995 (Defn): Add example about use of $0.
996 (Indir, Format): Resolve FIXME done in last commit.
997 (Ifelse): Add example about creating blind macro.
998 (Debugging): Fix grammar.
999 (Dnl): Add example about dnl with arguments.
1000 (M4wrap): Be explicit that LIFO order is non compliant, and will
1002 (Undivert): Resolve FIXME by adding example.
1003 (Frozen files): Document that m4wrap and sysval will not work
1004 consistently until m4 2.0.
1005 (Incompatibilities): Document another POSIX compliance bug, this
1006 time with changequote. Document a traditional incompatibility
1007 with partial input spanning file boundaries.
1009 Make error messages more consistent with GNU coding standards -
1010 start with lower case, and don't end sentence with punctuation.
1011 * src/debug.c (trace_pre): Update message wording.
1012 * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1014 * src/freeze.c (produce_frozen_state, issue_expect_message),
1015 (reload_frozen_state): Likewise.
1016 * src/input.c (push_string_init, pop_init, init_macro_token),
1017 (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1018 * src/m4.c (stackovf_handler, main): Likewise.
1019 * src/macro.c (expand_token, expand_argument, call_macro),
1020 (expand_macro): Likewise.
1021 * src/output.c (make_room_for, output_text, insert_file),
1022 (freeze_diversions): Likewise.
1023 * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1025 * src/builtin.c (builtin_tab): Make format and indir blind.
1026 (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1027 * NEWS: Mention the change to builtins.
1029 2006-06-22 Eric Blake <ebb9@byu.net>
1031 Robustify frozen file format.
1032 * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1033 macro. Require V first, and only accept it once. For F, use
1034 placeholder if builtin is not found, rather than warning.
1035 * src/m4.h (m4_placeholder): New prototype.
1036 * src/builtin.c: Unify error message style.
1037 (m4_placeholder): New function, warn if invoked.
1038 (builtin_tab): Add m4_placeholder.
1039 (m4_defn): Warn if placeholder is encountered.
1040 (find_builtin_by_addr): Handle placeholder.
1041 (find_builtin_by_name): Return placeholder on failure.
1042 (m4_builtin): Treat placeholder as undefined.
1043 * doc/m4.texinfo (Frozen files): Document changes in V and F.
1044 * NEWS: Document this change.
1045 Reported by Bruno Haible.
1047 * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
1048 (tabchar): New macro, so that 'make check' still works.
1049 (Invoking m4): Document that ignored compatibility options -B, -S,
1050 and -T each consume an argument.
1051 * checks/get-them: Honor @tabchar{}.
1053 Avoid compiler warnings during -DDEBUG.
1054 * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1055 [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1056 * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1057 (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
1058 (next_token) [DEBUG_INPUT]: Print before returning.
1059 * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1060 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1062 Avoid mkstemp bugs on various platforms.
1063 * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1064 * src/output.c [! HAVE_MKSTEMP]: Delete.
1065 * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1066 * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1067 * NEWS: Document this.
1069 * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1070 Reported by Bruno Haible.
1072 2006-06-21 Eric Blake <ebb9@byu.net>
1074 Avoid obsolete sigstack when POSIX sigaltstack is available.
1075 * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1077 * configure.ac (AC_CHECK_HEADERS): Likewise.
1078 (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1079 obsolete and most hosts now have it in signal.h.
1080 (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1081 (AC_CACHE_CHECK): Cache decision to use stackovf.
1082 (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1083 * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1084 (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1085 simplify later code.
1086 (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1087 in case of dereferencing a member of a NULL pointer.
1088 (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1090 (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1091 EXIT_FAILURE in error, indent preprocessor directives.
1092 [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1094 [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1095 Reported by Santiago Vila.
1097 2006-06-19 Eric Blake <ebb9@byu.net>
1101 2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
1103 * checks/Makefile.in (PATH_SEPARATOR): New macro.
1104 (check, installcheck): Use it, for OS/2.
1106 2006-06-18 Eric Blake <ebb9@byu.net>
1108 Consistently use "GNU M4" as package name, "m4" as executable
1110 * NEWS: Document previous fix.
1112 * README: Fix grammar. Document that --enable-changeword is on
1114 * doc/m4.texinfo (Top, Changeword): Likewise.
1115 (Sysval): Enhance this test.
1116 (History): Backport this section from CVS head, and update.
1118 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
1119 Eric Blake <ebb9@byu.net>
1121 * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1122 (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1123 big-endian and little-endian wait status definitions.
1124 (m4_sysval): Use WEXITSTATUS.
1125 Reported by Andreas Buening.
1127 2006-06-18 Eric Blake <ebb9@byu.net>
1129 * configure.ac (AC_INIT): Bump version number.
1130 * NEWS: Describe changes in 1.4.4c.
1132 2006-06-17 Eric Blake <ebb9@byu.net>
1136 * configure.ac (AC_INIT): Bump version number.
1137 * NEWS: Describe changes since 1.4.4.
1138 * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1140 * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1142 * checks/Makefile.in (maintainer-clean): Add missing target.
1143 * COPYING: Remove generated file from CVS.
1145 2006-06-16 Eric Blake <ebb9@byu.net>
1147 * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1149 2006-06-15 Eric Blake <ebb9@byu.net>
1151 * checks/wrapfifo.m4: New file. Use it...
1152 * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1153 demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1155 * src/m4.h (to_uchar): New function.
1156 * src/eval.c (eval_lex): Use it to avoid passing signed char to
1157 isdigit, isalpha, isupper, islower, isspace, isalnum.
1158 * src/builtin.c (expand_user_macro): Likewise.
1159 * src/format.c (format): Likewise.
1160 * src/macro.c (expand_argument): Likewise.
1161 * NEWS: Document this security fix.
1164 * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1165 * src/freeze.c (reload_frozen_state): Fix typo in message.
1166 (produce_frozen_state): Standardize on builtin, not built-in.
1167 * src/builtin.c (numeric_arg, bad_argc): Likewise.
1169 * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1170 (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1171 (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1173 * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1174 * m4/gnulib-cache.m4: New file, from gnulib.
1175 * bootstrap: Invoke gnulib-tool --update.
1176 * src/m4.c (main): Cast away const.
1177 * NEWS: Document that regex is updated.
1180 2006-06-08 Eric Blake <ebb9@byu.net>
1182 * configure.ac (changeword): Work even when changeword is not a
1184 (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1185 Delete; now done by automake.
1186 (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1188 2006-06-07 Eric Blake <ebb9@byu.net>
1190 * lib/regex.c (bcmp_translate): Canonicalize type name.
1191 * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1192 * configure.ac (changeword): Disable changeword for the creation
1193 of configure, in case of bootstrapping with an m4 configured with
1194 --enable-changeword.
1196 Distribute a rudimentary man page.
1197 * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1199 * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1200 (SUFFIXES, m4.1): New macros and rules to build m4.1.
1202 2006-06-06 Eric Blake <ebb9@byu.net>
1204 * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1205 compiler warnings at -O2.
1206 * lib/getopt.c (_getopt_internal): Likewise.
1208 Cleanup of previous patches.
1209 * src/input.c (struct input_block): Remove traced member.
1210 (push_macro, init_macro_token): Don't pass trace status around.
1211 * src/m4.h (struct token_data): Remove traced member.
1212 (struct symbol, struct builtin): Reduce unused space.
1213 (TOKEN_DATA_FUNC): Simplify.
1214 (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1215 (push_macro, define_builtin): Remove unused parameter.
1216 * src/builtin.c (define_builtin, builtin_init, define_macro),
1217 (m4_defn): Don't pass trace status around.
1218 * src/macro.c (expand_argument): Likewise.
1219 * src/freeze.c (reload_frozen_state): Likewise.
1220 * src/symtab.c: Whitespace cleanup.
1221 * NEWS: Clean up wording.
1222 * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1223 ensure tests actually expose bugs prior to today's patches.
1225 Trace status of builtins is no longer inherited across
1226 define(...,defn(...)). Fixes bug that autom4te had been working
1228 * src/builtin.c (define_builtin): Don't override trace status.
1229 * doc/m4.texinfo (Trace): Add test for this.
1230 * NEWS: Document this.
1232 When changing macro definitions inside the arguments to the macro,
1233 consistently preserve the old definition that was in effect before
1234 argument collection, similar to the C pre-processor.
1235 Reported by John Brzustowski.
1236 * NEWS: Document this change.
1237 * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1238 this policy, and add tests that expose core dumps prior to this
1240 * src/m4.h (struct symbol): New members to track when a symbol is
1241 still in use after removal from the symbol table.
1242 (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1243 (free_symbol): Prototype.
1244 * src/macro.c (expand_macro): Track pending expansions of a
1245 symbol. On completion, if a symbol is deleted and no longer
1246 pending, free its memory.
1247 * src/symtab.c (free_symbol): Export. Don't free memory if symbol
1249 (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1251 (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1252 in use as deleted and remove from the table without freeing
1254 (symtab_print_list) [DEBUG_SYM]: More debug output.
1256 * src/symtab.c (hack_all_symbols): Allow certain modifications of
1257 the symbol table during traversal.
1258 * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1259 SYMBOL_POPDEF, since only the latter is safe with
1262 Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1263 * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1264 Preserve placeholder when macro is being traced.
1265 * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1266 symbol is not defined.
1267 (set_trace): Remove placeholder when no longer traced.
1268 (m4_traceon): On named traces, always reserve a slot in the
1270 (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1271 * NEWS: Document new trace behavior.
1272 * doc/m4.texinfo (Trace): Tracing by name now consistently works
1273 no matter whether that macro is currently defined.
1274 (Incompatibilities): Document differences between traditional and
1277 2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
1278 Eric Blake <ebb9@byu.net>
1280 * src/m4.h (hash_table_size): Now size_t instead of int.
1281 * src/m4.c (hash_table_size): Likewise.
1282 (main): Adjust to this; use atol rather than atoi.
1283 * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1284 (symtab_init, lookup_symbol, hack_all_symbols):
1285 Use size_t for sizes and indexes, not int.
1286 (symtab_print_list) [DEBUG_SYM]: Likewise.
1287 (hash): Likewise. Don't case-fold in the hash function.
1288 Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1289 Don't assume hash word is 32 bits.
1290 * NEWS: Document this change.
1292 2006-06-04 Eric Blake <ebb9@byu.net>
1294 * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1295 to allow compilation, for use in debugger.
1296 (profiles, current_mode) [DEBUG_SYM]: New variables.
1297 (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1298 determining hash table performance.
1300 2006-05-31 Eric Blake <ebb9@byu.net>
1301 John Brzustowski <jbrzusto@fastmail.fm>
1303 * src/input.c (input_stack): Delete; use current_input instead.
1304 (wrapup_stack): Dynamically allocate, so that recursion is handled
1306 (push_wrapup): Use current wrapup stack.
1307 (pop_wrapup): Rotate wrapup stack to current, and create new
1309 (input_init): Dynamically allocate stacks.
1310 * NEWS: Update, now that recursive m4wrap can no longer cause
1313 2006-05-31 Eric Blake <ebb9@byu.net>
1315 * lib/getopt.c: Fix copyright year.
1316 * lib/obstack.c: Ditto.
1317 * src/builtin.c: Ditto.
1319 2006-05-30 Eric Blake <ebb9@byu.net>
1321 * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
1322 Reported by John Brzustowski.
1323 (Incompatibilities): Document known POSIX incompatibilities.
1326 2006-05-29 Eric Blake <ebb9@byu.net>
1328 * doc/m4.texinfo (Maketemp): Work even when running 'make check'
1332 * Makefile.am: New file.
1333 * doc/Makefile.am: Ditto.
1334 * examples/Makefile.am: Ditto.
1335 * lib/Makefile.am: Ditto.
1336 * src/Makefile.am: Ditto.
1337 * acinclude.m4: New file, renamed from aclocal.m4.
1338 * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
1339 (AC_ARG_PROGRAM): Now redundant.
1340 (STACKOVF): Turn into automake conditional.
1341 (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
1342 * checks/Makefile.in: Converting this dir to automake was not
1343 trivial; for now, just add missing targets demanded by top-level.
1344 * INSTALL: Remove files that are now generated from CVS.
1345 * Makefile.in: Ditto.
1346 * aclocal.m4: Ditto.
1347 * install-sh: Ditto.
1348 * mkinstalldirs: Ditto.
1349 * doc/Makefile.in: Ditto.
1350 * doc/texinfo.tex: Ditto.
1351 * examples/Makefile.in: Ditto.
1352 * lib/Makefile.in: Ditto.
1353 * src/Makefile.in: Ditto.
1355 * AUTHORS: Backport from CVS head, and update.
1356 * doc/m4.texinfo (Changeword): Fix examples to match behavior.
1358 2006-05-27 Eric Blake <ebb9@byu.net>
1360 * lib/regex.c (regex_compile): Kill compiler warnings.
1361 * lib/getopt.c: Likewise.
1362 * lib/obstack.c: Likewise.
1363 * src/builtin.c (builtin_init): Likewise.
1364 * src/path.c (path_search): Likewise.
1366 * doc/m4.texinfo: Fix usage of a vs. an.
1367 (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
1368 overfull hbox warnings.
1369 (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
1371 * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
1373 * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
1374 (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
1376 (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
1377 * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
1378 * src/Makefile.in: Delete remains of ansi2knr.
1379 * src/ansi2knr.1: Delete.
1380 * src/ansi2knr.c: Delete.
1382 2006-05-25 Eric Blake <ebb9@byu.net>
1384 * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
1387 * doc/m4.texinfo (Francois): No longer needed as a tex variable.
1388 Reported by Karl Berry.
1390 2006-05-24 Eric Blake <ebb9@byu.net>
1392 * Makefile.in (html): New target.
1393 * doc/Makefile.in (html, m4.html): Likewise.
1394 (MAKEINFOHTML): New macro.
1395 * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
1397 (Regexp) [ifhtml]: Make cross-reference to emacs manual an
1399 Reported by Bob Badour.
1401 * THANKS: Update. Move reporter's email addresses here, instead
1404 2006-05-11 Eric Blake <ebb9@byu.net>
1407 * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
1408 patched on 2005-12-04.
1409 Reported by Ilya N. Golubev.
1411 * bootstrap: New file, so that generated files need not be stored
1413 * Makefile.in (DISTFILES): Add bootstrap.
1415 Make testsuite less sensitive to doc changes.
1416 * doc/m4.texinfo: Use m4.input instead of filename.
1417 * checks/check-them (xerr): Turn m4.input into filename.
1418 * checks/Makefile.in (dist): Depend on stamp-checks.
1420 Portability updates for OS/2.
1421 * src/Makefile.in (EXEEXT, OBJEXT): Define.
1424 * lib/Makefile.in (OBJEXT): Define.
1426 * doc/Makefile.in (install, uninstall): Install info files into
1428 Reported by Andreas Buening.
1430 2006-05-09 Eric Blake <ebb9@byu.net>
1432 * install-sh: Update to newer upstream version.
1433 * mkinstalldirs: Likewise.
1434 Reported by Andreas Buening.
1436 * src/m4.c (main): Bump copyright year.
1437 * Makefile.in (datarootdir): Define, for autoconf 2.59c.
1438 * doc/Makefile.in (datarootdir): Likewise.
1440 2006-05-08 Eric Blake <ebb9@byu.net>
1443 * doc/m4.texinfo (Bugs): Backport bug email address from head.
1444 Reported by Stepan Kasal.
1446 2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
1448 * input.c (match_input): Do not pass expression with side effect
1449 to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
1452 2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
1454 * doc/m4.texinfo (How to debug macros and input): s/woould/would/
1455 Reported by Damian Menscher.
1457 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
1459 * configure.ac (AC_INIT): Bump to 1.4.4a.
1461 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
1465 * configure.ac (AC_INIT): Bump to 1.4.4.
1466 * NEWS: Describe 1.4.4's changes.
1467 * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
1469 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
1471 * src/m4.c: fix return code when non-existent files are processed
1473 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
1475 * README: update email address for bug reports.
1477 2005-10-17 Gary V. Vaughan <gary@gnu.org>
1479 * doc/m4.info: Generated files are not kept in the repository.
1481 2005-05-01 Gary V. Vaughan <gary@gnu.org>
1483 The FSF are moving offices today. Changed their contact address
1484 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
1485 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
1487 Also, some of the files here were never updated from the previous
1488 '675 Mass Ave, Cambridge, MA 02139', so changed those to the
1489 '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
1491 2005-03-31 Mike Frysinger <vapier@gentoo.org>
1493 * Makefile.in (bindir, infodir): Substitute from configure rather
1495 * doc/Makefile.in (infodir): Ditto.
1496 * src/Makefile.in (bindir): Ditto.
1499 2005-03-31 Gary V. Vaughan <gary@gnu.org>
1501 Changes needed to automate the release process for 1.4.3:
1503 * Makefile.in (dist): Make .tar.bz2 tarball too.
1504 * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
1505 (cvs-news): Look 1 line further down for NEWS release number.
1506 (cvs-dist): We don't use automake, so make dist is fine.
1507 Remove double . before suffixes.
1508 (cvs-release): Don't mention manual.html.
1509 (fetch): Get latest gendocs files.
1510 (web-manual): Rewritten to use gendoc for multiformat manuals.
1511 * doc/gendocs.sh: Don't save an old version in m4 CVS!
1512 * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
1513 preserving, but case insensitive, so generating html docs per node
1514 clashes between Index.html, the node file, and index.html, the
1515 top-level of the document tree...
1516 (Index macro): ...so renamed to this. Changed all references.
1518 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
1520 * configure.ac (AC_INIT): Bump to 1.4.3a.
1522 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
1526 * configure.in (AC_INIT): Bump to 1.4.3.
1527 * NEWS: Describe 1.4.3's changes.
1529 2005-03-31 Gary V. Vaughan <gary@gnu.org>
1531 * Makefile.maint: New file with release rules, from CVS libtool.
1532 * Makefile.in (DISTFILES): Add Makefile.maint.
1533 * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
1536 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
1538 * doc/m4.texinfo (Patsubst): Re-add trailing space required by
1539 checks/47.patsubst, with a redundant @comment to prevent emacs
1540 from removing it accidentally again.
1541 * checks/get-them: Allow for trailing spaces tucked behind
1544 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
1546 * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
1547 * src/Makefile.in (install, uninstall): Likewise.
1549 2005-02-07 Gary V. Vaughan <gary@gnu.org>
1551 * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
1553 Reported by Eric Blake.
1555 2005-02-04 Gary V. Vaughan <gary@gnu.org>
1557 * lib/regex.c, lib/regex.h: Updated from gnulib.
1558 * src/input.c (set_word_regexp): Don't change the word_regexp
1559 unless it compiles correctly.
1561 Reported by Frank Schwidom.
1563 * Makefile.in (stamp-h): Regenerate config.h properly.
1565 2005-02-03 Gary V. Vaughan <gary@gnu.org>
1567 * configure.ac (AC_DEFINE): Fix overquoting of description
1570 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
1572 * src/freeze.c (produce_frozen_state): Use \n line-endings even
1573 on Windows, so that the frozen file reader will work.
1574 Reported by Josef T. Burger.
1576 * src/m4.c (main): Modernise the --version output.
1578 2005-02-03 Gary V. Vaughan <gary@gnu.org>
1580 Modernise the configury a little to prevent spurious errors from
1581 Autoconf-2.59's autoreconf:
1583 * config.h.in: Renamed to...
1584 * config-h.in: ...this to better support DOS 8.3 file systems.
1585 * acconfig.h: Removed.
1586 * configure.in: Renamed to...
1587 * configure.ac: ...this, and AC_DEFINE used to declare config.h
1588 entry comments. Slight reorganisation and reformatting.
1589 * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
1591 (AC_INIT): Use a modern 3 argument call.
1592 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1593 examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
1594 s/PRODUCT/PACKAGE/g.
1595 * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
1596 config.h.in. Added configure.ac, config-h.in.
1597 (stamp-h.in): Removed acconfig.h from dependencies.
1598 (configure): Depends on configure.ac, not configure.in.
1599 * doc/Makefile.in (stamp-vti): Ditto.
1600 * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
1601 difference between PRODUCT="m4" and PACKAGE="GNU M4".
1602 * configure: Regenerated.
1604 2005-02-03 Noah Misch <noah@cs.caltech.edu>
1606 * src/output.c (mkstemp): Make non-static, and build regardless of
1607 HAVE_TMPFILE; src/builtin.c also needs this replacement.
1610 2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
1612 * configure.in (AC_CHECK_HEADERS): Commit works best when you save
1613 changes from your editor buffer first.
1615 * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
1616 * src/m4.c: And include them as appropriate.
1619 2004-09-09 Andreas Schwab <schwab@suse.de>
1621 Refactoring of the string read case in next_char provides about a
1622 20% speedup of M4 as typically used by autoconf:
1624 * src/input.c (next_char_1): Renamed from next_char.
1625 (next_char): New macro.
1628 2004-08-21 Gary V. Vaughan <gary@gnu.org>
1630 * configure.in (VERSION): Bump to 1.4.2a.
1632 2004-08-19 Paul Eggert <eggert@twinsun.com>
1636 * configure.in (VERSION): Bump to 1.4.2.
1637 * News: Describe 1.4.2's changes.
1639 * src/m4.c (reference_error): Preserve errno, since M4ERROR
1641 * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
1642 (m4_maketemp): Clear errno before calling mkstemp.
1643 * src/path.c (path_search): Don't let "free" trash errno when
1645 * src/output.c (insert_file): Don't assume errno has a valid
1646 value simply because fread returns zero. This fixes a
1647 portability bug reported by Marion Hakanson in
1648 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
1650 2004-06-09 Gary V. Vaughan <gary@gnu.org>
1652 * configure.in (VERSION): Bump to 1.4.1a.
1653 * NEWS: Place holder for next stable release.
1655 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
1659 * configure.in (VERSION): Bump to 1.4.1.
1660 * NEWS: Describe 1.4.1's changes.
1662 * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
1663 pacify Autoconf 2.59.
1665 * doc/m4.texinfo: Insert commas after @xref's that lack them,
1666 to pacify Texinfo 4.7.
1667 * doc/Makefile.in (info): Remove info-1, info-2, info-3.
1669 * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
1670 pacify Sun C compilers.
1672 2003-09-28 Akim Demaille <akim@epita.fr>
1674 * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
1677 2003-09-03 Santiago Vila <sanvila@debian.org>
1679 * examples/stackovf.sh: Use tempfile if available.
1681 2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
1683 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
1684 * src/output.c (m4_insert_file): Do not mix buffered and
1685 unbuffered I/O, as this breaks on the Hurd. (trivial change)
1687 2001-02-01 Santiago Vila <sanvila@debian.org>
1689 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
1690 * src/m4.c (main): Fix format vulnerabilities. (trivial change)
1692 2001-02-01 Matt Kraai <kraai@debian.org>
1694 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
1695 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
1696 empty file rather than to a nonexistent file. This closes a common
1698 * src/builtin.c (m4_maketemp): Implement the above, by using
1699 mkstemp rather than mktemp. (trivial change)
1701 2000-01-09 Akim Demaille <demaille@inf.enst.fr>
1703 * src/builtin.c (expand_ranges): Added break after trailing dash.
1704 This caused misbehaviors on some systems.
1706 Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
1710 * doc/Makefile.in (realclean): Also remove stamp-vti.
1711 Reported by Eric Backus.
1713 Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
1715 * src/freeze.c (produce_frozen_state): If the frozen file cannot
1716 be opened, return immediately after producing the error message.
1717 Reported by Andreas Schwab.
1719 * configure.in: Check for const only after having found possible
1720 ANSIfying compiler flags, this is of no use to check it before.
1721 Reported by Alexander Lehmann.
1723 Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
1725 * src/macro.c (collect_arguments): Cast obstack arguments to
1726 (voidstar), so avoiding compiler warnings.
1727 Reported by Joseph E. Sacco.
1729 * src/freeze.c (produce_frozen_state): Cast printed lengths to
1730 (int) so they correspond to %d format items.
1731 Reported by Joseph E. Sacco.
1733 * src/m4.c (main): Cast the argument to xfree to (voidstar).
1734 * src/symtab.c (free_symbol): Idem.
1735 Reported by Karl Vogel.
1737 Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
1739 * Makefile.in (DISTFILES): Distribute BACKLOG.
1741 * configure.in: Define PRODUCT and VERSION.
1742 * acconfig.h: Document PRODUCT and VERSION.
1743 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
1744 constant string m4 and variable or parameter named version.
1746 Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
1748 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
1749 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
1750 defines __STDC__ to 0, for indicating it is *not* ANSI!
1751 Reported by Kaveh R. Ghazi.
1753 * configure.in: Added obsolescent tests for AIX and Minix.
1755 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
1756 which texclean does not exist anymore.
1757 Reported by Eric Backus, Jim Meyering, John David Anglin and
1760 Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
1762 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
1763 Reported by John David Anglin.
1765 * src/ansi2knr.c: New version, sent by Peter Deutsch.
1766 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
1767 ANSI2KNR, depending on the fact the compiler is ANSI or not.
1768 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
1769 Remove the sed filter after ansi2knr for debug.c. Use $O instead
1770 of $U, put underline in extensions rather than in basenames. Use
1771 implicit rules, now that regularity makes this possible.
1772 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
1773 of ansi2knr whenever it is needed.
1774 * configure.in: Adjusted for correct STACKOVF substitution.
1775 * src/debug.c (trace_format): When not __STDC__, use (...) as a
1776 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
1777 Reported by David MacKenzie.
1779 * Makefile.in: Remove binprefix. Use transform_name instead.
1780 Reported by David MacKenzie.
1782 * doc/Makefile.in: Create version.texi, use it, clean it.
1783 Reported by Jim Meyering.
1785 Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
1787 * Makefile.in (all, install, uninstall): Depend on Makefile.
1789 * Makefile.in: For actions invoking $(MAKE) from within compound
1790 sh statements, exit non-zero if the sub-make fails. Otherwise,
1791 the top-level make may exit successfully when it should fail.
1792 Reported by Jim Kingdon.
1794 * {,/*}Makefile.in: Use && after all cd, in case they fail.
1796 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
1797 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
1798 * configure.in: Substitute PRODUCT and VERSION.
1800 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
1802 Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
1804 * Makefile.in (mostlyclean-local): Do not remove *~.
1805 * */Makefile.in (mostlyclean): Idem.
1806 Reported by Robert E. Brown and Richard Stallman.
1808 Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
1810 * src/m4.h: Get rid of CONFIG_BROKETS.
1812 Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
1814 * configure.in: Use AC_ARG_PROGRAM.
1815 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
1816 Reported by David MacKenzie.
1818 Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
1820 * configure.in: Do not add -O to CFLAGS for GNU C, now that
1821 configure does it automatically.
1822 Reported by Jim Meyering.
1824 Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
1826 * src/stackovf.c: Declare the handler_t typedef earlier in the
1827 code, use it for stackovf_handler.
1828 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
1829 casting sigsegv_handler.
1830 Reported by Robert Bernstein.
1832 * src/m4.c (main): Initialize program_name to argv[0] without
1834 Reported by Karl Berry.
1836 Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
1838 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
1839 Reported by Karl Berry.
1841 Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
1843 * lib/Makefile.in (mostlyclean): Added.
1844 (TAGS): Make in $(srcdir).
1846 * configure.in: Use `choke me' in test, like everywhere!
1848 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
1849 unreacheable and useless.
1851 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
1853 * lib/Makefile.in (DISTFILES): Distribute TAGS.
1854 (distclean): Do not remove TAGS.
1855 (realclean): Remove it.
1856 * Makefile.in: Make TAGS in lib also, not just in src.
1857 Reported by Karl Berry.
1859 * Makefile.in (distclean, realclean): Instead of recursively
1860 calling $(MAKE) for the -local part, allow parallel execution of
1861 -recursive and -local, only delay the removal of config.status,
1862 which is repeated in both goals.
1864 Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
1868 * Makefile.in: Group all *clean-recursive goals in one, using sed
1869 to remove `-recursive' while calling make recursively. Also, use
1870 a subshell for each recursive $(MAKE).
1871 Reported by Jim Meyering.
1873 * src/m4.h (memcpy): Define with bcopy for BSD systems.
1874 Reported by Kaveh R. Ghazi.
1876 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
1877 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
1880 * configure.in: Use date instead of touch for stamp-h.
1881 * Makefile.in (stamp-h.in): Idem.
1883 * Makefile.in (distclean, realclean): Force serial execution of
1884 both goals, in case parallel makes are being used.
1885 Reported by Jim Meyering.
1887 * src/Makefile.in (DISTFILES): Distribute TAGS.
1888 (distclean): Do not remove TAGS.
1889 (realclean): Remove it.
1890 Reported by Karl Berry.
1892 Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
1894 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
1895 to old names, for following Autoconf.
1897 Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
1899 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
1900 ./install.sh will not be correctly referred to in sub-Makefiles.
1901 Reported by John David Anglin.
1903 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
1904 Reported by Eric Backus.
1906 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1907 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
1908 config.status into remaking this directory's Makefile only.
1909 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
1910 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
1911 Reported by Jim Meyering.
1913 Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
1915 * configure.in: Correct stack overflow detection logic, taking
1916 care of systems having only incomplete implementations (like for
1917 Pyramid 9820 OSx 5.0d).
1918 Reported by Kaveh R. Ghazi.
1920 * src/Makefile.in (TAGS): Remote -t from etags call.
1922 Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
1924 * lib/Makefile.in (install): Depend on all.
1926 Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
1928 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
1929 Reported by Jim Meyering and John David Anglin.
1931 * Makefile.in (distclean-local): Delete config.log.
1932 Reported by Jim Meyering.
1934 Solidify frozen files with respect to -P:
1935 * src/m4.c: Have -P set prefix_all_buitins variable instead of
1936 calling a function by that name. Declare the variable.
1937 * src/m4.h: Adjust declaration for prefix_all_buitins.
1938 * src/builtin.c (builtin_init): Merge in functionality from
1939 previous prefix_all_buitins function, while making entries in the
1940 symbol table, but not modifying the builtin description itself.
1942 * src/freeze.c (reload_frozen_state): Add a useless `break;',
1943 because *many* compilers do not accept an empty `default:'.
1944 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
1945 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
1947 * configure.in: Use AC_TYPE_SIGNAL.
1948 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
1949 Reported by Robert Bernstein.
1951 * checks/Makefile.in (check): Modify PATH so check-them will find
1952 m4 in the src directory.
1953 * Makefile.in (check): Don't.
1954 Reported by Akiko Matsushita and Jim Meyering.
1956 * src/output.c (make_room_for, output_character_helper): New
1957 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
1958 a per buffer MAXIMUM_BUFFER_SIZE.
1960 * src/output.c (output_text): New function, for optimizing the
1961 output of strings of characters. Use it.
1963 Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
1965 * doc, src: New directories reorganizing the distribution.
1966 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
1968 * Makefile.in: Adjusted.
1969 * configure.in: Configure new Makefiles.
1971 * m4.h: Declare STRING typedef. Use it for comment and quote
1972 strings, adjusting all references. (This is the rudiments of a
1973 beginning for the eventual withdrawal of NUL terminated strings.)
1974 * output.c (shipout_text): Accept a length parameter, and use it.
1975 All callers adjusted.
1977 Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
1979 * m4.h: Include <unistd.h> if it exists.
1980 * stackovf.c: Don't.
1982 Clean up for current_diversion variable:
1983 * output.c: Move current_diversion from builtin.c.
1984 * m4.h: Declare current_diversion so builtin.c can access it.
1985 * output.c (output_init, make_diversion): Initialize or update
1987 * builtin.c (builtin_init, m4_divert): Leave current_diversion
1990 Remove limit on number of diversions:
1991 * output.c: Replace ndiversion by diversions, declare it.
1992 (output_init): Allocate only diversion 0.
1993 (make_diversion): Allocate new diversions as needed.
1994 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
1995 * m4.c: Still accept -N, but do nothing with it.
1996 Reported by David MacKenzie.
1999 * output.c (freeze_diversions): New function.
2000 * m4.h: Declare freeze_diversions.
2001 * freeze.c: Document frozen file format, revise it, call
2002 freeze_diversions to add diversions to frozen format, and code to
2003 reload them properly.
2004 * m4.c: Do not undivert automatically at end when status being
2005 frozen. Do not call builtin_init when reloading frozen state.
2007 Speed up diversion processing:
2008 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2009 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2010 structure and variables, cached variables out of output_diversion,
2011 reallocate_diversion_for and OUTPUT_CHARACTER.
2012 (shipout_text, make_diversion, insert_diversion): Adapted to new
2014 (insert_file): Use better buffering.
2015 Reported by David MacKenzie.
2017 Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
2019 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2020 dist works from another build directory.
2022 Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
2024 * symtab.c (hack_all_symbols): Use hash_table_size instead of
2025 constant HASHMAX, for -H option to work better.
2027 * builtin.c (DECLARE): Simplify by using _ ().
2029 * freeze.c: New file.
2030 * Makefile.in: Compile it, distribute it.
2031 * m4.c: Recognize, document and process --freeze-state (-F) and
2032 --reload-state (-R) options. Pass a true flag to builtin_init
2033 only if no reloading some state.
2034 * builtin.c (define_builtin): Remove static specifier.
2035 (find_builtin_by_name): Remove static specifier.
2036 (builtin_init): Accept and obey a flag argument.
2037 * m4.h: Add declarations for freeze.c, changes for builtin.c.
2039 Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
2041 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2044 * configure.in: Implement --with-dmalloc.
2045 * acconfig.h: Document WITH_DMALLOC.
2046 * m4.h: Add code for when WITH_DMALLOC.
2048 Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
2050 * m4.c (long_options): Use "error-output", the dash was missing.
2051 Reported by Akiko Matsushita.
2053 Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
2055 * m4.h: Include <sys/types.h>.
2056 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2057 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2059 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2061 * builtin.c (dump_args): Declare len as size_t, not int.
2063 * debug.c: Prototype the forward declaration of debug_set_file.
2065 * builtin.c (m4_undivert): Replace div by file, for avoiding the
2066 shadowing of this variable.
2067 * output.c (insert_diversion): Idem.
2069 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2070 (input_init): Duplicate default quote and comment strings.
2071 (set_quotes): Free previous quote strings in all cases. Duplicate
2072 even default quote strings.
2073 (set_comment): Free previous comment strings in all cases.
2074 Duplicate even default comment strings.
2076 * configure.in: Updated for Autoconf 2.0.
2077 * Makefile.in (distclean-local): Also delete config.cache.
2079 * m4.c (usage): Reorganize the --help output by topic. Include a
2080 description for debugging flags.
2082 Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
2084 * configure.in: If sigaction is available and SA_ONSTACK defined,
2085 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
2086 defined, use sigvec. Else don't compile stackovf.c.
2087 * stackovf.c (setup_stackovf_trap): Idem.
2088 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2091 Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
2093 * m4.c (usage): Replace printf par fputs.
2095 Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
2099 Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
2101 * configure.in: Check for sigaction and sigvec. Add a new delayed
2102 check for RLIMIT_STACK, combine in the checking for getrlimit.
2103 All those things are not universally available.
2104 * stackovf.c: Split setting up the trap handler and catching
2105 signals, for better taking care of various configure outcomes.
2106 * examples/stackovf.sh: Correct a typo.
2107 Reported by Eric Backus, Jim Avera and Jim Meyering.
2109 Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
2111 * ansi2knr.c: New version sent by its author, Peter Deutsch.
2113 Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
2115 * Makefile.in: Modify so parallel make will not try making
2116 lib/libm4.a twice simultaneously.
2117 Reported by Jim Meyering.
2119 Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
2121 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2122 error message, for when no code possibility exists. Even if this
2123 line is completely #ifdef'ed out, it brings a syntax error.
2124 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2126 * Makefile.in (install): Have install depend on all too, for lib
2127 to be remade as needed.
2129 * examples/stackovf.sh: Try ksh, bsh and bash for shells
2130 providing ulimit, instead of using only ksh.
2131 Reported by Jim Avera and Joseph E. Sacco.
2133 Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
2135 * Makefile.in (check): Have it depend on all instead of m4. In
2136 this way, a change in lib will be detected and processed.
2138 * builtin.c (numeric_arg): Use strtol and verify the conversion,
2139 instead of using sscanf which stops as soon as there is a
2140 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
2141 and divert(1xyzzy) were all accepted without any warning or error
2143 * m4.h: Declare strtol as long if not including stdlib.h.
2144 * configure.in: Check for limits.h, and replace strtol if missing.
2145 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
2146 * lib/strtol.c: New file, from elsewhere.
2147 Reported by Andreas Schwab.
2149 Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
2151 * macro.c (expand_macro): Cast value to (boolean) prior to
2152 assigning it to traced.
2153 Reported by Tom McConnell.
2155 * Makefile.in (m4): Always make all in lib first.
2156 Reported by Jim Meyering.
2158 Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
2160 * stackovf.c: Isolated OS-dependent sections; Improved portability,
2161 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2162 handlers), and a default error message if the fault address is not
2163 available (when neither siginfo.h nor BSD sigcontext are supported).
2164 * configure.in: Changes for stackovf.h: Check for sigcontext,
2165 sigaction, sigstack, and define rlim_t as int if necessary.
2166 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2167 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2168 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2170 Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
2172 * configure.in: Use AC_SET_MAKE.
2173 * Makefile.in: Use @SET_MAKE@.
2174 Reported by Jim Meyering.
2176 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2177 Reported by Ian Taylor.
2179 Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
2181 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2182 because siginfo.h is unrelated to standard headers, and siginfo.h
2183 is already checked for.
2184 Reported by Joseph E. Sacco.
2186 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2188 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2191 Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
2193 * builtin.c (substitute): Use \& to represent this part of the
2194 string which was matched by the whole regexp, instead of
2195 representing the whole string. Any usage of \0 issues a warning
2196 and acts like \&, it will disappear in some subsequent release.
2198 Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
2200 * m4.c: Complete prototype for forwarded declaration of usage.
2202 * input.c (init_macro_token): Correct own reference in error
2203 message. Previous name get_macro_func was referred to instead.
2204 (next_char): Correct own reference in error message. Previous
2205 name advance_input was referred to instead.
2207 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2208 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2209 and_term, not_term, logical_not_term, cmp_term, shift_term,
2210 add_term, mult_term, exp_term, unary_term, simple_term): Add
2211 prototype to forwarded declarations. Declare parameter v1 as
2212 eval_t * instead of int *. Same for local variable v2 in dyadic
2213 functions. Same for result in exp_term.
2214 * builtin.c (m4_eval): Declare value as eval_t instead of int.
2215 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
2216 unsigned_eval_t instead of unsigned int. Change casts accordingly.
2217 (shipout_int): Cast first argument of ntoa to eval_t.
2218 Reported by Thorsten Ohl.
2220 * macro.c: Complete the prototypes of forwarded expand_macro and
2222 Reported by Thorsten Ohl.
2224 * m4.h: Define voidstar as void * or char * depending on __STDC__.
2225 The Ultrix 3.1 compiler cannot do much with void pointers.
2227 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2228 * m4.c (xfree): Replace void * by voidstar.
2229 Reported by Tom McConnell.
2231 * ansi2knr.1: New, from elsewhere.
2232 * Makefile.in (DISTFILES): Distribute ansi2knr.1
2234 * Makefile.in (stamp-h.in): Avoid running ./config.status if
2235 stamp-h does not exist yet. This avoids running it a second time
2236 just after the initial ./configure.
2237 Reported by David MacKenzie and Tom McConnell.
2239 * m4.h: Replace the enum debug_info declaration with a series of
2240 #define's. The Ultrix 3.1 compiler would otherwise need casting
2241 (int) to most references, when used in expressions.
2242 Reported by Tom McConnell.
2244 Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
2246 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2247 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
2248 calls the compiler. Previously, FP_PROTOTYPES was only calling
2249 the preprocessor; by not being subject to CFLAGS, this was
2250 discouraging those flags asking for ANSI compilation.
2251 * acconfig.h: Document HAVE_PROTOTYPES.
2252 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2253 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2254 Reported by Eric Backus.
2256 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2257 from the environment. Default CFLAGS to -g if not set.
2258 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2259 * lib/Makefile.in: Have CFLAGS substituted from configure.
2260 Reported by Eric Backus and Tom McConnell.
2262 * configure.in: m4_undefine changeword before using AC_ENABLE.
2264 * m4.h: Declare prototypes for error (for ANSI compilers only),
2265 prefix_all_builtins and reference_error.
2266 Reported by Tom McConnell.
2268 * input.c (set_word_regexp): Do not try to initialize the array
2269 test from a string, this does not work with non-ANSI compilers.
2270 Reported by Eric Backus.
2272 * Makefile.in (dist): Clean examples/ before saving it.
2273 (distclean-local): Also remove stamp-h.
2274 Reported by Eric Backus.
2276 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2278 Reported by Tom McConnell.
2280 * checks/Makefile.in (clean): Depends on mostlyclean.
2281 (mostlyclean): New goal.
2283 Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
2285 * Makefile.in (DISTFILES): Distribute install.sh.
2286 * install.sh: New file, copied from elsewhere.
2287 Reported by Assar Westerlund and Kaveh R. Ghazi.
2289 Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
2291 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2292 * acconfig.h: Explain ENABLE_CHANGEWORD.
2294 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2295 from code provided by Pete Chown]
2296 * m4.h: Add original_text field to u_t variant of union u.
2297 Declare TOKEN_DATA_FUNC macro.
2298 * builtin.c: Declare changeword.
2299 (m4_changeword): New function.
2300 * input.c: Include "regex.h", define variables with word regexps.
2301 (input_init): Initialize the word regexp.
2302 (set_word_regexp): New.
2303 (next_token): Declare local variables, use the previous code if
2304 default_word_regexp is true. Else, match using a new code. Save
2306 * macro.c (expand_token): Ship out original text if not a macro
2308 Reported by Krste Asanovic and Pete Chown.
2310 [These modifs all depend upon ENABLE_CHANGEWORD]
2311 * m4.h: Declare external user_word_regexp.
2312 * m4.c: Declare user_word_regexp, and initialize it from
2313 --word-regexp or -W, or NULL if not specified.
2314 * input.c: Use user_word_regexp if specified, instead of
2315 DEFAULT_WORD_REGEXP.
2317 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
2320 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2321 * checks/Makefile.in: Empty the suffix list.
2322 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2324 * m4.c: Declare nesting_limit and initialize it to 250.
2325 Implement -LNUMBER or --nesting-limit=NUMBER to change its
2327 * m4.h: Declare nesting_limit as external.
2328 * macro.c (expand_macro): Stop execution whenever nesting limit
2330 Reported by Bengt Mertensson.
2332 * eval.c (evaluate): Diagnose excess characters in eval input.
2333 Things like `eval(08)' used to return 0 with no diagnostic.
2335 * m4.h: Capitalize first letter of all macro arguments in
2338 * m4.c: Declare warning_status, initialize it to 0. Add new
2339 option -E, or --fatal-warnings, which sets warning_status to
2340 EXIT_FAILURE instead.
2341 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
2342 EXIT_FAILURE if not otherwise done by header files.
2343 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
2344 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
2345 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
2346 argument of all M4ERROR calls.
2347 Reported by Noah Friedman.
2349 * examples/incl-test.m4: Renamed from incl_test.m4.
2350 * examples/include.m4: Include incl-test.m4 instead of
2352 * examples/multiquotes.m4: Renamed from multi-quotes.m.
2354 Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
2356 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
2357 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
2358 also tested it on a Sun Sparc workstation running SunOS 4.x.
2360 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
2361 49.format check, abusing a `union values' argument with sprintf
2362 without selecting the proper field. Now, save the formatting type
2363 first, delaying the fetch of the corresponding argument.
2364 Reported by Joseph E. Sacco and Tom Quinn.
2366 * format.c (format): Remove const from char *fmt declaration when
2367 not HAVE_EFGCVT, because a NUL may be forced into it.
2369 * m4.h: Declare atof() when not STDC_HEADERS.
2370 Reported by Joseph E. Sacco.
2372 * Regenerate configure using Autoconf 1.11, this corrects a
2373 problem about an incorrect cpp seting on NeXT 3.1.
2374 Reported by Alexander Lehmann.
2376 Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
2378 * m4.h (_): Change argument from `x' to `Args'.
2380 Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
2382 * Makefile.in: Remove all occurrences of $(MFLAGS), which were
2383 bringing more evil than good on a few systems.
2384 Reported by Greg A. Woods.
2386 Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
2388 * m4.h: Rename Args() to _().
2389 * m4.h: Remove extern specifier from all function declarations.
2391 Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
2393 * stackovf.c: New file implementing stack-overflow detection.
2394 * configure.in: Check for getrlimit, sigaction. If all of
2395 standard headers, getrlimit and sigaction, define USE_STACKOVF and
2396 substitute ${U}stackovf.o for STACKOVF.
2397 * acconfig.h: Declare USE_STACKOVF.
2398 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
2399 * m4.h: Declare setup_stackovf_trap().
2400 * m4.c: Call setup_stackovf_trap().
2401 * tests/stackovf_test.sh: New file.
2403 Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
2405 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
2407 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
2409 Sun Jan 30 14:24:19 1994 (pinard at icule)
2411 * m4.h: Remove definition of volatile, not used anymore.
2412 Reported by Jim Meyering and Joseph E. Sacco.
2414 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
2415 of `if ... else /* nothing */' for if macros.
2416 Reported by Jim Meyering.
2418 * builtin.c (m4_regexp): Reorganize the code for avoiding a
2419 warning from gcc about `repl' possibly used before defined.
2420 Reported by Jim Meyering.
2422 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
2423 Reported by Jim Meyering.
2425 Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
2427 * m4.h: Move the conditional definition of volatile after the
2428 inclusion of system files, because they may define it first.
2430 Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
2432 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
2433 get around a problem with Alpha make seeing a syntax error, there.
2434 Reported by Vern Paxson.
2436 Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
2438 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
2439 Reported by Richard Stallman.
2441 Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
2443 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
2444 instead of AC_HAVE_FUNCS.
2445 Reported by Noah Friedman.
2447 Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
2449 * m4.c: Initialize show_help and show_version to zero.
2451 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
2452 Use them in exit() and usage() calls.
2454 Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
2456 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
2457 syserr() macro. Delete errref, add reference_error and M4ERROR.
2458 * m4.c: Replace errref, which was returning an input reference
2459 string, with reference_error, which prints it on standard error.
2460 * builtin.c, output.c: Use errno as second parameter to error,
2461 instead of using syserr() with %s.
2462 * *.c: Use M4ERROR instead of error: no more errref() with %s.
2463 Doing so, the program name appears after the input reference
2464 instead of before, which eases M-x next-error processing.
2466 Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
2468 * checks/get-them: Escape braces with backslashes in patterns,
2469 because HPUX-9.01 awk needs this.
2470 Reported by Jim Meyering.
2472 Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
2474 * builtin.c: Declare "FILE *popen ();".
2476 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
2477 macros, replace error_message_prefix() declaration by errref()'s.
2478 Declare xrealloc, for use in errref().
2479 * m4.c: Delete error_message_prefix() function, add errref().
2480 * *.c: Use error() systematically in place of all error macros,
2481 now that error() flushes stdout first. Make needed adjustments.
2483 * m4.h: Remove const in sys_errlist[] declaration, it creates
2484 conflicts on SGI and Alpha.
2485 Reported by Kaveh R. Ghazi.
2487 Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
2489 * m4.c: Include <getopt.h> instead of "getopt.h".
2491 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
2492 * acconfig.h: New, for documenting HAVE_EFGCVT.
2493 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
2494 use them wherever appropriate. Also use -I. for compilations.
2495 * lib/Makefile.in: Use -I.. for compilations.
2496 * *.c: Include <config.h> or "config.h".
2498 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
2499 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
2501 Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
2503 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
2505 * input.c (input_init): Initialize quote and comment strings
2506 explicitely instead of calling set_quotes and set_comment: by
2507 doing so, we ensure we do not free uninitialized variables.
2509 * checks/check-them: Reverse arguments to both diff, so the
2510 expected is on the left and the obtained on the right.
2512 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
2513 macros. Delete declarations for m4error, warning, fatal and
2514 internal_error, add declaration for error_message_prefix.
2515 * m4.c: Delete m4error, warning, fatal and internal_error
2516 routines, add error_message_prefix routine.
2517 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
2518 warning with WARNING*, fatal with FATAL* and internal_error with
2520 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
2521 this is not needed anymore.
2523 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
2524 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
2525 and debug_message, add declaration for debug_message_prefix.
2526 * debug.c: Remove static specifier for FILE *debug declaration.
2527 Delete debug_print and debug_message routines, add
2528 debug_message_prefix routine.
2529 * builtin.c, debug.c: Replace debug_print routine calls with
2530 DEBUG_PRINT* macro calls.
2531 * input.c, path.c: Replace debug_message routine calls with
2532 DEBUG_MESSAGE* macro calls.
2534 * m4.h: Remove inclusion of <varargs.h>.
2535 * debug.c: Include <stdarg.h> or <varargs.h>.
2536 (trace_format): Use stdarg instead of varargs if __STDC__.
2538 * configure.in: Remove checks for vfprintf and _doprnt. These
2539 implementations use varargs tricks which are not portable enough.
2540 * lib/vfprintf.c: Deleted.
2541 * lib/_doprnt.c: Deleted.
2542 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
2543 Reported by Joel Sherrill.
2545 * path.c (add_include_directory): Use xstrdup.
2547 * builtin.c (find_builtin_by_name): Declare static.
2549 * *.[ch]: Add const to a few "char *" declarations.
2551 * configure.in: Remove commented tests for fileno() and fstat().
2552 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
2554 * debug.c (debug_flush_files): New.
2555 * m4.h: Declares it.
2556 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
2557 Reported by Nicolas Pioch.
2559 Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
2561 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
2562 Reported by Joel Sherrill.
2564 * builtin.c (prefix_all_builtins): Instead of the table size, use
2565 the null entry at end for stopping the loop. It was overwritten.
2566 Reported by Andreas Schwab and Jim Meyering.
2568 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
2569 Reported by Kaveh R. Ghazi.
2571 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
2572 Reported by Karl Vogel.
2574 Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
2576 * m4.h: Do not define volatile if already defined.
2577 Reported by Rene' Seindal.
2579 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
2581 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
2582 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
2584 Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
2586 * m4.h: Define strchr and strrchr in terms of index and rindex,
2587 instead of the other way around.
2588 * builtin.c, m4.c, path.c: Use strchr instead of index.
2590 * input.c (next_char): Remove a "break;" after a "return ...;".
2591 Reported by Tom McConnell.
2593 Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
2597 * configure.in: Do not copy check files in the build hierarchy.
2598 * checks/check-them: Identify the m4 version being checked. For
2599 finding m4, look in $PATH instead of in the parent directory.
2600 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
2601 * checks/Makefile.in (.all-stamp): Always create check files in
2602 the source hierarchy, not anymore in the build hierarchy.
2603 (check): cd to the source hierarchy before performing checks.
2604 Do not copy nor clean COPYING anymore, take it from `..'.
2605 Reported by Tom McConnell.
2607 * Makefile.in (Makefile): Use $(SHELL).
2608 (config.status): Use $(SHELL). Use "config.status --recheck"
2609 instead of "configure --no-create", which is obsolete.
2610 Reported by Tom McConnell.
2612 Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
2614 * m4.c (usage): Use "%s" instead of "m4" in format string.
2615 Reported by Jim Meyering.
2617 * Makefile.in: Distribute mkinstalldirs.
2618 Reported by Pierre Gaumond.
2619 Reported by Jim Meyering.
2620 Reported by Tom McConnell.
2621 Reported by Andreas Gustafsson.
2623 * checks/check-them: Renamed from checks/check_them.
2624 * checks/get-them: Renamed from checks/get_them.
2625 * checks/.all-stamp: Renamed from checks/.all_stamp.
2626 * checks/Makefile.in: Changed accordingly.
2627 Reported by Jim Meyering.
2629 Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
2631 * lib/Makefile.in (dist): Correct permissions on files.
2633 * output.c: Declare tmpfile, some systems don't.
2635 Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
2637 * checks/Makefile.in (dist): Correct permissions on files.
2639 * Makefile.in (dist): Ensure recursive linking for subdirectory
2640 `examples', also set read/write permissions on all its files.
2642 * mkinstalldirs: New, from elsewhere.
2643 * Makefile.in: Use it.
2645 * debug.c: Synchronize debug messages and regular output when
2646 the debug file and stdout are redirected to the same file.
2647 * configure.in: Add (commented) checks for fileno and fstat.
2648 Reported by Jim Avera.
2650 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
2651 etc., arguments, then ignore the superfluous one. m4 used to
2652 diagnose missing arguments and return the empty string.
2653 Reported by Nick S. Kanakakorn.
2655 Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
2657 * m4.c (main): At end of all input, ensure all undiverted text
2658 goes to the main output stream.
2659 Reported by Andreas Gustafsson.
2661 * m4.c (main): exit (0), instead of return 0.
2663 * m4.c: Implement -P and --prefix-builtins.
2664 * builtin.c: Delete const specifier on builtin_tab.
2665 (prefix_all_builtins): New.
2666 Reported by Noah Friedman.
2667 Reported by Scott Bartram.
2669 * c-boxes.el: New, from elsewhere.
2670 * Makefile.in: Distribute it.
2672 * m4.h: Do not define bcopy if <string.h> defines it.
2673 Reported by Stephen Perkins.
2675 * builtin.c (define_macro): Allow a missing second argument, in
2676 which case it is implied empty. Affects define and pushdef.
2677 Reported by Eric Allman.
2679 Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
2681 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
2682 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
2683 * builtin.c: Initialize all the blindness fields in builtin_tab.
2684 (define_builtin): Copy the blindness of a builtin into its symbol.
2685 * macro.c (expand_token): Avoid processing a blind builtin if the
2686 next character is not an opening parenthesis.
2687 Reported by David MacKenzie.
2688 Reported by Noah Friedman.
2690 * configure.in: Ensure an exit status of 0 on completion.
2691 Reported by Vivek P. Singhal.
2693 * eval.c (eval_lex): Admit both lower and upper case letters for
2694 bases greater than 10. Only lower case letters were accepted.
2696 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
2697 Reported by Krste Asanovic.
2699 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
2700 * eval.c (logical_not_term): New name for not_term.
2701 * eval.c (xor_term): New, between or_term and and_term.
2702 * eval.c (not_term): New, between and_term and logical_not_term.
2703 * eval.c (shift_term): New, between cmp_term and add_term.
2704 Reported by Krste Asanovic: ~, ^, <<, >>.
2705 Reported by Ben A. Mesander: ** vs ^.
2707 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
2708 * m4.h: Delete xrealloc.c.
2709 * lib/xmalloc.c: New, from elsewhere.
2710 * lib/xstrdup.c: New, from elsewhere.
2711 * lib/Makefile.in: Distribute and compile them.
2713 * m4.c: Change progname to program_name.
2714 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
2715 * lib/error.c: New, from elsewhere.
2716 * lib/Makefile.in: Distribute and compile error.c.
2717 * configure.in: Check AC_VPRINTF and for strerror.
2718 * m4.c: Delete cmd_error. Use error instead.
2719 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
2721 * m4.h: Delete #define const, let Autoconf takes care of this.
2723 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
2724 Merge parse_args into main. Declare argv to be `char *const *',
2725 then remove superfluous casts.
2727 * m4.c: Rename --no-gnu-extensions to --traditional.
2728 Reported by Ben A. Mesander.
2730 * m4.c (usage): Add a status parameter. Supply one in various
2731 calls. Add --help processing. Remove -V for --version.
2733 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
2735 * lib/Makefile.in: Have an AR=ar declaration.
2736 Reported by Eric Backus.
2737 Reported by Bjorn R. Bjornsson.
2738 Reported by Tom Tromey.
2739 Reported by Kristine Lund.
2740 Reported by Marion Hakanson.
2742 Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
2744 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
2745 Reported by Noah Friedman.
2747 Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
2749 * Makefile.in: Remove MDEFINES and cleanup.
2751 Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
2753 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
2756 Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
2758 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
2759 ensure 777 mode for directories, so older tar's will restore file
2762 Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
2764 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
2765 so the installer can override automatically configured choices.
2766 Reported by Karl Berry.
2768 Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
2770 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
2771 previous version was not working properly on m68k-hp-bsd4.3.
2772 Reported by Roland McGrath.
2774 * lib/_doprnt.c: Stolen from Oleo distribution.
2775 * configure.in: Check for _doprnt.c if vfprintf.c selected.
2776 * lib/Makefile.in: Distribute _doprnt.c.
2777 Do not distribute regex.[ch].old anymore.
2779 Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
2781 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
2782 Richard wants it there.
2784 Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
2786 * Makefile.in: Add DEFS to MDEFINES.
2787 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
2788 (libm4.a): Remove the library before creating it.
2789 (distclean): Remove tags and TAGS too.
2791 Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
2793 * Makefile.in (dvi, m4.dvi): New goals.
2795 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
2796 macro.c, output.c, path.c, symtab.c: Change Copyright from
2797 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
2799 * examples/divert.m4: Deleted, this bug has been corrected.
2801 * Makefile.in (texclean, mostlyclean): New goals.
2803 * Makefile.in (clean): Remove clutter from ansi2knr.
2804 Reported by Pierre Gaumond.
2805 Reported by Greg A. Woods.
2807 Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
2809 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
2810 might well use CFLAGS is s/he needs it.
2812 * Makefile.in: Allow installation of info files from a separate
2814 Reported by Jason Merrill.
2815 Reported by David MacKenzie.
2816 Reported by Skip Montanaro.
2817 Reported by Erez Zadok.
2818 Reported by Assar Westerlund.
2820 Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
2823 This is still a beta release for the future GNU m4 version 1.1.
2825 * lib/alloca.c: New, from elsewhere.
2826 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
2828 * m4.h: Do not define index/rindex if already defined. If
2829 FALSE/TRUE are already defined, do not redefine them, but merely
2830 define boolean typedef to int.
2832 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
2833 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
2834 because some C compilers do not like connectives with #ifdef.
2835 * m4.h: Define `volatile' only if __GNUC__, instead of once for
2836 __GNUC__ and once for __STDC__.
2837 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
2839 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
2840 Makefile dependencies. Without it, make keeps destroying and
2841 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
2843 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
2844 to diversion/DIVERSION, this was a spelling error.
2846 * m4.c: Declare version[], remove #include "version.h".
2847 * version.h: Deleted.
2848 * Makefile.in: Remove references to version.h.
2850 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
2851 production, by using a simpler and more robust algorithm. This
2852 solves the problem of synclines sometimes written in the middle of
2853 an output line. Delete sync_line() and output_lines variable.
2854 * m4.h: Remove sync_line prototype and output_lines declaration.
2855 * input.c (next_char), output.c (shipout_text): Remove references
2857 * input.c (push_file, pop_file): Merely put the value -1 in
2858 output_current_line instead of calling sync_line, for delaying a
2859 single `#line NUM FILE' before next output line. Do not test
2860 for sync_output, because this is unnecessary clutter.
2861 * output.c (make_divertion, insert_divertion): Idem.
2862 * input.c: Rename must_advance_line to start_of_input_line, for
2865 * debug.c (trace_header): Select a new debug line format, which
2866 better complies with GNU standards for formatting error messages.
2867 With option `-dfl', M-x next-error might be used on the output.
2868 * m4.c (vmesg): Adjust format of error output to GNU standards.
2869 * m4.texinfo: Adjust examples for `make check' to work.
2871 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
2872 case for enum debug_info constants, which were all lower case.
2874 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
2876 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
2877 collected patches. I tried a few times using newer regex.[ch], it
2878 mysteriously stopped aborting with this one. Insecure feeling...
2879 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
2881 Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
2883 * m4.c: Change `--no-warnings' to `--silent'.
2884 Reported by David MacKenzie.
2886 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
2887 leave it off for now. See comment in m4.c for justification.
2888 Reported by David MacKenzie.
2890 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
2891 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
2893 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
2895 * Makefile.in: Ensure recursive cleaning is done before local
2896 cleaning for all clean goals.
2898 * builtin.c (ntoa): Ensure the value is always interpreted as a
2899 signed quantity, whatever the radix is.
2901 Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
2903 * builtin.c, format.c, input.c: Split long lines.
2904 * m4.c: Use typedef macro_definition instead of struct
2906 * symtab.c: Use typedef symbol instead of struct symbol.
2908 Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
2910 * *.[ch]: Remove all trailing whitespace, in code and comments.
2912 * configure.in: Find some awk.
2913 * Makefile.in: Add $(AWK) to MDEFINES.
2914 * checks/Makefile.in: Transmit $(AWK) to get_them.
2915 * checks/get_them: Use $AWK instead of gawk. Add a close in the
2916 awk script when switching files, because without this, mawk runs
2917 out of file descriptors.
2919 Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
2921 * Makefile.in (realclean): Delete m4.info*.
2922 Reported by Jim Meyering.
2924 * Makefile.in: Adjust and link with checks/Makefile.
2925 * checks/Makefile.in: New.
2926 * configure.in: Output checks/Makefile.
2928 * checks/get_them: Have the dnl header of each test more
2929 recognizable by next-error, also use a better message.
2931 Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
2933 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
2934 And use that only if __GNUC__ since we're using it's GCC-specific
2935 semantics that tell the compiler the associated function doesn't
2938 * builtin.c (substitute): Don't use character as an array index.
2939 (dumpdef_cmp): Make formal arguments `const void *' to avoid
2940 warnings with gcc -W -Wall on systems with qsort prototype.
2941 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
2944 * eval.c (most functions): Add parentheses to assignments used
2945 as truth values go avoid warnings from gcc -Wall.
2947 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
2948 any functions that don't need external scope.
2950 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
2951 (many functions and arrays): Declare `const'.
2953 Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
2955 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
2956 removing the declaration from m4.h. Also rename false to FALSE
2959 * lib/Makefile.in (Makefile): New goal.
2961 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
2962 so heavily loaded. It gets more easily overridable, calling make.
2963 Reported by Jim Meyering.
2965 * Makefile.in (dist): Get .fname from the current directory name,
2966 instead of from version.h. I need updating many files manually,
2967 when the version changes, version.h is just one of them.
2969 Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
2971 * m4.h: Remove the tag `boolean' on the enum introducing typedef
2972 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
2973 Reported by Tom McConnell.
2975 Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
2977 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
2978 39.cleardiv, which were describing missing or spurious newlines.
2979 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
2980 do not depend on machine word size, `/bin/false' implementation,
2981 or `wc' output format. `make check' is more dependable, now.
2983 * checks/check_them: Summarize the failed tests by listing their
2984 name, at end. If none, issue `All checks successful'. Output
2985 `Checking' instead of `Input file:'.
2987 * checks/get_them, checks/check_them: Reindented.
2989 * Makefile.in (dist): chmod a+r before making the tar file.
2991 Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
2993 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
2995 * input.c (next_token): Reinitialize token_buttom just after using
2996 it as a watermark with obstack_free. Or else, a future token, big
2997 enough for triggering reallocation of the obstack chunk, could
2998 void the initialized value of token_buttom, later causing panic in
2999 obstack_free. Rename token_buttom to token_bottom everywhere.
3001 * m4.h: Before declaring errno, first include <errno.h> and
3002 ensure that it does not define errno.
3003 Reported by Richard Stallman.
3005 Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
3007 * builtin.c: Define and use DECLARE macro for builtins.
3009 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3010 argument, this is a common idiom for introducing long comments.
3012 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3013 arguments. The last argument was silently ignored.
3015 * m4.c (cmd_error): Add a missing semicolon before va_end().
3017 Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
3019 * Makefile.in: Now handle protoized sources. Define and use U.
3020 Compile and use ansi2knr with old compilers. Update DISTFILES.
3021 Add `aclocal.m4' to `configure' dependencies.
3022 * ansi2knr.c: New, from Ghostscript distribution.
3023 * configure.in: Define U through FP_PROTOTYPES for old compilers.
3024 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3025 * aclocal.m4: New, provide FP_PROTOTYPES.
3026 * m4.h: Conditionnaly protoized through Args, save for varags.
3027 * builtin.c: Protoized. Then:
3028 Include <sys/types.h> if size_t is not defined, before "regex.h".
3029 (m4_ifelse): Fetch built-in name properly for diagnostic.
3030 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3031 (m4_regexp): Add const to `msg' declaration.
3032 (m4_patsubst): Add const to `msg' declaration.
3033 * debug.c: Protoized, save for varargs.
3034 * eval.c: Protoized.
3035 * format.c: Protoized.
3036 * input.c: Protoized.
3037 * m4.c: Protoized, save for varargs. Then:
3038 (xfree): Accept void * instead of char *.
3039 (xmalloc): Return void * instead of char *.
3040 (xrealloc): Accept and return void * instead of char *.
3041 * macro.c: Protoized.
3042 * output.c: Protoized.
3043 * path.c: Protoized. Then cast some (char *) over xmalloc's.
3044 * symtab.c: Protoized.
3046 Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
3048 * m4.texinfo: Remove directory from diagnostics in 30.include,
3049 51.eval, 56.errprint and 57.m4exit tests.
3051 * m4.h: Remove declarations for int or void system functions, they
3052 cause more conflicting trouble than they make good.
3054 * configure.in: Avoid configuration header file. Add some tests.
3055 * m4.h: Remove #include "config.h".
3056 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3057 Then, rewritten for better compliance with GNU standards.
3059 Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
3061 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3062 because of a misplaced #endif.
3064 * Many *.[hc] files: Correct intra-line spacing here and there,
3065 according to GNU indent 1.6 advice.
3067 * configure.in: New, using Autoconf 1.2.
3068 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3069 * Delete old configure.in, configure, etc/configure.in,
3070 etc/configure, lib/configure.in, lib/configure and config/*.
3071 Reported by Jason Merrill.
3073 * symtab.c (hash): Change (char) NULL to '\0'.
3074 Reported by Jason Merrill.
3076 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3077 etc/nextvers.sh. Release numbers will be edited `by hand'.
3078 * version.h: De-automatize, force value in.
3080 * m4.c: Changes in order to use a newer getopt.h.
3081 Reported by David MacKenzie.
3083 * checks/: New name for examples/.
3084 * checks/get_them: New location for etc/get_examples.
3085 * checks/check_them: New location for etc/check_examples.
3086 * Makefile.in, checks/get_them, checks/check_them: Adjust.
3087 * lib/vfprintf.c: New location for etc/vfprintf.c.
3088 * Delete empty etc/.
3089 * examples/: New name for test/.
3091 Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
3093 * Makefile.in (check): Add m4 as dependency.
3095 * m4.c: Accept --no-warnings instead of --no_warnings, and
3096 --no-gnu-extensions instead of --no_gnu_extensions. Make the
3097 usage message more informative.
3098 Reported by David MacKenzie.
3100 Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
3102 * etc/check_examples: New name for check_examples.sh.
3103 * etc/get_examples: New name for get_examples.sh.
3104 * Makefile.in, etc/Makefile.in: Use new names.
3106 * Makefile.in: Transmit $(CC) while making in lib.
3108 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3109 code disposition by hand.
3111 Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
3113 * m4.h: Delete definitions for abort() and exit().
3114 Reported by Richard Stallman.
3116 * config/hmake-unicos, config/s-unicos.h: New files.
3117 Reported by Hal Peterson.
3119 * eval.c (exp_term): Have N^0 return 1.
3120 Reported by Michael Fetterman.
3122 * eval.c, input.c, m4.h: Remove last comma in enums.
3123 Reported by Mike Lijewski.
3125 * Transfer of maintenance duties from Rene' to Franc,ois.
3127 Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
3129 * Release 1.0. Many thanks to those, who provided me with bug
3130 reports and feedback.
3132 * Uses GNU configure, taken from the gdb distribution.
3134 * Uses GNU getopt(), with long option names.
3136 * The -Q/+quiet option is added, which suppresses warnings about
3137 missing or superflous arguments to built-in macros.
3139 * Added default options via the M4OPTS environment variable.
3141 * The built-in format can now be configured to use sprintf as
3142 the formatting engine, for systems without [efg]cvt(3).
3144 * GNU library code is moved to the ./lib subdirectory; other
3145 utility files are now in ./etc.
3147 * Several minor bugs have been fixed.
3149 Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
3151 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
3152 Francois Pinard and Roland H. Pesch for providing me with reports.
3154 * The builtins incr and decr are now implemented without use of
3157 * The builtin indir is added, to allow for indirect macro calls
3158 (allows use of "illegal" macro names).
3160 * The debugging and tracing facilities has been enhanced
3161 considerably. See the manual for details.
3163 * The -tMACRO option is added, marks MACRO for tracing as soon
3166 * Builtins are traced after renaming iff they were before.
3168 * Named files can now be undiverted.
3170 * The -Nnum option can be used to increase the number of
3171 divertions available.
3173 * Calling changecom without arguments now disables all comment
3176 * The function m4_patsubst() is now consistently declared
3179 * A bug in dnl is fixed.
3181 * A bug in the multi-character quoting code is fixed.
3183 * Several typos in the manual has been corrected. More probably
3186 * The m4.info file is now installed along with the program.
3188 Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
3190 * Updated and enhanced version. Release 0.75, manual 0.07.
3192 * Implemented search path for include files (-I option and
3193 M4PATH envronment variable).
3195 * Implemented builtin "format" for printf-like formatting.
3197 * Implemented builtin "regexp" for searching for regular
3200 * Implemented builtin "patsubst" for substitution with regular
3203 * Implemented builtin "esyscmd", which expands to a shell
3206 * Implemented "__file__" and "__line__" for use in error
3209 * Implemented character ranges in "translit".
3211 * Implemented control over debugging output.
3213 * Implemented multi-character quotes.
3215 * Implemented multi-character comment delimiters.
3217 * Changed predefined macro "gnu" to "__gnu__".
3219 * Changed predefined macro "unix" to "__unix__", when the -G
3220 option is not used. With -G, "unix" is still defined.
3222 * Changed "shift", "$@" and "$*" to not insert spaces afters
3225 * Added program name to error messages.
3227 * Fixed two missing null bytes bugs.
3229 Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
3231 * Initial beta release. Release 0.50, manual 0.05.
3241 Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3242 2005, 2006 Free Software Foundation, Inc.
3244 Copying and distribution of this file, with or without
3245 modification, are permitted provided the copyright notice
3246 and this notice are preserved.