Mick Charles Beaver said:
Hello,
Would anyone know why the FreeBSD implementation of swab() uses an
unsigned long for its temporary variable when swapping bytes?
Well, they gotta use something, haven't they? And unsigned long is a
reasonable choice. (Presumably sizeof(unsigned long) is 8 on that system.)
Personally, I use memcpy (and a buffer somewhat larger than 8), but the way
they do it is fine, although those casts are a bit pointless, aren't they?
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999