int bi, i, errs, l, r, d, u;
int xoverlap, yoverlap;
-#ifndef DONTFIXPATH
/* remove degenerate boxes. */
i = 0;
for (bi = 0; bi < boxn; bi++) {
i++;
}
boxn = i;
-#endif /* DONTFIXPATH */
ba = &boxes[0];
if (ba->LL.x > ba->UR.x || ba->LL.y > ba->UR.y) {
bi, bi + 1);
printpath(thepath);
}
-#ifndef DONTFIXPATH
if (errs > 0) {
int xy;
bb->UR.y = xy, u = 0;
}
}
-#else
- abort();
-#endif
-#ifndef DONTFIXPATH
/* check for overlapping boxes */
xoverlap = overlap(ba->LL.x, ba->UR.x, bb->LL.x, bb->UR.x);
yoverlap = overlap(ba->LL.y, ba->UR.y, bb->LL.y, bb->UR.y);
}
}
}
-#endif /* DONTFIXPATH */
if (thepath->start.p.x < boxes[0].LL.x
|| thepath->start.p.x > boxes[0].UR.x
fprintf(stderr, "in checkpath, start port not in first box\n");
printpath(thepath);
}
-#ifndef DONTFIXPATH
if (thepath->start.p.x < boxes[0].LL.x)
thepath->start.p.x = boxes[0].LL.x;
if (thepath->start.p.x > boxes[0].UR.x)
thepath->start.p.y = boxes[0].LL.y;
if (thepath->start.p.y > boxes[0].UR.y)
thepath->start.p.y = boxes[0].UR.y;
-#else
- abort();
-#endif
}
if (thepath->end.p.x < boxes[boxn - 1].LL.x
|| thepath->end.p.x > boxes[boxn - 1].UR.x
fprintf(stderr, "in checkpath, end port not in last box\n");
printpath(thepath);
}
-#ifndef DONTFIXPATH
if (thepath->end.p.x < boxes[boxn - 1].LL.x)
thepath->end.p.x = boxes[boxn - 1].LL.x;
if (thepath->end.p.x > boxes[boxn - 1].UR.x)
thepath->end.p.y = boxes[boxn - 1].LL.y;
if (thepath->end.p.y > boxes[boxn - 1].UR.y)
thepath->end.p.y = boxes[boxn - 1].UR.y;
-#else
- abort();
-#endif
}
return 0;
}