File: critbit.h

package info (click to toggle)
libowfat 0.30-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 4,180 kB
  • ctags: 1,478
  • sloc: ansic: 15,320; makefile: 22
file content (30 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CRITBIT_H_
#define CRITBIT_H_

#ifdef __cplusplus
extern "C" {
#endif

/* for __pure__ if we are compiling under dietlibc */
#include <stddef.h>

#ifndef __pure__
#define __pure__
#endif

typedef struct {
  void *root;
} critbit0_tree;

int critbit0_contains(critbit0_tree *t, const char *u) __pure__;
int critbit0_insert(critbit0_tree *t, const char *u);
int critbit0_delete(critbit0_tree *t, const char *u);
void critbit0_clear(critbit0_tree *t);
int critbit0_allprefixed(critbit0_tree *t, const char *prefix,
                         int (*handle) (const char *, void *), void *arg);

#ifdef __cplusplus
};
#endif

#endif