diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-04-22 22:30:44 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-04-23 04:44:37 +1000 |
commit | c80479aae2106531a8b7fe0d21de2c0639fbec96 (patch) | |
tree | 19bd4cf269dc37a07f36196cf51d3c0a773022a5 | |
parent | 86142001d8ef967528d5f9f4b585e85936c9c228 (diff) | |
download | busybox-w32-c80479aae2106531a8b7fe0d21de2c0639fbec96.tar.gz busybox-w32-c80479aae2106531a8b7fe0d21de2c0639fbec96.tar.bz2 busybox-w32-c80479aae2106531a8b7fe0d21de2c0639fbec96.zip |
coreutils/diff: treat \r as same as \n
-rw-r--r-- | coreutils/diff.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c index f6b045b2d..f0e298797 100644 --- a/coreutils/diff.c +++ b/coreutils/diff.c | |||
@@ -208,7 +208,9 @@ static int readhash(FILE * f) | |||
208 | for (i = 0;;) { | 208 | for (i = 0;;) { |
209 | switch (t = getc(f)) { | 209 | switch (t = getc(f)) { |
210 | case '\t': | 210 | case '\t': |
211 | #ifndef __MINGW32__ | ||
211 | case '\r': | 212 | case '\r': |
213 | #endif | ||
212 | case '\v': | 214 | case '\v': |
213 | case '\f': | 215 | case '\f': |
214 | case ' ': | 216 | case ' ': |
@@ -226,6 +228,9 @@ static int readhash(FILE * f) | |||
226 | if (i == 0) | 228 | if (i == 0) |
227 | return 0; | 229 | return 0; |
228 | /* FALLTHROUGH */ | 230 | /* FALLTHROUGH */ |
231 | #ifdef __MINGW32__ | ||
232 | case '\r': | ||
233 | #endif | ||
229 | case '\n': | 234 | case '\n': |
230 | break; | 235 | break; |
231 | } | 236 | } |