Return to listing6.c CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / confuse / doc |
1.1 misho 1: #include <stdio.h> 2: #include <confuse.h> 3: 4: int main(void) 5: { 6: /* ... setup options ... */ 7: 8: cfg = cfg_init(opts, CFGF_NONE); 9: cfg_parse(cfg, "hello.conf"); 10: 11: if(cfg_size(cfg, "greeting") == 0) 12: { 13: cfg_parse_buf(cfg, "greeting Hello {}"); 14: } 15: 16: /* ... print the greetings ... */ 17: }