fprintf(stderr, "%% constraint poly\n");
fprintf(stderr, "newpath\n");
for (i = 0; i < sz; i++)
- fprintf(stderr, "%f %f %s\n", p[i].x, p[i].y,
- i == 0 ? "moveto" : "lineto");
+ fprintf(stderr, "%f %f %s\n", p[i].x, p[i].y, i == 0 ? "moveto" : "lineto");
fprintf(stderr, "closepath stroke\n");
}
static void psprintpoint(point p)
maxpn = PINC;
#ifdef DEBUG
if (Show_boxes) {
- int i;
- for (i = 0; Show_boxes[i]; i++)
+ for (int i = 0; Show_boxes[i]; i++)
free (Show_boxes[i]);
free (Show_boxes);
Show_boxes = NULL;
}
if (flip) {
- int i;
for (bi = 0; bi < boxn; bi++) {
double v = boxes[bi].UR.y;
boxes[bi].UR.y = -1*boxes[bi].LL.y;
boxes[bi].LL.y = -v;
}
- for (i = 0; i < pi; i++)
+ for (int i = 0; i < pi; i++)
polypoints[i].y *= -1;
}
for (bi = 0; bi < boxn - 1; bi++) {
ba = &boxes[bi], bb = &boxes[bi + 1];
if (bb->LL.x > bb->UR.x || bb->LL.y > bb->UR.y) {
- agerr(AGERR, "in checkpath, box %d has LL coord > UR coord\n",
- bi + 1);
+ agerr(AGERR, "in checkpath, box %d has LL coord > UR coord\n", bi + 1);
printpath(thepath);
return 1;
}
static void vec_delete(vec* pvec)
{
- size_t i;
- for (i = 0; i < vec_length(pvec); ++i) {
+ for (size_t i = 0; i < vec_length(pvec); ++i) {
vec_delete(vec_get(pvec, i));
}
free(pvec->_mem);
static bool vec_contains(vec* pvec, void* item)
{
- size_t i;
-
- for (i=0; i < pvec->_elems; ++i) {
+ for (size_t i=0; i < pvec->_elems; ++i) {
if (pvec->_mem[i] == item)
return true;
}
node_t* c_end;
size_t cycle_len = vec_length(cycle);
- size_t i;
- for (i=0; i < cycle_len; ++i) {
+ for (size_t i=0; i < cycle_len; ++i) {
if (i == 0) {
c_start = vec_get(cycle, cycle_len-1);
} else {