#include "bitvector.h"
#include "stdlib.h"
#include "stddef.h"
gehe zum Quellcode dieser Datei
|
bit_vector_t * | bv_create (int len, int nbits) |
|
static void | bv_setbit (const bit_vector_t *bm, int pos, int val) |
|
static int | bv_getbit (const bit_vector_t *bm, int pos) |
|
void | bv_set (const bit_vector_t *bm, int pos, int val) |
|
void | bv_set2 (const bit_vector_t *bm, int pos, int val) |
|
void | bv_set4 (const bit_vector_t *bm, int pos, int val) |
|
int | bv_get (const bit_vector_t *bm, int pos) |
|
void | bv_free (bit_vector_t *bm) |
|
Definiert in Zeile 35 der Datei bitvector.c.
42 int bp = pos - ((pos >> 3) << 3);
43 return (bm->
ptr[pos >> 3] & (1 << bp)) >> bp;
Definiert in Zeile 72 der Datei bitvector.c.
75 int bitpos = pos * bm->
nBits;
76 for (i = 0; i < bm->
nBits; ++i)
78 int t = val & (1 << i);
Definiert in Zeile 25 der Datei bitvector.c.
27 int bp = pos - ((pos >> 3) << 3);
29 bm->
ptr[pos >> 3] &= ~(1 << bp);
31 bm->
ptr[pos >> 3] |= (1 << bp);