]> granicus.if.org Git - graphviz/commitdiff
remove some commented out code
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 8 Apr 2021 03:54:07 +0000 (20:54 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Apr 2021 21:02:40 +0000 (14:02 -0700)
lib/ortho/sgraph.c

index b4f7b0d31cd079a5aca3a66401f251694a1ad5df..ecf9691f13cdf0caa3f0a20a1008fb8886942433 100644 (file)
 #include <ortho/sgraph.h>
 #include <ortho/fPQ.h>
 
-#if 0
-/* Max. number of maze segments around a node */
-static int MaxNodeBoundary = 100; 
-
-typedef struct {
-    int left, right, up, down;
-} irect;
-
-/* nodes in the search graph correspond to line segments in the 
- * grid formed by n_hlines horizontal lines and n_vlines vertical lines.
- * The vertical segments are enumerated first, top to bottom, left to right.
- * Then the horizontal segments left to right, top to bottom. For example,
- * with an array of 4 vertical and 3 horizontal lines, we have
- *
- * |--14--|--15--|--16--|
- * 1      3      5      7
- * |--11--|--12--|--13--|
- * 0      2      4      6
- * |-- 8--|-- 9--|--10--|
- */
-static irect
-get_indices(orthograph* OG,int i, int j)
-{
-    irect r;
-    int hl = OG->n_hlines-1;
-    int vl = OG->n_vlines-1;
-       r.left = i*hl + j;
-       r.right = r.left + hl;
-       r.down = (vl+1)*hl + j*vl + i;
-       r.up = r.down + vl;
-    return r;
-}
-
-static irect
-find_boundary(orthograph* G, int n)
-{
-    rect R = G->Nodes[n];
-    irect r;
-    int i;
-
-    for (i = 0; i < G->n_vlines; i++) {
-        if (R.left == G->v_lines[i]) {
-            r.left = i;
-            break;
-        }
-    }
-    for (; i < G->n_vlines; i++) {
-        if (R.right == G->v_lines[i]) {
-            r.right = i;
-            break;
-        }
-    }
-    for (i = 0; i < G->n_hlines; i++) {
-        if (R.down == G->h_lines[i]) {
-            r.down = i;
-            break;
-        }
-    }
-    for (; i < G->n_hlines; i++) {
-        if (R.up == G->h_lines[i]) {
-            r.up = i;
-            break;
-        }
-    }
-    return r;
-}
-#endif
-
 void
 gsave (sgraph* G)
 {
@@ -262,7 +194,6 @@ shortPath (sgraph* g, snode* from, snode* to)
        }
     }
 
-    /* PQfree(); */
     return 0;
 }