File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / confuse / doc / listing6.c
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Jan 24 14:48:55 2017 UTC (7 years, 5 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

    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>