+ if(updown) {
+ DICT_ITERATE_ITEMS(d2, point_t*, p2, void*, c2) {
+ int count = (ptroff_t)c2;
+ if(count!=0) {
+ if(count>0) fprintf(stderr, "Point (%d,%d) has %d more incoming than outgoing segments\n", p2->x, p2->y, count);
+ if(count<0) fprintf(stderr, "Point (%d,%d) has %d more outgoing than incoming segments\n", p2->x, p2->y, -count);
+ dict_destroy(d2);
+ return 0;
+ }
+ }
+ }
+ dict_destroy(d1);
+ dict_destroy(d2);