00001 #ifndef _HLBR_BITS_H_ 00002 #define _HLBR_BITS_H_ 00003 00004 #ifndef TRUE 00005 #define TRUE 1 00006 #define FALSE 0 00007 #define NULL 0 00008 #endif 00009 00010 00011 int GetBit(unsigned char* BitField, int BitFieldLen, int BitNum); 00012 void SetBit(unsigned char* BitField, int BitFieldLen, int BitNum, char Value); 00013 void SetBits(unsigned char* BitField, int BitFieldLen, int StartBit, int EndBit, char Value); 00014 void NotAndBitFields(unsigned char* BitField1, unsigned char* BitField2, unsigned char* TargetBitField, int BitFieldLen); 00015 void AndBitFields(unsigned char* BitField1, unsigned char* BitField2, unsigned char* TargetBitField, int BitFieldLen); 00016 void OrBitFields(unsigned char* BitField1, unsigned char* BitField2, unsigned char* TargetBitField, int BitFieldLen); 00017 int CountBits(unsigned char* BitField, int BitFieldLen); 00018 int BitFieldIsEmpty(unsigned char* BitField, int BitFieldLen); 00019 00020 00021 #endif