]> granicus.if.org Git - graphviz/commitdiff
janitor cleanups
authorellson <devnull@localhost>
Sat, 7 Nov 2009 13:37:06 +0000 (13:37 +0000)
committerellson <devnull@localhost>
Sat, 7 Nov 2009 13:37:06 +0000 (13:37 +0000)
proper function declarations
proper return values

14 files changed:
cmd/smyrna/Makefile.am
cmd/smyrna/btree.c
cmd/smyrna/draw.c
cmd/smyrna/glexpose.c
cmd/smyrna/glmotion.c
cmd/smyrna/gui/appmouse.c
cmd/smyrna/gui/frmobjectui.c
cmd/smyrna/gui/frmobjectui.h
cmd/smyrna/gui/glcompui.c
cmd/smyrna/gui/topviewsettings.h
cmd/smyrna/hotkeymap.c
cmd/smyrna/topview.c
cmd/smyrna/topview.h
cmd/smyrna/viewport.c

index 7e80a1c2476c65a8ed3c5285aa13e4e227efa151..601cbfe0ad68cdb0be95b95814cac2aafc780acd 100644 (file)
@@ -26,19 +26,19 @@ endif
 
 noinst_HEADERS = btree.h draw.h filter.h glexpose.h glmotion.h gltemplate.h \
        hier.h materials.h selection.h smyrnadefs.h support.h topview.h \
-       topviewdata.h topviewdefs.h trackball.h tvnodes.h viewport.h \
+       topviewdata.h topviewdefs.h trackball.h tvnodes.h viewport.h hotkeymap.h \
        topfisheyeview.h viewportcamera.h gvprpipe.h md5.h drawxdot.h arcball.h \
        gui/beacon.h gui/callbacks.h gui/datalistcallbacks.h gui/filterscallbacks.h \
        gui/frmobjectui.h gui/glcompui.h gui/gui.h gui/menucallbacks.h \
-       gui/toolboxcallbacks.h gui/topviewsettings.h gui/appmouse.h hotkeymap.h
+       gui/toolboxcallbacks.h gui/topviewsettings.h gui/appmouse.h
 
 smyrna_SOURCES = btree.c draw.c filter.c glexpose.c glmotion.c gltemplate.c \
        hier.c main.c selection.c support.c template.c topview.c topviewdata.c \
        topfisheyeview.c trackball.c tvnodes.c viewport.c viewportcamera.c \
-       gvprpipe.c md5.c drawxdot.c arcball.c \
+       gvprpipe.c md5.c drawxdot.c arcball.c hotkeymap.c \
        gui/beacon.c gui/callbacks.c gui/datalistcallbacks.c gui/filterscallbacks.c \
        gui/frmobjectui.c gui/glcompui.c gui/gui.c gui/menucallbacks.c \
-       gui/toolboxcallbacks.c gui/topviewsettings.c gui/appmouse.c hotkeymap.c
+       gui/toolboxcallbacks.c gui/topviewsettings.c gui/appmouse.c
 
 smyrna_LDADD = $(top_builddir)/lib/cgraph/libcgraph_C.la \
                $(top_builddir)/lib/cdt/libcdt_C.la \
index c1cb89306489342fa1737708792e5a9d65e02176..eb2cee88b11a5f450c947e15889dbd1099459605 100644 (file)
@@ -133,7 +133,7 @@ int print_children(btree_node * n)
 
 }
 
