From a62185baa5a927170cb75927d9ba4e04700e0c8c Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 9 Jan 2008 22:36:19 +0000 Subject: [PATCH] Commit version of gvpr using the cgraph library. The relevant code is wrapped in #ifdef USE_CGRAPH. --- cmd/gvpr/gprdata | 186 ++++++++++++++++++++++++-------------------- cmd/gvpr/gprstate.h | 4 + 2 files changed, 104 insertions(+), 86 deletions(-) diff --git a/cmd/gvpr/gprdata b/cmd/gvpr/gprdata index cbade5b7e..b84d26e5d 100644 --- a/cmd/gvpr/gprdata +++ b/cmd/gvpr/gprdata @@ -1,89 +1,103 @@ -V_this "$" ID T_obj 0 YALL -V_thisg "$G" ID T_graph 0 Y(G) -V_targt "$T" ID T_graph 0 Y(G) -V_outgraph "$O" ID T_graph 0 Y(G) -V_tgtname "$tgtname" ID STRING 0 Y(S) -V_infname "$F" ID STRING 0 Y(S) -V_travroot "$tvroot" ID T_node 0 Y(V) -V_travtype "$tvtype" ID T_tvtyp 0 Y(TV) -V_ARGC "ARGC" ID INTEGER 0 Y(I) -M_degree "degree" ID INTEGER Y(V) Y(I) -M_head "head" ID T_node Y(E) Y(V) -M_tail "tail" ID T_node Y(E) Y(V) -M_name "name" ID STRING YALL Y(S) -M_indegree "indegree" ID INTEGER Y(V) Y(I) -M_outdegree "outdegree" ID INTEGER Y(V) Y(I) -M_root "root" ID T_graph YALL Y(G) -M_parent "parent" ID T_graph Y(G) Y(G) -M_n_edges "n_edges" ID INTEGER Y(G) Y(I) -M_n_nodes "n_nodes" ID INTEGER Y(G) Y(I) -M_directed "directed" ID INTEGER Y(G) Y(I) -M_strict "strict" ID INTEGER Y(G) Y(I) -T_node "node_t" DECLARE T_node -T_edge "edge_t" DECLARE T_edge -T_graph "graph_t" DECLARE T_graph -T_obj "obj_t" DECLARE T_obj -T_tvtyp "tvtype_t" DECLARE T_tvtyp -A_ARGV "ARGV" ARRAY S|A(1,I) -F_graph "graph" FUNCTION G|A(1,S)|A(2,S) -F_subg "subg" FUNCTION G|A(1,G)|A(2,S) -F_issubg "isSubg" FUNCTION G|A(1,G)|A(2,S) -F_fstsubg "fstsubg" FUNCTION G|A(1,G) -F_nxtsubg "nxtsubg" FUNCTION G|A(1,G) -F_node "node" FUNCTION V|A(1,G)|A(2,S) -F_addnode "subnode" FUNCTION V|A(1,G)|A(2,V) -F_fstnode "fstnode" FUNCTION V|A(1,G) -F_nxtnode "nxtnode" FUNCTION V|A(1,V) -F_isnode "isNode" FUNCTION V|A(1,G)|A(2,S) -F_isin "isIn" FUNCTION I|A(1,G)|A(2,O) -F_edge "edge" FUNCTION E|A(1,V)|A(2,V)|A(3,S) -F_addedge "subedge" FUNCTION E|A(1,G)|A(2,E) -F_fstout "fstout" FUNCTION E|A(1,V) -F_nxtout "nxtout" FUNCTION E|A(1,E) -F_fstin "fstin" FUNCTION E|A(1,V) -F_nxtin "nxtin" FUNCTION E|A(1,E) -F_fstedge "fstedge" FUNCTION E|A(1,V) -F_nxtedge "nxtedge" FUNCTION E|A(1,E)|A(2,V) -F_compof "compOf" FUNCTION G|A(1,G)|A(2,V) -F_kindof "kindOf" FUNCTION S|A(1,O) -F_index "index" FUNCTION I|A(1,S)|A(2,S) -F_isedge "isEdge" FUNCTION E|A(1,V)|A(2,V)|A(3,S) -F_length "length" FUNCTION I|A(1,S) -F_match "match" FUNCTION I|A(1,S)|A(2,S) -F_write "write" FUNCTION I|A(1,G) -F_writeg "writeG" FUNCTION I|A(1,G)|A(2,S) -F_readg "readG" FUNCTION G|A(1,S) -F_fwriteg "fwriteG" FUNCTION I|A(1,G)|A(2,I) -F_freadg "freadG" FUNCTION G|A(1,I) -F_openf "openF" FUNCTION I|A(1,S)|A(2,S) -F_closef "closeF" FUNCTION I|A(1,I) -F_readl "readL" FUNCTION S|A(1,I) -F_induce "induce" FUNCTION I|A(1,G) -F_isdirect "isDirect" FUNCTION I|A(1,G) -F_isstrict "isStrict" FUNCTION I|A(1,G) -F_delete "delete" FUNCTION I|A(1,G)|A(2,O) -F_clone "clone" FUNCTION O|A(1,G)|A(2,O) -F_copy "copy" FUNCTION O|A(1,G)|A(2,O) -F_copya "copyA" FUNCTION I|A(1,O)|A(2,O) -F_lock "lock" FUNCTION I|A(1,G)|A(2,I) -F_nnodes "nNodes" FUNCTION I|A(1,G) -F_nedges "nEdges" FUNCTION I|A(1,G) -F_sqrt "sqrt" FUNCTION F|A(1,F) -F_cos "cos" FUNCTION F|A(1,F) -F_sin "sin" FUNCTION F|A(1,F) -F_atan2 "atan2" FUNCTION F|A(1,F)|A(2,F) -F_exp "exp" FUNCTION F|A(1,F) -F_pow "pow" FUNCTION F|A(1,F)|A(2,F) -F_log "log" FUNCTION F|A(1,F) -F_xof "xOf" FUNCTION S|A(1,S) -F_yof "yOf" FUNCTION S|A(1,S) -F_llof "llOf" FUNCTION S|A(1,S) -F_urof "urOf" FUNCTION S|A(1,S) -F_canon "canon" FUNCTION S|A(1,S) -F_get "aget" FUNCTION S|A(1,O)|A(2,S) -F_set "aset" FUNCTION I|A(1,O)|A(2,S)|A(3,S) -F_dget "getDflt" FUNCTION S|A(1,G)|A(2,S)|A(3,S) -F_dset "setDflt" FUNCTION I|A(1,G)|A(2,S)|A(3,S)|A(4,S) +V_this "$" ID T_obj 0 YALL +V_thisg "$G" ID T_graph 0 Y(G) +V_targt "$T" ID T_graph 0 Y(G) +V_outgraph "$O" ID T_graph 0 Y(G) +V_tgtname "$tgtname" ID STRING 0 Y(S) +V_infname "$F" ID STRING 0 Y(S) +V_travroot "$tvroot" ID T_node 0 Y(V) +V_travtype "$tvtype" ID T_tvtyp 0 Y(TV) +V_ARGC "ARGC" ID INTEGER 0 Y(I) +M_degree "degree" ID INTEGER Y(V) Y(I) +M_head "head" ID T_node Y(E) Y(V) +M_tail "tail" ID T_node Y(E) Y(V) +M_name "name" ID STRING YALL Y(S) +M_indegree "indegree" ID INTEGER Y(V) Y(I) +M_outdegree "outdegree" ID INTEGER Y(V) Y(I) +M_root "root" ID T_graph YALL Y(G) +M_parent "parent" ID T_graph Y(G) Y(G) +M_n_edges "n_edges" ID INTEGER Y(G) Y(I) +M_n_nodes "n_nodes" ID INTEGER Y(G) Y(I) +M_directed "directed" ID INTEGER Y(G) Y(I) +M_strict "strict" ID INTEGER Y(G) Y(I) +T_node "node_t" DECLARE T_node +T_edge "edge_t" DECLARE T_edge +T_graph "graph_t" DECLARE T_graph +T_obj "obj_t" DECLARE T_obj +T_tvtyp "tvtype_t" DECLARE T_tvtyp +A_ARGV "ARGV" ARRAY S|A(1,I) +F_graph "graph" FUNCTION G|A(1,S)|A(2,S) +F_subg "subg" FUNCTION G|A(1,G)|A(2,S) +F_issubg "isSubg" FUNCTION G|A(1,G)|A(2,S) +F_fstsubg "fstsubg" FUNCTION G|A(1,G) +F_nxtsubg "nxtsubg" FUNCTION G|A(1,G) +F_node "node" FUNCTION V|A(1,G)|A(2,S) +F_addnode "subnode" FUNCTION V|A(1,G)|A(2,V) +F_fstnode "fstnode" FUNCTION V|A(1,G) +F_nxtnode "nxtnode" FUNCTION V|A(1,V) +F_nxtnodesg "nxtnode_sg" FUNCTION V|A(1,G)|A(2,V) +F_isnode "isNode" FUNCTION V|A(1,G)|A(2,S) +F_issubnode "isSubnode" FUNCTION I|A(1,G)|A(2,V) +F_indegree "indegreeOf" FUNCTION I|A(1,G)|A(2,V) +F_outdegree "outdegreeOf" FUNCTION I|A(1,G)|A(2,V) +F_degree "degreeOf" FUNCTION I|A(1,G)|A(2,V) +F_isin "isIn" FUNCTION I|A(1,G)|A(2,O) +F_edge "edge" FUNCTION E|A(1,V)|A(2,V)|A(3,S) +F_edgesg "edge_sg" FUNCTION E|A(1,G)|A(2,V)|A(3,V)|A(4,S) +F_addedge "subedge" FUNCTION E|A(1,G)|A(2,E) +F_fstout "fstout" FUNCTION E|A(1,V) +F_nxtout "nxtout" FUNCTION E|A(1,E) +F_fstin "fstin" FUNCTION E|A(1,V) +F_nxtin "nxtin" FUNCTION E|A(1,E) +F_fstedge "fstedge" FUNCTION E|A(1,V) +F_nxtedge "nxtedge" FUNCTION E|A(1,E)|A(2,V) +F_fstoutsg "fstout_sg" FUNCTION E|A(1,G)|A(2,V) +F_nxtoutsg "nxtout_sg" FUNCTION E|A(1,G)|A(2,E) +F_fstinsg "fstin_sg" FUNCTION E|A(1,G)|A(2,V) +F_nxtinsg "nxtin_sg" FUNCTION E|A(1,G)|A(2,E) +F_fstedgesg "fstedge_sg" FUNCTION E|A(1,G)|A(2,V) +F_nxtedgesg "nxtedge_sg" FUNCTION E|A(1,G)|A(2,E)|A(3,V) +F_compof "compOf" FUNCTION G|A(1,G)|A(2,V) +F_kindof "kindOf" FUNCTION S|A(1,O) +F_index "index" FUNCTION I|A(1,S)|A(2,S) +F_isedge "isEdge" FUNCTION E|A(1,V)|A(2,V)|A(3,S) +F_isedgesg "isEdge_sg" FUNCTION E|A(1,G)|A(2,V)|A(3,V)|A(4,S) +F_issubedge "isSubedge" FUNCTION I|A(1,G)|A(2,E) +F_length "length" FUNCTION I|A(1,S) +F_match "match" FUNCTION I|A(1,S)|A(2,S) +F_write "write" FUNCTION I|A(1,G) +F_writeg "writeG" FUNCTION I|A(1,G)|A(2,S) +F_readg "readG" FUNCTION G|A(1,S) +F_fwriteg "fwriteG" FUNCTION I|A(1,G)|A(2,I) +F_freadg "freadG" FUNCTION G|A(1,I) +F_openf "openF" FUNCTION I|A(1,S)|A(2,S) +F_closef "closeF" FUNCTION I|A(1,I) +F_readl "readL" FUNCTION S|A(1,I) +F_induce "induce" FUNCTION I|A(1,G) +F_isdirect "isDirect" FUNCTION I|A(1,G) +F_isstrict "isStrict" FUNCTION I|A(1,G) +F_delete "delete" FUNCTION I|A(1,G)|A(2,O) +F_clone "clone" FUNCTION O|A(1,G)|A(2,O) +F_copy "copy" FUNCTION O|A(1,G)|A(2,O) +F_copya "copyA" FUNCTION I|A(1,O)|A(2,O) +F_lock "lock" FUNCTION I|A(1,G)|A(2,I) +F_nnodes "nNodes" FUNCTION I|A(1,G) +F_nedges "nEdges" FUNCTION I|A(1,G) +F_sqrt "sqrt" FUNCTION F|A(1,F) +F_cos "cos" FUNCTION F|A(1,F) +F_sin "sin" FUNCTION F|A(1,F) +F_atan2 "atan2" FUNCTION F|A(1,F)|A(2,F) +F_exp "exp" FUNCTION F|A(1,F) +F_pow "pow" FUNCTION F|A(1,F)|A(2,F) +F_log "log" FUNCTION F|A(1,F) +F_xof "xOf" FUNCTION S|A(1,S) +F_yof "yOf" FUNCTION S|A(1,S) +F_llof "llOf" FUNCTION S|A(1,S) +F_urof "urOf" FUNCTION S|A(1,S) +F_canon "canon" FUNCTION S|A(1,S) +F_get "aget" FUNCTION S|A(1,O)|A(2,S) +F_set "aset" FUNCTION I|A(1,O)|A(2,S)|A(3,S) +F_dget "getDflt" FUNCTION S|A(1,G)|A(2,S)|A(3,S) +F_dset "setDflt" FUNCTION I|A(1,G)|A(2,S)|A(3,S)|A(4,S) C_flat "TV_flat" CONSTANT T_tvtyp C_dfs "TV_dfs" CONSTANT T_tvtyp C_bfs "TV_bfs" CONSTANT T_tvtyp diff --git a/cmd/gvpr/gprstate.h b/cmd/gvpr/gprstate.h index dd63aa835..74019ecd2 100644 --- a/cmd/gvpr/gprstate.h +++ b/cmd/gvpr/gprstate.h @@ -22,7 +22,11 @@ extern "C" { #define GPRSTATE_H #include +#ifdef USE_CGRAPH +#include +#else #include +#endif #include #include -- 2.40.0