Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Erik Forsberg
Sun, 12 Apr 1992 09:48
Problem in sed.
Author: Erik Forsberg
Date: Sun, 12 Apr 1992 09:48
Date: Sun, 12 Apr 1992 09:48
37 lines
1394 bytes
1394 bytes
This was found using GNU sed 1.08 while
trying to build TeX 3.14 mf. I have simplified
the test case down to a minimum.
Take this sed program
: again
/\.$/{
N
s/\.\n/./
t again
}
s/\.hh/.hhfield/g
Apply it to this input file
foo.hh.bar.
xyzzy
and the last s command is applied too many times.
The jump 't again' transfers outside of the currently executing
subprogram but that is not reflected in the sed execution.
At the jump, it jumps but does not exit the current invokation
of execute_program. So the final substitution happens, we return
from execute_program back to the original execute_program loop
that then applies the substitution again. We end up with the
text
foo.hhfieldfield.bar.xyzzy instead of the expected
foo.hhfield.bar.xyzzy
I have currently NO idea how to fix it (without breaking anything else)
EF
---------------------------------------------------------------------------
Erik Forsberg, erik@eab.retix.com Phone: (310) 476-7133 FAX: (310) 476-7657
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads