|
Wheefun I/O Library
0.0.5
Useful I/O Primitives.
|
Byte-swapping functions. More...
#include <wfio/type.h>Go to the source code of this file.
Functions | |
| WFIO_INLINE wfio_sint16_t | wfio_swapSI16 (wfio_sint16_t src) |
| Perform a byte swap on a 16-bit signed integer. More... | |
| WFIO_DLL void | wfio_swapSI16V2 (const wfio_sint16_t *src, wfio_sint16_t *dest, size_t len) |
Perform a byte swap on 16-bit signed integers in src to be stored in dest. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapSI16V (wfio_sint16_t *buf, size_t len) |
Perform a byte swap on 16-bit signed integers in buf. More... | |
| WFIO_ALWAYS_INLINE wfio_sint16_t | wfio_swapUI16 (wfio_sint16_t src) |
| Perform a byte swap on a 16-bit unsigned integer. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapUI16V2 (const wfio_sint16_t *src, wfio_sint16_t *dest, size_t len) |
Perform a byte swap on 16-bit unsigned integers in src to be stored in dest. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapUI16V (wfio_sint16_t *buf, size_t len) |
Perform a byte swap on 16-bit unsigned integers in buf. More... | |
| WFIO_MAYBE_INLINE wfio_sint32_t | wfio_swapSI32 (wfio_sint32_t src) |
| Perform a byte swap on a 32-bit signed integer. More... | |
| WFIO_DLL void | wfio_swapSI32V2 (const wfio_sint32_t *src, wfio_sint32_t *dest, size_t len) |
Perform a byte swap on 32-bit signed integers in src to be stored in dest. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapSI32V (wfio_sint32_t *buf, size_t len) |
Perform a byte swap on 32-bit signed integers in buf. More... | |
| WFIO_ALWAYS_INLINE wfio_sint32_t | wfio_swapUI32 (wfio_sint32_t src) |
| Perform a byte swap on a 32-bit signed integer. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapUI32V2 (const wfio_sint32_t *src, wfio_sint32_t *dest, size_t len) |
Perform a byte swap on 32-bit unsigned integers in src to be stored in dest. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapUI32V (wfio_sint32_t *buf, size_t len) |
Perform a byte swap on 32-bit unsigned integers in buf. More... | |
| WFIO_MAYBE_INLINE wfio_sint64_t | wfio_swapSI64 (wfio_sint64_t src) |
| Perform a byte swap on a 64-bit signed integer. More... | |
| WFIO_DLL void | wfio_swapSI64V2 (const wfio_sint64_t *src, wfio_sint64_t *dest, size_t len) |
Perform a byte swap on 64-bit signed integers in src to be stored in dest. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapSI64V (wfio_sint64_t *buf, size_t len) |
Perform a byte swap on 64-bit signed integers in buf. More... | |
| WFIO_ALWAYS_INLINE wfio_sint64_t | wfio_swapUI64 (wfio_sint64_t src) |
| Perform a byte swap on a 64-bit unsigned integer. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapUI64V2 (const wfio_sint64_t *src, wfio_sint64_t *dest, size_t len) |
Perform a byte swap on 64-bit unsigned integers in src to be stored in dest. More... | |
| WFIO_ALWAYS_INLINE void | wfio_swapUI64V (wfio_sint64_t *buf, size_t len) |
Perform a byte swap on 64-bit unsigned integers in buf. More... | |
Byte-swapping functions.
| WFIO_INLINE wfio_sint16_t wfio_swapSI16 | ( | wfio_sint16_t | src | ) |
Perform a byte swap on a 16-bit signed integer.
This function can be used to swap the endianness of a 16-bit signed integer. It does not take into account whether or not the integer is already in the host endianness.
| src | The integer to swap endianness for. |
| WFIO_ALWAYS_INLINE void wfio_swapSI16V | ( | wfio_sint16_t * | buf, |
| size_t | len | ||
| ) |
Perform a byte swap on 16-bit signed integers in buf.
This function can be used to swap the endianness of a vector of 16-bit signed integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| buf | An array of integers to swap endianess of. |
| len | The number of integers to process. |
buf is not null buf shall have their endiannes swapped from the values originally passed. | WFIO_DLL void wfio_swapSI16V2 | ( | const wfio_sint16_t * | src, |
| wfio_sint16_t * | dest, | ||
| size_t | len | ||
| ) |
Perform a byte swap on 16-bit signed integers in src to be stored in dest.
This function can be used to swap the endianness of a vector of 16-bit signed integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| src | An array of integers to read from. |
| dest | An array of integers to write to. |
| len | The number of integers to process. |
src or dest are null. dest shall have their endiannes swapped from the values originally passed in src. | WFIO_MAYBE_INLINE wfio_sint32_t wfio_swapSI32 | ( | wfio_sint32_t | src | ) |
Perform a byte swap on a 32-bit signed integer.
This function can be used to swap the endianness of a 32-bit signed integer. It does not take into account whether or not the integer is already in the host endianness.
| src | The integer to swap endianness for. |
| WFIO_ALWAYS_INLINE void wfio_swapSI32V | ( | wfio_sint32_t * | buf, |
| size_t | len | ||
| ) |
Perform a byte swap on 32-bit signed integers in buf.
This function can be used to swap the endianness of a vector of 32-bit signed integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| buf | An array of integers to swap endianess of. |
| len | The number of integers to process. |
buf is not null buf shall have their endiannes swapped from the values originally passed. | WFIO_DLL void wfio_swapSI32V2 | ( | const wfio_sint32_t * | src, |
| wfio_sint32_t * | dest, | ||
| size_t | len | ||
| ) |
Perform a byte swap on 32-bit signed integers in src to be stored in dest.
This function can be used to swap the endianness of a vector of 32-bit signed integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| src | An array of integers to read from. |
| dest | An array of integers to write to. |
| len | The number of integers to process. |
src or dest are null. dest shall have their endiannes swapped from the values originally passed in src. | WFIO_MAYBE_INLINE wfio_sint64_t wfio_swapSI64 | ( | wfio_sint64_t | src | ) |
Perform a byte swap on a 64-bit signed integer.
This function can be used to swap the endianness of a 64-bit signed integer. It does not take into account whether or not the integer is already in the host endianness.
| src | The integer to swap endianness for. |
| WFIO_ALWAYS_INLINE void wfio_swapSI64V | ( | wfio_sint64_t * | buf, |
| size_t | len | ||
| ) |
Perform a byte swap on 64-bit signed integers in buf.
This function can be used to swap the endianness of a vector of 64-bit signed integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| buf | An array of integers to swap endianess of. |
| len | The number of integers to process. |
buf is not null buf shall have their endiannes swapped from the values originally passed. | WFIO_DLL void wfio_swapSI64V2 | ( | const wfio_sint64_t * | src, |
| wfio_sint64_t * | dest, | ||
| size_t | len | ||
| ) |
Perform a byte swap on 64-bit signed integers in src to be stored in dest.
This function can be used to swap the endianness of a vector of 64-bit signed integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| src | An array of integers to read from. |
| dest | An array of integers to write to. |
| len | The number of integers to process. |
src or dest are null. dest shall have their endiannes swapped from the values originally passed in src. | WFIO_ALWAYS_INLINE wfio_sint16_t wfio_swapUI16 | ( | wfio_sint16_t | src | ) |
Perform a byte swap on a 16-bit unsigned integer.
This function can be used to swap the endianness of a 16-bit unsigned integer. It does not take into account whether or not the integer is already in the host endianness.
| src | The integer to swap endianness for. |
| WFIO_ALWAYS_INLINE void wfio_swapUI16V | ( | wfio_sint16_t * | buf, |
| size_t | len | ||
| ) |
Perform a byte swap on 16-bit unsigned integers in buf.
This function can be used to swap the endianness of a vector of 16-bit unsigned integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| buf | An array of integers to swap endianess of. |
| len | The number of integers to process. |
buf is not null buf shall have their endiannes swapped from the values originally passed. | WFIO_ALWAYS_INLINE void wfio_swapUI16V2 | ( | const wfio_sint16_t * | src, |
| wfio_sint16_t * | dest, | ||
| size_t | len | ||
| ) |
Perform a byte swap on 16-bit unsigned integers in src to be stored in dest.
This function can be used to swap the endianness of a vector of 16-bit unsigned integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| src | An array of integers to read from. |
| dest | An array of integers to write to. |
| len | The number of integers to process. |
src or dest are null. dest shall have their endiannes swapped from the values originally passed in src. | WFIO_ALWAYS_INLINE wfio_sint32_t wfio_swapUI32 | ( | wfio_sint32_t | src | ) |
Perform a byte swap on a 32-bit signed integer.
This function can be used to swap the endianness of a 32-bit unsigned integer. It does not take into account whether or not the integer is already in the host endianness.
| src | The integer to swap endianness for. |
| WFIO_ALWAYS_INLINE void wfio_swapUI32V | ( | wfio_sint32_t * | buf, |
| size_t | len | ||
| ) |
Perform a byte swap on 32-bit unsigned integers in buf.
This function can be used to swap the endianness of a vector of 32-bit unsigned integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| buf | An array of integers to swap endianess of. |
| len | The number of integers to process. |
buf is not null buf shall have their endiannes swapped from the values originally passed. | WFIO_ALWAYS_INLINE void wfio_swapUI32V2 | ( | const wfio_sint32_t * | src, |
| wfio_sint32_t * | dest, | ||
| size_t | len | ||
| ) |
Perform a byte swap on 32-bit unsigned integers in src to be stored in dest.
This function can be used to swap the endianness of a vector of 32-bit unsigned integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| src | An array of integers to read from. |
| dest | An array of integers to write to. |
| len | The number of integers to process. |
src or dest are null. dest shall have their endiannes swapped from the values originally passed in src. | WFIO_ALWAYS_INLINE wfio_sint64_t wfio_swapUI64 | ( | wfio_sint64_t | src | ) |
Perform a byte swap on a 64-bit unsigned integer.
This function can be used to swap the endianness of a 64-bit unsigned integer. It does not take into account whether or not the integer is already in the host endianness.
| src | The integer to swap endianness for. |
| WFIO_ALWAYS_INLINE void wfio_swapUI64V | ( | wfio_sint64_t * | buf, |
| size_t | len | ||
| ) |
Perform a byte swap on 64-bit unsigned integers in buf.
This function can be used to swap the endianness of a vector of 64-bit unsigned integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| buf | An array of integers to swap endianess of. |
| len | The number of integers to process. |
buf is not null buf shall have their endiannes swapped from the values originally passed. | WFIO_ALWAYS_INLINE void wfio_swapUI64V2 | ( | const wfio_sint64_t * | src, |
| wfio_sint64_t * | dest, | ||
| size_t | len | ||
| ) |
Perform a byte swap on 64-bit unsigned integers in src to be stored in dest.
This function can be used to swap the endianness of a vector of 64-bit unsigned integers. It does not take into account whether or not the integer is already in the host endianness. The swapped integers will read from src, have their endianness swapped, and will be stored into their corresponding positions in dest; src and dest may be the same buffer.
| src | An array of integers to read from. |
| dest | An array of integers to write to. |
| len | The number of integers to process. |
src or dest are null. dest shall have their endiannes swapped from the values originally passed in src.
1.8.13