]> granicus.if.org Git - graphviz/commitdiff
Fix various errors and warnings; remove constant and HUGE, using MAXFLOAT.
authorerg <devnull@localhost>
Wed, 13 May 2009 21:28:21 +0000 (21:28 +0000)
committererg <devnull@localhost>
Wed, 13 May 2009 21:28:21 +0000 (21:28 +0000)
cmd/smyrna/smyrnadefs.h
cmd/smyrna/topview.c
cmd/smyrna/viewport.c

index 81e88274cff38059334def423098adb9960f57e5..a0c1187aa718762d9f137a3249cd682d9be69409 100644 (file)
@@ -75,7 +75,6 @@
 
 #define SPHERE_SLICE_COUNT 6
 #define DOT_SIZE_CORRECTION_FAC 0.3
-#define HUGE_NUMBER    99999999999
 
 typedef enum { nodshapedot,nodeshapecircle} node_shape;
 typedef enum { leftmousebutton,rightmousebutton,thirdmousebutton} clicked_mouse_button;
index 46fbac7eb801c0f9273bb7bd8321ba1aa9c43725..f86596ecd63034bca25bdfbd6054d1b9ae776313 100755 (executable)
@@ -30,6 +30,7 @@
 #include "selection.h"
 #include "topviewdata.h"
 #include "hier.h"
+#include "arith.h"
 #include "topfisheyeview.h"
 #ifdef WIN32
 #include "regex_win32.h"
@@ -108,7 +109,7 @@ static int setpositioninfo(float* x,float* y,float* z,char* buf)
        /*find out if 2D or 3 d, count commas*/
        if (!buf)
                return 0;
-       for (ind;ind < (int)strlen(buf); ind=ind +1)
+       for (;ind < (int)strlen(buf); ind=ind +1)
        {
                if( buf[ind]==',')
                        commacount ++;
@@ -144,9 +145,9 @@ static void setRGBcolor(RGBColor* c,char* colorstr)
 void settvposinfo(Agraph_t* g,topview* t)
 {
     int ind;
-       float maxedgelen,len,minedgelen;
+    float maxedgelen,len,minedgelen;
        maxedgelen=0;
-       minedgelen=HUGE_NUMBER;
+       minedgelen=MAXFLOAT;
        /*loop nodes*/
        for (ind=0;ind < t->Nodecount ; ind ++)
        {
@@ -236,13 +237,12 @@ void preparetopview(Agraph_t * g, topview * t)
     Agedge_t *e;
     Agsym_t *sym;
     int ind, ind2, data_type_count;    //number of columns for custom view->Topview data ,IP ,HOST, etc
-       int maxlabelsize=0;
-       float maxedgelen,minedgelen,edgelength;
+    float maxedgelen,minedgelen,edgelength;
 
 
-       maxedgelen=0;
-       minedgelen=(float)99999999.00000;       //FIX ME if you have a giant graph or fix your graph
-       edgelength=0;
+    maxedgelen=0;
+    minedgelen=MAXFLOAT;
+    edgelength=0;
 
     ind = 0;
     ind2 = 0;
index ad09e3244574f6a2098da9f7fa6f77e65e59b4a1..569d2efc55513c5f489e94d2a1a1608522d0aae0 100755 (executable)
@@ -1046,7 +1046,6 @@ void apply_gvpr(Agraph_t* g,char* prog)
 #ifdef WIN32   
        Agraph_t* a=exec_gvpr(prog,g);
 #endif
-       return 1;
 }
 float interpol(float minv,float maxv,float minc,float maxc,float x)
 {