Commit ab22677e authored by Lubos Slovak's avatar Lubos Slovak

Common library separated.

This includes:
- base32 encoding
- dynamic array
- skip-list
- latency profiling
- print routines
- Bird list
- Slab allocator
- AVL tree

refs #400
parent 9bac0d95
...@@ -2,11 +2,26 @@ Doxy.page.h ...@@ -2,11 +2,26 @@ Doxy.page.h
CodingStyle CodingStyle
Makefile.am Makefile.am
src/Makefile.am src/Makefile.am
src/alloc/malloc.c src/common/slab/malloc.c
src/alloc/malloc.h src/common/slab/malloc.h
src/alloc/slab.c src/common/slab/slab.c
src/alloc/slab.h src/common/slab/slab.h
src/alloc/alloc-common.h src/common/slab/alloc-common.h
src/common/lists.h
src/common/lists.c
src/common/base32.h
src/common/base32.c
src/common/print.c
src/common/print.h
src/common/latency.c
src/common/latency.h
src/common/dynamic-array.c
src/common/dynamic-array.h
src/common/skip-list.c
src/common/skip-list.h
src/common/tree.h
src/common/base32hex.h
src/common/base32hex.c
src/dnslib/dnslib-common.h src/dnslib/dnslib-common.h
src/dnslib/dname.h src/dnslib/dname.h
src/dnslib/dname.c src/dnslib/dname.c
...@@ -42,13 +57,6 @@ src/dnslib/zone-load.c ...@@ -42,13 +57,6 @@ src/dnslib/zone-load.c
src/dnslib/zone-load.h src/dnslib/zone-load.h
src/dnslib/zone-dump-text.h src/dnslib/zone-dump-text.h
src/dnslib/zone-dump-text.c src/dnslib/zone-dump-text.c
src/dnslib/ext/dynamic-array.c
src/dnslib/ext/dynamic-array.h
src/dnslib/ext/skip-list.c
src/dnslib/ext/skip-list.h
src/dnslib/ext/tree.h
src/dnslib/ext/base32hex.h
src/dnslib/ext/base32hex.c
src/dnslib/hash/cuckoo-hash-table.c src/dnslib/hash/cuckoo-hash-table.c
src/dnslib/hash/cuckoo-hash-table.h src/dnslib/hash/cuckoo-hash-table.h
src/dnslib/hash/hash-functions.c src/dnslib/hash/hash-functions.c
...@@ -71,19 +79,9 @@ src/knot/main.c ...@@ -71,19 +79,9 @@ src/knot/main.c
src/knot/ctl/knotc_main.c src/knot/ctl/knotc_main.c
src/knot/ctl/process.c src/knot/ctl/process.c
src/knot/ctl/process.h src/knot/ctl/process.h
src/knot/lib/bitset.c
src/knot/lib/bitset.h
src/knot/lib/lists.h
src/knot/lib/lists.c
src/knot/lib/base32.h
src/knot/lib/base32.c
src/knot/other/debug.h src/knot/other/debug.h
src/knot/other/log.c src/knot/other/log.c
src/knot/other/log.h src/knot/other/log.h
src/knot/other/print.c
src/knot/other/print.h
src/knot/other/latency.c
src/knot/other/latency.h
src/knot/stat/gatherer.c src/knot/stat/gatherer.c
src/knot/stat/gatherer.h src/knot/stat/gatherer.h
src/knot/stat/stat.h src/knot/stat/stat.h
......
...@@ -70,21 +70,27 @@ knotd_SOURCES = \ ...@@ -70,21 +70,27 @@ knotd_SOURCES = \
noinst_LTLIBRARIES = libknot.la noinst_LTLIBRARIES = libknot.la
libknot_la_SOURCES = \ libknot_la_SOURCES = \
alloc/slab.c \ common/slab/slab.c \
alloc/malloc.c \ common/slab/malloc.c \
alloc/slab.h \ common/slab/slab.h \
alloc/malloc.h \ common/slab/malloc.h \
common/lists.c \
common/base32.c \
common/lists.h \
common/base32.h \
common/print.c \
common/print.h \
common/dynamic-array.c \
common/skip-list.c \
common/base32hex.c \
common/skip-list.h \
common/dynamic-array.h \
common/tree.h \
common/base32hex.h \
knot/stat/gatherer.c \ knot/stat/gatherer.c \
knot/stat/stat.c \ knot/stat/stat.c \
knot/stat/gatherer.h \ knot/stat/gatherer.h \
knot/stat/stat.h \ knot/stat/stat.h \
dnslib/ext/dynamic-array.c \
dnslib/ext/skip-list.c \
dnslib/ext/base32hex.c \
dnslib/ext/skip-list.h \
dnslib/ext/dynamic-array.h \
dnslib/ext/tree.h \
dnslib/ext/base32hex.h \
dnslib/edns.c \ dnslib/edns.c \
dnslib/utils.c \ dnslib/utils.c \
dnslib/rrset.c \ dnslib/rrset.c \
...@@ -124,15 +130,7 @@ libknot_la_SOURCES = \ ...@@ -124,15 +130,7 @@ libknot_la_SOURCES = \
dnslib/debug.h \ dnslib/debug.h \
dnslib/nsec3.h \ dnslib/nsec3.h \
knot/common.h \ knot/common.h \
knot/lib/lists.c \
knot/lib/bitset.c \
knot/lib/base32.c \
knot/lib/lists.h \
knot/lib/bitset.h \
knot/lib/base32.h \
knot/other/log.c \ knot/other/log.c \
knot/other/print.c \
knot/other/print.h \
knot/other/log.h \ knot/other/log.h \
knot/other/debug.h \ knot/other/debug.h \
knot/conf/cf-parse.y \ knot/conf/cf-parse.y \
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <urcu.h> #include <urcu.h>
//#include "common.h" //#include "common.h"
#include "dnslib/ext/dynamic-array.h" #include "common/dynamic-array.h"
#ifndef ERR_ALLOC_FAILED #ifndef ERR_ALLOC_FAILED
#define ERR_ALLOC_FAILED fprintf(stderr, "Allocation failed at %s:%d\n", \ #define ERR_ALLOC_FAILED fprintf(stderr, "Allocation failed at %s:%d\n", \
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* \addtogroup data_structures * \addtogroup data_structures
* @{ * @{
*/ */
#ifndef _KNOT_DYNAMIC_ARRAY_H_ #ifndef _KNOT_COMMON_DYNAMIC_ARRAY_H_
#define _KNOT_DYNAMIC_ARRAY_H_ #define _KNOT_COMMON_DYNAMIC_ARRAY_H_
#include <string.h> #include <string.h>
#include <pthread.h> #include <pthread.h>
...@@ -135,6 +135,6 @@ uint da_get_count(const da_array_t *array); ...@@ -135,6 +135,6 @@ uint da_get_count(const da_array_t *array);
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
#endif /* _KNOT_DYNAMIC_ARRAY_H_ */ #endif /* _KNOT_COMMON_DYNAMIC_ARRAY_H_ */
/*! @} */ /*! @} */
#ifndef _LATENCYPROF_H_ #ifndef _KNOT_COMMON_LATENCY_H_
#define _LATENCYPROF_H_ #define _KNOT_COMMON_LATENCY_H_
/* Optional. */ /* Optional. */
#ifdef PROF_LATENCY #ifdef PROF_LATENCY
...@@ -40,4 +40,4 @@ int pf_pthread_mutex_unlock(pthread_mutex_t *mutex, ...@@ -40,4 +40,4 @@ int pf_pthread_mutex_unlock(pthread_mutex_t *mutex,
pf_pthread_mutex_unlock(m, __FUNCTION__, __FILE__, __LINE__) pf_pthread_mutex_unlock(m, __FUNCTION__, __FILE__, __LINE__)
#endif // PROF_LATENCY #endif // PROF_LATENCY
#endif // _LATENCYPROF_H_ #endif // _KNOT_COMMON_LATENCY_H_
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define _BIRD_LISTS_C_ #define _BIRD_LISTS_C_
#include <stdlib.h> #include <stdlib.h>
#include "knot/lib/lists.h" #include "common/lists.h"
/** /**
* add_tail - append a node to a list * add_tail - append a node to a list
......
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include "knot/common.h"
#include "print.h" #include "print.h"
#include "log.h"
void hex_printf(const char *data, int length, printf_t print_handler) void hex_printf(const char *data, int length, printf_t print_handler)
{ {
...@@ -19,16 +17,6 @@ void hex_print(const char *data, int length) ...@@ -19,16 +17,6 @@ void hex_print(const char *data, int length)
hex_printf(data, length, &printf); hex_printf(data, length, &printf);
} }
void hex_log(int source, const char *data, int length)
{
int ptr = 0;
for (; ptr < length; ptr++) {
log_msg(source, LOG_DEBUG, "0x%02x ",
(unsigned char)*(data + ptr));
}
log_msg(source, LOG_DEBUG, "\n");
}
void bit_printf(const char *data, int length, printf_t print_handler) void bit_printf(const char *data, int length, printf_t print_handler)
{ {
unsigned char mask = 0x01; unsigned char mask = 0x01;
......
...@@ -12,15 +12,14 @@ ...@@ -12,15 +12,14 @@
* @{ * @{
*/ */
#ifndef _KNOT_PRINT_H_ #ifndef _KNOT_COMMON_PRINT_H_
#define _KNOT_PRINT_H_ #define _KNOT_COMMON_PRINT_H_
typedef int (*printf_t)(const char *fmt, ...); typedef int (*printf_t)(const char *fmt, ...);
/* Hex-value printing. /* Hex-value printing.
*/ */
void hex_log(int source, const char *data, int length);
void hex_print(const char *data, int length); void hex_print(const char *data, int length);
void hex_printf(const char *data, int length, printf_t print_handler); void hex_printf(const char *data, int length, printf_t print_handler);
...@@ -30,6 +29,6 @@ void hex_printf(const char *data, int length, printf_t print_handler); ...@@ -30,6 +29,6 @@ void hex_printf(const char *data, int length, printf_t print_handler);
void bit_print(const char *data, int length); void bit_print(const char *data, int length);
void bit_printf(const char *data, int length, printf_t print_handler); void bit_printf(const char *data, int length, printf_t print_handler);
#endif /* _KNOT_PRINT_H_ */ #endif /* _KNOT_COMMON_PRINT_H_ */
/*! @} */ /*! @} */
...@@ -36,7 +36,7 @@ Retrieved from: http://en.literateprograms.org/Skip_list_(C)?oldid=12811 ...@@ -36,7 +36,7 @@ Retrieved from: http://en.literateprograms.org/Skip_list_(C)?oldid=12811
#include <assert.h> #include <assert.h>
//#include "common.h" //#include "common.h"
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
#define ERR_ALLOC_FAILED fprintf(stderr, "Allocation failed at %s:%d\n", \ #define ERR_ALLOC_FAILED fprintf(stderr, "Allocation failed at %s:%d\n", \
__FILE__, __LINE__) __FILE__, __LINE__)
......
...@@ -41,8 +41,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ...@@ -41,8 +41,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Retrieved from: http://en.literateprograms.org/Skip_list_(C)?oldid=12811 Retrieved from: http://en.literateprograms.org/Skip_list_(C)?oldid=12811
*/ */
#ifndef _KNOT_SKIP_LIST_H_ #ifndef _KNOT_COMMON_SKIP_LIST_H_
#define _KNOT_SKIP_LIST_H_ #define _KNOT_COMMON_SKIP_LIST_H_
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/*! /*!
...@@ -196,6 +196,6 @@ const skip_node_t *skip_next(const skip_node_t *node); ...@@ -196,6 +196,6 @@ const skip_node_t *skip_next(const skip_node_t *node);
void skip_print_list(const skip_list_t *list, void skip_print_list(const skip_list_t *list,
void (*print_item)(void *, void *)); void (*print_item)(void *, void *));
#endif /* _KNOT_SKIP_LIST_H_ */ #endif /* _KNOT_COMMON_SKIP_LIST_H_ */
/*! \} */ /*! \} */
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
* \addtogroup alloc * \addtogroup alloc
* @{ * @{
*/ */
#ifndef _KNOT_ALLOC_COMMON_H_ #ifndef _KNOT_COMMON_ALLOC_COMMON_H_
#define _KNOT_ALLOC_COMMON_H_ #define _KNOT_COMMON_ALLOC_COMMON_H_
#include <stdio.h> #include <stdio.h>
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
#endif #endif
#endif /* _KNOT_ALLOC_COMMON_H_ */ #endif /* _KNOT_COMMON_ALLOC_COMMON_H_ */
/*! @} */ /*! @} */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <string.h> #include <string.h>
#include <sys/resource.h> #include <sys/resource.h>
#include "alloc/alloc-common.h" #include "common/slab/alloc-common.h"
#ifdef MEM_DEBUG #ifdef MEM_DEBUG
/* /*
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* @{ * @{
*/ */
#ifndef __KNOT_MALLOC_H__ #ifndef _KNOT_COMMON_MALLOC_H_
#define __KNOT_MALLOC_H__ #define _KNOT_COMMON_MALLOC_H_
#include <stdlib.h> #include <stdlib.h>
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
*/ */
void usage_dump(); void usage_dump();
#endif #endif // _KNOT_COMMON_MALLOC_H_
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <sys/mman.h> #include <sys/mman.h>
#include "alloc/alloc-common.h" #include "common/slab/alloc-common.h"
#include "alloc/slab.h" #include "common/slab/slab.h"
/* Magic constants. /* Magic constants.
*/ */
......
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
* @{ * @{
*/ */
#ifndef _KNOT_SLAB_H_ #ifndef _KNOT_COMMON_SLAB_H_
#define _KNOT_SLAB_H_ #define _KNOT_COMMON_SLAB_H_
#include <pthread.h> #include <pthread.h>
#include <stdint.h> #include <stdint.h>
...@@ -329,6 +329,6 @@ void *slab_alloc_realloc(slab_alloc_t* alloc, void *ptr, size_t size); ...@@ -329,6 +329,6 @@ void *slab_alloc_realloc(slab_alloc_t* alloc, void *ptr, size_t size);
*/ */
void slab_alloc_stats(slab_alloc_t* alloc); void slab_alloc_stats(slab_alloc_t* alloc);
#endif /* _KNOT_SLAB_H_ */ #endif /* _KNOT_COMMON_SLAB_H_ */
/*! \} */ /*! \} */
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/* Memory cache. /* Memory cache.
*/ */
#include "alloc/slab.h" #include "common/slab/slab.h"
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
static pthread_key_t dname_ckey; static pthread_key_t dname_ckey;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "dnslib/debug.h" #include "dnslib/debug.h"
#include "dnslib/hash/cuckoo-hash-table.h" #include "dnslib/hash/cuckoo-hash-table.h"
#include "dnslib/hash/hash-functions.h" #include "dnslib/hash/hash-functions.h"
#include "dnslib/ext/dynamic-array.h" #include "common/dynamic-array.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Macros and inline functions */ /* Macros and inline functions */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <pthread.h> #include <pthread.h>
#include "dnslib/hash/universal-system.h" #include "dnslib/hash/universal-system.h"
#include "dnslib/ext/dynamic-array.h" #include "common/dynamic-array.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#include "dnslib-common.h" #include "dnslib-common.h"
#include "dnslib/node.h" #include "dnslib/node.h"
#include "dnslib/rrset.h" #include "dnslib/rrset.h"
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
#include "dnslib/ext/tree.h" #include "common/tree.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#define _KNOT_DNSLIB_NODE_H_ #define _KNOT_DNSLIB_NODE_H_
#include "dnslib/dname.h" #include "dnslib/dname.h"
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
#include "dnslib/rrset.h" #include "dnslib/rrset.h"
#include "dnslib/ext/tree.h" #include "common/tree.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/*! /*!
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include "dnslib.h" #include "dnslib.h"
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
/* TODO max length of alg */ /* TODO max length of alg */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "dnslib/zone-dump.h" #include "dnslib/zone-dump.h"
#include "dnslib/dnslib.h" #include "dnslib/dnslib.h"
#include "dnslib/debug.h" #include "dnslib/debug.h"
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
/* \note For space and speed purposes, dname ID (to be later used in loading) /* \note For space and speed purposes, dname ID (to be later used in loading)
* is being stored in dname->node field. Not to be confused with dname's actual * is being stored in dname->node field. Not to be confused with dname's actual
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include "dnslib/nsec3.h" #include "dnslib/nsec3.h"
#include "dnslib/debug.h" #include "dnslib/debug.h"
#include "dnslib/utils.h" #include "dnslib/utils.h"
#include "dnslib/ext/tree.h" #include "common/tree.h"
#include "dnslib/ext/base32hex.h" #include "common/base32hex.h"
#include "dnslib/hash/cuckoo-hash-table.h" #include "dnslib/hash/cuckoo-hash-table.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "dnslib/node.h" #include "dnslib/node.h"
#include "dnslib/dname.h" #include "dnslib/dname.h"
#include "dnslib/nsec3.h" #include "dnslib/nsec3.h"
#include "dnslib/ext/tree.h" #include "common/tree.h"
#include "dnslib/hash/cuckoo-hash-table.h" #include "dnslib/hash/cuckoo-hash-table.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "dnslib/dname.h" #include "dnslib/dname.h"
#include "dnslib/node.h" #include "dnslib/node.h"
#include "dnslib/debug.h" #include "dnslib/debug.h"
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Non-API functions */ /* Non-API functions */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifndef _KNOT_DNSLIB_ZONEDB_H_ #ifndef _KNOT_DNSLIB_ZONEDB_H_
#define _KNOT_DNSLIB_ZONEDB_H_ #define _KNOT_DNSLIB_ZONEDB_H_
#include "dnslib/ext/skip-list.h" #include "common/skip-list.h"
#include "dnslib/zone.h" #include "dnslib/zone.h"
#include "dnslib/node.h" #include "dnslib/node.h"
#include "dnslib/dname.h" #include "dnslib/dname.h"
......
...@@ -46,8 +46,8 @@ typedef unsigned int uint; ...@@ -46,8 +46,8 @@ typedef unsigned int uint;
/* Common includes. /* Common includes.
*/ */
#include "knot/other/latency.h" #include "common/latency.h"
#include "knot/other/print.h" #include "common/print.h"
#include "knot/other/log.h" #include "knot/other/log.h"
#include "knot/other/debug.h" #include "knot/other/debug.h"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include "dnslib/descriptor.h" #include "dnslib/descriptor.h"
#include "knot/lib/lists.h" #include "common/lists.h"
#include "knot/other/log.h" #include "knot/other/log.h"
/* Constants. */ /* Constants. */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "knot/conf/logconf.h" #include "knot/conf/logconf.h"
#include "knot/conf/conf.h" #include "knot/conf/conf.h"
#include "knot/other/log.h" #include "knot/other/log.h"
#include "knot/lib/lists.h" #include "common/lists.h"
int log_conf_hook(const struct conf_t *conf) int log_conf_hook(const struct conf_t *conf)
{ {
......
#include <config.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include "knot/lib/bitset.h"
#define WORD_SIZE 32
#define WORD_CHECK 31
static unsigned int size = 0;
//static bitset_t clear = NULL;
void BITSET_CREATE( bitset_t *bitset, unsigned int n )
{
size = ((n >> WORD_EXP) + 1) * sizeof(uint32_t);
*bitset = (bitset_t)malloc(size);
//clear = (bitset_t)malloc(size);
//memset(clear, 0, size);
}
void BITSET_DESTROY( bitset_t *bitset )
{
assert(size > 0);
free(*bitset);
*bitset = NULL;
}
void BITSET_SET( bitset_t bitset, unsigned int i )
{
assert(size > 0);
bitset[((unsigned)i) >> WORD_EXP]
|= (1 << (((unsigned)i) & WORD_CHECK));
}
void BITSET_UNSET( bitset_t bitset, unsigned int i )
{
assert(size > 0);
bitset[((unsigned)i) >> WORD_EXP]
&= ~(1 << (((unsigned)i) & WORD_CHECK));
}
unsigned int BITSET_GET( bitset_t bitset, unsigned int i )
{
assert(size > 0);
return bitset[((unsigned)i) >> WORD_EXP]
& (1 << (((unsigned)i) & WORD_CHECK));
}
unsigned int BITSET_ISSET( bitset_t bitset, unsigned int i )
{
assert(size > 0);
return BITSET_GET(bitset, i) != 0;
//return 0;
}
void BITSET_CLEAR( bitset_t bitset, unsigned int n )
{
assert(size > 0);
memset(bitset, 0, size);
//memcpy(bitset, clear, size);
}
#ifndef BITSET
#define BITSET
#include <stdint.h> /* uint32_t */
#define WORD_EXP 5
typedef uint32_t* bitset_t;
void BITSET_CREATE( bitset_t *bitset, unsigned int n );
void BITSET_DESTROY( bitset_t *bitset );
void BITSET_SET( bitset_t bitset, unsigned int i );
void BITSET_UNSET( bitset_t bitset, unsigned int i );
unsigned int BITSET_GET( bitset_t bitset, unsigned int i );
unsigned int BITSET_ISSET( bitset_t bitset, unsigned int i );
void BITSET_CLEAR( bitset_t bitset, unsigned int n );
#endif /* BITSET */
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#define _KNOT_DEBUG_H_ #define _KNOT_DEBUG_H_
#include "knot/other/log.h" #include "knot/other/log.h"
#include "knot/other/print.h"