source: umon/main/glib/swap.c @ b987a75

Last change on this file since b987a75 was b987a75, checked in by Jarielle Catbagan <jcatbagan93@…>, on 06/19/15 at 21:32:43

Removed execution mode file attribute from all ASCII text files

  • Property mode set to 100644
File size: 352 bytes
Line 
1#include "config.h"
2#include <ctype.h>
3#include "genlib.h"
4#include "stddefs.h"
5
6ushort
7swap2(ushort sval_in)
8{
9        return(((sval_in & 0x00ff) << 8) | ((sval_in & 0xff00) >> 8));
10}
11
12ulong
13swap4(ulong sval_in)
14{
15        return(((sval_in & 0x000000ff) << 24) | ((sval_in & 0x0000ff00) << 8) |
16                        ((sval_in & 0x00ff0000) >> 8) | ((sval_in & 0xff000000) >> 24));
17}
18
Note: See TracBrowser for help on using the repository browser.