summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/patch/pch.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1998-01-21 15:10:14 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1998-01-21 15:10:14 +0000
commit8bf2e8c7e283cf81faf56e6a50aeb2ef05eca050 (patch)
tree6c41ccaecb088b0784671bed73f1e7b92147652e /gnu/usr.bin/patch/pch.c
parent249a716c6c68229b9a2efbec2d23adc4563972a1 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/patch/pch.c')
-rw-r--r--gnu/usr.bin/patch/pch.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/usr.bin/patch/pch.c b/gnu/usr.bin/patch/pch.c
index 52d018a1a7e0..9021397f52ec 100644
--- a/gnu/usr.bin/patch/pch.c
+++ b/gnu/usr.bin/patch/pch.c
@@ -1,6 +1,9 @@
-/* $Header: /home/ncvs/src/gnu/usr.bin/patch/Attic/pch.c,v 1.8.2.2 1998/01/03 23:52:05 ache Exp $
+/* $Header: /home/ncvs/src/gnu/usr.bin/patch/pch.c,v 1.13 1998/01/21 14:37:23 ache Exp $
*
* $Log: pch.c,v $
+ * Revision 1.13 1998/01/21 14:37:23 ache
+ * Resurrect patch 2.1 without FreeBSD Index: hack
+ *
* Revision 1.8.2.2 1998/01/03 23:52:05 ache
* MFC: ctype and Index over +++/--- precedence
*
@@ -29,6 +32,9 @@
*
* Revision 1.8 1996/04/12 11:37:32 markm
* Attempt to break a $Log: pch.c,v $
+ * Attempt to break a Revision 1.13 1998/01/21 14:37:23 ache
+ * Attempt to break a Resurrect patch 2.1 without FreeBSD Index: hack
+ * Attempt to break a
* Attempt to break a Revision 1.8.2.2 1998/01/03 23:52:05 ache
* Attempt to break a MFC: ctype and Index over +++/--- precedence
* Attempt to break a
@@ -322,6 +328,7 @@ intuit_diff_type()
char *newname = Nullch;
Reg11 int retval;
bool no_filearg = (filearg[0] == Nullch);
+ extern int index_first;
ok_to_create_file = FALSE;
Fseek(pfp, p_base, 0);
@@ -431,7 +438,9 @@ intuit_diff_type()
oldname = fetchname(oldtmp, strippath, ok_to_create_file);
if (newtmp != Nullch)
newname = fetchname(newtmp, strippath, ok_to_create_file);
- if (oldname && newname) {
+ if (index_first && indname)
+ filearg[0] = savestr(indname);
+ else if (oldname && newname) {
if (strlen(oldname) < strlen(newname))
filearg[0] = savestr(oldname);
else