--- libecb/ecb.pod 2011/05/26 21:18:52 1.11 +++ libecb/ecb.pod 2011/05/26 22:14:52 1.13 @@ -236,8 +236,8 @@ common use case is to compute the integer binary logarithm, i.e., floor(log2(n)). For example: - ecb_ctz32(3) = 1 - ecb_ctz32(6) = 2 + ecb_ctz32(3) = 0 + ecb_ctz32(6) = 1 =item int ecb_popcount32 (uint32_t x) @@ -250,6 +250,9 @@ =item uint32_t ecb_bswap32 (uint32_t x) +These two functions return the value of the 16-bit (32-bit) variable +C after reversing the order of bytes. + =item uint32_t ecb_rotr32 (uint32_t x, unsigned int count) =item uint32_t ecb_rotl32 (uint32_t x, unsigned int count) @@ -276,6 +279,14 @@ =item element_count = ecb_array_length (name) [MACRO] +Returns the number of elements in the array C. For example: + + int primes[] = { 2, 3, 5, 7, 11 }; + int sum = 0; + + for (i = 0; i < ecb_array_length (primes); i++) + sum += primes [i]; + =back