1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE
- #endif
- #include <search.h>
- static struct hsearch_data htab;
- ENTRY *hsearch (ENTRY item, ACTION action)
- {
- ENTRY *result;
- (void) hsearch_r (item, action, &result, &htab);
- return result;
- }
- int hcreate (size_t nel)
- {
- return hcreate_r (nel, &htab);
- }
- void hdestroy (void)
- {
- hdestroy_r (&htab);
- }
|