The following two functions SH() and LG() convert big-endian short * and long numbers into native byte order. They are some kind of * counterpart to the generic UnZip's makeword() and makelong() functions. */
| 1760 | * counterpart to the generic UnZip's makeword() and makelong() functions. |
| 1761 | */ |
| 1762 | static ush SH(ush val) |
| 1763 | { |
| 1764 | uch swapbuf[2]; |
| 1765 | |
| 1766 | swapbuf[1] = (uch)(val & 0xff); |
| 1767 | swapbuf[0] = (uch)(val >> 8); |
| 1768 | return (*(ush *)swapbuf); |
| 1769 | } |
| 1770 | |
| 1771 | |
| 1772 |