1 #ifndef __inifile_h__ 2 #define __inifile_h__ 3 4 struct _listparam{ 5 int keylen; 6 char* key; 7 int paramlen; 8 char* param; 9 }; 10 typedef struct _listparam LISTPARAM; 11 12 struct _list{ 13 int num; 14 LISTPARAM* param; 15 }; 16 typedef struct _list LIST; 17 18 struct _hash{ 19 LIST list[256]; 20 }; 21 typedef struct _hash HASH; 22 23 struct _inifile{ 24 FILE* fp; 25 HASH hash; 26 }; 27 typedef struct _inifile INIFILE; 28 29 30 INIFILE* ini_open(const char* filename); 31 void ini_close(INIFILE* ini); 32 const char* ini_getstr(INIFILE* ini, const char* key); 33 34 #endif /* __inifile_h__ */ 35