X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fconf-dump.c;h=cc5ddb37792953fdc6da29dafad20c1cadf42e9f;hb=0895fc9a44fde521ec31e066cccafd052f2a15a0;hp=cb80db70ca05cd54547f8518bc7d9f7e3f024ab3;hpb=ae7dfec55384883a72867d4877b5283a3c1c8aa1;p=libucw.git diff --git a/ucw/conf-dump.c b/ucw/conf-dump.c index cb80db70..cc5ddb37 100644 --- a/ucw/conf-dump.c +++ b/ucw/conf-dump.c @@ -3,6 +3,7 @@ * * (c) 2001--2006 Robert Spalek * (c) 2003--2012 Martin Mares + * (c) 2014 Pavel Charvat * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -14,6 +15,7 @@ #include #include #include +#include static void spaces(struct fastbuf *fb, uint nr) @@ -43,6 +45,9 @@ dump_basic(struct fastbuf *fb, void *ptr, enum cf_type type, union cf_union *u) else bprintf(fb, "??? "); break; + case CT_XTYPE: + bprintf(fb, "'%s' ", u->xtype->format(ptr, XTYPE_FMT_DEFAULT, cf_get_pool())); + break; } } @@ -55,7 +60,7 @@ dump_item(struct fastbuf *fb, struct cf_item *item, int level, void *ptr) { ptr += (uintptr_t) item->ptr; enum cf_type type = item->type; - uint size = cf_type_size(item->type, item->u.utype); + uint size = cf_type_size(item->type, &item->u); int i; spaces(fb, level); bprintf(fb, "%s: C%s #", item->name, class_names[item->cls]); @@ -64,9 +69,12 @@ dump_item(struct fastbuf *fb, struct cf_item *item, int level, void *ptr) else bprintf(fb, "%d ", item->number); if (item->cls == CC_STATIC || item->cls == CC_DYNAMIC || item->cls == CC_BITMAP) { - bprintf(fb, "T%s ", cf_type_names[type]); if (item->type == CT_USER) bprintf(fb, "U%s S%d ", item->u.utype->name, size); + else if (item->type == CT_XTYPE) + bprintf(fb, "X%s S%d ", item->u.xtype->name, size); + else + bprintf(fb, "T%s ", cf_type_names[type]); } if (item->cls == CC_STATIC) { for (i=0; inumber; i++)