improve ini reader performance
This commit is contained in:
parent
488d4ea567
commit
d7ed6bd7bc
4 changed files with 182 additions and 50 deletions
16
inc/ini.h
16
inc/ini.h
|
@ -1,6 +1,20 @@
|
|||
#ifndef INI_H
|
||||
#define INI_H
|
||||
|
||||
BOOL ini_section_exists(char* section);
|
||||
typedef struct
|
||||
{
|
||||
char filename[MAX_PATH];
|
||||
|
||||
struct {
|
||||
unsigned long hash;
|
||||
char* data;
|
||||
}*sections;
|
||||
} INIFILE;
|
||||
|
||||
void ini_create(INIFILE* ini, char* filename);
|
||||
DWORD ini_get_string(INIFILE* ini, LPCSTR section, LPCSTR key, LPCSTR def, LPSTR buf, DWORD size);
|
||||
BOOL ini_get_bool(INIFILE* ini, LPCSTR section, LPCSTR key, BOOL def);
|
||||
int ini_get_int(INIFILE* ini, LPCSTR section, LPCSTR key, int def);
|
||||
void ini_free(INIFILE* ini);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue