Clemens Valens
/
LED_panel
32x64 3-color message board http://elektorembedded.blogspot.com/
Embed:
(wiki syntax)
Show/hide line numbers
ini.h
00001 /* inih -- simple .INI file parser 00002 00003 inih is released under the New BSD license (see LICENSE.txt). Go to the project 00004 home page for more info: 00005 00006 http://code.google.com/p/inih/ 00007 00008 */ 00009 00010 #ifndef __INI_H__ 00011 #define __INI_H__ 00012 00013 /* Make this header file easier to include in C++ code */ 00014 #ifdef __cplusplus 00015 extern "C" { 00016 #endif 00017 00018 /* Parse given INI-style file. May have [section]s, name=value pairs 00019 (whitespace stripped), and comments starting with ';' (semicolon). Section 00020 is "" if name=value pair parsed before any section heading. 00021 00022 For each name=value pair parsed, call handler function with given user 00023 pointer as well as section, name, and value (data only valid for duration 00024 of handler call). Handler should return nonzero on success, zero on error. 00025 00026 Returns 0 on success, line number of first error on parse error, or -1 on 00027 file open error. 00028 */ 00029 int ini_parse(const char* filename, 00030 int (*handler)(void* user, const char* section, 00031 const char* name, const char* value), 00032 void* user); 00033 00034 /* Nonzero to allow multi-line value parsing, in the style of Python's 00035 ConfigParser. If allowed, ini_parse() will call the handler with the same 00036 name for each subsequent line parsed. */ 00037 #ifndef INI_ALLOW_MULTILINE 00038 #define INI_ALLOW_MULTILINE 1 00039 #endif 00040 00041 #ifdef __cplusplus 00042 } 00043 #endif 00044 00045 #endif /* __INI_H__ */
Generated on Thu Jul 14 2022 01:11:21 by 1.7.2