root/misc/bswap32.c

Revision 966, 164 bytes (checked in by alpt, 2 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 unsigned long swap32 (unsigned long ul)
2 {
3         return ((ul & 0x000000FF) << 24) | ((ul & 0x0000FF00) << 8)  |
4                 ((ul & 0x00FF0000) >> 8) | ((ul & 0xFF000000) >> 24);
5 }
Note: See TracBrowser for help on using the browser.