summaryrefslogtreecommitdiff
path: root/sed
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2009-01-05 17:01:36 +0100
committerPaolo Bonzini <bonzini@gnu.org>2009-01-05 17:01:36 +0100
commit12e758ad53057d619bc51e98498723427bdb55d1 (patch)
treeacfe8d16ae83b9da16bba574f65cf15d5c23384c /sed
parent6ea4dbce16b6c4cc0d9bfd0e81adec62aa87a7e7 (diff)
downloadsed-12e758ad53057d619bc51e98498723427bdb55d1.tar.gz
fix "x", "g", "G" commands with "sed -i" to match BSD sed
2009-01-05 Paolo Bonzini <bonzini@gnu.org> * execute.c (read_pattern_space): Reset hold space at end-of-file if input->reset_at_next_file.
Diffstat (limited to 'sed')
-rw-r--r--sed/execute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sed/execute.c b/sed/execute.c
index 8048cfc..1c11cf8 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008
+ Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008,2009
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -828,6 +828,7 @@ read_pattern_space(input, the_program, append)
if (input->reset_at_next_file)
{
input->line_number = 0;
+ hold.length = 0;
reset_addresses (the_program);
rewind_read_files ();