added 3dengfx into the repo, probably not the correct version for this
[summerhack] / src / 3dengfx / src / common / config_parser.h
1 #ifndef _CONFIG_PARSER_H_
2 #define _CONFIG_PARSER_H_
3
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif  /* _cplusplus */
8
9
10 enum ParserState {
11         PS_AssignmentSymbol,
12         PS_CommentSymbol,
13         PS_Seperators,
14         PS_MaxLineLen
15 };
16
17 #define CFGOPT_INT      1
18 #define CFGOPT_FLT      2
19         
20 struct ConfigOption {
21         char *option, *str_value;
22         int int_value;
23         float flt_value;
24         unsigned short flags;
25 };
26
27 void set_parser_state(enum ParserState state, long value);
28 int load_config_file(const char *fname);
29 const struct ConfigOption *get_next_option();
30 void destroy_config_parser();
31
32
33 #ifdef __cplusplus
34 }
35 #endif  /* _cplusplus */
36
37 #endif  /* _CONFIG_PARSER_H_ */