2015-04-09 19:05:32 +00:00
|
|
|
#ifndef CRITBIT_H_
|
|
|
|
#define CRITBIT_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-11-08 00:29:35 +00:00
|
|
|
#include <libowfat/compiler.h>
|
2015-04-09 23:35:40 +00:00
|
|
|
|
2015-04-09 19:05:32 +00:00
|
|
|
typedef struct {
|
|
|
|
void *root;
|
|
|
|
} critbit0_tree;
|
|
|
|
|
2020-11-08 00:29:35 +00:00
|
|
|
att_pure
|
|
|
|
int critbit0_contains(critbit0_tree *t, const char *u) noexcept;
|
|
|
|
|
|
|
|
int critbit0_insert(critbit0_tree *t, const char *u) noexcept;
|
|
|
|
|
|
|
|
int critbit0_delete(critbit0_tree *t, const char *u) noexcept;
|
|
|
|
|
|
|
|
void critbit0_clear(critbit0_tree *t) noexcept;
|
|
|
|
|
2015-04-09 19:05:32 +00:00
|
|
|
int critbit0_allprefixed(critbit0_tree *t, const char *prefix,
|
2020-11-08 00:29:35 +00:00
|
|
|
int (*handle) (const char *, void *), void *arg) noexcept;
|
2015-04-09 19:05:32 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|