
March 10, 1995
7:13 a.m.
How about this?
result = 0; for (i = 0; i < 4; ++i) result = (result << 8) | (codep[i] & 0xff); return((result >> 31) ? (result | (~0L << 32)) : result);
yeah, that should work as desired, though i forget if "0L" is an ansi-C-ism, and don't have a book around to check... you definitely _do_ need the cast to long, in some form, otherwise it'll lose. cgd