#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "include/swap.h"Functions | |
| int | little_endian () |
| void | swap (void *from, void *to, int size) |
| void | swabip (void *buf, int size) |
| void | swawbip (void *buf, int size) |
| void | swawip (void *buf, int size) |
| void | printf32bits (void *buf) |
|
|
Check whether current platform uses little endian byte order. See H&S Sec. 6.1.2 pp. 163-4.
|
|
|
|
|
||||||||||||
|
In-place swab, replaces the non-ANSI function swab(), which may not work if data is overlapping.
|
|
||||||||||||||||
|
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.
|
|
||||||||||||
|
In-place swab and swaw, switches words and bytes from an array of 4-byte ints or floats.
|
|
||||||||||||
|
In-place swaw, switches words (but not bytes) from an array of 4-byte ints or floats.
|
1.4.1