OB.DAAC Logo
NASA Logo
Ocean Color Science Software

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
inpointer to memory to byte swap
nbytesize of object to reverse
ntimenumber 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
inpointer to source memory to byte swap
outpointer to destination memory
nbytesize of object to reverse
ntimenumber of objects to swap
Returns
0 always

Definition at line 24 of file swapc_bytes.c.