Redo location tracking. Instead of having just files track the
commit208d4aa00c7f2921270554466afe2ee13a5d26de
authorEric Blake <ebb9@byu.net>
Wed, 25 Oct 2006 20:54:39 +0000 (25 20:54 +0000)
committerEric Blake <ebb9@byu.net>
Fri, 21 Sep 2007 21:27:43 +0000 (21 15:27 -0600)
treef7c7730a1fbec2b402389ebe7d102e638d92894e
parentfc4438f6651637c83fd20be95a673b15f7399100
Redo location tracking.  Instead of having just files track the
line to return to when popping input, now all input blocks track
their current line.
* src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
needed.
(input_block): Have line and file storage for all input types, and
rename some members.
(input_change): New global flag.
(push_file, push_macro, push_string_init, push_wrapup): Store
location.
(push_string_finish, pop_input, pop_wrapup): Notice changes in
input blocks.
(peek_input): Adjust to new member names.
(next_char, next_char1): Adjust location if needed.
(skip_line): Simplify restoring location.
* doc/m4.texinfo (Location): Augment the test to catch line
location of expansion of multi-line arguments.
Reported by Stepan Kasal.
ChangeLog
doc/m4.texinfo
src/input.c