ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.pod
(Generate patch)

Comparing libecb/ecb.pod (file contents):
Revision 1.20 by root, Fri May 27 00:12:00 2011 UTC vs.
Revision 1.23 by sf-exg, Fri May 27 01:35:46 2011 UTC

408 408
409=item uint32_t ecb_bswap16 (uint32_t x) 409=item uint32_t ecb_bswap16 (uint32_t x)
410 410
411=item uint32_t ecb_bswap32 (uint32_t x) 411=item uint32_t ecb_bswap32 (uint32_t x)
412 412
413These two functions return the value of the 16-bit (32-bit) variable 413These two functions return the value of the 16-bit (32-bit) value C<x>
414C<x> after reversing the order of bytes. 414after reversing the order of bytes (0x11223344 becomes 0x44332211).
415 415
416=item uint32_t ecb_rotr32 (uint32_t x, unsigned int count) 416=item uint32_t ecb_rotr32 (uint32_t x, unsigned int count)
417 417
418=item uint32_t ecb_rotl32 (uint32_t x, unsigned int count) 418=item uint32_t ecb_rotl32 (uint32_t x, unsigned int count)
419 419
420These two functions return the value of C<x> after shifting all the bits 420These two functions return the value of C<x> after rotating all the bits
421by C<count> positions to the right or left respectively. 421by C<count> positions to the right or left respectively.
422 422
423Current GCC versions understand these functions and usually compile them 423Current GCC versions understand these functions and usually compile them
424to "optimal" code (e.g. a single C<roll> on x86). 424to "optimal" code (e.g. a single C<roll> on x86).
425 425
434Returns the positive remainder of the modulo operation between C<m> and 434Returns the positive remainder of the modulo operation between C<m> and
435C<n>. Unlike the C modulo operator C<%>, this function ensures that the 435C<n>. Unlike the C modulo operator C<%>, this function ensures that the
436return value is always positive - ISO C guarantees very little when 436return value is always positive - ISO C guarantees very little when
437negative numbers are used with C<%>. 437negative numbers are used with C<%>.
438 438
439C<n> must be strictly positive (i.e. C<< >1 >>), while C<m> must be 439C<n> must be strictly positive (i.e. C<< >= 1 >>), while C<m> must be
440negatable, that is, both C<m> and C<-m> must be representable in its 440negatable, that is, both C<m> and C<-m> must be representable in its
441type. 441type.
442 442
443=back 443=back
444 444
445=head2 UTILITY 445=head2 UTILITY
446 446
447=over 4 447=over 4
448 448
449=item element_count = ecb_array_length (name) [MACRO] 449=item element_count = ecb_array_length (name)
450 450
451Returns the number of elements in the array C<name>. For example: 451Returns the number of elements in the array C<name>. For example:
452 452
453 int primes[] = { 2, 3, 5, 7, 11 }; 453 int primes[] = { 2, 3, 5, 7, 11 };
454 int sum = 0; 454 int sum = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines