diff --git a/CMakeLists.txt b/CMakeLists.txt index e571400d5..626686e5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,6 @@ set(HEADERS include/re_av1.h include/re_base64.h include/re_bfcp.h - include/re_bitv.h include/re_btrace.h include/re_conf.h include/re_convert.h diff --git a/include/re_bitv.h b/include/re_bitv.h deleted file mode 100644 index 7ed774add..000000000 --- a/include/re_bitv.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file re_bitv.h Interface to Bit Vector functions - * - * Copyright (C) 2010 Creytiv.com - */ - - -typedef unsigned long bitv_t; - -enum { - BITS_SZ = (8*sizeof(bitv_t)), - BITS_MASK = (BITS_SZ-1) -}; - -#define BITV_NELEM(nbits) (((nbits) + (BITS_SZ) - 1) / (BITS_SZ)) -#define BITV_DECL(name, nbits) bitv_t (name)[BITV_NELEM(nbits)] - - -static inline uint32_t index2offset(uint32_t i) -{ - return i/BITS_SZ; -} - -static inline bitv_t index2bit(uint32_t i) -{ - return (bitv_t)1<<(i & BITS_MASK); -} - - -/* - * Public API - */ - - -static inline void bitv_init(bitv_t *bv, uint32_t nbits, bool val) -{ - memset(bv, val?0xff:0x00, BITV_NELEM(nbits)*sizeof(bitv_t)); -} - -static inline void bitv_set(bitv_t *bv, uint32_t i) -{ - bv[index2offset(i)] |= index2bit(i); -} - -static inline void bitv_clr(bitv_t *bv, uint32_t i) -{ - bv[index2offset(i)] &= ~index2bit(i); -} - -static inline void bitv_assign(bitv_t *bv, uint32_t i, bool val) -{ - if (val) - bitv_set(bv, i); - else - bitv_clr(bv, i); -} - -static inline bool bitv_val(const bitv_t *bv, uint32_t i) -{ - return 0 != (bv[index2offset(i)] & index2bit(i)); -} - -static inline void bitv_toggle(bitv_t *bv, uint32_t i) -{ - bv[index2offset(i)] ^= index2bit(i); -} - -static inline void bitv_assign_range(bitv_t *bv, uint32_t i, uint32_t n, - bool val) -{ - while (n--) - bitv_assign(bv, i+n, val); -} diff --git a/mk/Doxyfile b/mk/Doxyfile index 551c69b83..ae1373882 100644 --- a/mk/Doxyfile +++ b/mk/Doxyfile @@ -88,7 +88,6 @@ FILE_PATTERNS = *.c \ *.dox RECURSIVE = YES EXCLUDE = test.c \ - include/re_bitv.h \ src/md5/md5.h src/md5/md5.c EXCLUDE_SYMLINKS = NO