Functions | |
| unsigned short | qfits_swap_bytes_16 (unsigned short w) |
| Swap a 16-bit number. | |
| unsigned int | qfits_swap_bytes_32 (unsigned int dw) |
| Swap a 32-bit number. | |
| void | qfits_swap_bytes (void *p, int s) |
| Swaps bytes in a variable of given size. | |
This module offers access to byte-swapping routines. Generic routines are offered that should work everywhere. Assembler is also included for x86 architectures, and dedicated assembler calls for processors > 386.
| void qfits_swap_bytes | ( | void * | p, | |
| int | s | |||
| ) |
Swaps bytes in a variable of given size.
| p | pointer to void (generic pointer) | |
| s | size of the element to swap, pointed to by p |
This byte-swapper is portable and works for any even variable size. It is not truly the most efficient ever, but does its job fine everywhere this file compiles.
Referenced by qfits_query_column(), and qfits_query_column_seq().
| unsigned short qfits_swap_bytes_16 | ( | unsigned short | w | ) |
Swap a 16-bit number.
| w | A 16-bit (short) number to byte-swap. |
This function swaps a 16-bit number, returned the swapped value without modifying the passed argument. Assembler included for x86 architectures.
| unsigned int qfits_swap_bytes_32 | ( | unsigned int | dw | ) |
Swap a 32-bit number.
| dw | A 32-bit (long) number to byte-swap. |
This function swaps a 32-bit number, returned the swapped value without modifying the passed argument. Assembler included for x86 architectures and optimized for processors above 386.
1.6.1