NCEPLIBS-bacio  2.6.0
fast-byteswap.h File Reference

Header file for byteswap functions. More...

#include <stdlib.h>

Go to the source code of this file.

Functions

int fast_byteswap (void *data, int bytes, size_t count)
 Fast byteswap. More...
 
void fast_byteswap_errors (int flag)
 Set a flag to turn warnings off for non-aligned pointers. More...
 

Detailed Description

Header file for byteswap functions.

Author
George Vandenberghe
Date
July 22, 2015

Definition in file fast-byteswap.h.

Function Documentation

◆ fast_byteswap()

int fast_byteswap ( void *  data,
int  bytes,
size_t  count 
)

Fast byteswap.

Parameters
datadata
bytesNumber of bytes
countCount.
Returns
0 for error, 1 otherwise.
Author
Dexin Zhang, Jun Wang

Definition at line 146 of file byteswap.c.

References macro_swap_64(), simple_swap_16(), and simple_swap_32().

Referenced by byteswap_().

◆ fast_byteswap_errors()

void fast_byteswap_errors ( int  flag)

Set a flag to turn warnings off for non-aligned pointers.

Parameters
flagSet to 0 to turn off warnings, non-zero to turn them on (the default).
Author
Dexin Zhang, Jun Wang

Definition at line 41 of file byteswap.c.

References send_errors.