* Note: this code is harmless on little-endian machines. */
| 15 | * Note: this code is harmless on little-endian machines. |
| 16 | */ |
| 17 | void byteReverse(unsigned char *buf, unsigned longs) |
| 18 | { |
| 19 | uint32_t t; |
| 20 | do |
| 21 | { |
| 22 | t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 | |
| 23 | ((unsigned) buf[1] << 8 | buf[0]); |
| 24 | *(uint32_t *) buf = t; |
| 25 | buf += 4; |
| 26 | } while (--longs); |
| 27 | } |
| 28 | #endif |
| 29 | |
| 30 | /* |