removing more P2PF()
authorellson <devnull@localhost>
Wed, 10 Sep 2008 12:24:23 +0000 (12:24 +0000)
committerellson <devnull@localhost>
Wed, 10 Sep 2008 12:24:23 +0000 (12:24 +0000)
lib/common/splines.c
lib/dotgen/dotsplines.c
lib/neatogen/neatosplines.c

index 7fec4f2812d77707ec015ab3b4ec550efb09a17c..4095273ec89fa35f49298f0d158aa4920c1ce07b 100644 (file)
@@ -788,10 +788,10 @@ static void selfBottom (edge_t* edges[], int ind, int cnt,
     stepx = MAX(stepx,2.);
     pointn = 0;
     P2PF(ND_coord_i(n), np);
-    P2PF(ED_tail_port(e).p, tp);
+    tp = ED_tail_port(e).p;
     tp.x += np.x;
     tp.y += np.y;
-    P2PF(ED_head_port(e).p, hp);
+    hp = ED_head_port(e).p;
     hp.x += np.x;
     hp.y += np.y;
     if (tp.x >= hp.x) sgn = 1;
@@ -854,10 +854,10 @@ selfTop (edge_t* edges[], int ind, int cnt, double sizex, double stepy,
     stepx = MAX(stepx, 2.);
     pointn = 0;
     P2PF(ND_coord_i(n), np);
-    P2PF(ED_tail_port(e).p, tp);
+    tp = ED_tail_port(e).p;
     tp.x += np.x;
     tp.y += np.y;
-    P2PF(ED_head_port(e).p, hp);
+    hp = ED_head_port(e).p;
     hp.x += np.x;
     hp.y += np.y;
     if (tp.x >= hp.x) sgn = 1;
@@ -920,10 +920,10 @@ selfRight (edge_t* edges[], int ind, int cnt, double stepx, double sizey,
     stepy = MAX(stepy, 2.);
     pointn = 0;
     P2PF(ND_coord_i(n), np);
-    P2PF(ED_tail_port(e).p, tp);
+    tp = ED_tail_port(e).p;
     tp.x += np.x;
     tp.y += np.y;
-    P2PF(ED_head_port(e).p, hp);
+    hp = ED_head_port(e).p;
     hp.x += np.x;
     hp.y += np.y;
     if (tp.y >= hp.y) sgn = 1;
@@ -986,10 +986,10 @@ selfLeft (edge_t* edges[], int ind, int cnt, double stepx, double sizey,
     stepy = MAX(stepy,2.);
     pointn = 0;
     P2PF(ND_coord_i(n), np);
-    P2PF(ED_tail_port(e).p, tp);
+    tp = ED_tail_port(e).p;
     tp.x += np.x;
     tp.y += np.y;
-    P2PF(ED_head_port(e).p, hp);
+    hp = ED_head_port(e).p;
     hp.x += np.x;
     hp.y += np.y;
     if (tp.y >= hp.y) sgn = 1;
index 2e90afbda65f26134b44a3099d29a839f245363e..13aa8882f5b7359b5e5df2bfef740c0c56b3fa67 100644 (file)
@@ -686,17 +686,15 @@ static void
 makeSimpleFlat (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et)
 {
     edge_t* e = edges[ind];
-    pointf points[10], np, ep, tp, hp;
+    pointf points[10], np, tp, hp;
     int i, pointn;
     double stepy, dy;
 
     P2PF(ND_coord_i(tn), np);
-    P2PF(ED_tail_port(e).p, ep);
-    tp = add_pointfs(np, ep);
+    tp = add_pointfs(np, ED_tail_port(e).p);
 
     P2PF(ND_coord_i(hn), np);
-    P2PF(ED_head_port(e).p, ep);
-    hp = add_pointfs(np, ep);
+    hp = add_pointfs(np, ED_head_port(e).p);
 
     stepy = (cnt > 1) ? ND_ht_i(tn) / (double)(cnt - 1) : 0.;
     dy = tp.y - ((cnt > 1) ? ND_ht_i(tn) / 2. : 0.);
@@ -934,15 +932,13 @@ make_flat_labeled_edge(spline_info_t* sp, path* P, edge_t* e, int et)
     P2PF(ND_coord_i(ln), ED_label(e)->pos);
 
     if (et == ET_LINE) {
-       pointf np, ep, startp, endp, lp;
+       pointf np, startp, endp, lp;
 
         P2PF(ND_coord_i(tn), np);
-       P2PF(ED_tail_port(e).p, ep);
-       startp = add_pointfs(np, ep);
+       startp = add_pointfs(np, ED_tail_port(e).p);
 
         P2PF(ND_coord_i(hn), np);
-       P2PF(ED_head_port(e).p, ep);
-       endp = add_pointfs(np, ep);
+       endp = add_pointfs(np, ED_head_port(e).p);
 
         lp = ED_label(e)->pos;
        lp.y -= (ED_label(e)->dimen.y)/2.0;
@@ -1200,7 +1196,7 @@ makeLineEdge(edge_t* fe, pointf* points, node_t** hp)
     node_t* hn;
     node_t* tn;
     edge_t* e = fe;
-    pointf np, ep, startp, endp, lp;
+    pointf np, startp, endp, lp;
     pointf dimen;
     double width, height;
 
@@ -1214,20 +1210,16 @@ makeLineEdge(edge_t* fe, pointf* points, node_t** hp)
     if (fe->tail == e->tail) {
        *hp = hn;
        P2PF(ND_coord_i(tn), np);
-       P2PF(ED_tail_port(e).p, ep);
-       startp = add_pointfs(np, ep);
+       startp = add_pointfs(np, ED_tail_port(e).p);
        P2PF(ND_coord_i(hn), np);
-       P2PF(ED_head_port(e).p, ep);
-       endp = add_pointfs(np, ep);
+       endp = add_pointfs(np, ED_head_port(e).p);
     }
     else {
        *hp = tn; 
        P2PF(ND_coord_i(hn), np);
-       P2PF(ED_head_port(e).p, ep);
-       startp = add_pointfs(np, ep);
+       startp = add_pointfs(np, ED_head_port(e).p);
        P2PF(ND_coord_i(tn), np);
-       P2PF(ED_tail_port(e).p, ep);
-       endp = add_pointfs(np, ep);
+       endp = add_pointfs(np, ED_tail_port(e).p);
     }
 
     if (ED_label(e)) {
@@ -1866,6 +1858,9 @@ static edge_t *bot_bound(edge_t * e, int side)
     return ans;
 }
 
+#if 0
+/* not used */
+
 point closest(splines * spl, point p)
 {
     int i, j, k, besti, bestj;
@@ -1924,6 +1919,7 @@ point closest(splines * spl, point p)
     PF2P(pt2, rv);
     return rv;
 }
+#endif
 
 /* common routines */
 
index a1089d011f193ce613be78f75b7caf18e8c56321..bf5828525d298ee1ed47aa0a2e00efed11217066 100644 (file)
@@ -428,15 +428,13 @@ makeStraightEdge(graph_t * g, edge_t * e, int doPolyline)
     int i, j, xstep, dx;
     double l_perp;
     pointf dumber[4];
-    pointf p, q, np, ep;
+    pointf p, q, np;
 
     P2PF(ND_coord_i(n), np);
-    P2PF(ED_tail_port(e).p, ep);
-    p = dumb[1] = dumb[0] = add_pointfs(np, ep);
+    p = dumb[1] = dumb[0] = add_pointfs(np, ED_tail_port(e).p);
 
     P2PF(ND_coord_i(head), np);
-    P2PF(ED_head_port(e).p, ep);
-    q = dumb[2] = dumb[3] = add_pointfs(np, ep);
+    q = dumb[2] = dumb[3] = add_pointfs(np, ED_head_port(e).p);
 
     if (e_cnt == 1) {
        clip_and_install(e, e->head, dumb, 4, &sinfo);