mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 01:32:08 +00:00
Preserve whether or not the line was previously altered when running a
subst command (discovery and patch by Jim Gleason).
This commit is contained in:
parent
7499918f30
commit
547e102082
@ -650,12 +650,12 @@ static void process_file(FILE *file)
|
||||
|
||||
/* we print the line once, unless we were told to be quiet */
|
||||
if (!be_quiet)
|
||||
altered = do_subst_command(&sed_cmds[i], line);
|
||||
altered |= do_subst_command(&sed_cmds[i], line);
|
||||
|
||||
/* we also print the line if we were given the 'p' flag
|
||||
* (this is quite possibly the second printing) */
|
||||
if (sed_cmds[i].sub_p)
|
||||
altered = do_subst_command(&sed_cmds[i], line);
|
||||
altered |= do_subst_command(&sed_cmds[i], line);
|
||||
|
||||
break;
|
||||
|
||||
|
4
sed.c
4
sed.c
@ -650,12 +650,12 @@ static void process_file(FILE *file)
|
||||
|
||||
/* we print the line once, unless we were told to be quiet */
|
||||
if (!be_quiet)
|
||||
altered = do_subst_command(&sed_cmds[i], line);
|
||||
altered |= do_subst_command(&sed_cmds[i], line);
|
||||
|
||||
/* we also print the line if we were given the 'p' flag
|
||||
* (this is quite possibly the second printing) */
|
||||
if (sed_cmds[i].sub_p)
|
||||
altered = do_subst_command(&sed_cmds[i], line);
|
||||
altered |= do_subst_command(&sed_cmds[i], line);
|
||||
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user