/****************************************************************************** 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 #include "INIfile.h" #include "d2functions.h" #include "error.h" /* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getprivateprofilestring.asp */ /*****************************************************************************/ // First a few support routines static char *strstri(char *text, char *string) { char *found = NULL; if(text && string) { int len = strlen(string); if(len) { while(*text) { if(strnicmp(string, text, len) == 0) { found = text; break; } text++; } } } return found; } static BOOL chrcmp(char c, char *string) { for(unsigned int i=0; i