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.
 
 
 
 

22 lines
694 B

  1. .TH critbit0_insert 3
  2. .SH NAME
  3. critbit0_insert \- insert a string into a critbit tree
  4. .SH SYNTAX
  5. .B #include <critbit.h>
  6. critbit0_tree cb = { 0 };
  7. int \fBcritbit0_insert\fP(critbit0_tree* \fIcb\fR,const char* \fIstr\fR);
  8. .SH DESCRIPTION
  9. critbit0_insert attempts to insert a string into a critbit0 tree.
  10. If \fIstr\fR is already in \fIcb\fR, critbit0_insert returns 1.
  11. If \fIstr\fR is not in \fIcb\fR, it is inserted and critbit0_insert
  12. returns 2.
  13. If there is a memory allocation failure on the way, critbit0_insert
  14. leaves \fIcb\fR alone and returns 0.
  15. .SH "RETURN VALUE"
  16. 2 if the key was inserted, 1 if it was already in cb, 0 on memory
  17. allocation failure.
  18. .SH "SEE ALSO"
  19. critbit0_contains(3)