💾 Archived View for gmi.noulin.net › gitRepositories › ini › file › src › ini.h.gmi captured on 2023-01-29 at 13:20:31. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
ini.h (792B)
1 #ifndef _INI_H_ 2 #define _INI_H_ 3 4 #include "libsheepyObject.h" 5 6 #define BUFFER_SIZE 16384 7 8 /** 9 * @brief Parse an ini file. 10 * @details Parse an ini file. Passes values to a callback function. 11 * No dynamic memory is allocated. 12 * 13 * @param fp Open file pointer to read INI file from 14 * @param callback Callback function accepting three arguments: 15 * section, variable, and value strings. 16 * @return 0 on success, error code on failure 17 */ 18 int ini_parse_file(FILE* fp, int (*callback)(char* section, char* variable, char* value)); 19 20 smallDictt *parseIni(const char *filename); 21 bool saveIni(smallDictt *ini, const char *path); 22 #endif 23 24 #define isIniCompiledWithCurrentLisheepyVersion checkLibsheepyVersionIni(LIBSHEEPY_VERSION) 25 bool checkLibsheepyVersionIni(const char *currentLibsheepyVersion);