#include "lib/lib.h"
#include "lib/conf2.h"
#include "lib/clists.h"
+#include "lib/fastbuf.h"
#include <stdlib.h>
#include <stdio.h>
static struct sub_sect_1 sec1 = { {}, "Charlie", "WBAFC", { 0, -1} };
static struct clist secs;
static time_t t1, t2;
+static u32 ip;
static byte *
init_top(void *ptr UNUSED)
CF_INT_DYN("nrs1", &nrs1, 1000),
CF_INT_ARY("nrs2", nrs2, 5),
CF_STRING("str1", &str1),
- CF_STRING_DYN("str2", &str2, 2),
+ CF_STRING_DYN("str2", &str2, 20),
CF_U64("u1", &u1),
CF_DOUBLE("d1", &d1),
CF_PARSER("FirstTime", &t1, time_parser, -1),
CF_PARSER("SecondTime", &t2, time_parser, 1),
CF_SECTION("master", &sec1, &cf_sec_1),
CF_LIST("slaves", &secs, &cf_sec_1),
+ CF_IP("ip", &ip),
CF_END
}
};
{
log_init(argv[0]);
cf_declare_section("top", &cf_top, 0);
+ cf_def_file = "lib/conf2.t";
int opt;
while ((opt = cf_get_opt(argc, argv, short_opts, long_opts, NULL)) >= 0)
if (optind < argc)
usage();
+ struct fastbuf *out = bfdopen(1, 1<<14);
+ cf_dump_sections(out);
+ bclose(out);
+
return 0;
}