Rizin
unix-like reverse engineering framework and cli tools
rz_bitmap.h
Go to the documentation of this file.
1 #ifndef RZ_BITMAP_H
2 #define RZ_BITMAP_H
3 
4 #include <rz_types.h>
5 
6 #if RZ_SYS_BITS == 4
7 #define BITWORD_BITS_SHIFT 5
8 #define RBitword ut32
9 #else
10 #define BITWORD_BITS_SHIFT 6
11 #define RBitword ut64
12 #endif
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 typedef struct rz_bitmap_t {
19  int length;
22 
24 RZ_API void rz_bitmap_set_bytes(RzBitmap *b, const ut8 *buf, int len);
26 RZ_API void rz_bitmap_set(RzBitmap *b, size_t bit);
27 RZ_API void rz_bitmap_unset(RzBitmap *b, size_t bit);
28 RZ_API int rz_bitmap_test(RzBitmap *b, size_t bit);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif // RZ_BITMAP_H
size_t len
Definition: 6502dis.c:15
#define RZ_API
RzCryptoSelector bit
Definition: crypto.c:16
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
#define RBitword
Definition: rz_bitmap.h:11
RZ_API RzBitmap * rz_bitmap_new(size_t len)
Definition: bitmap.c:16
RZ_API void rz_bitmap_set_bytes(RzBitmap *b, const ut8 *buf, int len)
Definition: bitmap.c:26
RZ_API void rz_bitmap_set(RzBitmap *b, size_t bit)
Definition: bitmap.c:38
struct rz_bitmap_t RzBitmap
RZ_API int rz_bitmap_test(RzBitmap *b, size_t bit)
Definition: bitmap.c:52
RZ_API void rz_bitmap_free(RzBitmap *b)
Definition: bitmap.c:33
RZ_API void rz_bitmap_unset(RzBitmap *b, size_t bit)
Definition: bitmap.c:45
#define b(i)
Definition: sha256.c:42
RBitword * bitmap
Definition: rz_bitmap.h:20
int length
Definition: rz_bitmap.h:19