1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00
cnc-ddraw/inc/ini.h

23 lines
616 B
C
Raw Permalink Normal View History

2023-10-14 12:41:52 +02:00
#ifndef INI_H
#define INI_H
2023-10-17 18:13:35 +02:00
typedef struct
{
char filename[MAX_PATH];
struct {
unsigned long hash;
char* data;
}*sections;
} INIFILE;
void ini_create(INIFILE* ini, char* filename);
BOOL ini_section_exists(INIFILE* ini, LPCSTR section);
2023-10-17 18:13:35 +02:00
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);
2023-10-19 00:54:48 +02:00
float ini_get_float(INIFILE* ini, LPCSTR section, LPCSTR key, float def);
2023-10-17 18:13:35 +02:00
void ini_free(INIFILE* ini);
2023-10-14 12:41:52 +02:00
#endif