GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
critbit0_allprefixed(3) FreeBSD Library Functions Manual critbit0_allprefixed(3)

critbit0_allprefixed - search a critbit tree by prefix

#include <libowfat/critbit.h>

critbit0_tree cb = { 0 };

int critbit0_allprefixed(critbit0_tree* cb,const char* prefix, int (*handle)(const char*,void*),void* arg);

critbit0_allprefixed calls the handle function on all members of cb that start with prefix. It passes arg as second argument to handle.

If handle returns 0, the search stops and critbit0_allprefixed returns 0.

If handle returns 1, the search continues and critbit0_allprefixed returns 1 if all keys with the given prefix were handled.

If handle returns something else, the search stops and critbit0_allprefixed returns -1.

This function uses recursion to traverse the tree. It may require nontrivial amounts of available stack space.

1 if all keys were found and handled (or if there were no keys with that prefix).

0 if at least one key was found, handle was called and returned 0.

-1 if at least one key was found, handle was called and returned something other than 0 or 1.

critbit0_contains(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.