Magellan Linux

Contents of /trunk/patch/patches/patch-2.5.9-cr-stripping.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 1355 byte(s)
-import

1 From: Paul Eggert
2 Subject: Re: patch2.5.9 fails on some dos generated patches
3 Date: Thu, 05 May 2005 17:46:30 -0700
4 User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)
5
6 This should fix your problem:
7
8 2003-07-02 Paul Eggert <address@hidden>
9
10 * pch.c (intuit_diff_type): If a unified-diff header line contains
11 trailing CR, strip CR from each body line. This corrects a bug
12 introduced in the 2003-05-18 patch. Bug reported by Andreas
13 Gruenbacher.
14
15 --- pch.c
16 +++ pch.c
17 @@ -366,10 +366,16 @@
18 if (!stars_last_line && strnEQ(s, "*** ", 4))
19 name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
20 else if (strnEQ(s, "+++ ", 4))
21 + {
22 /* Swap with NEW below. */
23 name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
24 + p_strip_trailing_cr = strip_trailing_cr;
25 + }
26 else if (strnEQ(s, "Index:", 6))
27 + {
28 name[INDEX] = fetchname (s+6, strippath, (time_t *) 0);
29 + p_strip_trailing_cr = strip_trailing_cr;
30 + }
31 else if (strnEQ(s, "Prereq:", 7)) {
32 for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
33 continue;
34 @@ -409,6 +415,7 @@
35 p_timestamp[NEW] = timestamp;
36 p_rfc934_nesting = (t - s) >> 1;
37 }
38 + p_strip_trailing_cr = strip_trailing_cr;
39 }
40 }
41 if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&