1 2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
3 Fix Debian bug 405594, introduced 2006-11-01 from a bad
4 copy-n-paste from head.
5 * src/m4.c (main): Use correct file name after --.
8 2007-01-04 Eric Blake <ebb9@byu.net>
10 Fix regression from 1.4.7 in large file handling on some
11 platforms, introduced on 2006-10-13.
12 * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
14 * NEWS: Document this fix.
16 2007-01-03 Eric Blake <ebb9@byu.net>
18 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
20 * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
21 it bumps the copyright year).
23 2006-12-27 Eric Blake <ebb9@byu.net>
25 * doc/m4.texinfo (Patsubst): Fix typo.
27 2006-12-16 Eric Blake <ebb9@byu.net>
29 * src/m4.c (main): Check for errors when closing stdin.
31 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
33 * doc/m4.texinfo: Fix some typos.
35 2006-12-09 Eric Blake <ebb9@byu.net>
37 * configure.ac (AC_INIT): Bump version number.
38 * NEWS: Start changes of 1.4.8a.
40 2006-11-20 Eric Blake <ebb9@byu.net>
44 * configure.ac (AC_INIT): Bump version number.
45 * NEWS: Describe changes since 1.4.7.
47 2006-11-16 Eric Blake <ebb9@byu.net>
49 * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
50 Minor tweaks noticed while porting to head.
52 2006-11-14 Eric Blake <ebb9@byu.net>
54 * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
56 (m4_tmpname): Avoid memory leak.
58 2006-11-13 Eric Blake <ebb9@byu.net>
60 * src/output.c (cleanup_tmpfile): Avoid double error message when
62 (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
64 (m4_tmpfile): Add parameter, move cloexec action here.
65 (make_room_for): Adjust caller. Don't keep too many files open.
66 (insert_diversion_helper): Unlink emptied temp files.
67 (make_diversion): Don't keep too many files open.
68 * doc/m4.texinfo (Diversions): Tweak wording, now that open file
69 descriptors are no longer a limiting factor.
70 * NEWS: Document this change.
72 Backport sparse diversion handling from head.
73 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
75 * src/output.c (struct m4_diversion): Rename from struct
76 diversion, and update members. All users changed.
77 (diversion_table): Change to an ordered set, instead of an array.
78 (div0): New storage for diversion 0.
79 (diversions): No longer needed.
80 (free_list): New list to allow recycling diversion storage.
81 (diversion_storage): New storage to reduce malloc overhead.
82 (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
83 (output_init, output_exit, cleanup_tmpfile, make_room_for)
84 (make_diversion): Handle new diversion storage scheme.
85 (insert_diversion_helper): New function.
86 (insert_diversion, undivert_all, freeze_diversions): Use it.
87 * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
88 exhaustion to visible test of large diversion numbers.
89 * NEWS: Document this fix.
91 2006-11-11 Eric Blake <ebb9@byu.net>
93 * src/builtin.c (m4_translit): Slight optimization.
95 * src/m4.h (to_uchar): Depend on HAVE_INLINE.
97 * src/builtin.c: Remove unnecessary casts.
98 (expand_ranges): Make 8-bit clean.
99 * doc/m4.texinfo (Translit): Add tests and wording.
100 * NEWS: Document this fix.
102 2006-11-07 Eric Blake <ebb9@byu.net>
104 * src/m4.h (output_exit): New prototype.
105 * src/m4.c (main): Use it.
106 * src/output.c (cleanup_tmpfile): Close files before removing
108 (insert_diversion): Check for failure.
109 (output_exit): Avoid memory leak.
110 * doc/m4.texinfo (Diversions): Test this bug.
112 * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
114 2006-11-01 Eric Blake <ebb9@byu.net>
116 Allow C++ compilation on Linux, as a safety measure in type
118 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
120 * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
121 (boolean): Kill this, and use stdbool.h instead.
122 * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
123 * src/output.c, src/symtab.c: All users changed.
124 * src/symtab.c (hack_all_symbols): Update prototype.
125 * src/builtin.c (dump_symbol, set_trace): Update signature.
126 (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
127 (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
129 * src/debug.c (trace_flush): Likewise.
130 * src/freeze.c (reload_frozen_state): Likewise.
131 * src/input.c (push_file, push_string_finish, push_wrapup):
132 (token_bottom, next_token): Likewise.
133 * src/m4.c (main): Likewise.
135 * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
137 * src/m4.h (m4_path_search): Tweak signature.
138 * src/path.c (m4_path_search): Likewise.
139 * src/builtin.c (include): Update caller.
140 * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
141 with file names. Don't write to **argv.
142 (process_file): New helper method.
143 * NEWS: Document this fix.
145 2006-10-31 Eric Blake <ebb9@byu.net>
147 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
148 * doc/m4.texinfo (Translit): Improve the documentation.
149 * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
151 (m4_index): Simplify, and speed up slightly.
152 * NEWS: Document this fix.
154 2006-10-28 Eric Blake <ebb9@byu.net>
156 * src/input.c (set_quotes): Don't allow empty end-quote with
157 non-empty start-quote.
158 (set_comment): Likewise for end-comment.
159 * src/builtin.c (m4_changecom): Adjust caller.
160 * doc/m4.texinfo (Changequote, Changecom): Update documentation to
162 (Incompatibilities): Document another POSIX bug.
163 * NEWS: Mention this change.
165 2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
167 * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
170 2006-10-26 Eric Blake <ebb9@byu.net>
172 Silence -Wwrite-strings -Wpointer-arith warnings.
173 * src/builtin.c (define_user_macro): Allow NULL argument.
174 (m4_builtin, m4_indir): Cast away const of "".
175 * src/format.c (format): Likewise.
176 * src/macro.c (collect_arguments): Likewise.
177 (expand_macro): Avoid math on void*.
178 * src/m4.c (main): Adjust caller.
179 * src/output.c (freeze_diversions): Detect off_t overflow.
181 * src/input.c (pop_input): Remove unnecessary code.
183 2006-10-25 Eric Blake <ebb9@byu.net>
185 * src/symtab.c (symtab_init): Avoid size_t overflow.
186 * src/output.c (make_diversion): Avoid size_t overflow.
187 * doc/m4.texinfo (Diversions): Test this fix.
188 * src/input.c (input_block): Remove unused member. Reduce size
190 (push_file, pop_input): Avoid useless assignment.
191 * NEWS: Document the bug fix.
193 Redo location tracking. Instead of having just files track the
194 line to return to when popping input, now all input blocks track
196 * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
198 (input_block): Have line and file storage for all input types, and
200 (input_change): New global flag.
201 (push_file, push_macro, push_string_init, push_wrapup): Store
203 (push_string_finish, pop_input, pop_wrapup): Notice changes in
205 (peek_input): Adjust to new member names.
206 (next_char, next_char1): Adjust location if needed.
207 (skip_line): Simplify restoring location.
208 * doc/m4.texinfo (Location): Augment the test to catch line
209 location of expansion of multi-line arguments.
210 Reported by Stepan Kasal.
212 2006-10-23 Eric Blake <ebb9@byu.net>
214 * doc/m4.texinfo (Macro Arguments): Document that leading space
215 in argument collection stops at macro expansion.
216 (Incompatibilities): Document POSIX whitespace wording issue.
218 2006-10-20 Eric Blake <ebb9@byu.net>
220 * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
221 TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
222 end of a TeX line splits incorrectly.
223 (Foreach, Improved foreach): Write these sections, borrowing ideas
224 from CVS head and from m4sugar.
225 * checks/get-them: Accomodate new way to show trailing space in
227 * examples/foreach.m4: Make usable in documentation.
228 * examples/foreachq.m4: New file.
229 * examples/foreachq2.m4: New file.
230 * examples/foreach2.m4: New file.
231 * NEWS: Document the documentation updates.
233 2006-10-19 Eric Blake <ebb9@byu.net>
235 * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
236 (m4_maketemp): Provide traditional behavior.
237 * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
238 new `mkstemp' macro and the flaws of the old `maketemp'.
239 (Incompatibilities): Move maketemp discussion to...
240 (Extensions): ...here, since -G now supresses the GNU extension.
241 * NEWS: Document this.
243 * examples/forloop.m4: Simplify.
244 * examples/forloop2.m4: New file.
245 * examples/quote.m4: New file.
246 * doc/m4.texinfo (Loops): Rename to...
247 (Shift): ...this node.
248 (Forloop, Foreach, Improved forloop, Improved foreach): New
251 2006-10-17 Eric Blake <ebb9@byu.net>
253 * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
255 * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
256 gnulib headers, rather than in top directory.
257 * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
260 2006-10-16 Eric Blake <ebb9@byu.net>
262 * doc/m4.texinfo: Backport some minor cleanups from head.
263 (Cleardivert): Rename from cleardiv.
265 * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
266 a section of Preliminaries.
267 (Operation modes, Preprocessor features, Limits control)
268 (Frozen state, Debugging options, Command line files): Subdivide
270 (Input processing, Quoting Arguments, Define, Arguments)
271 (Cleardiv, Format, M4exit): Fix grammar of references.
272 (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
273 (Debug Levels, Debug Output, Include, Search Path, Divert)
274 (Platform macros, Syscmd, Location, Extensions): Point to new
276 (Top, Loops, Include, Undivert, Location, Incompatibilities):
277 Improve file references.
279 2006-10-14 Eric Blake <ebb9@byu.net>
281 * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
283 Reported by Ralf Wildenhues.
285 * src/builtin.c (m4_undivert): Check for read error.
287 2006-10-13 Eric Blake <ebb9@byu.net>
289 * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
290 header files are included, since <unistd.h> can affect the tests.
292 Reported by Martin Koeppe.
294 Backport head's usage of clean-temp module, as it is cleaner than
296 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
297 clean-temp closeout', and remove tmpfile-safer.
298 * src/m4.h (includes): Adjust.
299 (m4_path_search): Rename from path_search, to avoid collision
301 * src/m4.c (main): Install closeout handler. Adjust caller.
302 (usage): Now done by closeout module.
303 * src/builtin.c (m4_m4exit): Likewise.
304 (m4_undivert, include): Adjust callers.
305 * src/freeze.c (reload_frozen_state): Likewise.
306 * src/path.c (m4_path_search): Rename from path_search.
307 * src/output.c (output_temp_dir): New variable.
308 (cleanup_tmpfile, m4_tmpfile): New functions, from head.
309 (insert_diversion, make_room_for): Use them.
310 * doc/m4.texinfo (Diversions): Document this, and add a test.
311 (Improved fatal_error): Fix typo.
312 (Maketemp): Port test to mingw, and no longer hide from
314 * NEWS: Document the change in TMPDIR behavior.
316 * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
317 macros, to work with recent gnulib-tool update.
319 * src/builtin.c (m4_builtin, m4_indir): Allow transparent
320 handling of defn results.
321 * doc/m4.texinfo (Builtin, Indir): Add test cases.
322 * NEWS: Document this.
324 2006-10-12 Eric Blake <ebb9@byu.net>
326 * doc/m4.texinfo (Location): Fix typo in previous commit.
327 (Changeword): Catch one more case.
328 * src/input.c (skip_line): Fix case when outer file used macro to
331 2006-10-11 Eric Blake <ebb9@byu.net>
333 * src/input.c (enum input_type): Add additional types, to shave
334 time off the common case.
335 (push_wrapup): Wrapped strings remember location.
336 (push_string_finish): Normal strings carry no location.
337 (push_file): Start new files uninitialized.
338 (peek_input, next_char_1): Optimize common cases by updating
339 location only on new input types.
340 (pop_input): Update to honor new input types.
341 (skip_line, push_string_finish): Fix regression in previous patch
342 when dnl is not followed by newline in included file.
343 (push_string_init): Initialize all fields of INPUT_STRING sooner.
344 (peek_token): Simplify.
345 (peek_input): Don't pop input files on peek, so that __file__ and
346 __line__ as last token of include file work correctly.
347 * doc/m4.texinfo (History): Mention 1.4.8.
348 (Answers): Split into sections, one per answer.
349 (Improved exch, Improved cleardivert, Improved fatal_error): New
351 (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
352 new m4wrap location semantics.
353 (Changeword): Add test that caught the regression.
354 * NEWS: Document this.
356 * src/macro.c (expand_macro): In macro expansion errors, report
357 line number at open parenthesis.
358 * src/input.c (next_token): Fix off-by-one bug in reporting end
359 of file in unterminated comment and string.
360 (file_names): New obstack, necessary since expand_macro now hangs
361 on to file names longer than the files remain open.
362 (input_init): Initialize new obstack.
363 (push_file): Use new obstack. Delay updates to current_file
364 until after expand_macro has restored state.
365 (peek_input, next_char_1): Update current_file if necessary.
366 (pop_wrapup): Release memory.
367 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
369 (Dnl): Update to the new location reporting rules.
370 * NEWS: Document these changes.
372 2006-10-10 Eric Blake <ebb9@byu.net>
374 * src/macro.c (argc_stack, argv_stack): New variables for sharing
375 obstacks across multiple macro calls.
376 (expand_input): Initialize and tear down stack once per input
377 file, instead of once per macro.
378 (expand_macro): Reuse existing stacks when possible.
379 (collect_arguments): Simplify slightly.
381 * src/path.c (include_env_init): Fix botched patch application.
382 Reported by Ralf Wildenhues.
384 2006-10-09 Eric Blake <ebb9@byu.net>
386 * src/m4.c (usage, main): Detect write failures to stderr.
387 * src/builtin.c (m4_m4exit): Likewise.
388 * NEWS: Document this.
390 * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
392 * NEWS: Document this.
393 * doc/m4.texinfo (Invoking m4): Likewise.
395 2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
397 * src/path.c (include_env_init): Copy the string returned
398 by getenv before overwriting it; POSIX disallows this.
400 2006-10-09 Eric Blake <ebb9@byu.net>
402 * src/m4.c (main): Defer debugfile until after --help.
403 * configure.ac (AC_INIT): Bump version number.
404 * NEWS: Start changes of 1.4.7a.
406 2006-09-25 Eric Blake <ebb9@byu.net>
410 * configure.ac (AC_INIT): Bump version number.
411 * NEWS: Describe changes since 1.4.6.
413 2006-09-21 Eric Blake <ebb9@byu.net>
415 * doc/m4.texinfo (Invoking m4): Add clarification on option
418 Reported by Mikhail Teterin.
420 * bootstrap: Add --force option, based on idea from coreutils.
421 * README: Document that ./bootstrap and autoreconf are for
422 developers, and not lightly done in tarballs.
424 2006-09-20 Eric Blake <ebb9@byu.net>
426 * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
427 deprecation warning on -e.
428 * doc/m4.texinfo (Invoking m4, Extensions): Document this.
429 * NEWS: Document this.
431 2006-09-19 Eric Blake <ebb9@byu.net>
433 * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
434 -o/--error-output to --debugfile, and deprecate the former. This
435 will allow a future release to be more consistent with other GNU
436 tools, with -o/--output affecting stdout, not debug.
437 * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
438 * NEWS: Document this.
440 2006-09-14 Eric Blake <ebb9@byu.net>
442 * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
443 --diversions. `m4 --help --version' now displays help, not
445 (interactive, frozen_file_to_read, frozen_file_to_write): Move to
447 (show_help, show_version): No longer needed.
448 (long_options, DIVERSIONS_OPTION): Backport patch from head to
449 distinguish between -N and --diversions in warning.
450 * doc/m4.texinfo (Invoking m4): Document this.
453 2006-09-11 Eric Blake <ebb9@byu.net>
455 * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
456 * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
458 (debug_set_file): Use STDOUT_FILENO.
459 * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
460 with POSIX in regards to unread input.
461 * NEWS: Document this fix.
462 * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
464 2006-09-07 Eric Blake <ebb9@byu.net>
466 * m4/gnulib-cache.m4: Update to newer gnulib-tool.
467 * src/m4.h (push_file): Change prototype.
468 * src/input.c (push_file, peek_input, next_char_1): Only call getc
469 once at EOF, to avoid double ^D on terminal stdin; regression from
471 (push_file, pop_file): Allow reading stdin twice.
472 * src/m4.c (main): Likewise.
473 * src/builtin.c (include): Update caller.
474 * NEWS: Document this change.
475 * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
476 (Syscmd): Add a test that failed before this patch.
478 2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
480 * checks/check-them: Quote $pwd.
482 2006-09-05 Eric Blake <ebb9@byu.net>
484 * src/builtin.c (define_macro): Warn on invalid macro name.
485 * NEWS: Document this change.
486 * doc/m4.texinfo: Fix typos.
487 (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
488 (Ifelse): Backport some improvements from head.
490 2006-09-04 Eric Blake <ebb9@byu.net>
492 * doc/m4.texinfo (Changeword): Skip test on mingw, where the
493 native echo is braindead.
494 * checks/check-them (strip_needed): Ignore \r in output. Now the
495 testsuite will pass when cross-compiling from cygwin to mingw.
497 * src/input.c (peek_input): Fix regression in handling macro
498 without arguments as last token in file; debian bug 385720.
499 (next_token): Always consume an input character.
500 Reported by Andreas Schultz.
501 * configure.ac (AC_INIT): Bump version number.
502 * NEWS: Document this fix.
503 * doc/m4.texinfo (History): Mention next version.
504 (Changeword): Add example that exposes this bug.
507 2006-08-25 Eric Blake <ebb9@byu.net>
511 * configure.ac (AC_INIT): Bump version number.
512 * NEWS: Describe changes since 1.4.5.
514 * Makefile.maint (web-manual): Give up on VPATH build during
515 distribution. But distributions are made so infrequently that
516 this is not too much of a hardship.
517 * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
520 2006-08-24 Eric Blake <ebb9@byu.net>
522 * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
523 Solaris, produce output on just one argument.
524 (m4_regexp, m4_patsubst): For consistency, do likewise.
525 (m4_patsubst): Allow zero-length match at end of string.
526 * doc/m4.texinfo (Sysval): Fix overfull hbox.
527 (Bugs, Macro Arguments): Minor fixes.
528 (Other tokens): Rearrange node order.
529 (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
530 * NEWS: Document these fixes.
532 2006-08-22 Eric Blake <ebb9@byu.net>
534 * src/input.c (pop_input): Avoid empty filename with -di option.
535 * src/debug.c (debug_message_prefix): Put space before message.
537 * m4/gnulib-cache.m4: We don't explicitly use alloca module.
539 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
540 * Makefile.maint (fetch): Simplify, now that we can use gnupload.
542 * checks/check-them: State why a test is skipped.
543 * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
545 * ChangeLog: Add copyright.
551 * examples/COPYING: New file, add copyright for all the examples.
552 * checks/get-them: Put copyright on testsuite files.
554 2006-08-18 Eric Blake <ebb9@byu.net>
556 Don't let unrelated child processes see too many files.
557 * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
558 * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
559 spelling in error message.
560 * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
561 (debug_set_output): Close debug file on exec.
562 * src/m4.h (includes): Add cloexec.h.
563 * src/output.c (make_room_for): Close diversions on exec.
564 * src/path.c (path_search): Close include files on exec.
565 * NEWS: Document this.
567 Regular expressions were leaking memory.
568 * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
570 (m4_regexp, m4_patsubst): Avoid memory leak.
571 * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
573 (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
574 from O(n^2) to O(n) for calculating word_start.
575 (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
576 O(1) bitmap, not O(n) search string.
577 * NEWS: Document this fix.
579 2006-08-17 Eric Blake <ebb9@byu.net>
581 * NEWS: Document previous checkin.
583 * src/builtin.c (substitute): Avoid core dump when accessing
584 beyond bound of regular expression.
585 Reported by Karl Nelson.
586 * doc/m4.texinfo (Regexp): Add example that causes core dump on
587 some architectures prior to this patch.
590 2006-08-16 Eric Blake <ebb9@byu.net>
592 * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
593 clear that dumpdef does not always go to stderr.
595 * src/builtin.c (m4_errprint): Flush buffers before printing to
599 2006-08-15 Eric Blake <ebb9@byu.net>
601 * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
602 per debian bug 96075.
603 * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
604 (Changeword): Don't use shift as an example of a swallowed word.
605 (Divert): Discuss fact that divert is an English word.
606 Reported by Richard A Nelson.
608 2006-08-14 Eric Blake <ebb9@byu.net>
610 * doc/m4.texinfo (Invoking m4): Minor fixes.
612 2006-08-12 Eric Blake <ebb9@byu.net>
614 * doc/m4.texinfo (Arguments): Hint at better exch macro.
615 (Answers): Provide a better definition.
617 2006-08-09 Eric Blake <ebb9@byu.net>
619 * doc/m4.texinfo (Incompatibilities): Document that m4 does not
620 yet understand locales.
621 * NEWS: Fix wording of a few items.
623 2006-08-08 Eric Blake <ebb9@byu.net>
625 Avoid printing `NONE:0:' in error messages.
626 * src/m4.h (m4_error_at_line): New function.
627 * src/m4.c (m4_error_at_line): Implement.
628 * src/input.c (skip_line, input_init, next_token): Use "", not
629 "NONE", for no file, since NONE can be a real file name.
630 * src/macro.c (expand_argument): Likewise.
631 * src/debug.c (debug_message_prefix, trace_header): Check for
633 * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
634 (Location): Document that synclines and internal message format
635 are not impacted by redefining these macros.
636 (M4exit): Hint at bug in fatal_error.
637 (Answers): Provide workaround to match m4 output.
639 * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
640 * src/m4.h (m4_error): New function.
641 (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
642 error module deficiencies.
643 (reference_error, suppress_line): No longer needed.
644 * src/m4.c (m4_error): Implement.
645 (main): No longer need to install error callback.
647 2006-08-04 Eric Blake <ebb9@byu.net>
649 * src/m4.h (program_name): Declare.
650 (suppress_line): New variable.
651 (M4ERROR_AT_LINE): New macro.
652 * src/m4.c (reference_error, main): Follow GNU Coding Standards
653 for error message format.
654 * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
655 * src/macro.c (expand_argument): Likewise.
656 * checks/check-them (examples): Adjust to new message format.
657 * src/builtin.c (m4___program__): New builtin.
658 * doc/m4.texinfo (Location): Split from Errprint into new node,
659 and document __program__.
660 (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
661 (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
663 (Extensions): Document __program__.
664 * NEWS: Document this change.
666 2006-08-03 Eric Blake <ebb9@byu.net>
668 Don't confuse leading `(' in comment or quote with start of
670 * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
672 (peek_input): Make private to input.c.
673 (peek_token): New prototype.
674 * src/input.c (default_word_regexp): Reduce ifdefs.
675 (peek_input): Make static.
676 (next_token): Return new token types.
677 (match_input, MATCH): Add argument consume, which controls
678 whether match should be pushed back.
679 (peek_token): New function.
680 (token_type_string) [DEBUG_INPUT]: New function.
681 * src/macro.c (expand_token, expand_argument, collect_arguments):
682 Handle new token types.
683 * doc/m4.texinfo (Changequote, Changecom): Document this.
684 * NEWS: Document this.
686 * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
688 * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
689 overflow detection when sigstack exists but is not implemented.
690 Fixes debian bug 154053.
692 Reported by David Perlin.
694 2006-08-02 Eric Blake <ebb9@byu.net>
696 * src/input.c (MATCH): Fix EOF detection on multi-byte comment
699 2006-08-01 Eric Blake <ebb9@byu.net>
701 * src/input.c (skip_line, next_token): Remember current file in
702 case input file ends abruptly. Addresses debian bug 175365.
703 (pop_input): Defer freeing storage that holds previous file
705 (pop_wrapup): to here, after error message is issued.
706 * src/macro.c (expand_argument): Remember current file in case
707 input file ends abruptly.
708 * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
709 (M4wrap): Adjust testsuite accordingly.
710 (Errprint): Document line number limitation of m4wrap.
711 * NEWS: Document this fix.
714 2006-07-31 Eric Blake <ebb9@byu.net>
716 * src/input.c (peek_input, next_char, match_input): Be eight-bit
717 clean; fixes debian bug 311378.
718 * doc/m4.texinfo (Syntax): Describe eight-bit handling.
719 (Changequote, Changecom): Add examples to test this.
720 * NEWS: Document this fix.
722 Reported by Steven Augart.
724 * doc/m4.texinfo: Whitespace fix.
725 * checks/get-them: Avoid exceeding 14-char file name limit.
728 2006-07-30 Eric Blake <ebb9@byu.net>
730 * src/path.c (path_search): Detect allocation failure.
732 Use native free when it is good enough.
733 * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
734 * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
736 * src/symtab.c (free_symbol): Likewise.
737 * src/m4.c (xfree, main): Likewise.
738 * src/m4.h (obstack_chunk_free): Likewise.
739 * src/path.c (path_search): Likewise.
740 * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
742 * doc/m4.texinfo (Errprint): Add example for last patch.
743 * checks/check-them: Account for VPATH in latest example.
745 2006-07-29 Eric Blake <ebb9@byu.net>
747 * src/path.c (path_search): Add result parameter, so that
748 -I can be accounted for. Debian bug 53685.
749 * src/m4.h (path_search): Update prototype.
750 * src/m4.c (main): Adjust callers.
751 * src/freeze.c (reload_frozen_state): Likewise.
752 * src/builtin.c (include, m4_undivert): Likewise.
753 * NEWS: Document this change.
754 Reported by Nicolas Lichtmaier.
756 2006-07-28 Eric Blake <ebb9@byu.net>
758 * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
759 several non-GNU makes.
760 * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
761 * src/m4.h: Likewise.
762 * src/input.c (push_wrapup): Avoid compiler warning with Solaris
765 2006-07-27 Eric Blake <ebb9@byu.net>
767 * doc/m4.texinfo: Use @acronym{GNU} throughout.
768 (History): Update for 1.4.6.
770 * src/m4.h (_): Remove K&R cruft.
771 * src/builtin.c: Likewise.
772 * src/debug.c: Likewise.
773 * src/eval.c: Likewise.
774 * src/macro.c: Likewise.
775 * src/stackovf.c: Likewise.
777 * doc/Makefile.am (m4.1): Improve man page.
778 * src/m4.c (usage): Improve --help output, including adding the
779 bug reporting address.
780 (main): Follow GNU Coding Standards for --version output.
782 2006-07-26 Eric Blake <ebb9@byu.net>
784 * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
785 end-comment consistently, to match POSIX.
787 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
788 (Dnl, M4wrap, Include): Document EOF issues, and add examples.
789 (Incompatibilities): Document incompatibility of changecom
790 vs. macro names, and of EOF in include.
791 * src/input.c (next_token): Reject unterminated comments at EOF.
792 (skip_line): Warn on unterminated dnl at EOF.
793 * NEWS: Document these changes.
795 2006-07-25 Eric Blake <ebb9@byu.net>
797 * m4/gnulib-cache.m4: Update to reflect gnulib's split of
798 stdio-safer into fopen-safer and tmpfile-safer.
799 * src/m4.c: Remove redundant include.
801 2006-07-24 Eric Blake <ebb9@byu.net>
803 Fix bugs related to stream handling.
804 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
805 unlocked-io stdio-safer stdlib-safer close-stream.
806 * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
807 provided by gnulib if needed.
808 * src/output.c [! HAVE_TMPFILE]: Likewise.
809 * src/m4.h (includes): Replace unistd, stdio, and stdlib with
810 their safer counterparts.
811 (retcode): New global variable.
812 * src/input.c (pop_input): Check for read failure.
813 * src/freeze.c (reload_frozen_state): Likewise.
814 (produce_frozen_state): Check for write failure.
815 * src/debug.c (debug_set_file): Likewise.
816 * src/m4.c (usage, main): Likewise.
817 (retcode): Make global.
818 * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
819 status is non-zero except when everything succeeds.
820 * doc/m4.texinfo (M4exit): Document these changes.
821 (Incompatibilities): Remove documentation of bug now fixed.
822 * NEWS: Document these fixes.
824 2006-07-22 Eric Blake <ebb9@byu.net>
826 * src/format.c (format): Avoid compiler warning that str may be
829 2006-07-21 Eric Blake <ebb9@byu.net>
831 * src/m4.h [UNIX]: Add more platforms that are close enough to
832 categorize as UNIX, but which don't predefine __unix__.
833 Reported by Nelson H. F. Beebe.
835 2006-07-20 Eric Blake <ebb9@byu.net>
837 * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
838 to explicitly ask for --assume-autoconf=2.60.
840 2006-07-19 Eric Blake <ebb9@byu.net>
842 * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
843 and exits normally with 129.
844 Reported by Nelson H. F. Beebe.
847 * src/m4.h (EXIT_MISMATCH): Define.
848 * src/freeze.c (reload_frozen_state): Detect version mismatch, by
849 exiting with status 63.
850 * src/m4.c (usage): Document this.
851 * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
854 * doc/m4.texinfo (copying): Relax restriction on front-cover and
857 2006-07-17 Eric Blake <ebb9@byu.net>
859 * src/format.c (format): Support F, g, and G specifiers.
860 * doc/m4.texinfo (Format): Document this.
861 * NEWS: Document this addition.
863 * doc/m4.texinfo (Builtin): Delete redundant text.
865 * configure.ac (AC_INIT): Bump version number.
866 * src/builtin.c (substitute): Bah. Fix buffer overrun.
867 * NEWS: Document this fix.
869 2006-07-15 Eric Blake <ebb9@byu.net>
873 * configure.ac (AC_INIT): Bump version number.
874 * NEWS: Describe changes since 1.4.4.
876 * src/m4.c (usage): Document exit status.
877 * doc/m4.texinfo: Use `exit status', not `exit code'.
878 (Invoking m4): Document exit status.
880 * bootstrap: Backport --help, --version from head.
881 (func_update): New function, for easily grabbing up-to-date files
883 * Makefile.maint (web-manual): Fix for VPATH builds.
885 2006-07-14 Eric Blake <ebb9@byu.net>
887 * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
888 looks bad in info. Use @deffn rather than @example for
889 describing prototypes. Fix awkward wording and grammar.
891 * src/builtin.c (substitute): Warn on bad escape sequences.
892 Ignore trailing backslash.
893 * doc/m4.texinfo (Regexp): Add documentation for this.
894 * NEWS: Document this change.
896 * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
897 * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
899 (Dnl): Update example to show side effects.
900 * checks/get-them: Generate three digit test names.
901 * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
903 2006-07-13 Eric Blake <ebb9@byu.net>
905 * src/input.c (input_init): Simplify.
906 (set_word_regexp): Treat empty string as default, since empty
907 regexp would disable word parsing.
908 * src/m4.c (user_word_regexp): Default to empty string.
909 * src/builtin.c (builtin_tab): Make changeword blind.
910 * doc/m4.texinfo (Changeword): Document this.
911 * NEWS: Document this.
912 * TODO: Knock off completed items.
914 * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
916 * doc/m4.texinfo (Undefine, Pushdef): Test this.
917 * NEWS: Document this change.
919 * src/builtin.c (numeric_arg): Treat empty string as 0, with a
920 warning. Detect quoted leading space and overflow as warnings.
921 (m4_eval): Treat empty radix as 10, and allow output in radix 1.
922 Treat width as minimum number of digits, as required by POSIX.
923 (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
925 (m4_substr): Likewise. Silently treat empty start as 0.
926 (m4_undivert): Treat ` 1a' as file, not diversion 1.
927 * src/eval.c (eval_lex): Parse radix 1 numbers.
928 * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
930 (Manual): Document behavior of numeric parsing of empty string.
931 (Divert, Incr): Document error handling.
932 (Eval): Document radices better.
933 (Incompatibilities): Document translit incompatibility.
934 * NEWS: Document these changes.
936 * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
937 (web-manual): Simplify.
938 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
939 * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
940 (MAINTAINERCLEANFILES): Clean it as well.
941 * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
942 (MAINTAINERCLEANFILES): Clean it as well.
944 2006-07-12 Eric Blake <ebb9@byu.net>
946 * doc/m4.texinfo (Extensions): Document how to overcome
947 implementation difference in > 9 positional parameters.
949 * src/m4.c (usage): Sort within sections.
950 (nesting_limit): Raise default from 250 to 1024.
951 * doc/m4.texinfo: Use file name, not filename, per GNU coding
952 standard. Use @option where appropriate.
953 (Invoking m4): Sort to match --help output.
954 (Debug Levels): Sort.
955 (Frozen files): Sort and break into two nodes.
957 * src/m4.c (nesting_limit): Raise default from 250 to 1024.
958 * NEWS: Document raised -L limit.
960 2006-07-11 Eric Blake <ebb9@byu.net>
962 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
963 stress-test changeword before a release.
964 * doc/m4.texinfo: More doc cleanups.
965 (Copying This Manual): New node; actually include the FDL in the
967 * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
968 * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
969 * NEWS: Mention documentation improvements.
971 * src/m4.h (OS2): New platform macro.
972 * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
974 * doc/m4.texinfo (Platform macros): Document it.
975 (Sysval): Remove non-portable test of system("").
976 * NEWS: Document this change.
977 Reported by Andreas Buening.
979 2006-07-09 Eric Blake <ebb9@byu.net>
981 * doc/m4.texinfo (Undivert): Fix typo in last commit.
982 * src/m4.c (usage): Document M4PATH.
983 * src/path.c (path_search): Reject empty string.
984 * src/output.c (insert_diversion): Ignore diversion 0.
985 * src/builtin.c (m4_undivert): Ignore empty string.
986 * NEWS: Document this fix.
988 2006-07-08 Eric Blake <ebb9@byu.net>
990 * checks/get-them: Make filtering easier.
991 * checks/check-them: Filter non-input lines, so line counts are
992 more realistic in the documentation, and so changeword tests work
993 even when dnl is disabled.
994 * doc/m4.texinfo: Adjust example line numbers. Clean up
995 front-matter, following autoconf's example.
996 (Changeword): Enable tests, skipping if changeword not supported.
997 (Define, Defn, Ifelse): Backport more examples from head.
998 (Input processing, Answers): New nodes, backported from head.
999 (Include): Expand test to cover empty filename.
1000 (Undivert): Add test of undivert(0).
1002 2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1004 * doc/m4.texinfo: Fix spelling errors.
1006 2006-07-07 Eric Blake <ebb9@byu.net>
1010 * doc/Makefile.am (m4.1): No need to go through a temporary file;
1011 this also ensures timestamps are updated.
1012 * src/m4.h (includes): Require config.h. Assume string.h,
1013 stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
1014 than prototyping ourselves.
1015 (builtin_func): Add parameter type-checking.
1016 (voidstar): Delete, now that we assume C89.
1017 * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
1019 * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
1022 2006-07-06 Eric Blake <ebb9@byu.net>
1024 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1026 * src/m4.h (includes): Add binary-io.h for O_BINARY.
1027 * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
1028 #ifdef. Fixes patch from 2005-02-03 for cygwin.
1029 * NEWS: Mention this fix.
1031 * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
1032 * src/builtin.c (m4_syscmd): Work around OS/2 bug.
1034 * Makefile.am (SUBDIRS): Build . before src, so that autoheader
1035 runs first when needed.
1036 * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
1037 once in srcdir rather than multiple times in VPATH builds.
1039 2006-07-03 Eric Blake <ebb9@byu.net>
1041 * checks/check-them: Use portable = in test.
1042 * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
1043 directory, as required by Solaris cc. Include built headers, as
1044 required by Solaris make in VPATH build.
1045 * checks/Makefile.in: Use $(srcdir) where needed.
1046 (CHECKS): Factor $(srcdir) into macro.
1047 (DISTFILES): Likewise. Automake takes care of distributing
1050 (Makefile): Use modern syntax of config.status.
1051 * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
1052 Avoid overfull and underfull hboxes in dvi.
1054 Fix 'make check' in VPATH build. All files included by testsuite
1055 now live in a single directory. Use forloop.m4 in testsuite.
1056 * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
1058 * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
1060 * checks/Makefile.in (DISTFILES): Don't distribute moved files.
1061 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1062 * checks/check-them: Avoid s/// when filename is in pattern.
1063 * examples/forloop.m4: Fix to match documentation.
1064 * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
1066 (Loops, Format): Actually use forloop.m4 in tests.
1068 2006-07-02 Eric Blake <ebb9@byu.net>
1070 * checks/Makefile.in (exec_prefix, prefix): New macros, so that
1071 $(bindir) works in installcheck.
1072 (check, installcheck): No longer change directory, so that
1073 distcheck works with a read-only builddir.
1074 * checks/check-them: Work when pwd is no longer builddir.
1076 2006-07-01 Eric Blake <ebb9@byu.net>
1078 * GNUmakefile: New file, borrowed from coreutils.
1079 * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
1080 * Makefile.maint (Makefile): Delete this rule, now that
1081 GNUmakefile includes Makefile.
1083 2006-06-30 Eric Blake <ebb9@byu.net>
1085 For compatibility with other m4 implementations, sysval returns
1086 signal<<8 rather than 0 if syscmd is terminated by a signal.
1087 * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
1088 * src/builtin.c (include): Include sys/wait.h when stdlib.h does
1089 not provide wait macros.
1090 (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
1091 (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
1092 (m4_esyscmd): Set sysval to -1 on failure.
1093 (m4_sysval): Print 127 on failure, and accomodate signals if they
1095 * NEWS: Document this change.
1096 * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
1098 * checks/check-them: Likewise.
1099 * src/debug.c (debug_set_file): Work around mingw fstat bug.
1101 * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
1102 * src/freeze.c (produce_frozen_state): Use new spelling of
1104 * src/builtin.c (predefined_tab): Add __windows__ on non-unix
1106 (m4_syscmd, m4_esyscmd): The empty command is successful.
1107 * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
1108 Document platform-dependence of system().
1109 (Syscmd): Add example.
1110 (Esyscmd): Make example more robust, and actually demonstrate
1112 (Sysval): Expand test to cover esyscmd code path, and to check
1113 that empty command is successful. Add conditional check for
1115 (Other Incompatibilities): Move platform macros from here...
1116 (Platform macros): ...to this new node. Add windows macro.
1117 Check that exactly one platform macro is provided.
1118 * checks/check-them: Improve trap cleanup. Tolerate dirname and
1119 .exe in error messages. Allow for skipping checks.
1120 * configure.ac (HAVE_EFGCVT): Kill dead configure check.
1121 * NEWS: Document platform macros.
1123 2006-06-29 Eric Blake <ebb9@byu.net>
1125 Fix buffer overrun bug.
1126 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
1128 * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
1129 variant instead, since [efg]cvt are obsolete and our use of them
1130 was buggy (savannah sr #104303).
1131 (format): Fix buffer overflow by using xasprintf.
1132 * doc/m4.texinfo (Format): Expand format test to catch both bugs.
1133 * NEWS: Document this fix.
1135 * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
1137 (AC_CACHE_CHECK): Cache search for ecvt.
1139 2006-06-27 Eric Blake <ebb9@byu.net>
1141 * doc/m4.texinfo (Eval): Document 32-bit signed limitations
1142 required by POSIX, and add example that exposed core dump on x86
1144 (Incompatibilities): Document incompatibility in eval precedence.
1145 * src/eval.c (shift_term): Explicitly mask, to avoid undefined
1147 (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
1148 * NEWS: Document this change.
1150 * doc/m4.texinfo: Use @noindent consistently.
1151 (Quoting Arguments): Document that unquoted parentheses group
1153 (Pseudo Arguments): Expand tests to show this.
1154 (Incompatibilities): Contrast traditional behavior of
1157 2006-06-24 Eric Blake <ebb9@byu.net>
1159 * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
1160 (AC_CHECK_HEADERS_ONCE): Use this new feature.
1161 (AC_CHECK_FUNCS_ONCE): Likewise.
1163 2006-06-23 Eric Blake <ebb9@byu.net>
1165 * doc/m4.texinfo: Quoting cleanup throughout - follow
1166 autoconf-recommended style of one level of quote per parenthesis
1167 in the normal case. Adjust error messages to match GNU coding
1168 standards (and to allow 'make check' to pass again).
1169 (Quoted strings, Inhibiting Invocation): Turn more examples into
1171 (Comments): Resolve FIXME by adding example.
1172 (Define): Add example about underquoting.
1173 (Defn): Add example about use of $0.
1174 (Indir, Format): Resolve FIXME done in last commit.
1175 (Ifelse): Add example about creating blind macro.
1176 (Debugging): Fix grammar.
1177 (Dnl): Add example about dnl with arguments.
1178 (M4wrap): Be explicit that LIFO order is non compliant, and will
1180 (Undivert): Resolve FIXME by adding example.
1181 (Frozen files): Document that m4wrap and sysval will not work
1182 consistently until m4 2.0.
1183 (Incompatibilities): Document another POSIX compliance bug, this
1184 time with changequote. Document a traditional incompatibility
1185 with partial input spanning file boundaries.
1187 Make error messages more consistent with GNU coding standards -
1188 start with lower case, and don't end sentence with punctuation.
1189 * src/debug.c (trace_pre): Update message wording.
1190 * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
1192 * src/freeze.c (produce_frozen_state, issue_expect_message),
1193 (reload_frozen_state): Likewise.
1194 * src/input.c (push_string_init, pop_init, init_macro_token),
1195 (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
1196 * src/m4.c (stackovf_handler, main): Likewise.
1197 * src/macro.c (expand_token, expand_argument, call_macro),
1198 (expand_macro): Likewise.
1199 * src/output.c (make_room_for, output_text, insert_file),
1200 (freeze_diversions): Likewise.
1201 * src/symtab.c (symtab_init, lookup_symbol): Likewise.
1203 * src/builtin.c (builtin_tab): Make format and indir blind.
1204 (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
1205 * NEWS: Mention the change to builtins.
1207 2006-06-22 Eric Blake <ebb9@byu.net>
1209 Robustify frozen file format.
1210 * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
1211 macro. Require V first, and only accept it once. For F, use
1212 placeholder if builtin is not found, rather than warning.
1213 * src/m4.h (m4_placeholder): New prototype.
1214 * src/builtin.c: Unify error message style.
1215 (m4_placeholder): New function, warn if invoked.
1216 (builtin_tab): Add m4_placeholder.
1217 (m4_defn): Warn if placeholder is encountered.
1218 (find_builtin_by_addr): Handle placeholder.
1219 (find_builtin_by_name): Return placeholder on failure.
1220 (m4_builtin): Treat placeholder as undefined.
1221 * doc/m4.texinfo (Frozen files): Document changes in V and F.
1222 * NEWS: Document this change.
1223 Reported by Bruno Haible.
1225 * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
1226 (tabchar): New macro, so that 'make check' still works.
1227 (Invoking m4): Document that ignored compatibility options -B, -S,
1228 and -T each consume an argument.
1229 * checks/get-them: Honor @tabchar{}.
1231 Avoid compiler warnings during -DDEBUG.
1232 * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
1233 [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
1234 * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
1235 (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
1236 (next_token) [DEBUG_INPUT]: Print before returning.
1237 * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
1238 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
1240 Avoid mkstemp bugs on various platforms.
1241 * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
1242 * src/output.c [! HAVE_MKSTEMP]: Delete.
1243 * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
1244 * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
1245 * NEWS: Document this.
1247 * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
1248 Reported by Bruno Haible.
1250 2006-06-21 Eric Blake <ebb9@byu.net>
1252 Avoid obsolete sigstack when POSIX sigaltstack is available.
1253 * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
1255 * configure.ac (AC_CHECK_HEADERS): Likewise.
1256 (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
1257 obsolete and most hosts now have it in signal.h.
1258 (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
1259 (AC_CACHE_CHECK): Cache decision to use stackovf.
1260 (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
1261 * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
1262 (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
1263 simplify later code.
1264 (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
1265 in case of dereferencing a member of a NULL pointer.
1266 (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
1268 (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
1269 EXIT_FAILURE in error, indent preprocessor directives.
1270 [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
1272 [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
1273 Reported by Santiago Vila.
1275 2006-06-19 Eric Blake <ebb9@byu.net>
1279 2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
1281 * checks/Makefile.in (PATH_SEPARATOR): New macro.
1282 (check, installcheck): Use it, for OS/2.
1284 2006-06-18 Eric Blake <ebb9@byu.net>
1286 Consistently use "GNU M4" as package name, "m4" as executable
1288 * NEWS: Document previous fix.
1290 * README: Fix grammar. Document that --enable-changeword is on
1292 * doc/m4.texinfo (Top, Changeword): Likewise.
1293 (Sysval): Enhance this test.
1294 (History): Backport this section from CVS head, and update.
1296 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
1297 Eric Blake <ebb9@byu.net>
1299 * src/builtin.c (WEXITSTATUS): Provide fallback definition.
1300 (m4_esyscmd): Set sysval to 0xffff, to accomodate both
1301 big-endian and little-endian wait status definitions.
1302 (m4_sysval): Use WEXITSTATUS.
1303 Reported by Andreas Buening.
1305 2006-06-18 Eric Blake <ebb9@byu.net>
1307 * configure.ac (AC_INIT): Bump version number.
1308 * NEWS: Describe changes in 1.4.4c.
1310 2006-06-17 Eric Blake <ebb9@byu.net>
1314 * configure.ac (AC_INIT): Bump version number.
1315 * NEWS: Describe changes since 1.4.4.
1316 * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
1318 * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
1320 * checks/Makefile.in (maintainer-clean): Add missing target.
1321 * COPYING: Remove generated file from CVS.
1323 2006-06-16 Eric Blake <ebb9@byu.net>
1325 * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
1327 2006-06-15 Eric Blake <ebb9@byu.net>
1329 * checks/wrapfifo.m4: New file. Use it...
1330 * doc/m4.texinfo (Incompatibilities): here, in a new test case to
1331 demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
1333 * src/m4.h (to_uchar): New function.
1334 * src/eval.c (eval_lex): Use it to avoid passing signed char to
1335 isdigit, isalpha, isupper, islower, isspace, isalnum.
1336 * src/builtin.c (expand_user_macro): Likewise.
1337 * src/format.c (format): Likewise.
1338 * src/macro.c (expand_argument): Likewise.
1339 * NEWS: Document this security fix.
1342 * src/symtab.c (lookup_symbol): Use invalid, not illegal.
1343 * src/freeze.c (reload_frozen_state): Fix typo in message.
1344 (produce_frozen_state): Standardize on builtin, not built-in.
1345 * src/builtin.c (numeric_arg, bad_argc): Likewise.
1347 * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
1348 (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
1349 (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
1351 * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
1352 * m4/gnulib-cache.m4: New file, from gnulib.
1353 * bootstrap: Invoke gnulib-tool --update.
1354 * src/m4.c (main): Cast away const.
1355 * NEWS: Document that regex is updated.
1358 2006-06-08 Eric Blake <ebb9@byu.net>
1360 * configure.ac (changeword): Work even when changeword is not a
1362 (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
1363 Delete; now done by automake.
1364 (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
1366 2006-06-07 Eric Blake <ebb9@byu.net>
1368 * lib/regex.c (bcmp_translate): Canonicalize type name.
1369 * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
1370 * configure.ac (changeword): Disable changeword for the creation
1371 of configure, in case of bootstrapping with an m4 configured with
1372 --enable-changeword.
1374 Distribute a rudimentary man page.
1375 * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
1377 * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
1378 (SUFFIXES, m4.1): New macros and rules to build m4.1.
1380 2006-06-06 Eric Blake <ebb9@byu.net>
1382 * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
1383 compiler warnings at -O2.
1384 * lib/getopt.c (_getopt_internal): Likewise.
1386 Cleanup of previous patches.
1387 * src/input.c (struct input_block): Remove traced member.
1388 (push_macro, init_macro_token): Don't pass trace status around.
1389 * src/m4.h (struct token_data): Remove traced member.
1390 (struct symbol, struct builtin): Reduce unused space.
1391 (TOKEN_DATA_FUNC): Simplify.
1392 (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
1393 (push_macro, define_builtin): Remove unused parameter.
1394 * src/builtin.c (define_builtin, builtin_init, define_macro),
1395 (m4_defn): Don't pass trace status around.
1396 * src/macro.c (expand_argument): Likewise.
1397 * src/freeze.c (reload_frozen_state): Likewise.
1398 * src/symtab.c: Whitespace cleanup.
1399 * NEWS: Clean up wording.
1400 * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
1401 ensure tests actually expose bugs prior to today's patches.
1403 Trace status of builtins is no longer inherited across
1404 define(...,defn(...)). Fixes bug that autom4te had been working
1406 * src/builtin.c (define_builtin): Don't override trace status.
1407 * doc/m4.texinfo (Trace): Add test for this.
1408 * NEWS: Document this.
1410 When changing macro definitions inside the arguments to the macro,
1411 consistently preserve the old definition that was in effect before
1412 argument collection, similar to the C pre-processor.
1413 Reported by John Brzustowski.
1414 * NEWS: Document this change.
1415 * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
1416 this policy, and add tests that expose core dumps prior to this
1418 * src/m4.h (struct symbol): New members to track when a symbol is
1419 still in use after removal from the symbol table.
1420 (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
1421 (free_symbol): Prototype.
1422 * src/macro.c (expand_macro): Track pending expansions of a
1423 symbol. On completion, if a symbol is deleted and no longer
1424 pending, free its memory.
1425 * src/symtab.c (free_symbol): Export. Don't free memory if symbol
1427 (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
1429 (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
1430 in use as deleted and remove from the table without freeing
1432 (symtab_print_list) [DEBUG_SYM]: More debug output.
1434 * src/symtab.c (hack_all_symbols): Allow certain modifications of
1435 the symbol table during traversal.
1436 * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
1437 SYMBOL_POPDEF, since only the latter is safe with
1440 Solve crash when passing "indir(`foo')" to "m4 -tfoo".
1441 * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
1442 Preserve placeholder when macro is being traced.
1443 * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
1444 symbol is not defined.
1445 (set_trace): Remove placeholder when no longer traced.
1446 (m4_traceon): On named traces, always reserve a slot in the
1448 (m4_traceoff): Don't warn about untracing a nonexistent symbol.
1449 * NEWS: Document new trace behavior.
1450 * doc/m4.texinfo (Trace): Tracing by name now consistently works
1451 no matter whether that macro is currently defined.
1452 (Incompatibilities): Document differences between traditional and
1455 2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
1456 Eric Blake <ebb9@byu.net>
1458 * src/m4.h (hash_table_size): Now size_t instead of int.
1459 * src/m4.c (hash_table_size): Likewise.
1460 (main): Adjust to this; use atol rather than atoi.
1461 * src/symtab.c: Include <limits.h>, for CHAR_BIT.
1462 (symtab_init, lookup_symbol, hack_all_symbols):
1463 Use size_t for sizes and indexes, not int.
1464 (symtab_print_list) [DEBUG_SYM]: Likewise.
1465 (hash): Likewise. Don't case-fold in the hash function.
1466 Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
1467 Don't assume hash word is 32 bits.
1468 * NEWS: Document this change.
1470 2006-06-04 Eric Blake <ebb9@byu.net>
1472 * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
1473 to allow compilation, for use in debugger.
1474 (profiles, current_mode) [DEBUG_SYM]: New variables.
1475 (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
1476 determining hash table performance.
1478 2006-05-31 Eric Blake <ebb9@byu.net>
1479 John Brzustowski <jbrzusto@fastmail.fm>
1481 * src/input.c (input_stack): Delete; use current_input instead.
1482 (wrapup_stack): Dynamically allocate, so that recursion is handled
1484 (push_wrapup): Use current wrapup stack.
1485 (pop_wrapup): Rotate wrapup stack to current, and create new
1487 (input_init): Dynamically allocate stacks.
1488 * NEWS: Update, now that recursive m4wrap can no longer cause
1491 2006-05-31 Eric Blake <ebb9@byu.net>
1493 * lib/getopt.c: Fix copyright year.
1494 * lib/obstack.c: Ditto.
1495 * src/builtin.c: Ditto.
1497 2006-05-30 Eric Blake <ebb9@byu.net>
1499 * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
1500 Reported by John Brzustowski.
1501 (Incompatibilities): Document known POSIX incompatibilities.
1504 2006-05-29 Eric Blake <ebb9@byu.net>
1506 * doc/m4.texinfo (Maketemp): Work even when running 'make check'
1510 * Makefile.am: New file.
1511 * doc/Makefile.am: Ditto.
1512 * examples/Makefile.am: Ditto.
1513 * lib/Makefile.am: Ditto.
1514 * src/Makefile.am: Ditto.
1515 * acinclude.m4: New file, renamed from aclocal.m4.
1516 * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
1517 (AC_ARG_PROGRAM): Now redundant.
1518 (STACKOVF): Turn into automake conditional.
1519 (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
1520 * checks/Makefile.in: Converting this dir to automake was not
1521 trivial; for now, just add missing targets demanded by top-level.
1522 * INSTALL: Remove files that are now generated from CVS.
1523 * Makefile.in: Ditto.
1524 * aclocal.m4: Ditto.
1525 * install-sh: Ditto.
1526 * mkinstalldirs: Ditto.
1527 * doc/Makefile.in: Ditto.
1528 * doc/texinfo.tex: Ditto.
1529 * examples/Makefile.in: Ditto.
1530 * lib/Makefile.in: Ditto.
1531 * src/Makefile.in: Ditto.
1533 * AUTHORS: Backport from CVS head, and update.
1534 * doc/m4.texinfo (Changeword): Fix examples to match behavior.
1536 2006-05-27 Eric Blake <ebb9@byu.net>
1538 * lib/regex.c (regex_compile): Kill compiler warnings.
1539 * lib/getopt.c: Likewise.
1540 * lib/obstack.c: Likewise.
1541 * src/builtin.c (builtin_init): Likewise.
1542 * src/path.c (path_search): Likewise.
1544 * doc/m4.texinfo: Fix usage of a vs. an.
1545 (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
1546 overfull hbox warnings.
1547 (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
1549 * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
1551 * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
1552 (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
1554 (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
1555 * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
1556 * src/Makefile.in: Delete remains of ansi2knr.
1557 * src/ansi2knr.1: Delete.
1558 * src/ansi2knr.c: Delete.
1560 2006-05-25 Eric Blake <ebb9@byu.net>
1562 * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
1565 * doc/m4.texinfo (Francois): No longer needed as a tex variable.
1566 Reported by Karl Berry.
1568 2006-05-24 Eric Blake <ebb9@byu.net>
1570 * Makefile.in (html): New target.
1571 * doc/Makefile.in (html, m4.html): Likewise.
1572 (MAKEINFOHTML): New macro.
1573 * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
1575 (Regexp) [ifhtml]: Make cross-reference to emacs manual an
1577 Reported by Bob Badour.
1579 * THANKS: Update. Move reporter's email addresses here, instead
1582 2006-05-11 Eric Blake <ebb9@byu.net>
1585 * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
1586 patched on 2005-12-04.
1587 Reported by Ilya N. Golubev.
1589 * bootstrap: New file, so that generated files need not be stored
1591 * Makefile.in (DISTFILES): Add bootstrap.
1593 Make testsuite less sensitive to doc changes.
1594 * doc/m4.texinfo: Use m4.input instead of filename.
1595 * checks/check-them (xerr): Turn m4.input into filename.
1596 * checks/Makefile.in (dist): Depend on stamp-checks.
1598 Portability updates for OS/2.
1599 * src/Makefile.in (EXEEXT, OBJEXT): Define.
1602 * lib/Makefile.in (OBJEXT): Define.
1604 * doc/Makefile.in (install, uninstall): Install info files into
1606 Reported by Andreas Buening.
1608 2006-05-09 Eric Blake <ebb9@byu.net>
1610 * install-sh: Update to newer upstream version.
1611 * mkinstalldirs: Likewise.
1612 Reported by Andreas Buening.
1614 * src/m4.c (main): Bump copyright year.
1615 * Makefile.in (datarootdir): Define, for autoconf 2.59c.
1616 * doc/Makefile.in (datarootdir): Likewise.
1618 2006-05-08 Eric Blake <ebb9@byu.net>
1621 * doc/m4.texinfo (Bugs): Backport bug email address from head.
1622 Reported by Stepan Kasal.
1624 2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
1626 * input.c (match_input): Do not pass expression with side effect
1627 to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
1630 2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
1632 * doc/m4.texinfo (How to debug macros and input): s/woould/would/
1633 Reported by Damian Menscher.
1635 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
1637 * configure.ac (AC_INIT): Bump to 1.4.4a.
1639 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
1643 * configure.ac (AC_INIT): Bump to 1.4.4.
1644 * NEWS: Describe 1.4.4's changes.
1645 * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
1647 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
1649 * src/m4.c: fix return code when non-existent files are processed
1651 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
1653 * README: update email address for bug reports.
1655 2005-10-17 Gary V. Vaughan <gary@gnu.org>
1657 * doc/m4.info: Generated files are not kept in the repository.
1659 2005-05-01 Gary V. Vaughan <gary@gnu.org>
1661 The FSF are moving offices today. Changed their contact address
1662 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
1663 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
1665 Also, some of the files here were never updated from the previous
1666 '675 Mass Ave, Cambridge, MA 02139', so changed those to the
1667 '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
1669 2005-03-31 Mike Frysinger <vapier@gentoo.org>
1671 * Makefile.in (bindir, infodir): Substitute from configure rather
1673 * doc/Makefile.in (infodir): Ditto.
1674 * src/Makefile.in (bindir): Ditto.
1677 2005-03-31 Gary V. Vaughan <gary@gnu.org>
1679 Changes needed to automate the release process for 1.4.3:
1681 * Makefile.in (dist): Make .tar.bz2 tarball too.
1682 * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
1683 (cvs-news): Look 1 line further down for NEWS release number.
1684 (cvs-dist): We don't use automake, so make dist is fine.
1685 Remove double . before suffixes.
1686 (cvs-release): Don't mention manual.html.
1687 (fetch): Get latest gendocs files.
1688 (web-manual): Rewritten to use gendoc for multiformat manuals.
1689 * doc/gendocs.sh: Don't save an old version in m4 CVS!
1690 * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
1691 preserving, but case insensitive, so generating html docs per node
1692 clashes between Index.html, the node file, and index.html, the
1693 top-level of the document tree...
1694 (Index macro): ...so renamed to this. Changed all references.
1696 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
1698 * configure.ac (AC_INIT): Bump to 1.4.3a.
1700 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
1704 * configure.in (AC_INIT): Bump to 1.4.3.
1705 * NEWS: Describe 1.4.3's changes.
1707 2005-03-31 Gary V. Vaughan <gary@gnu.org>
1709 * Makefile.maint: New file with release rules, from CVS libtool.
1710 * Makefile.in (DISTFILES): Add Makefile.maint.
1711 * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
1714 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
1716 * doc/m4.texinfo (Patsubst): Re-add trailing space required by
1717 checks/47.patsubst, with a redundant @comment to prevent emacs
1718 from removing it accidentally again.
1719 * checks/get-them: Allow for trailing spaces tucked behind
1722 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
1724 * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
1725 * src/Makefile.in (install, uninstall): Likewise.
1727 2005-02-07 Gary V. Vaughan <gary@gnu.org>
1729 * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
1731 Reported by Eric Blake.
1733 2005-02-04 Gary V. Vaughan <gary@gnu.org>
1735 * lib/regex.c, lib/regex.h: Updated from gnulib.
1736 * src/input.c (set_word_regexp): Don't change the word_regexp
1737 unless it compiles correctly.
1739 Reported by Frank Schwidom.
1741 * Makefile.in (stamp-h): Regenerate config.h properly.
1743 2005-02-03 Gary V. Vaughan <gary@gnu.org>
1745 * configure.ac (AC_DEFINE): Fix overquoting of description
1748 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
1750 * src/freeze.c (produce_frozen_state): Use \n line-endings even
1751 on Windows, so that the frozen file reader will work.
1752 Reported by Josef T. Burger.
1754 * src/m4.c (main): Modernise the --version output.
1756 2005-02-03 Gary V. Vaughan <gary@gnu.org>
1758 Modernise the configury a little to prevent spurious errors from
1759 Autoconf-2.59's autoreconf:
1761 * config.h.in: Renamed to...
1762 * config-h.in: ...this to better support DOS 8.3 file systems.
1763 * acconfig.h: Removed.
1764 * configure.in: Renamed to...
1765 * configure.ac: ...this, and AC_DEFINE used to declare config.h
1766 entry comments. Slight reorganisation and reformatting.
1767 * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
1769 (AC_INIT): Use a modern 3 argument call.
1770 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
1771 examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
1772 s/PRODUCT/PACKAGE/g.
1773 * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
1774 config.h.in. Added configure.ac, config-h.in.
1775 (stamp-h.in): Removed acconfig.h from dependencies.
1776 (configure): Depends on configure.ac, not configure.in.
1777 * doc/Makefile.in (stamp-vti): Ditto.
1778 * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
1779 difference between PRODUCT="m4" and PACKAGE="GNU M4".
1780 * configure: Regenerated.
1782 2005-02-03 Noah Misch <noah@cs.caltech.edu>
1784 * src/output.c (mkstemp): Make non-static, and build regardless of
1785 HAVE_TMPFILE; src/builtin.c also needs this replacement.
1788 2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
1790 * configure.in (AC_CHECK_HEADERS): Commit works best when you save
1791 changes from your editor buffer first.
1793 * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
1794 * src/m4.c: And include them as appropriate.
1797 2004-09-09 Andreas Schwab <schwab@suse.de>
1799 Refactoring of the string read case in next_char provides about a
1800 20% speedup of M4 as typically used by autoconf:
1802 * src/input.c (next_char_1): Renamed from next_char.
1803 (next_char): New macro.
1806 2004-08-21 Gary V. Vaughan <gary@gnu.org>
1808 * configure.in (VERSION): Bump to 1.4.2a.
1810 2004-08-19 Paul Eggert <eggert@twinsun.com>
1814 * configure.in (VERSION): Bump to 1.4.2.
1815 * News: Describe 1.4.2's changes.
1817 * src/m4.c (reference_error): Preserve errno, since M4ERROR
1819 * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
1820 (m4_maketemp): Clear errno before calling mkstemp.
1821 * src/path.c (path_search): Don't let "free" trash errno when
1823 * src/output.c (insert_file): Don't assume errno has a valid
1824 value simply because fread returns zero. This fixes a
1825 portability bug reported by Marion Hakanson in
1826 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
1828 2004-06-09 Gary V. Vaughan <gary@gnu.org>
1830 * configure.in (VERSION): Bump to 1.4.1a.
1831 * NEWS: Place holder for next stable release.
1833 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
1837 * configure.in (VERSION): Bump to 1.4.1.
1838 * NEWS: Describe 1.4.1's changes.
1840 * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
1841 pacify Autoconf 2.59.
1843 * doc/m4.texinfo: Insert commas after @xref's that lack them,
1844 to pacify Texinfo 4.7.
1845 * doc/Makefile.in (info): Remove info-1, info-2, info-3.
1847 * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
1848 pacify Sun C compilers.
1850 2003-09-28 Akim Demaille <akim@epita.fr>
1852 * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
1855 2003-09-03 Santiago Vila <sanvila@debian.org>
1857 * examples/stackovf.sh: Use tempfile if available.
1859 2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
1861 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
1862 * src/output.c (m4_insert_file): Do not mix buffered and
1863 unbuffered I/O, as this breaks on the Hurd. (trivial change)
1865 2001-02-01 Santiago Vila <sanvila@debian.org>
1867 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
1868 * src/m4.c (main): Fix format vulnerabilities. (trivial change)
1870 2001-02-01 Matt Kraai <kraai@debian.org>
1872 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
1873 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
1874 empty file rather than to a nonexistent file. This closes a common
1876 * src/builtin.c (m4_maketemp): Implement the above, by using
1877 mkstemp rather than mktemp. (trivial change)
1879 2000-01-09 Akim Demaille <demaille@inf.enst.fr>
1881 * src/builtin.c (expand_ranges): Added break after trailing dash.
1882 This caused misbehaviors on some systems.
1884 Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
1888 * doc/Makefile.in (realclean): Also remove stamp-vti.
1889 Reported by Eric Backus.
1891 Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
1893 * src/freeze.c (produce_frozen_state): If the frozen file cannot
1894 be opened, return immediately after producing the error message.
1895 Reported by Andreas Schwab.
1897 * configure.in: Check for const only after having found possible
1898 ANSIfying compiler flags, this is of no use to check it before.
1899 Reported by Alexander Lehmann.
1901 Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
1903 * src/macro.c (collect_arguments): Cast obstack arguments to
1904 (voidstar), so avoiding compiler warnings.
1905 Reported by Joseph E. Sacco.
1907 * src/freeze.c (produce_frozen_state): Cast printed lengths to
1908 (int) so they correspond to %d format items.
1909 Reported by Joseph E. Sacco.
1911 * src/m4.c (main): Cast the argument to xfree to (voidstar).
1912 * src/symtab.c (free_symbol): Idem.
1913 Reported by Karl Vogel.
1915 Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
1917 * Makefile.in (DISTFILES): Distribute BACKLOG.
1919 * configure.in: Define PRODUCT and VERSION.
1920 * acconfig.h: Document PRODUCT and VERSION.
1921 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
1922 constant string m4 and variable or parameter named version.
1924 Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
1926 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
1927 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
1928 defines __STDC__ to 0, for indicating it is *not* ANSI!
1929 Reported by Kaveh R. Ghazi.
1931 * configure.in: Added obsolescent tests for AIX and Minix.
1933 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
1934 which texclean does not exist anymore.
1935 Reported by Eric Backus, Jim Meyering, John David Anglin and
1938 Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
1940 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
1941 Reported by John David Anglin.
1943 * src/ansi2knr.c: New version, sent by Peter Deutsch.
1944 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
1945 ANSI2KNR, depending on the fact the compiler is ANSI or not.
1946 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
1947 Remove the sed filter after ansi2knr for debug.c. Use $O instead
1948 of $U, put underline in extensions rather than in basenames. Use
1949 implicit rules, now that regularity makes this possible.
1950 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
1951 of ansi2knr whenever it is needed.
1952 * configure.in: Adjusted for correct STACKOVF substitution.
1953 * src/debug.c (trace_format): When not __STDC__, use (...) as a
1954 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
1955 Reported by David MacKenzie.
1957 * Makefile.in: Remove binprefix. Use transform_name instead.
1958 Reported by David MacKenzie.
1960 * doc/Makefile.in: Create version.texi, use it, clean it.
1961 Reported by Jim Meyering.
1963 Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
1965 * Makefile.in (all, install, uninstall): Depend on Makefile.
1967 * Makefile.in: For actions invoking $(MAKE) from within compound
1968 sh statements, exit non-zero if the sub-make fails. Otherwise,
1969 the top-level make may exit successfully when it should fail.
1970 Reported by Jim Kingdon.
1972 * {,/*}Makefile.in: Use && after all cd, in case they fail.
1974 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
1975 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
1976 * configure.in: Substitute PRODUCT and VERSION.
1978 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
1980 Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
1982 * Makefile.in (mostlyclean-local): Do not remove *~.
1983 * */Makefile.in (mostlyclean): Idem.
1984 Reported by Robert E. Brown and Richard Stallman.
1986 Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
1988 * src/m4.h: Get rid of CONFIG_BROKETS.
1990 Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
1992 * configure.in: Use AC_ARG_PROGRAM.
1993 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
1994 Reported by David MacKenzie.
1996 Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
1998 * configure.in: Do not add -O to CFLAGS for GNU C, now that
1999 configure does it automatically.
2000 Reported by Jim Meyering.
2002 Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
2004 * src/stackovf.c: Declare the handler_t typedef earlier in the
2005 code, use it for stackovf_handler.
2006 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
2007 casting sigsegv_handler.
2008 Reported by Robert Bernstein.
2010 * src/m4.c (main): Initialize program_name to argv[0] without
2012 Reported by Karl Berry.
2014 Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
2016 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
2017 Reported by Karl Berry.
2019 Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
2021 * lib/Makefile.in (mostlyclean): Added.
2022 (TAGS): Make in $(srcdir).
2024 * configure.in: Use `choke me' in test, like everywhere!
2026 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
2027 unreacheable and useless.
2029 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
2031 * lib/Makefile.in (DISTFILES): Distribute TAGS.
2032 (distclean): Do not remove TAGS.
2033 (realclean): Remove it.
2034 * Makefile.in: Make TAGS in lib also, not just in src.
2035 Reported by Karl Berry.
2037 * Makefile.in (distclean, realclean): Instead of recursively
2038 calling $(MAKE) for the -local part, allow parallel execution of
2039 -recursive and -local, only delay the removal of config.status,
2040 which is repeated in both goals.
2042 Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
2046 * Makefile.in: Group all *clean-recursive goals in one, using sed
2047 to remove `-recursive' while calling make recursively. Also, use
2048 a subshell for each recursive $(MAKE).
2049 Reported by Jim Meyering.
2051 * src/m4.h (memcpy): Define with bcopy for BSD systems.
2052 Reported by Kaveh R. Ghazi.
2054 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
2055 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
2058 * configure.in: Use date instead of touch for stamp-h.
2059 * Makefile.in (stamp-h.in): Idem.
2061 * Makefile.in (distclean, realclean): Force serial execution of
2062 both goals, in case parallel makes are being used.
2063 Reported by Jim Meyering.
2065 * src/Makefile.in (DISTFILES): Distribute TAGS.
2066 (distclean): Do not remove TAGS.
2067 (realclean): Remove it.
2068 Reported by Karl Berry.
2070 Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
2072 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
2073 to old names, for following Autoconf.
2075 Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
2077 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
2078 ./install.sh will not be correctly referred to in sub-Makefiles.
2079 Reported by John David Anglin.
2081 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
2082 Reported by Eric Backus.
2084 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
2085 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
2086 config.status into remaking this directory's Makefile only.
2087 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
2088 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
2089 Reported by Jim Meyering.
2091 Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
2093 * configure.in: Correct stack overflow detection logic, taking
2094 care of systems having only incomplete implementations (like for
2095 Pyramid 9820 OSx 5.0d).
2096 Reported by Kaveh R. Ghazi.
2098 * src/Makefile.in (TAGS): Remote -t from etags call.
2100 Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
2102 * lib/Makefile.in (install): Depend on all.
2104 Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
2106 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
2107 Reported by Jim Meyering and John David Anglin.
2109 * Makefile.in (distclean-local): Delete config.log.
2110 Reported by Jim Meyering.
2112 Solidify frozen files with respect to -P:
2113 * src/m4.c: Have -P set prefix_all_buitins variable instead of
2114 calling a function by that name. Declare the variable.
2115 * src/m4.h: Adjust declaration for prefix_all_buitins.
2116 * src/builtin.c (builtin_init): Merge in functionality from
2117 previous prefix_all_buitins function, while making entries in the
2118 symbol table, but not modifying the builtin description itself.
2120 * src/freeze.c (reload_frozen_state): Add a useless `break;',
2121 because *many* compilers do not accept an empty `default:'.
2122 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
2123 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
2125 * configure.in: Use AC_TYPE_SIGNAL.
2126 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
2127 Reported by Robert Bernstein.
2129 * checks/Makefile.in (check): Modify PATH so check-them will find
2130 m4 in the src directory.
2131 * Makefile.in (check): Don't.
2132 Reported by Akiko Matsushita and Jim Meyering.
2134 * src/output.c (make_room_for, output_character_helper): New
2135 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
2136 a per buffer MAXIMUM_BUFFER_SIZE.
2138 * src/output.c (output_text): New function, for optimizing the
2139 output of strings of characters. Use it.
2141 Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
2143 * doc, src: New directories reorganizing the distribution.
2144 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
2146 * Makefile.in: Adjusted.
2147 * configure.in: Configure new Makefiles.
2149 * m4.h: Declare STRING typedef. Use it for comment and quote
2150 strings, adjusting all references. (This is the rudiments of a
2151 beginning for the eventual withdrawal of NUL terminated strings.)
2152 * output.c (shipout_text): Accept a length parameter, and use it.
2153 All callers adjusted.
2155 Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
2157 * m4.h: Include <unistd.h> if it exists.
2158 * stackovf.c: Don't.
2160 Clean up for current_diversion variable:
2161 * output.c: Move current_diversion from builtin.c.
2162 * m4.h: Declare current_diversion so builtin.c can access it.
2163 * output.c (output_init, make_diversion): Initialize or update
2165 * builtin.c (builtin_init, m4_divert): Leave current_diversion
2168 Remove limit on number of diversions:
2169 * output.c: Replace ndiversion by diversions, declare it.
2170 (output_init): Allocate only diversion 0.
2171 (make_diversion): Allocate new diversions as needed.
2172 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
2173 * m4.c: Still accept -N, but do nothing with it.
2174 Reported by David MacKenzie.
2177 * output.c (freeze_diversions): New function.
2178 * m4.h: Declare freeze_diversions.
2179 * freeze.c: Document frozen file format, revise it, call
2180 freeze_diversions to add diversions to frozen format, and code to
2181 reload them properly.
2182 * m4.c: Do not undivert automatically at end when status being
2183 frozen. Do not call builtin_init when reloading frozen state.
2185 Speed up diversion processing:
2186 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
2187 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
2188 structure and variables, cached variables out of output_diversion,
2189 reallocate_diversion_for and OUTPUT_CHARACTER.
2190 (shipout_text, make_diversion, insert_diversion): Adapted to new
2192 (insert_file): Use better buffering.
2193 Reported by David MacKenzie.
2195 Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
2197 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
2198 dist works from another build directory.
2200 Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
2202 * symtab.c (hack_all_symbols): Use hash_table_size instead of
2203 constant HASHMAX, for -H option to work better.
2205 * builtin.c (DECLARE): Simplify by using _ ().
2207 * freeze.c: New file.
2208 * Makefile.in: Compile it, distribute it.
2209 * m4.c: Recognize, document and process --freeze-state (-F) and
2210 --reload-state (-R) options. Pass a true flag to builtin_init
2211 only if no reloading some state.
2212 * builtin.c (define_builtin): Remove static specifier.
2213 (find_builtin_by_name): Remove static specifier.
2214 (builtin_init): Accept and obey a flag argument.
2215 * m4.h: Add declarations for freeze.c, changes for builtin.c.
2217 Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
2219 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
2222 * configure.in: Implement --with-dmalloc.
2223 * acconfig.h: Document WITH_DMALLOC.
2224 * m4.h: Add code for when WITH_DMALLOC.
2226 Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
2228 * m4.c (long_options): Use "error-output", the dash was missing.
2229 Reported by Akiko Matsushita.
2231 Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
2233 * m4.h: Include <sys/types.h>.
2234 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
2235 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
2237 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
2239 * builtin.c (dump_args): Declare len as size_t, not int.
2241 * debug.c: Prototype the forward declaration of debug_set_file.
2243 * builtin.c (m4_undivert): Replace div by file, for avoiding the
2244 shadowing of this variable.
2245 * output.c (insert_diversion): Idem.
2247 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
2248 (input_init): Duplicate default quote and comment strings.
2249 (set_quotes): Free previous quote strings in all cases. Duplicate
2250 even default quote strings.
2251 (set_comment): Free previous comment strings in all cases.
2252 Duplicate even default comment strings.
2254 * configure.in: Updated for Autoconf 2.0.
2255 * Makefile.in (distclean-local): Also delete config.cache.
2257 * m4.c (usage): Reorganize the --help output by topic. Include a
2258 description for debugging flags.
2260 Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
2262 * configure.in: If sigaction is available and SA_ONSTACK defined,
2263 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
2264 defined, use sigvec. Else don't compile stackovf.c.
2265 * stackovf.c (setup_stackovf_trap): Idem.
2266 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
2269 Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
2271 * m4.c (usage): Replace printf par fputs.
2273 Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
2277 Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
2279 * configure.in: Check for sigaction and sigvec. Add a new delayed
2280 check for RLIMIT_STACK, combine in the checking for getrlimit.
2281 All those things are not universally available.
2282 * stackovf.c: Split setting up the trap handler and catching
2283 signals, for better taking care of various configure outcomes.
2284 * examples/stackovf.sh: Correct a typo.
2285 Reported by Eric Backus, Jim Avera and Jim Meyering.
2287 Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
2289 * ansi2knr.c: New version sent by its author, Peter Deutsch.
2291 Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
2293 * Makefile.in: Modify so parallel make will not try making
2294 lib/libm4.a twice simultaneously.
2295 Reported by Jim Meyering.
2297 Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
2299 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
2300 error message, for when no code possibility exists. Even if this
2301 line is completely #ifdef'ed out, it brings a syntax error.
2302 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
2304 * Makefile.in (install): Have install depend on all too, for lib
2305 to be remade as needed.
2307 * examples/stackovf.sh: Try ksh, bsh and bash for shells
2308 providing ulimit, instead of using only ksh.
2309 Reported by Jim Avera and Joseph E. Sacco.
2311 Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
2313 * Makefile.in (check): Have it depend on all instead of m4. In
2314 this way, a change in lib will be detected and processed.
2316 * builtin.c (numeric_arg): Use strtol and verify the conversion,
2317 instead of using sscanf which stops as soon as there is a
2318 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
2319 and divert(1xyzzy) were all accepted without any warning or error
2321 * m4.h: Declare strtol as long if not including stdlib.h.
2322 * configure.in: Check for limits.h, and replace strtol if missing.
2323 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
2324 * lib/strtol.c: New file, from elsewhere.
2325 Reported by Andreas Schwab.
2327 Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
2329 * macro.c (expand_macro): Cast value to (boolean) prior to
2330 assigning it to traced.
2331 Reported by Tom McConnell.
2333 * Makefile.in (m4): Always make all in lib first.
2334 Reported by Jim Meyering.
2336 Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
2338 * stackovf.c: Isolated OS-dependent sections; Improved portability,
2339 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
2340 handlers), and a default error message if the fault address is not
2341 available (when neither siginfo.h nor BSD sigcontext are supported).
2342 * configure.in: Changes for stackovf.h: Check for sigcontext,
2343 sigaction, sigstack, and define rlim_t as int if necessary.
2344 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
2345 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
2346 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
2348 Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
2350 * configure.in: Use AC_SET_MAKE.
2351 * Makefile.in: Use @SET_MAKE@.
2352 Reported by Jim Meyering.
2354 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
2355 Reported by Ian Taylor.
2357 Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
2359 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
2360 because siginfo.h is unrelated to standard headers, and siginfo.h
2361 is already checked for.
2362 Reported by Joseph E. Sacco.
2364 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
2366 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
2369 Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
2371 * builtin.c (substitute): Use \& to represent this part of the
2372 string which was matched by the whole regexp, instead of
2373 representing the whole string. Any usage of \0 issues a warning
2374 and acts like \&, it will disappear in some subsequent release.
2376 Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
2378 * m4.c: Complete prototype for forwarded declaration of usage.
2380 * input.c (init_macro_token): Correct own reference in error
2381 message. Previous name get_macro_func was referred to instead.
2382 (next_char): Correct own reference in error message. Previous
2383 name advance_input was referred to instead.
2385 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
2386 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
2387 and_term, not_term, logical_not_term, cmp_term, shift_term,
2388 add_term, mult_term, exp_term, unary_term, simple_term): Add
2389 prototype to forwarded declarations. Declare parameter v1 as
2390 eval_t * instead of int *. Same for local variable v2 in dyadic
2391 functions. Same for result in exp_term.
2392 * builtin.c (m4_eval): Declare value as eval_t instead of int.
2393 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
2394 unsigned_eval_t instead of unsigned int. Change casts accordingly.
2395 (shipout_int): Cast first argument of ntoa to eval_t.
2396 Reported by Thorsten Ohl.
2398 * macro.c: Complete the prototypes of forwarded expand_macro and
2400 Reported by Thorsten Ohl.
2402 * m4.h: Define voidstar as void * or char * depending on __STDC__.
2403 The Ultrix 3.1 compiler cannot do much with void pointers.
2405 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
2406 * m4.c (xfree): Replace void * by voidstar.
2407 Reported by Tom McConnell.
2409 * ansi2knr.1: New, from elsewhere.
2410 * Makefile.in (DISTFILES): Distribute ansi2knr.1
2412 * Makefile.in (stamp-h.in): Avoid running ./config.status if
2413 stamp-h does not exist yet. This avoids running it a second time
2414 just after the initial ./configure.
2415 Reported by David MacKenzie and Tom McConnell.
2417 * m4.h: Replace the enum debug_info declaration with a series of
2418 #define's. The Ultrix 3.1 compiler would otherwise need casting
2419 (int) to most references, when used in expressions.
2420 Reported by Tom McConnell.
2422 Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
2424 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
2425 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
2426 calls the compiler. Previously, FP_PROTOTYPES was only calling
2427 the preprocessor; by not being subject to CFLAGS, this was
2428 discouraging those flags asking for ANSI compilation.
2429 * acconfig.h: Document HAVE_PROTOTYPES.
2430 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
2431 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
2432 Reported by Eric Backus.
2434 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
2435 from the environment. Default CFLAGS to -g if not set.
2436 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
2437 * lib/Makefile.in: Have CFLAGS substituted from configure.
2438 Reported by Eric Backus and Tom McConnell.
2440 * configure.in: m4_undefine changeword before using AC_ENABLE.
2442 * m4.h: Declare prototypes for error (for ANSI compilers only),
2443 prefix_all_builtins and reference_error.
2444 Reported by Tom McConnell.
2446 * input.c (set_word_regexp): Do not try to initialize the array
2447 test from a string, this does not work with non-ANSI compilers.
2448 Reported by Eric Backus.
2450 * Makefile.in (dist): Clean examples/ before saving it.
2451 (distclean-local): Also remove stamp-h.
2452 Reported by Eric Backus.
2454 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
2456 Reported by Tom McConnell.
2458 * checks/Makefile.in (clean): Depends on mostlyclean.
2459 (mostlyclean): New goal.
2461 Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
2463 * Makefile.in (DISTFILES): Distribute install.sh.
2464 * install.sh: New file, copied from elsewhere.
2465 Reported by Assar Westerlund and Kaveh R. Ghazi.
2467 Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
2469 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
2470 * acconfig.h: Explain ENABLE_CHANGEWORD.
2472 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
2473 from code provided by Pete Chown]
2474 * m4.h: Add original_text field to u_t variant of union u.
2475 Declare TOKEN_DATA_FUNC macro.
2476 * builtin.c: Declare changeword.
2477 (m4_changeword): New function.
2478 * input.c: Include "regex.h", define variables with word regexps.
2479 (input_init): Initialize the word regexp.
2480 (set_word_regexp): New.
2481 (next_token): Declare local variables, use the previous code if
2482 default_word_regexp is true. Else, match using a new code. Save
2484 * macro.c (expand_token): Ship out original text if not a macro
2486 Reported by Krste Asanovic and Pete Chown.
2488 [These modifs all depend upon ENABLE_CHANGEWORD]
2489 * m4.h: Declare external user_word_regexp.
2490 * m4.c: Declare user_word_regexp, and initialize it from
2491 --word-regexp or -W, or NULL if not specified.
2492 * input.c: Use user_word_regexp if specified, instead of
2493 DEFAULT_WORD_REGEXP.
2495 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
2498 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
2499 * checks/Makefile.in: Empty the suffix list.
2500 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
2502 * m4.c: Declare nesting_limit and initialize it to 250.
2503 Implement -LNUMBER or --nesting-limit=NUMBER to change its
2505 * m4.h: Declare nesting_limit as external.
2506 * macro.c (expand_macro): Stop execution whenever nesting limit
2508 Reported by Bengt Mertensson.
2510 * eval.c (evaluate): Diagnose excess characters in eval input.
2511 Things like `eval(08)' used to return 0 with no diagnostic.
2513 * m4.h: Capitalize first letter of all macro arguments in
2516 * m4.c: Declare warning_status, initialize it to 0. Add new
2517 option -E, or --fatal-warnings, which sets warning_status to
2518 EXIT_FAILURE instead.
2519 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
2520 EXIT_FAILURE if not otherwise done by header files.
2521 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
2522 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
2523 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
2524 argument of all M4ERROR calls.
2525 Reported by Noah Friedman.
2527 * examples/incl-test.m4: Renamed from incl_test.m4.
2528 * examples/include.m4: Include incl-test.m4 instead of
2530 * examples/multiquotes.m4: Renamed from multi-quotes.m.
2532 Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
2534 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
2535 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
2536 also tested it on a Sun Sparc workstation running SunOS 4.x.
2538 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
2539 49.format check, abusing a `union values' argument with sprintf
2540 without selecting the proper field. Now, save the formatting type
2541 first, delaying the fetch of the corresponding argument.
2542 Reported by Joseph E. Sacco and Tom Quinn.
2544 * format.c (format): Remove const from char *fmt declaration when
2545 not HAVE_EFGCVT, because a NUL may be forced into it.
2547 * m4.h: Declare atof() when not STDC_HEADERS.
2548 Reported by Joseph E. Sacco.
2550 * Regenerate configure using Autoconf 1.11, this corrects a
2551 problem about an incorrect cpp seting on NeXT 3.1.
2552 Reported by Alexander Lehmann.
2554 Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
2556 * m4.h (_): Change argument from `x' to `Args'.
2558 Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
2560 * Makefile.in: Remove all occurrences of $(MFLAGS), which were
2561 bringing more evil than good on a few systems.
2562 Reported by Greg A. Woods.
2564 Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
2566 * m4.h: Rename Args() to _().
2567 * m4.h: Remove extern specifier from all function declarations.
2569 Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
2571 * stackovf.c: New file implementing stack-overflow detection.
2572 * configure.in: Check for getrlimit, sigaction. If all of
2573 standard headers, getrlimit and sigaction, define USE_STACKOVF and
2574 substitute ${U}stackovf.o for STACKOVF.
2575 * acconfig.h: Declare USE_STACKOVF.
2576 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
2577 * m4.h: Declare setup_stackovf_trap().
2578 * m4.c: Call setup_stackovf_trap().
2579 * tests/stackovf_test.sh: New file.
2581 Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
2583 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
2585 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
2587 Sun Jan 30 14:24:19 1994 (pinard at icule)
2589 * m4.h: Remove definition of volatile, not used anymore.
2590 Reported by Jim Meyering and Joseph E. Sacco.
2592 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
2593 of `if ... else /* nothing */' for if macros.
2594 Reported by Jim Meyering.
2596 * builtin.c (m4_regexp): Reorganize the code for avoiding a
2597 warning from gcc about `repl' possibly used before defined.
2598 Reported by Jim Meyering.
2600 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
2601 Reported by Jim Meyering.
2603 Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
2605 * m4.h: Move the conditional definition of volatile after the
2606 inclusion of system files, because they may define it first.
2608 Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
2610 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
2611 get around a problem with Alpha make seeing a syntax error, there.
2612 Reported by Vern Paxson.
2614 Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
2616 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
2617 Reported by Richard Stallman.
2619 Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
2621 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
2622 instead of AC_HAVE_FUNCS.
2623 Reported by Noah Friedman.
2625 Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
2627 * m4.c: Initialize show_help and show_version to zero.
2629 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
2630 Use them in exit() and usage() calls.
2632 Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
2634 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
2635 syserr() macro. Delete errref, add reference_error and M4ERROR.
2636 * m4.c: Replace errref, which was returning an input reference
2637 string, with reference_error, which prints it on standard error.
2638 * builtin.c, output.c: Use errno as second parameter to error,
2639 instead of using syserr() with %s.
2640 * *.c: Use M4ERROR instead of error: no more errref() with %s.
2641 Doing so, the program name appears after the input reference
2642 instead of before, which eases M-x next-error processing.
2644 Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
2646 * checks/get-them: Escape braces with backslashes in patterns,
2647 because HPUX-9.01 awk needs this.
2648 Reported by Jim Meyering.
2650 Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
2652 * builtin.c: Declare "FILE *popen ();".
2654 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
2655 macros, replace error_message_prefix() declaration by errref()'s.
2656 Declare xrealloc, for use in errref().
2657 * m4.c: Delete error_message_prefix() function, add errref().
2658 * *.c: Use error() systematically in place of all error macros,
2659 now that error() flushes stdout first. Make needed adjustments.
2661 * m4.h: Remove const in sys_errlist[] declaration, it creates
2662 conflicts on SGI and Alpha.
2663 Reported by Kaveh R. Ghazi.
2665 Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
2667 * m4.c: Include <getopt.h> instead of "getopt.h".
2669 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
2670 * acconfig.h: New, for documenting HAVE_EFGCVT.
2671 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
2672 use them wherever appropriate. Also use -I. for compilations.
2673 * lib/Makefile.in: Use -I.. for compilations.
2674 * *.c: Include <config.h> or "config.h".
2676 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
2677 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
2679 Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
2681 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
2683 * input.c (input_init): Initialize quote and comment strings
2684 explicitely instead of calling set_quotes and set_comment: by
2685 doing so, we ensure we do not free uninitialized variables.
2687 * checks/check-them: Reverse arguments to both diff, so the
2688 expected is on the left and the obtained on the right.
2690 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
2691 macros. Delete declarations for m4error, warning, fatal and
2692 internal_error, add declaration for error_message_prefix.
2693 * m4.c: Delete m4error, warning, fatal and internal_error
2694 routines, add error_message_prefix routine.
2695 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
2696 warning with WARNING*, fatal with FATAL* and internal_error with
2698 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
2699 this is not needed anymore.
2701 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
2702 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
2703 and debug_message, add declaration for debug_message_prefix.
2704 * debug.c: Remove static specifier for FILE *debug declaration.
2705 Delete debug_print and debug_message routines, add
2706 debug_message_prefix routine.
2707 * builtin.c, debug.c: Replace debug_print routine calls with
2708 DEBUG_PRINT* macro calls.
2709 * input.c, path.c: Replace debug_message routine calls with
2710 DEBUG_MESSAGE* macro calls.
2712 * m4.h: Remove inclusion of <varargs.h>.
2713 * debug.c: Include <stdarg.h> or <varargs.h>.
2714 (trace_format): Use stdarg instead of varargs if __STDC__.
2716 * configure.in: Remove checks for vfprintf and _doprnt. These
2717 implementations use varargs tricks which are not portable enough.
2718 * lib/vfprintf.c: Deleted.
2719 * lib/_doprnt.c: Deleted.
2720 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
2721 Reported by Joel Sherrill.
2723 * path.c (add_include_directory): Use xstrdup.
2725 * builtin.c (find_builtin_by_name): Declare static.
2727 * *.[ch]: Add const to a few "char *" declarations.
2729 * configure.in: Remove commented tests for fileno() and fstat().
2730 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
2732 * debug.c (debug_flush_files): New.
2733 * m4.h: Declares it.
2734 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
2735 Reported by Nicolas Pioch.
2737 Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
2739 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
2740 Reported by Joel Sherrill.
2742 * builtin.c (prefix_all_builtins): Instead of the table size, use
2743 the null entry at end for stopping the loop. It was overwritten.
2744 Reported by Andreas Schwab and Jim Meyering.
2746 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
2747 Reported by Kaveh R. Ghazi.
2749 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
2750 Reported by Karl Vogel.
2752 Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
2754 * m4.h: Do not define volatile if already defined.
2755 Reported by Rene' Seindal.
2757 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
2759 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
2760 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
2762 Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
2764 * m4.h: Define strchr and strrchr in terms of index and rindex,
2765 instead of the other way around.
2766 * builtin.c, m4.c, path.c: Use strchr instead of index.
2768 * input.c (next_char): Remove a "break;" after a "return ...;".
2769 Reported by Tom McConnell.
2771 Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
2775 * configure.in: Do not copy check files in the build hierarchy.
2776 * checks/check-them: Identify the m4 version being checked. For
2777 finding m4, look in $PATH instead of in the parent directory.
2778 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
2779 * checks/Makefile.in (.all-stamp): Always create check files in
2780 the source hierarchy, not anymore in the build hierarchy.
2781 (check): cd to the source hierarchy before performing checks.
2782 Do not copy nor clean COPYING anymore, take it from `..'.
2783 Reported by Tom McConnell.
2785 * Makefile.in (Makefile): Use $(SHELL).
2786 (config.status): Use $(SHELL). Use "config.status --recheck"
2787 instead of "configure --no-create", which is obsolete.
2788 Reported by Tom McConnell.
2790 Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
2792 * m4.c (usage): Use "%s" instead of "m4" in format string.
2793 Reported by Jim Meyering.
2795 * Makefile.in: Distribute mkinstalldirs.
2796 Reported by Pierre Gaumond.
2797 Reported by Jim Meyering.
2798 Reported by Tom McConnell.
2799 Reported by Andreas Gustafsson.
2801 * checks/check-them: Renamed from checks/check_them.
2802 * checks/get-them: Renamed from checks/get_them.
2803 * checks/.all-stamp: Renamed from checks/.all_stamp.
2804 * checks/Makefile.in: Changed accordingly.
2805 Reported by Jim Meyering.
2807 Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
2809 * lib/Makefile.in (dist): Correct permissions on files.
2811 * output.c: Declare tmpfile, some systems don't.
2813 Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
2815 * checks/Makefile.in (dist): Correct permissions on files.
2817 * Makefile.in (dist): Ensure recursive linking for subdirectory
2818 `examples', also set read/write permissions on all its files.
2820 * mkinstalldirs: New, from elsewhere.
2821 * Makefile.in: Use it.
2823 * debug.c: Synchronize debug messages and regular output when
2824 the debug file and stdout are redirected to the same file.
2825 * configure.in: Add (commented) checks for fileno and fstat.
2826 Reported by Jim Avera.
2828 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
2829 etc., arguments, then ignore the superfluous one. m4 used to
2830 diagnose missing arguments and return the empty string.
2831 Reported by Nick S. Kanakakorn.
2833 Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
2835 * m4.c (main): At end of all input, ensure all undiverted text
2836 goes to the main output stream.
2837 Reported by Andreas Gustafsson.
2839 * m4.c (main): exit (0), instead of return 0.
2841 * m4.c: Implement -P and --prefix-builtins.
2842 * builtin.c: Delete const specifier on builtin_tab.
2843 (prefix_all_builtins): New.
2844 Reported by Noah Friedman.
2845 Reported by Scott Bartram.
2847 * c-boxes.el: New, from elsewhere.
2848 * Makefile.in: Distribute it.
2850 * m4.h: Do not define bcopy if <string.h> defines it.
2851 Reported by Stephen Perkins.
2853 * builtin.c (define_macro): Allow a missing second argument, in
2854 which case it is implied empty. Affects define and pushdef.
2855 Reported by Eric Allman.
2857 Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
2859 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
2860 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
2861 * builtin.c: Initialize all the blindness fields in builtin_tab.
2862 (define_builtin): Copy the blindness of a builtin into its symbol.
2863 * macro.c (expand_token): Avoid processing a blind builtin if the
2864 next character is not an opening parenthesis.
2865 Reported by David MacKenzie.
2866 Reported by Noah Friedman.
2868 * configure.in: Ensure an exit status of 0 on completion.
2869 Reported by Vivek P. Singhal.
2871 * eval.c (eval_lex): Admit both lower and upper case letters for
2872 bases greater than 10. Only lower case letters were accepted.
2874 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
2875 Reported by Krste Asanovic.
2877 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
2878 * eval.c (logical_not_term): New name for not_term.
2879 * eval.c (xor_term): New, between or_term and and_term.
2880 * eval.c (not_term): New, between and_term and logical_not_term.
2881 * eval.c (shift_term): New, between cmp_term and add_term.
2882 Reported by Krste Asanovic: ~, ^, <<, >>.
2883 Reported by Ben A. Mesander: ** vs ^.
2885 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
2886 * m4.h: Delete xrealloc.c.
2887 * lib/xmalloc.c: New, from elsewhere.
2888 * lib/xstrdup.c: New, from elsewhere.
2889 * lib/Makefile.in: Distribute and compile them.
2891 * m4.c: Change progname to program_name.
2892 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
2893 * lib/error.c: New, from elsewhere.
2894 * lib/Makefile.in: Distribute and compile error.c.
2895 * configure.in: Check AC_VPRINTF and for strerror.
2896 * m4.c: Delete cmd_error. Use error instead.
2897 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
2899 * m4.h: Delete #define const, let Autoconf takes care of this.
2901 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
2902 Merge parse_args into main. Declare argv to be `char *const *',
2903 then remove superfluous casts.
2905 * m4.c: Rename --no-gnu-extensions to --traditional.
2906 Reported by Ben A. Mesander.
2908 * m4.c (usage): Add a status parameter. Supply one in various
2909 calls. Add --help processing. Remove -V for --version.
2911 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
2913 * lib/Makefile.in: Have an AR=ar declaration.
2914 Reported by Eric Backus.
2915 Reported by Bjorn R. Bjornsson.
2916 Reported by Tom Tromey.
2917 Reported by Kristine Lund.
2918 Reported by Marion Hakanson.
2920 Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
2922 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
2923 Reported by Noah Friedman.
2925 Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
2927 * Makefile.in: Remove MDEFINES and cleanup.
2929 Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
2931 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
2934 Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
2936 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
2937 ensure 777 mode for directories, so older tar's will restore file
2940 Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
2942 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
2943 so the installer can override automatically configured choices.
2944 Reported by Karl Berry.
2946 Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
2948 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
2949 previous version was not working properly on m68k-hp-bsd4.3.
2950 Reported by Roland McGrath.
2952 * lib/_doprnt.c: Stolen from Oleo distribution.
2953 * configure.in: Check for _doprnt.c if vfprintf.c selected.
2954 * lib/Makefile.in: Distribute _doprnt.c.
2955 Do not distribute regex.[ch].old anymore.
2957 Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
2959 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
2960 Richard wants it there.
2962 Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
2964 * Makefile.in: Add DEFS to MDEFINES.
2965 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
2966 (libm4.a): Remove the library before creating it.
2967 (distclean): Remove tags and TAGS too.
2969 Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
2971 * Makefile.in (dvi, m4.dvi): New goals.
2973 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
2974 macro.c, output.c, path.c, symtab.c: Change Copyright from
2975 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
2977 * examples/divert.m4: Deleted, this bug has been corrected.
2979 * Makefile.in (texclean, mostlyclean): New goals.
2981 * Makefile.in (clean): Remove clutter from ansi2knr.
2982 Reported by Pierre Gaumond.
2983 Reported by Greg A. Woods.
2985 Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
2987 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
2988 might well use CFLAGS is s/he needs it.
2990 * Makefile.in: Allow installation of info files from a separate
2992 Reported by Jason Merrill.
2993 Reported by David MacKenzie.
2994 Reported by Skip Montanaro.
2995 Reported by Erez Zadok.
2996 Reported by Assar Westerlund.
2998 Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
3001 This is still a beta release for the future GNU m4 version 1.1.
3003 * lib/alloca.c: New, from elsewhere.
3004 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
3006 * m4.h: Do not define index/rindex if already defined. If
3007 FALSE/TRUE are already defined, do not redefine them, but merely
3008 define boolean typedef to int.
3010 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
3011 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
3012 because some C compilers do not like connectives with #ifdef.
3013 * m4.h: Define `volatile' only if __GNUC__, instead of once for
3014 __GNUC__ and once for __STDC__.
3015 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
3017 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
3018 Makefile dependencies. Without it, make keeps destroying and
3019 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
3021 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
3022 to diversion/DIVERSION, this was a spelling error.
3024 * m4.c: Declare version[], remove #include "version.h".
3025 * version.h: Deleted.
3026 * Makefile.in: Remove references to version.h.
3028 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
3029 production, by using a simpler and more robust algorithm. This
3030 solves the problem of synclines sometimes written in the middle of
3031 an output line. Delete sync_line() and output_lines variable.
3032 * m4.h: Remove sync_line prototype and output_lines declaration.
3033 * input.c (next_char), output.c (shipout_text): Remove references
3035 * input.c (push_file, pop_file): Merely put the value -1 in
3036 output_current_line instead of calling sync_line, for delaying a
3037 single `#line NUM FILE' before next output line. Do not test
3038 for sync_output, because this is unnecessary clutter.
3039 * output.c (make_divertion, insert_divertion): Idem.
3040 * input.c: Rename must_advance_line to start_of_input_line, for
3043 * debug.c (trace_header): Select a new debug line format, which
3044 better complies with GNU standards for formatting error messages.
3045 With option `-dfl', M-x next-error might be used on the output.
3046 * m4.c (vmesg): Adjust format of error output to GNU standards.
3047 * m4.texinfo: Adjust examples for `make check' to work.
3049 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
3050 case for enum debug_info constants, which were all lower case.
3052 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
3054 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
3055 collected patches. I tried a few times using newer regex.[ch], it
3056 mysteriously stopped aborting with this one. Insecure feeling...
3057 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
3059 Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
3061 * m4.c: Change `--no-warnings' to `--silent'.
3062 Reported by David MacKenzie.
3064 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
3065 leave it off for now. See comment in m4.c for justification.
3066 Reported by David MacKenzie.
3068 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
3069 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
3071 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
3073 * Makefile.in: Ensure recursive cleaning is done before local
3074 cleaning for all clean goals.
3076 * builtin.c (ntoa): Ensure the value is always interpreted as a
3077 signed quantity, whatever the radix is.
3079 Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
3081 * builtin.c, format.c, input.c: Split long lines.
3082 * m4.c: Use typedef macro_definition instead of struct
3084 * symtab.c: Use typedef symbol instead of struct symbol.
3086 Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
3088 * *.[ch]: Remove all trailing whitespace, in code and comments.
3090 * configure.in: Find some awk.
3091 * Makefile.in: Add $(AWK) to MDEFINES.
3092 * checks/Makefile.in: Transmit $(AWK) to get_them.
3093 * checks/get_them: Use $AWK instead of gawk. Add a close in the
3094 awk script when switching files, because without this, mawk runs
3095 out of file descriptors.
3097 Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
3099 * Makefile.in (realclean): Delete m4.info*.
3100 Reported by Jim Meyering.
3102 * Makefile.in: Adjust and link with checks/Makefile.
3103 * checks/Makefile.in: New.
3104 * configure.in: Output checks/Makefile.
3106 * checks/get_them: Have the dnl header of each test more
3107 recognizable by next-error, also use a better message.
3109 Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
3111 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
3112 And use that only if __GNUC__ since we're using it's GCC-specific
3113 semantics that tell the compiler the associated function doesn't
3116 * builtin.c (substitute): Don't use character as an array index.
3117 (dumpdef_cmp): Make formal arguments `const void *' to avoid
3118 warnings with gcc -W -Wall on systems with qsort prototype.
3119 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
3122 * eval.c (most functions): Add parentheses to assignments used
3123 as truth values go avoid warnings from gcc -Wall.
3125 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
3126 any functions that don't need external scope.
3128 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
3129 (many functions and arrays): Declare `const'.
3131 Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
3133 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
3134 removing the declaration from m4.h. Also rename false to FALSE
3137 * lib/Makefile.in (Makefile): New goal.
3139 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
3140 so heavily loaded. It gets more easily overridable, calling make.
3141 Reported by Jim Meyering.
3143 * Makefile.in (dist): Get .fname from the current directory name,
3144 instead of from version.h. I need updating many files manually,
3145 when the version changes, version.h is just one of them.
3147 Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
3149 * m4.h: Remove the tag `boolean' on the enum introducing typedef
3150 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
3151 Reported by Tom McConnell.
3153 Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
3155 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
3156 39.cleardiv, which were describing missing or spurious newlines.
3157 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
3158 do not depend on machine word size, `/bin/false' implementation,
3159 or `wc' output format. `make check' is more dependable, now.
3161 * checks/check_them: Summarize the failed tests by listing their
3162 name, at end. If none, issue `All checks successful'. Output
3163 `Checking' instead of `Input file:'.
3165 * checks/get_them, checks/check_them: Reindented.
3167 * Makefile.in (dist): chmod a+r before making the tar file.
3169 Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
3171 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
3173 * input.c (next_token): Reinitialize token_buttom just after using
3174 it as a watermark with obstack_free. Or else, a future token, big
3175 enough for triggering reallocation of the obstack chunk, could
3176 void the initialized value of token_buttom, later causing panic in
3177 obstack_free. Rename token_buttom to token_bottom everywhere.
3179 * m4.h: Before declaring errno, first include <errno.h> and
3180 ensure that it does not define errno.
3181 Reported by Richard Stallman.
3183 Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
3185 * builtin.c: Define and use DECLARE macro for builtins.
3187 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
3188 argument, this is a common idiom for introducing long comments.
3190 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
3191 arguments. The last argument was silently ignored.
3193 * m4.c (cmd_error): Add a missing semicolon before va_end().
3195 Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
3197 * Makefile.in: Now handle protoized sources. Define and use U.
3198 Compile and use ansi2knr with old compilers. Update DISTFILES.
3199 Add `aclocal.m4' to `configure' dependencies.
3200 * ansi2knr.c: New, from Ghostscript distribution.
3201 * configure.in: Define U through FP_PROTOTYPES for old compilers.
3202 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
3203 * aclocal.m4: New, provide FP_PROTOTYPES.
3204 * m4.h: Conditionnaly protoized through Args, save for varags.
3205 * builtin.c: Protoized. Then:
3206 Include <sys/types.h> if size_t is not defined, before "regex.h".
3207 (m4_ifelse): Fetch built-in name properly for diagnostic.
3208 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
3209 (m4_regexp): Add const to `msg' declaration.
3210 (m4_patsubst): Add const to `msg' declaration.
3211 * debug.c: Protoized, save for varargs.
3212 * eval.c: Protoized.
3213 * format.c: Protoized.
3214 * input.c: Protoized.
3215 * m4.c: Protoized, save for varargs. Then:
3216 (xfree): Accept void * instead of char *.
3217 (xmalloc): Return void * instead of char *.
3218 (xrealloc): Accept and return void * instead of char *.
3219 * macro.c: Protoized.
3220 * output.c: Protoized.
3221 * path.c: Protoized. Then cast some (char *) over xmalloc's.
3222 * symtab.c: Protoized.
3224 Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
3226 * m4.texinfo: Remove directory from diagnostics in 30.include,
3227 51.eval, 56.errprint and 57.m4exit tests.
3229 * m4.h: Remove declarations for int or void system functions, they
3230 cause more conflicting trouble than they make good.
3232 * configure.in: Avoid configuration header file. Add some tests.
3233 * m4.h: Remove #include "config.h".
3234 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
3235 Then, rewritten for better compliance with GNU standards.
3237 Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
3239 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
3240 because of a misplaced #endif.
3242 * Many *.[hc] files: Correct intra-line spacing here and there,
3243 according to GNU indent 1.6 advice.
3245 * configure.in: New, using Autoconf 1.2.
3246 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
3247 * Delete old configure.in, configure, etc/configure.in,
3248 etc/configure, lib/configure.in, lib/configure and config/*.
3249 Reported by Jason Merrill.
3251 * symtab.c (hash): Change (char) NULL to '\0'.
3252 Reported by Jason Merrill.
3254 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
3255 etc/nextvers.sh. Release numbers will be edited `by hand'.
3256 * version.h: De-automatize, force value in.
3258 * m4.c: Changes in order to use a newer getopt.h.
3259 Reported by David MacKenzie.
3261 * checks/: New name for examples/.
3262 * checks/get_them: New location for etc/get_examples.
3263 * checks/check_them: New location for etc/check_examples.
3264 * Makefile.in, checks/get_them, checks/check_them: Adjust.
3265 * lib/vfprintf.c: New location for etc/vfprintf.c.
3266 * Delete empty etc/.
3267 * examples/: New name for test/.
3269 Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
3271 * Makefile.in (check): Add m4 as dependency.
3273 * m4.c: Accept --no-warnings instead of --no_warnings, and
3274 --no-gnu-extensions instead of --no_gnu_extensions. Make the
3275 usage message more informative.
3276 Reported by David MacKenzie.
3278 Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
3280 * etc/check_examples: New name for check_examples.sh.
3281 * etc/get_examples: New name for get_examples.sh.
3282 * Makefile.in, etc/Makefile.in: Use new names.
3284 * Makefile.in: Transmit $(CC) while making in lib.
3286 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
3287 code disposition by hand.
3289 Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
3291 * m4.h: Delete definitions for abort() and exit().
3292 Reported by Richard Stallman.
3294 * config/hmake-unicos, config/s-unicos.h: New files.
3295 Reported by Hal Peterson.
3297 * eval.c (exp_term): Have N^0 return 1.
3298 Reported by Michael Fetterman.
3300 * eval.c, input.c, m4.h: Remove last comma in enums.
3301 Reported by Mike Lijewski.
3303 * Transfer of maintenance duties from Rene' to Franc,ois.
3305 Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
3307 * Release 1.0. Many thanks to those, who provided me with bug
3308 reports and feedback.
3310 * Uses GNU configure, taken from the gdb distribution.
3312 * Uses GNU getopt(), with long option names.
3314 * The -Q/+quiet option is added, which suppresses warnings about
3315 missing or superflous arguments to built-in macros.
3317 * Added default options via the M4OPTS environment variable.
3319 * The built-in format can now be configured to use sprintf as
3320 the formatting engine, for systems without [efg]cvt(3).
3322 * GNU library code is moved to the ./lib subdirectory; other
3323 utility files are now in ./etc.
3325 * Several minor bugs have been fixed.
3327 Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
3329 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
3330 Francois Pinard and Roland H. Pesch for providing me with reports.
3332 * The builtins incr and decr are now implemented without use of
3335 * The builtin indir is added, to allow for indirect macro calls
3336 (allows use of "illegal" macro names).
3338 * The debugging and tracing facilities has been enhanced
3339 considerably. See the manual for details.
3341 * The -tMACRO option is added, marks MACRO for tracing as soon
3344 * Builtins are traced after renaming iff they were before.
3346 * Named files can now be undiverted.
3348 * The -Nnum option can be used to increase the number of
3349 divertions available.
3351 * Calling changecom without arguments now disables all comment
3354 * The function m4_patsubst() is now consistently declared
3357 * A bug in dnl is fixed.
3359 * A bug in the multi-character quoting code is fixed.
3361 * Several typos in the manual has been corrected. More probably
3364 * The m4.info file is now installed along with the program.
3366 Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
3368 * Updated and enhanced version. Release 0.75, manual 0.07.
3370 * Implemented search path for include files (-I option and
3371 M4PATH envronment variable).
3373 * Implemented builtin "format" for printf-like formatting.
3375 * Implemented builtin "regexp" for searching for regular
3378 * Implemented builtin "patsubst" for substitution with regular
3381 * Implemented builtin "esyscmd", which expands to a shell
3384 * Implemented "__file__" and "__line__" for use in error
3387 * Implemented character ranges in "translit".
3389 * Implemented control over debugging output.
3391 * Implemented multi-character quotes.
3393 * Implemented multi-character comment delimiters.
3395 * Changed predefined macro "gnu" to "__gnu__".
3397 * Changed predefined macro "unix" to "__unix__", when the -G
3398 option is not used. With -G, "unix" is still defined.
3400 * Changed "shift", "$@" and "$*" to not insert spaces afters
3403 * Added program name to error messages.
3405 * Fixed two missing null bytes bugs.
3407 Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
3409 * Initial beta release. Release 0.50, manual 0.05.
3419 Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
3420 2005, 2006, 2007 Free Software Foundation, Inc.
3422 Copying and distribution of this file, with or without
3423 modification, are permitted provided the copyright notice
3424 and this notice are preserved.