added simple config parsing utilities
[k8sterm.git] / src / stini.h
blob4e633ac8d2a02a5857d2c111c059f0fe58eb51e0
1 /* See LICENSE for licence details. */
2 #ifndef STINI_H
3 #define STINI_H
6 // parse the argument list
7 // return error message or NULL
8 // format:
9 // '*': skip
10 // 's': string (char *)
11 // 'i': integer (int *)
12 // 'b': boolean (int *)
13 // '|': optional arguments follows
14 // string modifiers:
15 // '!' -- don't allow empty strings
16 // '-' -- trim spaces
17 // int modifiers:
18 // {lo,hi}
19 // {,hi}
20 // {lo}
21 // WARNING! `line` will be modified!
22 // WARNING! string pointers will point INSIDE `line`, so don't discard it!
23 extern const char *iniParseArguments (char *line, const char *fmt, ...);
26 #endif