Index: abstract.c =================================================================== --- abstract.c (revision 687) +++ abstract.c (revision 688) @@ -53,3 +53,25 @@ return net; } + +static void dump_attr(const csch_attribs_t *attr, FILE *f, const char *prefix1, const char *prefix2) +{ + htsp_entry_t *e; + fprintf(f, "%s%sAttributes:\n", prefix1, prefix2); + for(e = htsp_first(attr); e != NULL; e = htsp_next(attr, e)) { + const csch_attrib_t *a = e->value; + fprintf(f, "%s%s%s=%s\n", prefix1, prefix2, a->key, a->val); + } +} + +void csch_abstract_dump(const csch_abstract_t *abs, FILE *f, const char *prefix) +{ + htsp_entry_t *e; + + fprintf(f, "%sNets:\n", prefix); + for(e = htsp_first(&abs->nets); e != NULL; e = htsp_next(&abs->nets, e)) { + csch_anet_t *net = e->value; + fprintf(f, "%s '%s'\n", prefix, net->netname); + dump_attr(&net->hdr.attr, f, prefix, " "); + } +}