#include "lib/lib.h"
#include "lib/conf.h"
#include "lib/getopt.h"
+#include "lib/conf-internal.h"
#include "lib/clists.h"
#include "lib/mempool.h"
#include "lib/chartype.h"
static bb_t path;
-static uns
-type_size(enum cf_type type)
-{
- switch (type)
- {
- case CT_INT: return sizeof(int);
- case CT_U64: return sizeof(u64);
- case CT_DOUBLE: return sizeof(double);
- case CT_STRING: return sizeof(byte *);
- default: ASSERT(0);
- }
-}
-
static void
dump_value(uns array, struct item *item, void *v)
{
{
val = *(void **)val;
uns len = DARY_LEN(val);
- uns size = type_size(item->cf.type);
+ uns size = cf_type_size(item->cf.type, NULL);
for (uns i = 0; i < len; i++, val += size)
dump_value(1, item, val);
}