From 805cafe13a610beb54b8bb10903593729bee0620 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 10 Nov 2021 07:18:02 -0800 Subject: [PATCH] smyrna: remove C++ 'extern "C"' guards Smyrna is written entirely in C, so these guards are unused. --- cmd/smyrna/draw.h | 7 ------- cmd/smyrna/glexpose.h | 8 -------- cmd/smyrna/glmotion.h | 8 -------- cmd/smyrna/gltemplate.h | 8 -------- cmd/smyrna/glutrender.h | 8 -------- cmd/smyrna/gui/callbacks.h | 8 -------- cmd/smyrna/gui/datalistcallbacks.h | 8 -------- cmd/smyrna/gui/glcompui.h | 8 -------- cmd/smyrna/gui/gui.h | 8 -------- cmd/smyrna/gui/menucallbacks.h | 8 -------- cmd/smyrna/gui/toolboxcallbacks.h | 7 ------- cmd/smyrna/gui/topviewsettings.h | 8 -------- cmd/smyrna/gvprpipe.h | 8 -------- cmd/smyrna/hier.h | 8 -------- cmd/smyrna/polytess.h | 6 ------ cmd/smyrna/selectionfuncs.h | 7 ------- cmd/smyrna/smyrnadefs.h | 8 -------- cmd/smyrna/topfisheyeview.h | 8 -------- cmd/smyrna/topviewfuncs.h | 7 ------- cmd/smyrna/tvnodes.h | 8 -------- cmd/smyrna/viewport.h | 8 -------- cmd/smyrna/viewportcamera.h | 8 -------- 22 files changed, 170 deletions(-) diff --git a/cmd/smyrna/draw.h b/cmd/smyrna/draw.h index 8c4d18a3e..5e4bed97f 100644 --- a/cmd/smyrna/draw.h +++ b/cmd/smyrna/draw.h @@ -18,9 +18,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif /* DRAWING FUNCTIONS * these are opengl based xdot drawing functions * topview drawings are not here @@ -29,7 +26,3 @@ extern drawfunc_t OpFns[]; extern void drawCircle(float x, float y, float radius, float zdepth); extern void drawBorders(ViewInfo * view); extern void draw_selpoly(glCompPoly* selPoly); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/glexpose.h b/cmd/smyrna/glexpose.h index f2fc6c0df..4ea5a882e 100644 --- a/cmd/smyrna/glexpose.h +++ b/cmd/smyrna/glexpose.h @@ -12,12 +12,4 @@ #include "viewport.h" -#ifdef __cplusplus -extern "C" { -#endif - int glexpose_main(ViewInfo * v); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/glmotion.h b/cmd/smyrna/glmotion.h index e8986a3dc..b514835cd 100644 --- a/cmd/smyrna/glmotion.h +++ b/cmd/smyrna/glmotion.h @@ -12,14 +12,6 @@ #include "viewport.h" -#ifdef __cplusplus -extern "C" { -#endif - void glmotion_zoom(void); void glmotion_pan(ViewInfo * v); void glmotion_zoom_inc(int zoomin); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gltemplate.h b/cmd/smyrna/gltemplate.h index 52faa6028..af5843afb 100644 --- a/cmd/smyrna/gltemplate.h +++ b/cmd/smyrna/gltemplate.h @@ -26,15 +26,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - gboolean expose_event(GtkWidget * widget, GdkEventExpose * event, gpointer data); extern GdkGLConfig *configure_gl(void); void create_window(GdkGLConfig * glconfig, GtkWidget * vbox); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/glutrender.h b/cmd/smyrna/glutrender.h index 487f7afa2..4b02adf2e 100644 --- a/cmd/smyrna/glutrender.h +++ b/cmd/smyrna/glutrender.h @@ -1,11 +1,3 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - int cb_glutinit(int x,int y,int w,int h, int bits,int s_rate,int fullscreen,int* argcp, char *argv[],char* optArg); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/callbacks.h b/cmd/smyrna/gui/callbacks.h index ccd813d05..f3ce37891 100644 --- a/cmd/smyrna/gui/callbacks.h +++ b/cmd/smyrna/gui/callbacks.h @@ -14,10 +14,6 @@ #include "toolboxcallbacks.h" #include "gui.h" -#ifdef __cplusplus -extern "C" { -#endif - #ifdef _WIN32 //this is needed on _WIN32 to get libglade see the callback #define _BB __declspec(dllexport) #else @@ -46,7 +42,3 @@ extern "C" { gpointer user_data); _BB void on_consoleincbtn_clicked(GtkWidget * widget, gpointer user_data); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/datalistcallbacks.h b/cmd/smyrna/gui/datalistcallbacks.h index 1b5475df7..5f7ad8ea8 100644 --- a/cmd/smyrna/gui/datalistcallbacks.h +++ b/cmd/smyrna/gui/datalistcallbacks.h @@ -13,10 +13,6 @@ #include "gui.h" #include "tvnodes.h" -#ifdef __cplusplus -extern "C" { -#endif - _BB void btnTVOK_clicked_cb(GtkWidget * widget, gpointer user_data); _BB void btnTVShowAll_clicked_cb(GtkWidget * widget, gpointer user_data); @@ -25,7 +21,3 @@ extern "C" { _BB void btnTVSaveAs_clicked_cb(GtkWidget * widget, gpointer user_data); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/glcompui.h b/cmd/smyrna/gui/glcompui.h index 72224f113..162581cd5 100644 --- a/cmd/smyrna/gui/glcompui.h +++ b/cmd/smyrna/gui/glcompui.h @@ -12,17 +12,9 @@ #include "smyrnadefs.h" -#ifdef __cplusplus -extern "C" { -#endif - extern glCompSet *glcreate_gl_topview_menu(void); extern void switch2D3D(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); extern void menu_click_center(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); extern void menu_click_zoom_minus(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); extern void menu_click_zoom_plus(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); extern void menu_click_pan(glCompObj *obj, GLfloat x, GLfloat y, glMouseButtonType t); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/gui.h b/cmd/smyrna/gui/gui.h index 1626852e5..45741b73c 100644 --- a/cmd/smyrna/gui/gui.h +++ b/cmd/smyrna/gui/gui.h @@ -21,10 +21,6 @@ #define MAXIMUM_WIDGET_COUNT 97 -#ifdef __cplusplus -extern "C" { -#endif - extern GladeXML *xml; //global libglade vars extern GtkWidget *gladewidget; @@ -45,7 +41,3 @@ extern "C" { /*generic save file dialog*/ int savefiledlg(int filtercnt, char **filters, agxbuf * xbuf); void append_textview(GtkTextView * textv, const char *s, size_t bytes); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/menucallbacks.h b/cmd/smyrna/gui/menucallbacks.h index 54495e6d4..ddec7ce53 100644 --- a/cmd/smyrna/gui/menucallbacks.h +++ b/cmd/smyrna/gui/menucallbacks.h @@ -12,10 +12,6 @@ #include "gui.h" -#ifdef __cplusplus -extern "C" { -#endif - //file _BB void mOpenSlot(GtkWidget * widget, gpointer user_data); _BB void mSaveSlot(GtkWidget * widget, gpointer user_data); @@ -86,7 +82,3 @@ extern "C" { gpointer user_data); _BB void on_gvprbuttonsave_clicked(GtkWidget * widget, gpointer user_data); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/toolboxcallbacks.h b/cmd/smyrna/gui/toolboxcallbacks.h index 5b231abc4..eb45ce461 100644 --- a/cmd/smyrna/gui/toolboxcallbacks.h +++ b/cmd/smyrna/gui/toolboxcallbacks.h @@ -16,9 +16,6 @@ #define _BB __declspec(dllexport) #else #define _BB /**/ -#endif -#ifdef __cplusplus -extern "C" { #endif _BB void btnToolZoomOut_clicked(GtkWidget * widget, @@ -28,7 +25,3 @@ extern "C" { _BB void btnToolFit_clicked(GtkWidget * widget, gpointer user_data); _BB void on_btnActivateGraph_clicked(GtkWidget * widget, gpointer user_data); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gui/topviewsettings.h b/cmd/smyrna/gui/topviewsettings.h index 5dfb7a091..c62a251b5 100644 --- a/cmd/smyrna/gui/topviewsettings.h +++ b/cmd/smyrna/gui/topviewsettings.h @@ -12,10 +12,6 @@ #include "smyrnadefs.h" -#ifdef __cplusplus -extern "C" { -#endif - _BB void on_settingsOKBtn_clicked(GtkWidget * widget, gpointer user_data); _BB void on_settingsCancelBtn_clicked(GtkWidget * widget, @@ -28,7 +24,3 @@ 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(void); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/gvprpipe.h b/cmd/smyrna/gvprpipe.h index 4823a75f6..2eca35ccd 100644 --- a/cmd/smyrna/gvprpipe.h +++ b/cmd/smyrna/gvprpipe.h @@ -12,12 +12,4 @@ #include -#ifdef __cplusplus -extern "C" { -#endif extern int run_gvpr(Agraph_t * srcGraph, int argc, char *argv[]); - - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/hier.h b/cmd/smyrna/hier.h index 54af1de94..2dd40daf4 100644 --- a/cmd/smyrna/hier.h +++ b/cmd/smyrna/hier.h @@ -12,10 +12,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - typedef struct { int num_foci; int *foci_nodes; /* Nodes in real graph */ @@ -52,7 +48,3 @@ extern "C" { double *, hierparms_t *); focus_t *initFocus(int ncnt); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/polytess.h b/cmd/smyrna/polytess.h index bf3d66d0a..be2c87e41 100644 --- a/cmd/smyrna/polytess.h +++ b/cmd/smyrna/polytess.h @@ -12,15 +12,9 @@ #include "smyrnadefs.h" -#ifdef __cplusplus -extern "C" { -#endif typedef struct { GLUtesselator *tobj; GLenum windingRule; }tessPoly; extern int drawTessPolygon(sdot_op* p); extern int testDraw(void); -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/selectionfuncs.h b/cmd/smyrna/selectionfuncs.h index e6799baf2..60b3311ac 100644 --- a/cmd/smyrna/selectionfuncs.h +++ b/cmd/smyrna/selectionfuncs.h @@ -13,14 +13,7 @@ #include "draw.h" #include -#ifdef __cplusplus -extern "C" { -#endif - extern void pick_objects_rect(Agraph_t* g) ; extern void deselect_all(Agraph_t* g); extern void add_selpoly(Agraph_t* g,glCompPoly* selPoly,glCompPoint pt); extern void clear_selpoly(glCompPoly* sp); -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index b68d0329a..df9be7457 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -26,10 +26,6 @@ #include "hier.h" #include -#ifdef __cplusplus -extern "C" { -#endif - #ifdef _WIN32 //this is needed on _WIN32 to get libglade see the callback #define _BB __declspec(dllexport) #else @@ -457,7 +453,3 @@ typedef struct extern char *smyrnaGlade; extern void glexpose(void); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/topfisheyeview.h b/cmd/smyrna/topfisheyeview.h index 2d07b478d..829c2806a 100644 --- a/cmd/smyrna/topfisheyeview.h +++ b/cmd/smyrna/topfisheyeview.h @@ -13,15 +13,7 @@ #include "smyrnadefs.h" #include "hier.h" -#ifdef __cplusplus -extern "C" { -#endif - void drawtopologicalfisheye(topview * t); void changetopfishfocus(topview * t, float *x, float *y, float *z, int num_foci); void prepare_topological_fisheye(Agraph_t* g,topview * t); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/topviewfuncs.h b/cmd/smyrna/topviewfuncs.h index 66e4763e2..f1ed53944 100644 --- a/cmd/smyrna/topviewfuncs.h +++ b/cmd/smyrna/topviewfuncs.h @@ -12,9 +12,6 @@ #include "smyrnadefs.h" -#ifdef __cplusplus -extern "C" { -#endif extern void pick_object_xyz(Agraph_t* g,topview* t,GLfloat x,GLfloat y,GLfloat z) ; extern void initSmGraph(Agraph_t * g,topview* rv); extern void updateSmGraph(Agraph_t * g,topview* t); @@ -22,7 +19,3 @@ extern void renderSmGraph(Agraph_t * g,topview* t); extern void freeSmGraph(Agraph_t * g,topview* t); extern void cacheSelectedEdges(Agraph_t * g,topview* t); extern void cacheSelectedNodes(Agraph_t * g,topview* t); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/tvnodes.h b/cmd/smyrna/tvnodes.h index 3d67fdb04..03908f1df 100644 --- a/cmd/smyrna/tvnodes.h +++ b/cmd/smyrna/tvnodes.h @@ -12,15 +12,7 @@ #include "gui.h" -#ifdef __cplusplus -extern "C" { -#endif - int tv_show_all(void); int tv_hide_all(void); int tv_save_as(int); void setup_tree (Agraph_t* g); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/viewport.h b/cmd/smyrna/viewport.h index 77bf488d9..0e8d8f51c 100644 --- a/cmd/smyrna/viewport.h +++ b/cmd/smyrna/viewport.h @@ -16,10 +16,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - void init_viewport(ViewInfo * view); void set_viewport_settings_from_template(ViewInfo * view, Agraph_t *); void switch_graph(int); @@ -43,7 +39,3 @@ extern "C" { /* helper functions */ extern char *get_attribute_value(char *attr, ViewInfo * view, Agraph_t * g); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif diff --git a/cmd/smyrna/viewportcamera.h b/cmd/smyrna/viewportcamera.h index f20c81579..629779343 100644 --- a/cmd/smyrna/viewportcamera.h +++ b/cmd/smyrna/viewportcamera.h @@ -13,12 +13,4 @@ #include "smyrnadefs.h" #include -#ifdef __cplusplus -extern "C" { -#endif - extern void menu_click_add_camera(void *p); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif -- 2.40.0