From: arif Date: Fri, 23 Jul 2010 15:16:14 +0000 (+0000) Subject: strdup was replaced with _strdup in plugin.c X-Git-Tag: LAST_LIBGRAPH~32^2~1245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=409744bccd859a7ece938eed2c80da3ccb35330f;p=graphviz strdup was replaced with _strdup in plugin.c libgraph regex_win dependency removed from solution file few dependency changes in plugins --- diff --git a/cmd/smyrna/gltemplate.c b/cmd/smyrna/gltemplate.c index 14391745a..df2818d51 100755 --- a/cmd/smyrna/gltemplate.c +++ b/cmd/smyrna/gltemplate.c @@ -175,6 +175,7 @@ static void realize(GtkWidget * widget, gpointer data) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDepthFunc(GL_LESS); + glDisable(GL_DEPTH); // glEnable(GL_LINE_SMOOTH); gdk_gl_drawable_gl_end(gldrawable); diff --git a/graphviz.sln b/graphviz.sln index 0fc31cf24..f5df47139 100644 --- a/graphviz.sln +++ b/graphviz.sln @@ -13,7 +13,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdt", "lib\cdt\cdt.vcproj", EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvc", "lib\gvc.vcproj", "{15229511-9F6C-48A5-9194-660CA6492563}" ProjectSection(ProjectDependencies) = postProject - {C0663A08-F276-4DD6-B17C-E501EE066F7C} = {C0663A08-F276-4DD6-B17C-E501EE066F7C} {BD347753-A09D-48B4-8752-F1D8D9CF235D} = {BD347753-A09D-48B4-8752-F1D8D9CF235D} {1DE8628B-271E-49B3-A9B7-A53519E1CA65} = {1DE8628B-271E-49B3-A9B7-A53519E1CA65} {C99C1195-2032-408B-9822-F09F49006A3C} = {C99C1195-2032-408B-9822-F09F49006A3C} @@ -44,13 +43,11 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvplugin_dot_layout", "plugin\dot_layout\gvplugin_dot_layout.vcproj", "{189E64E3-8A67-4477-8B18-3B174C03F6B9}" ProjectSection(ProjectDependencies) = postProject {AE706502-3203-4815-BF50-4D73BF96BA58} = {AE706502-3203-4815-BF50-4D73BF96BA58} - {6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2} = {6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dot", "cmd\dot\dot.vcproj", "{A334BA89-79FC-40E4-8D42-4852ECD2505B}" ProjectSection(ProjectDependencies) = postProject {AE706502-3203-4815-BF50-4D73BF96BA58} = {AE706502-3203-4815-BF50-4D73BF96BA58} - {C0663A08-F276-4DD6-B17C-E501EE066F7C} = {C0663A08-F276-4DD6-B17C-E501EE066F7C} {2F5A730B-132C-4319-A1B3-DCBE05E2E1B1} = {2F5A730B-132C-4319-A1B3-DCBE05E2E1B1} {15229511-9F6C-48A5-9194-660CA6492563} = {15229511-9F6C-48A5-9194-660CA6492563} {BD347753-A09D-48B4-8752-F1D8D9CF235D} = {BD347753-A09D-48B4-8752-F1D8D9CF235D} @@ -214,6 +211,10 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glcomp", "lib\glcomp\glcomp.vcproj", "{CCEF85C9-BC40-4C26-8755-581276C8B7DA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xdot", "lib\xdot\xdot.vcproj", "{C99C1195-2032-408B-9822-F09F49006A3C}" + ProjectSection(ProjectDependencies) = postProject + {C0663A08-F276-4DD6-B17C-E501EE066F7C} = {C0663A08-F276-4DD6-B17C-E501EE066F7C} + {A8018B47-1FB9-4966-A02C-1F64D65C33C9} = {A8018B47-1FB9-4966-A02C-1F64D65C33C9} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smyrna", "cmd\smyrna\smyrna.vcproj", "{13145C00-3694-4342-AFBE-4FAA7E1086BC}" ProjectSection(ProjectDependencies) = postProject @@ -251,7 +252,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvprlib", "lib\gvpr\gvprlib EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvplugin_visio", "plugin\visio\gvplugin_visio.vcproj", "{213561C9-8E82-4156-8F8F-2300CC46CA16}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dotgen2", "lib\dotgen2\dotgen2.vcproj", "{6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dotgen2", "lib\dotgen2\dotgen2.vcproj", "{C3393507-0554-4F56-87E6-C58B63B351B7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapp", "cmd\test\testapp\testapp.vcproj", "{89B96246-FDE7-4780-98DD-261523BEBC48}" EndProject @@ -441,7 +442,6 @@ Global {89ED80CE-5DEF-46B1-9A12-1D991236EE3E}.Release|Win32.ActiveCfg = Release|Win32 {89ED80CE-5DEF-46B1-9A12-1D991236EE3E}.Release|Win32.Build.0 = Release|Win32 {CCEF85C9-BC40-4C26-8755-581276C8B7DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {CCEF85C9-BC40-4C26-8755-581276C8B7DA}.Debug|Win32.Build.0 = Debug|Win32 {CCEF85C9-BC40-4C26-8755-581276C8B7DA}.Release|Win32.ActiveCfg = Release|Win32 {CCEF85C9-BC40-4C26-8755-581276C8B7DA}.Release|Win32.Build.0 = Release|Win32 {C99C1195-2032-408B-9822-F09F49006A3C}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -449,7 +449,6 @@ Global {C99C1195-2032-408B-9822-F09F49006A3C}.Release|Win32.ActiveCfg = Release|Win32 {C99C1195-2032-408B-9822-F09F49006A3C}.Release|Win32.Build.0 = Release|Win32 {13145C00-3694-4342-AFBE-4FAA7E1086BC}.Debug|Win32.ActiveCfg = Debug|Win32 - {13145C00-3694-4342-AFBE-4FAA7E1086BC}.Debug|Win32.Build.0 = Debug|Win32 {13145C00-3694-4342-AFBE-4FAA7E1086BC}.Release|Win32.ActiveCfg = Release|Win32 {13145C00-3694-4342-AFBE-4FAA7E1086BC}.Release|Win32.Build.0 = Release|Win32 {3CD86498-8B4C-4018-A9BF-F9E008F376DD}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -496,10 +495,10 @@ Global {213561C9-8E82-4156-8F8F-2300CC46CA16}.Debug|Win32.Build.0 = Debug|Win32 {213561C9-8E82-4156-8F8F-2300CC46CA16}.Release|Win32.ActiveCfg = Release|Win32 {213561C9-8E82-4156-8F8F-2300CC46CA16}.Release|Win32.Build.0 = Release|Win32 - {6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2}.Debug|Win32.Build.0 = Debug|Win32 - {6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2}.Release|Win32.ActiveCfg = Release|Win32 - {6D39E8A2-A1F6-4AE9-822F-D2E61ACB29E2}.Release|Win32.Build.0 = Release|Win32 + {C3393507-0554-4F56-87E6-C58B63B351B7}.Debug|Win32.ActiveCfg = Debug|Win32 + {C3393507-0554-4F56-87E6-C58B63B351B7}.Debug|Win32.Build.0 = Debug|Win32 + {C3393507-0554-4F56-87E6-C58B63B351B7}.Release|Win32.ActiveCfg = Release|Win32 + {C3393507-0554-4F56-87E6-C58B63B351B7}.Release|Win32.Build.0 = Release|Win32 {89B96246-FDE7-4780-98DD-261523BEBC48}.Debug|Win32.ActiveCfg = Debug|Win32 {89B96246-FDE7-4780-98DD-261523BEBC48}.Debug|Win32.Build.0 = Debug|Win32 {89B96246-FDE7-4780-98DD-261523BEBC48}.Release|Win32.ActiveCfg = Release|Win32 @@ -509,6 +508,7 @@ Global {4B6103EF-590B-4916-92CB-D06934459928}.Release|Win32.ActiveCfg = Release|Win32 {4B6103EF-590B-4916-92CB-D06934459928}.Release|Win32.Build.0 = Release|Win32 {A8018B47-1FB9-4966-A02C-1F64D65C33C9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8018B47-1FB9-4966-A02C-1F64D65C33C9}.Debug|Win32.Build.0 = Debug|Win32 {A8018B47-1FB9-4966-A02C-1F64D65C33C9}.Release|Win32.ActiveCfg = Release|Win32 {A8018B47-1FB9-4966-A02C-1F64D65C33C9}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection diff --git a/lib/dotgen2/level.c b/lib/dotgen2/level.c index 4959f1443..4a8a8c620 100644 --- a/lib/dotgen2/level.c +++ b/lib/dotgen2/level.c @@ -16,6 +16,7 @@ #include "dot2.h" #include "utils.h" +#include "arith.h" #define BACKWARD_PENALTY 1000 #define STRONG_CLUSTER_WEIGHT 1000 diff --git a/lib/dotgen2/ns.c b/lib/dotgen2/ns.c index 61c87ef7a..4ce27252a 100644 --- a/lib/dotgen2/ns.c +++ b/lib/dotgen2/ns.c @@ -19,6 +19,8 @@ */ #include "render.h" +#include "arith.h" + static int init_graph(graph_t *); static void dfs_cutval(node_t * v, edge_t * par); diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index 8ce664d98..5c8d9eaa1 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -384,7 +384,11 @@ char *gvplugin_list(GVC_t * gvc, api_t api, const char *str) return NULL; /* does str have a :path modifier? */ +#ifdef WIN32 + s = _strdup(str); +#else s = strdup(str); +#endif p = strchr(s, ':'); if (p) *p++ = '\0'; diff --git a/plugin/dot_layout/gvlayout_dot_layout.c b/plugin/dot_layout/gvlayout_dot_layout.c index f0779fc43..9bfab6dda 100644 --- a/plugin/dot_layout/gvlayout_dot_layout.c +++ b/plugin/dot_layout/gvlayout_dot_layout.c @@ -23,13 +23,41 @@ typedef enum { LAYOUT_DOT, } layout_type; -extern void dot_layout(graph_t * g); -extern void dot_cleanup(graph_t * g); +#ifdef WIN32 /*dependencies*/ + #pragma comment( lib, "gvc.lib" ) + #pragma comment( lib, "ingraphs.lib" ) + #pragma comment( lib, "cdt.lib" ) -gvlayout_engine_t dotgen_engine = { + +#ifdef WITH_CGRAPH + #pragma comment( lib, "cgraph.lib" ) + #pragma comment( lib, "dotgen2.lib" ) + extern void dot2_layout(graph_t * g); + extern void dot2_cleanup(graph_t * g); + + gvlayout_engine_t dotgen_engine = { + dot2_layout, + dot2_cleanup, + }; + + +#else + #pragma comment( lib, "graph.lib" ) + #pragma comment( lib, "dotgen.lib" ) + extern void dot_layout(graph_t * g); + extern void dot_cleanup(graph_t * g); + + gvlayout_engine_t dotgen_engine = { dot_layout, dot_cleanup, -}; + }; + +#endif + +#endif + + + gvlayout_features_t dotgen_features = { LAYOUT_USES_RANKDIR, diff --git a/plugin/dot_layout/gvplugin_dot_layout.c b/plugin/dot_layout/gvplugin_dot_layout.c index 1ef96f7ed..bd4c78988 100644 --- a/plugin/dot_layout/gvplugin_dot_layout.c +++ b/plugin/dot_layout/gvplugin_dot_layout.c @@ -30,18 +30,7 @@ __declspec(dllimport) gvplugin_library_t gvplugin_dot_layout_LTX_library = { "do __declspec(dllexport) gvplugin_library_t gvplugin_dot_layout_LTX_library = { "dot_layout", apis }; #endif #endif -#ifdef WIN32 /*dependencies*/ -#ifdef WITH_CGRAPH - #pragma comment( lib, "cgraph.lib" ) - #pragma comment( lib, "dotgen2.lib" ) -#else - #pragma comment( lib, "graph.lib" ) - #pragma comment( lib, "dotgen.lib" ) -#endif - #pragma comment( lib, "gvc.lib" ) - #pragma comment( lib, "ingraphs.lib" ) -#endif /*end visual studio*/