Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
1.1 KiB

  1. .TH critbit0_allprefixed 3
  2. .SH NAME
  3. critbit0_allprefixed \- search a critbit tree by prefix
  4. .SH SYNTAX
  5. .B #include <critbit.h>
  6. critbit0_tree cb = { 0 };
  7. int \fBcritbit0_allprefixed\fP(critbit0_tree* \fIcb\fR,const char* \fIprefix\fR,
  8. int (*handle)(const char*,void*),void* arg);
  9. .SH DESCRIPTION
  10. critbit0_allprefixed calls the \fIhandle\fR function on all members of
  11. \fIcb\fR that start with \fIprefix\fR. It passes \fIarg\fR as second
  12. argument to \fIhandle\fR.
  13. If \fIhandle\fR returns 0, the search stops and critbit0_allprefixed
  14. returns 0.
  15. If \fIhandle\fR returns 1, the search continues and critbit0_allprefixed
  16. returns 1 if all keys with the given prefix were handled.
  17. If \fIhandle\fR returns something else, the search stops and
  18. critbit0_allprefixed returns -1.
  19. .SH "RETURN VALUE"
  20. 1 if all keys were found and handled (or if there were no keys with that
  21. prefix).
  22. 0 if at least one key was found, \fIhandle\fR was called and returned 0.
  23. -1 if at least one key was found, \fIhandle\fR was called and returned
  24. something other than 0 or 1.
  25. .SH "SEE ALSO"
  26. critbit0_contains(3)