Go to the source code of this file.
◆ little_endian()
Check whether current platform uses little endian byte order. See H&S Sec. 6.1.2 pp. 163-4.
- Returns
- Returns 1, if current platform is little endian, and 0 if not.
◆ printf32bits()
void printf32bits |
( |
void * |
buf | ) |
|
Printfs as bit string the 32-bit variable pointed to by buf. Far from being optimized, thus only for testing and development purposes.
- Parameters
-
◆ swabip()
void swabip |
( |
void * |
buf, |
|
|
int |
size |
|
) |
| |
In-place swab, replaces the non-ANSI function swab(), which may not work if data is overlapping.
- Parameters
-
buf | Pointer to memory |
size | Size of buf in bytes |
◆ swap()
void swap |
( |
void * |
from, |
|
|
void * |
to, |
|
|
int |
size |
|
) |
| |
Swaps the specified short int, int, long int, float, or double from little endian to big endian or vice versa. Arguments are allowed to overlap.
- Parameters
-
from | Pointer to a short int, int, long int, float, or double variable |
to | Pointer to a short int, int, long int, float, or double variable |
size | Size of from and to (byte nr) must be 1, 2, 4 or 8. |
References swap().
Referenced by intExpand(), and swap().
◆ swawbip()
void swawbip |
( |
void * |
buf, |
|
|
int |
size |
|
) |
| |
In-place swab and swaw, switches words and bytes from an array of 4-byte ints or floats.
- Parameters
-
buf | Pointer to memory |
size | Size of buf in bytes |
◆ swawip()
void swawip |
( |
void * |
buf, |
|
|
int |
size |
|
) |
| |
In-place swaw, switches words (but not bytes) from an array of 4-byte ints or floats.
- Parameters
-
buf | Pointer to memory |
size | Size of buf in bytes |