-int sample_tree()
+int sample_tree(void)
 {
     btree_node *root;
     btree_node *n;
@@ -179,7 +179,7 @@ btree_node *tree_from_filter_string(char *filter_string)
     char *b_cursor = 0;
     char *c_cursor;
     char op = '\0';
-    char last_char;
+    char last_char = '\0';
     root = new_node("R", "", 0, 0);
     cursor = root;
     c_cursor = filter_string;
index f437f7eb2ab129011b5384c97c7c38c217b6f9d0..29f8f230eb6832bc68a6e98c507be3442952dff9 100755 (executable)
@@ -29,6 +29,7 @@ XDOT DRAWING FUNCTIONS, maybe need to move them somewhere else
 #include "viewport.h"
 #include "topfisheyeview.h"
 #include "appmouse.h"
+#include "hotkeymap.h"
 
 //delta values
 static float dx = 0.0;
index 8dcd0389189fe93349aefdad7a2a4e5e6c194be5..e40196a618da112c4463e299621f948d86074919 100644 (file)
@@ -22,6 +22,7 @@
 #include "topfisheyeview.h"
 #include "gui/toolboxcallbacks.h"
 #include "arcball.h"
+#include "hotkeymap.h"
 
 void drawRotatingAxis(void);
 void draw_cube()
@@ -164,7 +165,7 @@ int glexpose_main(ViewInfo * view)
        }
     }
     else
-       return;
+       return 0;
 
     glexpose_grid(view);
     draw_fisheye_magnifier(view);
@@ -320,4 +321,4 @@ void drawRotatingTools(void)
     }
 
 }
-*/
\ No newline at end of file
+*/
index 6436cf8881bdaf66da3415cd3256445fffad40b5..d88191cb81e7d7d66385ac85e019567bcab6a611 100644 (file)
@@ -22,6 +22,7 @@
 #include "draw.h"
 #include "topview.h"
 #include "glutils.h"
+#include "hotkeymap.h"
 
 gboolean redraw = FALSE;
 
index 6326f78eb034558d1404e58e421fc6de4690e9f7..1b08f042012802c50580c36759da457963c93de8 100644 (file)
@@ -20,6 +20,8 @@
 #include "topview.h"
 #include "glmotion.h"
 #include "beacon.h"
+#include "hotkeymap.h"
+#include "selection.h"
 
 
     static float prevX=0;
index f1def3a16c6d7ba637f2da7dab92aebca2a0bf87..5e13f3d6fcd366ceac448cfa937466df52fec5bb 100644 (file)
@@ -47,7 +47,7 @@ static char* safestrdup(char* src)
        else
                return strdup(src);
 }
-static int get_object_type()
+static int get_object_type(void)
 {
        if(gtk_toggle_button_get_active((GtkToggleButton*)glade_xml_get_widget(xml, "attrRB0")))
                return AGRAPH;
@@ -68,7 +68,7 @@ void free_attr(attr_t* at)
 }
 
 
-attr_t* new_attr()
+attr_t* new_attr(void)
 {
        attr_t* attr=malloc(sizeof(attr_t));
        attr->defValG=(char*)0;
@@ -717,7 +717,7 @@ attr_list* load_attr_list(Agraph_t* g)
 }
 
 /**/
-static void set_header_text()
+static void set_header_text(void)
 {
        int nodeCnt;
        int edgeCnt;
index 2655b0b9d116b5242892a91039f2436ad1a4b642..d775ba8bbc9dafb4860602d0e3b75b706bd620d3 100644 (file)
@@ -33,7 +33,6 @@
 extern attr_list* attr_list_new(Agraph_t * g,int with_widgets );
 extern void attr_list_add(attr_list* l,attr_t* a);
 extern void free_attr_list(attr_list* l);
-extern attr_list* load_attr_list();
 extern void filter_attributes(char* prefix,topview* t);
 
 _BB void on_txtAttr_changed(GtkWidget * widget, gpointer user_data);
index 9ab4935a36716a9d07b0283c6d01a614a525df5b..6c6f823e8ec8d354e4f32e14220b40643639ef6f 100644 (file)
@@ -25,6 +25,7 @@
 #include "topfisheyeview.h"
 #include "toolboxcallbacks.h"
 #include "viewportcamera.h"
+#include "selection.h"
 #include "frmobjectui.h"
 
 
index 3fa54358d3decd4258f8977034ffaa567e0bf033..185dd3c3fb5c6fc54ced0e176c04540b5c6b3d2c 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 
     extern int load_settings_from_graph(Agraph_t * g);
     extern int update_graph_from_settings(Agraph_t * g);
-    extern int show_settings_form();
+    extern int show_settings_form(void);
 
 #ifdef __cplusplus
 }                              /* end extern "C" */
