home *** CD-ROM | disk | FTP | other *** search
/ Dream 51 / Amiga_Dream_51.iso / Atari / Desktops / text113b.zoo / textutils-1.13 / lib / diffs next >
Text File  |  1996-01-23  |  950b  |  30 lines

  1. diff -u ./md5.c /d/textutils-1.13.new/lib/md5.c
  2. --- ./md5.c    Thu Jul 27 22:12:20 1995
  3. +++ /d/textutils-1.13.new/lib/md5.c    Sat Jan 20 03:29:18 1996
  4. @@ -38,8 +38,16 @@
  5.  #ifdef WORDS_BIGENDIAN
  6.  # define SWAP(n)                            \
  7.      (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
  8. +
  9. +/* Works with `n' being an odd address */
  10. +# define SWAPDEREF(n) \
  11. +    (((unsigned long)(((unsigned char *)(n))[3]) << 24) | \
  12. +     ((unsigned long)(((unsigned char *)(n))[2]) << 16) | \
  13. +     ((unsigned long)(((unsigned char *)(n))[1]) << 8)  | \
  14. +     ((unsigned long)(((unsigned char *)(n))[0])))
  15.  #else
  16.  # define SWAP(n) (n)
  17. +# define SWAPDEREF(n) (n)
  18.  #endif
  19.  
  20.  
  21. @@ -249,7 +257,7 @@
  22.  #define OP(a, b, c, d, s, T)                        \
  23.        do                                \
  24.          {                                \
  25. -      a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T;        \
  26. +      a += FF (b, c, d) + (*cwp++ = SWAPDEREF (words)) + T;        \
  27.        ++words;                            \
  28.        CYCLIC (a, s);                        \
  29.        a += b;                            \
  30.