Annotation of embedaddon/confuse/doc/listing6.c, revision 1.1.1.1

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: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>