wget2 2.1.0
Loading...
Searching...
No Matches
bitmap.c File Reference

(2024-03-29 16:10:06 +0000, (build 5bd0af6))

Functions for bitmap. More...

#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <wget.h>
#include "private.h"
Include dependency graph for bitmap.c:

Data Structures

struct  wget_bitmap_st
 

Macros

#define bitmap_type   uint64_t
 
#define bitmap_bits   (sizeof(bitmap_type) * 8)
 
#define bitmap_shift   6
 
#define map(n)   (((wget_bitmap *)b)->map[(n) >> bitmap_shift])
 
#define bit(n)   (((bitmap_type) 1) << ((n) & (bitmap_bits - 1)))
 

Functions

void wget_bitmap_set (wget_bitmap *b, unsigned n)
 
void wget_bitmap_clear (wget_bitmap *b, unsigned n)
 
bool wget_bitmap_get (const wget_bitmap *b, unsigned n)
 
int wget_bitmap_init (wget_bitmap **b, unsigned bits)
 
void wget_bitmap_free (wget_bitmap **b)
 

Detailed Description

Functions for bitmap.