index 919ca5c95af709fee62396f90ecc0b1f121da894..7c2e43d7c3fcc9becf1024440afa0898796b28e5 100644 (file)
@@ -34,4 +34,5 @@ int get_mode(ViewInfo* v)
     if ((view->mouse.t==MOUSE_BUTTON_2)&&(view->mouse.down) ) 
        return MM_RECTANGULAR_SELECT;
 
+    return 0;
 }
index 3edbe7b1cdd89829fbd80d69137ccdf5d4a686ee..8710b8043fa964c055255e9dbef826481cbd9c52 100755 (executable)
@@ -39,6 +39,7 @@
 #include "colorprocs.h"
 #include <assert.h>
 #include "frmobjectui.h"
+#include "hotkeymap.h"
 static float dx = 0.0;
 static float dy = 0.0;
 static float dz = 0.0;
@@ -1097,13 +1098,13 @@ int move_TVnodes(void)
 {
     float delX,delY;
     topview_node *v;
-    static flag=0;
+    static int flag=0;
     int ind = 0;
     if (!flag)
     {
 //     printf ("dragx:%f dragy:%f\n",view->mouse.dragX,view->mouse.dragY);
        flag=1;
-       return;
+       return 0;
     }
 
     delX = GetOGLDistance((int) view->mouse.dragX);
index b1a6be429c4dcd4ebd734b9365153132be118519..ddc6fbb386037cbee9a1d80b6942090a3ce30c6f 100755 (executable)
 extern "C" {
 #endif
 
-    void cleartopview(topview * t);
-    void preparetopview(Agraph_t * g, topview * t);
-    void update_topview(Agraph_t * g, topview * t, int init);
-    void drawTopViewGraph(Agraph_t * g);
-    int move_TVnodes(void);
-    void local_zoom(topview * t);
-    void originate_distorded_coordinates(topview * t);
-    float calcfontsize(float totaledgelength, int totallabelsize,
+    extern void cleartopview(topview * t);
+    extern void preparetopview(Agraph_t * g, topview * t);
+    extern void update_topview(Agraph_t * g, topview * t, int init);
+    extern void drawTopViewGraph(Agraph_t * g);
+    extern int move_TVnodes(void);
+    extern void local_zoom(topview * t);
+    extern void originate_distorded_coordinates(topview * t);
+    extern float calcfontsize(float totaledgelength, int totallabelsize,
                       int edgecount, int totalnodecount);
-    void select_with_regex(char *exp);
-    void settvcolorinfo(Agraph_t * g, topview * t);
-    void setMultiedges(Agraph_t * g, char *attrname);
+    extern void select_with_regex(char *exp);
+    extern void settvcolorinfo(Agraph_t * g, topview * t);
+    extern void setMultiedges(Agraph_t * g, char *attrname);
 
 #ifdef __cplusplus
 }                              /* end extern "C" */
index 20b9d3fbd1cfa3f394a29ee3b9573a08479d542d..1d5216236b2ac8d3db36d4a9f5b7d2071bddb215 100755 (executable)
@@ -330,7 +330,7 @@ static gboolean gl_main_expose(gpointer data)
     return 1;
 }
 
-static void get_data_dir()
+static void get_data_dir(void)
 {
     if (view->template_file) {
        free(view->template_file);
@@ -1117,7 +1117,7 @@ colorschemaset *create_color_theme(int themeid)
 }
 
 
-void test_color_pallete()
+void test_color_pallete(void)
 {
     int ind = 0;
     float xGAP = 5;