diff options
author | Jim Meyering <jim@meyering.net> | 1995-06-15 16:46:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-06-15 16:46:34 +0000 |
commit | f9f17d4b0f5741ea1bde086b1c7cd71ce94bcbef (patch) | |
tree | 97fee35e737d5e34c0a57e78d80b9f138935711a /src/md5sum.c | |
parent | 33969b2c90082e5214efd1a22416315400788f58 (diff) | |
download | coreutils-f9f17d4b0f5741ea1bde086b1c7cd71ce94bcbef.tar.xz |
merge with 1.11.5b
Diffstat (limited to 'src/md5sum.c')
-rw-r--r-- | src/md5sum.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/md5sum.c b/src/md5sum.c index 3517fba55..0b95ff5d1 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -120,6 +120,8 @@ typedef unsigned short uint32; # endif #endif +#define TOLOWER(c) (ISUPPER (c) ? tolower (c) : (c)) + /* Hook for i18n. */ #define _(str) str @@ -350,8 +352,8 @@ main (argc, argv) /* Compare generated binary number with text representation in check file. Ignore case of hex digits. */ for (cnt = 0; cnt < 16; ++cnt) - if (tolower (md5num[2 * cnt]) != bin2hex[md5buffer[cnt] >> 4] - || tolower (md5num[2 * cnt + 1]) + if (TOLOWER (md5num[2 * cnt]) != bin2hex[md5buffer[cnt] >> 4] + || TOLOWER (md5num[2 * cnt + 1]) != (bin2hex[md5buffer[cnt] & 0xf])) break; @@ -481,7 +483,7 @@ md5_file (filename, resblock, binary) } while (sum < BLOCKSIZE && n != 0); - /* RFC 1321 specifies the possible length of the file upto 2^64 bits. + /* RFC 1321 specifies the possible length of the file up to 2^64 bits. Here we only compute the number of bytes. Do a double word increment. */ len[0] += sum; |