File:  [DVB] / dietlibc / lib / hcreate.c
Revision 1.1: download - view: text, annotated - select for diffs
Sun Oct 12 21:38:40 2014 UTC (9 years, 7 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
  add implementation of hsearch and friends

#include <search.h>

static struct hsearch_data hd;

int hcreate(size_t count) {
  return hcreate_r(count,&hd);
}

void hdestroy(void) {
  hdestroy_r(&hd);
}

ENTRY* hsearch(ENTRY item, ACTION action) {
  ENTRY* x;
  if (hsearch_r(item,action,&x,&hd))
    return x;
  return NULL;
}

LinuxTV legacy CVS <linuxtv.org/cvs>