1critbit0_insert(3)         Library Functions Manual         critbit0_insert(3)
2
3
4

NAME

6       critbit0_insert - insert a string into a critbit tree
7

SYNTAX

9       #include <critbit.h>
10
11       critbit0_tree cb = { 0 };
12
13       int critbit0_insert(critbit0_tree* cb,const char* str);
14

DESCRIPTION

16       critbit0_insert  attempts  to insert a string into a critbit0 tree. For
17       this it does not insert a copy of the pointer but makes a copy  of  the
18       whole  string.  If str is already in cb, critbit0_insert returns 1.  If
19       str is not in cb, it is inserted and  critbit0_insert  returns  2.   If
20       there is a memory allocation failure on the way, critbit0_insert leaves
21       cb alone and returns 0.
22

RETURN VALUE

24       2 if the key was inserted, 1 if it was already in cb, 0 on memory allo‐
25       cation failure.
26

SEE ALSO

28       critbit0_contains(3)
29
30
31
32                                                            critbit0_insert(3)
Impressum