summaryrefslogtreecommitdiffstats
path: root/docs/release/src/osd/winui/bitmask.h
blob: ad21e6ae7ae370c5f436457e32f31d77f65fa741 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// For licensing and usage information, read docs/winui_license.txt
//****************************************************************************

#ifndef BITMASK_H
#define BITMASK_H

/* Bit array type */
typedef struct
{
	UINT m_nSize;
	UCHAR* m_lpBits;
} BITS, * LPBITS;

/* Bit functions */
LPBITS NewBits(UINT nLength /* in bits */);
void DeleteBits(LPBITS lpBits);
BOOL TestBit(LPBITS lpBits, UINT nBit);
void SetBit(LPBITS lpBits, UINT nBit);
void ClearBit(LPBITS lpBits, UINT nBit);
void SetAllBits(LPBITS lpBits, BOOL bSet);
int FindBit(LPBITS lpBits, int nStartPos, BOOL bSet);

/* Linked list type */
typedef struct
{
	LPVOID  data;
	LPVOID  next;
	LPVOID  prev;
} NODE, * LPNODE;

/* Linked list functions */

#endif /* BITMASK_H */