v1.0

Dependencies:   Fonts TTF_fonts

Fork of RGB_Matrix by Jack Berkhout

Committer:
perlatecnica
Date:
Tue Jun 20 17:53:58 2017 +0000
Revision:
1:0a1a89c55c7c
v1.0;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
perlatecnica 1:0a1a89c55c7c 1 /* inih -- simple .INI file parser
perlatecnica 1:0a1a89c55c7c 2
perlatecnica 1:0a1a89c55c7c 3 inih is released under the New BSD license (see LICENSE.txt). Go to the project
perlatecnica 1:0a1a89c55c7c 4 home page for more info:
perlatecnica 1:0a1a89c55c7c 5
perlatecnica 1:0a1a89c55c7c 6 http://code.google.com/p/inih/
perlatecnica 1:0a1a89c55c7c 7
perlatecnica 1:0a1a89c55c7c 8 */
perlatecnica 1:0a1a89c55c7c 9
perlatecnica 1:0a1a89c55c7c 10 #ifndef __INI_H__
perlatecnica 1:0a1a89c55c7c 11 #define __INI_H__
perlatecnica 1:0a1a89c55c7c 12
perlatecnica 1:0a1a89c55c7c 13 /* Make this header file easier to include in C++ code */
perlatecnica 1:0a1a89c55c7c 14 #ifdef __cplusplus
perlatecnica 1:0a1a89c55c7c 15 extern "C" {
perlatecnica 1:0a1a89c55c7c 16 #endif
perlatecnica 1:0a1a89c55c7c 17
perlatecnica 1:0a1a89c55c7c 18 /* Parse given INI-style file. May have [section]s, name=value pairs
perlatecnica 1:0a1a89c55c7c 19 (whitespace stripped), and comments starting with ';' (semicolon). Section
perlatecnica 1:0a1a89c55c7c 20 is "" if name=value pair parsed before any section heading.
perlatecnica 1:0a1a89c55c7c 21
perlatecnica 1:0a1a89c55c7c 22 For each name=value pair parsed, call handler function with given user
perlatecnica 1:0a1a89c55c7c 23 pointer as well as section, name, and value (data only valid for duration
perlatecnica 1:0a1a89c55c7c 24 of handler call). Handler should return nonzero on success, zero on error.
perlatecnica 1:0a1a89c55c7c 25
perlatecnica 1:0a1a89c55c7c 26 Returns 0 on success, line number of first error on parse error, or -1 on
perlatecnica 1:0a1a89c55c7c 27 file open error.
perlatecnica 1:0a1a89c55c7c 28 */
perlatecnica 1:0a1a89c55c7c 29 int ini_parse(const char* filename,
perlatecnica 1:0a1a89c55c7c 30 int (*handler)(void* user, const char* section,
perlatecnica 1:0a1a89c55c7c 31 const char* name, const char* value),
perlatecnica 1:0a1a89c55c7c 32 void* user);
perlatecnica 1:0a1a89c55c7c 33
perlatecnica 1:0a1a89c55c7c 34 /* Nonzero to allow multi-line value parsing, in the style of Python's
perlatecnica 1:0a1a89c55c7c 35 ConfigParser. If allowed, ini_parse() will call the handler with the same
perlatecnica 1:0a1a89c55c7c 36 name for each subsequent line parsed. */
perlatecnica 1:0a1a89c55c7c 37 #ifndef INI_ALLOW_MULTILINE
perlatecnica 1:0a1a89c55c7c 38 #define INI_ALLOW_MULTILINE 1
perlatecnica 1:0a1a89c55c7c 39 #endif
perlatecnica 1:0a1a89c55c7c 40
perlatecnica 1:0a1a89c55c7c 41 #ifdef __cplusplus
perlatecnica 1:0a1a89c55c7c 42 }
perlatecnica 1:0a1a89c55c7c 43 #endif
perlatecnica 1:0a1a89c55c7c 44
perlatecnica 1:0a1a89c55c7c 45 #endif /* __INI_H__ */