X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fconf-dump.c;h=0d4092400f52b0da6632885594de3a38b47afcd3;hb=3c3f355f29b9a5706c09829f33bf937385aac3be;hp=073bf129e4cd5096a2a11ca6c1a3dc609a993015;hpb=47a0795e8a28e8ad6ff55cda89e300267d9e590c;p=libucw.git diff --git a/lib/conf-dump.c b/lib/conf-dump.c index 073bf129..0d409240 100644 --- a/lib/conf-dump.c +++ b/lib/conf-dump.c @@ -27,16 +27,16 @@ dump_basic(struct fastbuf *fb, void *ptr, enum cf_type type, union cf_union *u) { switch (type) { case CT_INT: bprintf(fb, "%d ", *(uns*)ptr); break; - case CT_U64: bprintf(fb, "%llu ", *(u64*)ptr); break; + case CT_U64: bprintf(fb, "%llu ", (long long) *(u64*)ptr); break; case CT_DOUBLE: bprintf(fb, "%lg ", *(double*)ptr); break; case CT_IP: bprintf(fb, "%08x ", *(uns*)ptr); break; case CT_STRING: - if (*(byte**)ptr) - bprintf(fb, "'%s' ", *(byte**)ptr); + if (*(char**)ptr) + bprintf(fb, "'%s' ", *(char**)ptr); else bprintf(fb, "NULL "); break; - case CT_LOOKUP: bprintf(fb, "%s ", *(int*)ptr >= 0 ? u->lookup[ *(int*)ptr ] : (byte*) "???"); break; + case CT_LOOKUP: bprintf(fb, "%s ", *(int*)ptr >= 0 ? u->lookup[ *(int*)ptr ] : "???"); break; case CT_USER: if (u->utype->dumper) u->utype->dumper(fb, ptr); @@ -48,12 +48,12 @@ dump_basic(struct fastbuf *fb, void *ptr, enum cf_type type, union cf_union *u) static void dump_section(struct fastbuf *fb, struct cf_section *sec, int level, void *ptr); -static byte *class_names[] = { "end", "static", "dynamic", "parser", "section", "list", "bitmap" }; +static char *class_names[] = { "end", "static", "dynamic", "parser", "section", "list", "bitmap" }; static void dump_item(struct fastbuf *fb, struct cf_item *item, int level, void *ptr) { - ptr += (addr_int_t) item->ptr; + ptr += (uintptr_t) item->ptr; enum cf_type type = item->type; uns size = cf_type_size(item->type, item->u.utype); int i;