ocssw
V2022
|
swapc_bytes.c File Reference
#include <string.h>
#include <stdlib.h>
Include dependency graph for swapc_bytes.c:
Go to the source code of this file.
Functions | |
int | swapc_bytes (char *in, int nbyte, int ntime) |
int | swapc_bytes2 (const char *in, char *out, int nbyte, int ntime) |
Function Documentation
◆ swapc_bytes()
int swapc_bytes | ( | char * | in, |
int | nbyte, | ||
int | ntime | ||
) |
Swap bytes in place
- Parameters
-
in pointer to memory to byte swap nbyte size of object to reverse ntime number of objects to swap
- Returns
- 0 always
Definition at line 4 of file swapc_bytes.c.
◆ swapc_bytes2()
int swapc_bytes2 | ( | const char * | in, |
char * | out, | ||
int | nbyte, | ||
int | ntime | ||
) |
Swap bytes from in to out. in and out should not be overlapping memory
- Parameters
-
in pointer to source memory to byte swap out pointer to destination memory nbyte size of object to reverse ntime number of objects to swap
- Returns
- 0 always
Definition at line 24 of file swapc_bytes.c.