diff options
author | Kelly Yancey <kbyanc@FreeBSD.org> | 2000-08-14 06:12:39 +0000 |
---|---|---|
committer | Kelly Yancey <kbyanc@FreeBSD.org> | 2000-08-14 06:12:39 +0000 |
commit | 515a925785c4a135e3c9d3806024744bab8bc87e (patch) | |
tree | 2d7fafe8a57de668b8f483c5df3b7ae7b3b276a5 /gnu/usr.bin/patch/patch.c | |
parent | 5ed20877e9d6761f965e5c241368c526cee69750 (diff) |
Notes
Diffstat (limited to 'gnu/usr.bin/patch/patch.c')
-rw-r--r-- | gnu/usr.bin/patch/patch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/usr.bin/patch/patch.c b/gnu/usr.bin/patch/patch.c index 0e37ddb46461..0b49410fa356 100644 --- a/gnu/usr.bin/patch/patch.c +++ b/gnu/usr.bin/patch/patch.c @@ -130,6 +130,9 @@ int check_patch = FALSE; /* or PATCH_INDEX_FIRST env. variable is set */ int index_first; +/* TRUE if -S was specified on command line. */ +int skip_flag_specified = FALSE; + /* Apply a set of diffs as appropriate. */ int @@ -313,7 +316,8 @@ char **argv; newwhere = pch_newfirst() + last_offset; if (skip_rest_of_patch) { abort_hunk(); - failed++; + if (! skip_flag_specified) + failed++; if (verbose) say3("Hunk #%d ignored at %ld.\n", hunk, newwhere); } @@ -438,6 +442,7 @@ reinitialize_almost_everything() reverse = reverse_flag_specified; skip_rest_of_patch = FALSE; + skip_flag_specified = FALSE; get_some_switches(); @@ -568,6 +573,7 @@ get_some_switches() break; case 'S': skip_rest_of_patch = TRUE; + skip_flag_specified = TRUE; break; case 't': batch = TRUE; |