Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
bitvec.c File Reference

A simple ADT for bit arrays. More...

#include "../dlib/dlib.h"
#include "bitvec.h"
Include dependency graph for bitvec.c:

Go to the source code of this file.

Functions

bitvec_ta_Bitvec_new (int num_bits)
 Create a new bitvec with 'num_bits' size.
 
void a_Bitvec_clear (bitvec_t *bvec)
 Clear a bitvec.
 
void a_Bitvec_free (bitvec_t *bvec)
 Free a bitvec.
 
int a_Bitvec_get_bit (bitvec_t *bvec, int pos)
 Get a bit.
 
void a_Bitvec_set_bit (bitvec_t *bvec, int pos)
 Set a bit.
 

Detailed Description

A simple ADT for bit arrays.

Definition in file bitvec.c.

Function Documentation

◆ a_Bitvec_clear()

void a_Bitvec_clear ( bitvec_t bvec)

Clear a bitvec.

Definition at line 35 of file bitvec.c.

References BVEC_SIZE, bitvec_t::len, and bitvec_t::vec.

Referenced by a_Dicache_new_scan().

◆ a_Bitvec_free()

void a_Bitvec_free ( bitvec_t bvec)

Free a bitvec.

Definition at line 43 of file bitvec.c.

References dFree(), and bitvec_t::vec.

Referenced by a_Dicache_freeall(), Dicache_remove(), and Image_free().

◆ a_Bitvec_get_bit()

int a_Bitvec_get_bit ( bitvec_t bvec,
int  pos 
)

Get a bit.

Definition at line 54 of file bitvec.c.

References BVEC_SIZE, dReturn_val_if_fail, and bitvec_t::vec.

Referenced by a_Dicache_callback().

◆ a_Bitvec_new()

bitvec_t * a_Bitvec_new ( int  num_bits)

Create a new bitvec with 'num_bits' size.

Definition at line 23 of file bitvec.c.

References BVEC_SIZE, dNew, dNew0, bitvec_t::len, and bitvec_t::vec.

Referenced by a_Dicache_set_parms(), and a_Image_set_parms().

◆ a_Bitvec_set_bit()

void a_Bitvec_set_bit ( bitvec_t bvec,
int  pos 
)

Set a bit.

Definition at line 63 of file bitvec.c.

References BVEC_SIZE, dReturn_if_fail, and bitvec_t::vec.

Referenced by a_Dicache_write(), and a_Image_write().