Main Page | Modules | File List | Globals | Related Pages

4 Bit String Routines


Functions

int BitStringCmp (int len, u_char *op1, u_char *op2, u_char *mask)
 Compare two bit string using an optional bit mask.

void BitStringAdd (int len, u_char *op1, u_char *op2)
 Numeric addition of two bit string.

int BitStringOnes (int len, u_char *op)
 Count the number of bits set to one in a bit string.


Function Documentation

void BitStringAdd int  len,
u_char *  op1,
u_char *  op2
[static]
 

Numeric addition of two bit string.

Parameters:
len Number of bits in the bit strings.
op1 Pointer to the first bit string, which will also receive the final result.
op2 Pointer to the second bit string. Will be added to the first.

Definition at line 99 of file xsvfexec.c.

Referenced by Execute().

int BitStringCmp int  len,
u_char *  op1,
u_char *  op2,
u_char *  mask
[static]
 

Compare two bit string using an optional bit mask.

Parameters:
len Number of bits in the bit strings.
op1 Pointer to the first bit string.
op2 Pointer to the second bit string.
mask Pointer to the mask. Bits are compared only if the corresponding bit in the mask is set. If this pointer is set to NULL, all bits will be compared.
Returns:
0 if equal, 1 otherwise.

Definition at line 68 of file xsvfexec.c.

Referenced by ReShift().

int BitStringOnes int  len,
u_char *  op
[static]
 

Count the number of bits set to one in a bit string.

Parameters:
len Number of bits in the bit string.
op Pointer to the bit string.
Returns:
The number of bits set to one.

Definition at line 125 of file xsvfexec.c.

Referenced by Execute().


© 2004 by egnite Software GmbH - visit http://www.ethernut.de/