diff --git a/GNUmakefile b/GNUmakefile index 68b4ef2..955a73a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -176,7 +176,7 @@ INCLUDES=buffer.h byte.h fmt.h ip4.h ip6.h mmap.h scan.h socket.h str.h stralloc uint16.h uint32.h uint64.h open.h textcode.h tai.h taia.h dns.h iopause.h case.h \ openreadclose.h readclose.h ndelay.h array.h io.h safemult.h iob.h havealloca.h \ errmsg.h cdb.h cdb_make.h rangecheck.h iarray.h va_narg.h isset.h \ -compiletimeassert.h +compiletimeassert.h critbit.h install-inc: install -d $(INCLUDEDIR) diff --git a/critbit/critbit0_allprefixed.3 b/critbit/critbit0_allprefixed.3 index e095de8..ba64aac 100644 --- a/critbit/critbit0_allprefixed.3 +++ b/critbit/critbit0_allprefixed.3 @@ -21,6 +21,9 @@ returns 1 if all keys with the given prefix were handled. If \fIhandle\fR returns something else, the search stops and critbit0_allprefixed returns -1. +.SH "NOTE" +This function uses recursion to traverse the tree. It may require +nontrivial amounts of available stack space. .SH "RETURN VALUE" 1 if all keys were found and handled (or if there were no keys with that prefix). diff --git a/critbit/critbit0_clear.3 b/critbit/critbit0_clear.3 index 486bbb7..4799470 100644 --- a/critbit/critbit0_clear.3 +++ b/critbit/critbit0_clear.3 @@ -10,6 +10,9 @@ void \fBcritbit0_clear\fP(critbit0_tree* \fIcb\fR); .SH DESCRIPTION critbit0_clear deletes all keys in \fIcb\fR and frees all memory associated with it. +.SH "NOTE" +This function uses recursion to traverse the tree. It may require +nontrivial amounts of available stack space. .SH "RETURN VALUE" none. .SH "SEE ALSO" diff --git a/critbit/critbit0_insert.3 b/critbit/critbit0_insert.3 index 13b409a..bc7b0c5 100644 --- a/critbit/critbit0_insert.3 +++ b/critbit/critbit0_insert.3 @@ -8,7 +8,9 @@ critbit0_tree cb = { 0 }; int \fBcritbit0_insert\fP(critbit0_tree* \fIcb\fR,const char* \fIstr\fR); .SH DESCRIPTION -critbit0_insert attempts to insert a string into a critbit0 tree. +critbit0_insert attempts to insert a string into a critbit0 tree. For +this it does not insert a copy of the pointer but makes a copy of the +whole string. If \fIstr\fR is already in \fIcb\fR, critbit0_insert returns 1. If \fIstr\fR is not in \fIcb\fR, it is inserted and critbit0_insert returns 2.