summaryrefslogtreecommitdiff
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authorkristerw <kristerw@NetBSD.org>2003-05-30 22:33:58 +0000
committerkristerw <kristerw@NetBSD.org>2003-05-30 22:33:58 +0000
commit7e5434fe39eaa35edcc4ddc84b4a481f621ee0bd (patch)
tree8298c96a73ac229726400609ad4efaae4fb197ac /usr.bin/patch/patch.c
parentb62cbc21e98a57d6fb8d8a98f0b71747df46906b (diff)
Remove stuff that are not needed any longer.
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index efabee91aa1..cdb9aa8ee1f 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -1,4 +1,4 @@
-/* $NetBSD: patch.c,v 1.15 2003/05/30 18:14:13 kristerw Exp $ */
+/* $NetBSD: patch.c,v 1.16 2003/05/30 22:33:58 kristerw Exp $ */
/* patch - a program to apply diffs to original files
*
@@ -25,7 +25,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: patch.c,v 1.15 2003/05/30 18:14:13 kristerw Exp $");
+__RCSID("$NetBSD: patch.c,v 1.16 2003/05/30 22:33:58 kristerw Exp $");
#endif /* not lint */
#include "INTERN.h"
@@ -440,8 +440,6 @@ get_some_switches(void)
char *s;
rejname[0] = '\0';
- Argc_last = Argc;
- Argv_last = Argv;
if (!Argc)
return;
for (Argc--,Argv++; Argc; Argc--,Argv++) {
@@ -843,7 +841,7 @@ dump_line(LINENUM line)
char R_newline = '\n';
/* Note: string is not null terminated. */
- for (s=ifetch(line, 0); putc(*s, ofp) != R_newline; s++) ;
+ for (s=ifetch(line); putc(*s, ofp) != R_newline; s++) ;
}
/* Does the patch pattern match at line base+offset? */
@@ -857,12 +855,12 @@ patch_match(LINENUM base, LINENUM offset, LINENUM fuzz)
for (iline=base+offset+fuzz; pline <= pat_lines; pline++,iline++) {
if (canonicalize) {
- if (!similar(ifetch(iline, (offset >= 0)),
+ if (!similar(ifetch(iline),
pfetch(pline),
pch_line_len(pline) ))
return FALSE;
}
- else if (strnNE(ifetch(iline, (offset >= 0)),
+ else if (strnNE(ifetch(iline),
pfetch(pline),
pch_line_len(pline) ))
return FALSE;