]> granicus.if.org Git - graphviz/commitdiff
Re-do some .h files to limit exposure of internal values, .h files,
authorerg <devnull@localhost>
Thu, 7 Dec 2006 22:49:37 +0000 (22:49 +0000)
committererg <devnull@localhost>
Thu, 7 Dec 2006 22:49:37 +0000 (22:49 +0000)
and dependencies on config.h; return to a simple, concrete boolean type

lib/neatogen/matrix_ops.c
lib/neatogen/matrix_ops.h
lib/neatogen/neatoinit.c
lib/neatogen/neatoprocs.h
lib/neatogen/neatosplines.c

index fbb64c1804cb49a48cc461ee54f18cc731160ea3..4f1db91e6c3323ac940a4fcb5d6c7065fe82d91f 100644 (file)
@@ -22,9 +22,9 @@
 
 static double p_iteration_threshold = 1e-3;
 
-bool
+boolean
 power_iteration(double **square_mat, int n, int neigs, double **eigs,
-               double *evals, bool initialize)
+               double *evals, boolean initialize)
 {
     /* compute the 'neigs' top eigenvectors of 'square_mat' using power iteration */
 
index f851036d45b1858b50225de37da31b2a2b253133..977cc306d6e4ef8e084d35afbb21043bca990e06 100644 (file)
@@ -65,8 +65,8 @@ extern "C" {
                                 double ***CC);
     extern void mult_sparse_dense_mat_transpose(vtx_data *, double **, int,
                                                int, float ***);
-    extern bool power_iteration(double **, int, int, double **, double *,
-                               bool);
+    extern boolean power_iteration(double **, int, int, double **, double *,
+                               boolean);
 
 
 /*****************************
index a819592253f05ad18da82db2fe9c3d8a0960966e..23d47fdf5eae3efab937d0028e7824aca8d0bbbf 100644 (file)
@@ -43,7 +43,7 @@ static int Pack;              /* If >= 0, layout components separately and pack together
                                 */
 static char *cc_pfx = "_neato_cc";
 
-void neato_nodesize(node_t * n, bool flip)
+void neato_nodesize(node_t * n, boolean flip)
 {
     int w;
 
@@ -236,7 +236,7 @@ static cluster_data* cluster_map(graph_t *mastergraph, graph_t *g)
      /* array of arrays of node indices in each cluster */
     int **cs,*cn;
     int i,j,nclusters=0;
-    bool* assigned = N_NEW(agnnodes(g), bool);
+    boolean* assigned = N_NEW(agnnodes(g), boolean);
     cluster_data *cdata = GNEW(cluster_data);
 
     cdata->ntoplevel = agnnodes(g);
@@ -274,7 +274,7 @@ static cluster_data* cluster_map(graph_t *mastergraph, graph_t *g)
                 }
                 /* fprintf(stderr,"  node=%s, id=%d, ind=%d\n",n->name,n->id,ind); */
                 *c++=ind;
-                assigned[ind]=true;
+                assigned[ind]=TRUE;
                 cdata->ntoplevel--;
             }
         }
@@ -1365,7 +1365,7 @@ void neato_layout(Agraph_t * g)
            int n_cc;
            int i;
            pack_info pinfo;
-           bool pin;
+           boolean pin;
 
            cc = pccomps(g, &n_cc, cc_pfx, &pin);
 
@@ -1376,9 +1376,9 @@ void neato_layout(Agraph_t * g)
                adjustNodes(gc);
            }
            if (n_cc > 1) {
-               bool *bp;
+               boolean *bp;
                if (pin) {
-                   bp = N_NEW(n_cc, bool);
+                   bp = N_NEW(n_cc, boolean);
                    bp[0] = TRUE;
                } else
                    bp = 0;
index 17455a76947915b9d61d30a8f5c3d0b55c27e7f6..a6dbceb43df9439869728fc7af0dca556c3135e8 100644 (file)
@@ -38,16 +38,16 @@ extern "C" {
     extern void heapdown(Agnode_t *);
     extern void heapup(Agnode_t *);
     extern void initial_positions(graph_t *, int);
-    extern int init_port(Agnode_t *, Agedge_t *, char *, bool);
+    extern int init_port(Agnode_t *, Agedge_t *, char *, boolean);
     extern void jitter3d(Agnode_t *, int);
     extern void jitter_d(Agnode_t *, int, int);
     extern Ppoly_t *makeObstacle(node_t * n, double SEP);
     extern void makeSelfArcs(path * P, edge_t * e, int stepx);
-    extern void makeSpline(edge_t *, Ppoly_t **, int, bool);
+    extern void makeSpline(edge_t *, Ppoly_t **, int, boolean);
     extern void make_spring(graph_t *, Agnode_t *, Agnode_t *, double);
     extern void move_node(graph_t *, int, Agnode_t *);
     extern int init_nop(graph_t * g, int);
-    extern void neato_nodesize(node_t * n, bool flip);
+    extern void neato_nodesize(node_t * n, boolean flip);
     extern void neato_cleanup(graph_t * g);
     extern void neato_cleanup_edge(edge_t * e);
     extern void neato_cleanup_graph(graph_t * g);
index 62d79d16a8879f8fce1da1f1fd9ecdbfce55fcb9..8147a83ff73d3d4f24b70ef80a838a983626f5b7 100644 (file)
@@ -33,12 +33,12 @@ extern double drand48(void);
 extern void printvis(vconfig_t * cp);
 extern int in_poly(Ppoly_t argpoly, Ppoint_t q);
 
-static bool spline_merge(node_t * n)
+static boolean spline_merge(node_t * n)
 {
     return FALSE;
 }
 
-static bool swap_ends_p(edge_t * e)
+static boolean swap_ends_p(edge_t * e)
 {
     return FALSE;
 }
@@ -534,7 +534,7 @@ getPath(edge_t * e, vconfig_t * vconfig, int chkPts, Ppoly_t ** obs,
  * is on or inside one of the obstacles and, if so, tells the shortest path
  * computation to ignore them. 
  */
-void makeSpline(edge_t * e, Ppoly_t ** obs, int npoly, bool chkPts)
+void makeSpline(edge_t * e, Ppoly_t ** obs, int npoly, boolean chkPts)
 {
     Ppolyline_t line, spline;
     Pvector_t slopes[2];
@@ -679,7 +679,7 @@ static int _spline_edges(graph_t * g, double SEP, int splines)
  * Returns 0 on success.
  *
  * The edge function is given the graph, the separation to be added
- * around obstacles, and the type of edge. (At present, this is a bool,
+ * around obstacles, and the type of edge. (At present, this is a boolean,
  * with 1 meaning splines and 0 meaning line segments.) It must guarantee 
  * that all bounding boxes are current; in particular, the bounding box of 
  * g must reflect the addition of the edges.