snode* ptr;
snode* next;
snode* prev; /* node in shortest path just previous to next */
- int i;
size_t sz = 0;
cell* cp;
cell* ncp;
}
rte.segs = realloc (rte.segs, rte.n*sizeof(segment));
- for (i=0; i<rte.n; i++) {
+ for (size_t i=0; i<rte.n; i++) {
if (i > 0)
rte.segs[i].prev = rte.segs + (i-1);
if (i < rte.n-1)
assignSegs (int nrtes, route* route_list, maze* mp)
{
channel* chan;
- int i, j;
+ int i;
for (i=0;i<nrtes;i++) {
route rte = route_list[i];
- for (j=0;j<rte.n;j++) {
+ for (size_t j=0;j<rte.n;j++) {
segment* seg = rte.segs+j;
if (seg->isVert)
chan = chanSearch(mp->vchans, seg);
attachOrthoEdges (Agraph_t* g, maze* mp, int n_edges, route* route_list, splineInfo *sinfo, epair_t es[], int doLbls)
{
int irte = 0;
- int i, ipt, npts;
+ int ipt, npts;
pointf* ispline = 0;
int splsz = 0;
pointf p, p1, q1;
ispline[0] = ispline[1] = p;
ipt = 2;
- for (i = 1;i<rte.n;i++) {
+ for (size_t i = 1;i<rte.n;i++) {
seg = rte.segs+i;
if (seg->isVert)
p.x = vtrack(seg, mp);
static boxf
emitEdge (FILE* fp, Agedge_t* e, route rte, maze* m, int ix, boxf bb)
{
- int i, x, y;
+ int x, y;
boxf n = CELL(agtail(e))->bb;
segment* seg = rte.segs;
if (seg->isVert) {
bb.UR.y = MAX(bb.UR.y, SC*y);
fprintf (fp, "newpath %d %d moveto\n", SC*x, SC*y);
- for (i = 1;i<rte.n;i++) {
+ for (size_t i = 1;i<rte.n;i++) {
seg = rte.segs+i;
if (seg->isVert) {
x = vtrack(seg, m);