DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

UDI_ENDIAN_SWAP_ARRAY(3udi)


Byte-swap each element in an array

SYNOPSIS

#include <udi.h>

#define \

   UDI_ENDIAN_SWAP_ARRAY(src, element_size, count) \

		udi_endian_swap(src, src, element_size, \

		                element_size, count)
 

ARGUMENTS src points to an array of count elements, each of which are element_size bytes in size.

element_size is the size, in bytes, of each element to be byte-swapped. element_size must be a power-of-two.

count the number of elements in the src array to be byte-swapped.

DESCRIPTION UDI_ENDIAN_SWAP_ARRAY byte-swaps count elements in the array pointed to by src. The results are written in place in the src array.

The macro UDI_ENDIAN_SWAP_ARRAY must be called as if it had the following functional interface, as can be derived from the above macro definition and the definition of udi_endian_swap:

void UDI_ENDIAN_SWAP_ARRAY (

	void *src,

	udi_ubit8_t element_size,

	udi_ubit16_t count );
 

REFERENCES udi_endian_swap


UDI Core Specification Contents