hush/editors
Rob Landley ce4f0e982b Hiroshi Ito found some bugs. The 'c' command (cut and paste) was hardwired
to not put a newline at the end (which was backwards, it should have been
hardwired _to_ put a newline at the end, whether or not the input line
ended with a newline).  Test case for that:

echo | sed -e '$ctest'

And then this would segfault:

echo | sed -e 'g'

Because pattern_space got freed but the dead pointer was only overwritten
in an if statement that didn't trigger if the hold space was empty.  Oops.

While debugging it, I found out that the hold space is persistent between
multiple input files, so I promoted it to a global and added it to the
memory cleanup.  The relevant test case (to compare with That Other Sed) is:

echo -n woo > woo
sed -e h -e g woo
echo "fish" | sed -e '/woo/h' -e "izap" -e 's/woo/thingy/' -e '/fish/g' woo -

And somebody gratuitously stuck in a c99 int8_t type for something that's just
a flag, so I grouped the darn ints.
2004-10-30 06:54:19 +00:00
..
awk.c Patch from Dmitry Zakharov to fix a bug triggered by freeswan's scripts. 2004-09-24 09:24:27 +00:00
Config.in Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Makefile egor duda writes: 2004-10-08 07:46:08 +00:00
Makefile.in egor duda writes: 2004-10-08 07:46:08 +00:00
patch.c Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
sed.c Hiroshi Ito found some bugs. The 'c' command (cut and paste) was hardwired 2004-10-30 06:54:19 +00:00
vi.c regularly update the status line display 2004-08-19 19:15:06 +00:00