bitmap.h
来自「eC++编译器源码」· C头文件 代码 · 共 47 行
H
47 行
#pragma BitMap
/* This module deals with any kind of bit map that is implemeted using BITSETs or
anything that can be manipulated like BITSETs */
int GetBit(unsigned int &bar[],unsigned int start);
/* Gets a bit out of the map and returns its index if successful, else -1.
It begins searching the map from index 'start' for a free bit */
void FreeBit(unsigned int &bar[],unsigned int index);
/* Returns a specific bit to the bitmap at index 'index' */
void FreeMap(unsigned int &bar[]);
/* Initializes a bitmap so that all bits are free */
void FreeNBit(unsigned int &bar[],unsigned int index,unsigned int count);
/* Returns 'count' number of consecutive bits to the map at index 'index' */
boolean GetFixBit(unsigned int &bar[],unsigned int index);
/* Gets a particular bit from the map and returns TRUE if successful, else FALSE */
boolean GetNFixBit(unsigned int &bar[],unsigned int index,unsigned int count);
/* Gets 'count' number of consecutive bits from the map starting at 'index' and
returns TRUE if successful, else FALSE */
int GetNBit(unsigned int &bar[], unsigned int start, unsigned int count);
/* Gets 'count' number of consecutive bits from the map and starts searching from
'start'. It returns index of starting position if successful, else -1 */
unsigned int Remainder(unsigned int &bar[]);
/* Returns the count of the consecutive bits which end at the last index position
of the map */
boolean CheckNBit(unsigned int &bar[],unsigned int &start,unsigned int count);
/* Returns TRUE if it is possible to get 'count' number of consecutive bits from
the map starting the searching from 'start', else FALSE */
boolean CheckNFixBit(unsigned int &bar[],unsigned int index, unsigned int count);
/* Returns TRUE if it is possible to get 'count' number of consecutive bits from
the map at index 'start' onwards, else FALSE */
boolean CheckBit(unsigned int &bar[],unsigned int &start);
/* Returns TRUE if it is possible to get a bit from the map starting the scan from
index 'start', else FALSE */
boolean CheckFixBit(unsigned int &bar[],unsigned int index);
/* Returns TRUE if it is possible to get a bit from the map at index 'index', else
FALSE */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?