From: <sp...@us...> - 2004-03-10 12:53:08
|
Update of /cvsroot/rtk/rtk/src/core/platform/epoc32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15429 Added Files: lfind.cpp lfind.h Log Message: lfind is missing in Symbian --- NEW FILE: lfind.cpp --- #include <rtk/Export.h> #include <stdlib.h> /* This is a very ugly implementation of lfind. I had to make this because symbian lacks lfind. */ void *lfind(const void *key, const void *base, size_t *nmemb, size_t size, int(*compar)(const void *, const void *)) { const unsigned char * ptr = (const unsigned char *)base; for(unsigned int i = 0; i < *nmemb; i++){ if (compar(ptr, key)) return (void*)ptr; ptr += size; } return NULL; } --- NEW FILE: lfind.h --- void *lfind(const void *key, const void *base, size_t *nmemb, size_t size, int(*compar)(const void *, const void *)); |