… | |
… | |
248 | |
248 | |
249 | =item uint32_t ecb_bswap16 (uint32_t x) |
249 | =item uint32_t ecb_bswap16 (uint32_t x) |
250 | |
250 | |
251 | =item uint32_t ecb_bswap32 (uint32_t x) |
251 | =item uint32_t ecb_bswap32 (uint32_t x) |
252 | |
252 | |
|
|
253 | These two functions return the value of the 16-bit (32-bit) variable |
|
|
254 | C<x> after reversing the order of bytes. |
|
|
255 | |
253 | =item uint32_t ecb_rotr32 (uint32_t x, unsigned int count) |
256 | =item uint32_t ecb_rotr32 (uint32_t x, unsigned int count) |
254 | |
257 | |
255 | =item uint32_t ecb_rotl32 (uint32_t x, unsigned int count) |
258 | =item uint32_t ecb_rotl32 (uint32_t x, unsigned int count) |
256 | |
259 | |
257 | These two functions return the value of C<x> after shifting all the bits |
260 | These two functions return the value of C<x> after shifting all the bits |
… | |
… | |
274 | |
277 | |
275 | =over 4 |
278 | =over 4 |
276 | |
279 | |
277 | =item element_count = ecb_array_length (name) [MACRO] |
280 | =item element_count = ecb_array_length (name) [MACRO] |
278 | |
281 | |
279 | =back |
282 | Returns the number of elements in the array C<name>. For example: |
280 | |
283 | |
|
|
284 | int primes[] = { 2, 3, 5, 7, 11 }; |
|
|
285 | int sum = 0; |
281 | |
286 | |
|
|
287 | for (i = 0; i < ecb_array_length (primes); i++) |
|
|
288 | sum += primes [i]; |
|
|
289 | |
|
|
290 | =back |
|
|
291 | |
|
|
292 | |