summaryrefslogtreecommitdiffstats
path: root/src/osd/winui/bitmask.h
blob: 90d500fdea2cfe90316a15fa368bbc60481adbee (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
34
// For licensing and usage information, read docs/release/winui_license.txt
//****************************************************************************

#ifndef WINUI_BITMASK_H
#define WINUI_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 */