home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 51
/
Amiga_Dream_51.iso
/
Atari
/
Desktops
/
text113b.zoo
/
textutils-1.13
/
lib
/
diffs
next >
Wrap
Text File
|
1996-01-23
|
950b
|
30 lines
diff -u ./md5.c /d/textutils-1.13.new/lib/md5.c
--- ./md5.c Thu Jul 27 22:12:20 1995
+++ /d/textutils-1.13.new/lib/md5.c Sat Jan 20 03:29:18 1996
@@ -38,8 +38,16 @@
#ifdef WORDS_BIGENDIAN
# define SWAP(n) \
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+
+/* Works with `n' being an odd address */
+# define SWAPDEREF(n) \
+ (((unsigned long)(((unsigned char *)(n))[3]) << 24) | \
+ ((unsigned long)(((unsigned char *)(n))[2]) << 16) | \
+ ((unsigned long)(((unsigned char *)(n))[1]) << 8) | \
+ ((unsigned long)(((unsigned char *)(n))[0])))
#else
# define SWAP(n) (n)
+# define SWAPDEREF(n) (n)
#endif
@@ -249,7 +257,7 @@
#define OP(a, b, c, d, s, T) \
do \
{ \
- a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \
+ a += FF (b, c, d) + (*cwp++ = SWAPDEREF (words)) + T; \
++words; \
CYCLIC (a, s); \
a += b; \