/****************************************************************************** File modified by Yohann NICOLAS. NAME INIfile.cpp DESCRIPTION Memory cached INI file read/write class to replace legacy MS code COPYRIGHT ©1999-2004 Ultrafunk (www.ultrafunk.com) - info@ultrafunk.com ******************************************************************************/ #include "INIfile.h" #include "common.h" #include /* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getprivateprofilestring.asp */ /*****************************************************************************/ // Utils LPSTR strstri(LPSTR text, LPSTR string) { if(text && string) { int len = strlen(string); if(len) { while(*text) { if(_strnicmp(string, text, len) == 0) { return text; break; } text++; } } } return NULL; } LPCWSTR strstri(LPCWSTR text, LPCWSTR string) { if (text && string) { int len = wcslen(string); if (len) { while (*text) { if (_wcsnicmp(string, text, len) == 0) { return text; break; } text++; } } } return NULL; } BOOL chrcmp(char c, char *string) { for(unsigned int i=0; i