#include <stdio.h>
#include <aitcfg.h>
int
main(int argc, char **argv)
{
cfg_root_t cfg;
FILE *f;
if (cfgInitConfig(&cfg)) {
printf("Error:: #%d - %s\n", cfg_GetErrno(), cfg_GetError());
return 1;
}
f = fopen("test_lines.txt", "r");
if (!f) {
cfgUnloadConfig(&cfg);
return 2;
} else {
if (argc > 1)
cfgReadLines(f, argv[1], "\r\n", &cfg);
else
cfgReadLines(f, ":", "\r\n", &cfg);
fclose(f);
}
cfgWriteConfig(stdout, &cfg, 0);
cfgUnloadConfig(&cfg);
return 0;
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>