From 83a7092ee93ee8f9a93e2cd4a043db27444517f9 Mon Sep 17 00:00:00 2001 From: ellson Date: Wed, 24 Jun 2009 01:44:02 +0000 Subject: [PATCH] various fixes for lib/gvpr --- cmd/gvpr/Makefile.am | 1 + lib/expr/Makefile.am | 6 +- lib/expr/exgram.h | 2 +- lib/expr/expr.h | 2 +- lib/gvpr/gdefs.h | 304 ------------------------------------------- 5 files changed, 6 insertions(+), 309 deletions(-) delete mode 100644 lib/gvpr/gdefs.h diff --git a/cmd/gvpr/Makefile.am b/cmd/gvpr/Makefile.am index dedaed705..0bf2235e4 100644 --- a/cmd/gvpr/Makefile.am +++ b/cmd/gvpr/Makefile.am @@ -8,6 +8,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/expr \ -I$(top_builddir)/lib/expr \ + -I$(top_srcdir)/lib/gvpr \ -I$(top_srcdir)/lib/vmalloc \ -I$(top_srcdir)/lib/sfio \ -I$(top_srcdir)/lib/ast \ diff --git a/lib/expr/Makefile.am b/lib/expr/Makefile.am index a3a2b9c0a..ba61ff2b0 100644 --- a/lib/expr/Makefile.am +++ b/lib/expr/Makefile.am @@ -34,12 +34,12 @@ libexpr_C_la_SOURCES = excc.c excontext.c exdata.c exerror.c \ libexpr_C_la_LIBADD = \ $(top_builddir)/lib/ast/libast_C.la \ $(top_builddir)/lib/vmalloc/libvmalloc_C.la \ - $(top_builddir)/lib/sfio/libsfio_C.la + $(top_builddir)/lib/sfio/libsfio_C.la \ + $(top_builddir)/lib/cdt/libcdt.la #libexpr_la_LDFLAGS = -version-info $(EXPR_VERSION) #libexpr_la_SOURCES = $(libexpr_C_la_SOURCES) -#libexpr_la_LIBADD = $(libexpr_C_la_LIBADD) \ -# $(top_builddir)/lib/cdt/libcdt.la +#libexpr_la_LIBADD = $(libexpr_C_la_LIBADD) $(libexpr_C_la_OBJECTS) $(libexpr_la_OBJECTS): \ exparse.h exparse.c exgram.h exop.h diff --git a/lib/expr/exgram.h b/lib/expr/exgram.h index 6fdf48958..8d4797c21 100644 --- a/lib/expr/exgram.h +++ b/lib/expr/exgram.h @@ -886,7 +886,7 @@ extern "C" { */ void - exinit() { + exinit(void) { memset (&expr, 0, sizeof(Expr_t)); } /* diff --git a/lib/expr/expr.h b/lib/expr/expr.h index 8320c7e67..5351e35c0 100644 --- a/lib/expr/expr.h +++ b/lib/expr/expr.h @@ -313,7 +313,7 @@ extern "C" { extern char *extype(int); extern Extype_t exzero(int); extern char *exopname(int); - extern void exinit(); + extern void exinit(void); extern char *extypename(Expr_t * p, int); extern int exisAssign(Exnode_t *); diff --git a/lib/gvpr/gdefs.h b/lib/gvpr/gdefs.h deleted file mode 100644 index 03bc871f5..000000000 --- a/lib/gvpr/gdefs.h +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef GDEFS_H -#define GDEFS_H - -/* generated by mkdefs; do not edit */ - -#define Y(i) (1<<(i)) - -#define V 0x4 /* NODE */ -#define E 0x5 /* EDGE */ -#define G 0x6 /* GRAPH */ -#define O 0x7 /* OBJECT */ -#define TV 0x8 /* TV_ */ -#define YALL (Y(V)|Y(E)|Y(G)) - -#define V_this 1 -#define V_thisg 2 -#define V_targt 3 -#define V_outgraph 4 -#define V_tgtname 5 -#define V_infname 6 -#define V_travroot 7 -#define V_travtype 8 -#define V_ARGC 9 -#define M_degree 10 -#define M_head 11 -#define M_tail 12 -#define M_name 13 -#define M_indegree 14 -#define M_outdegree 15 -#define M_root 16 -#define M_parent 17 -#define M_n_edges 18 -#define M_n_nodes 19 -#define M_directed 20 -#define M_strict 21 -#define T_node 22 -#define T_edge 23 -#define T_graph 24 -#define T_obj 25 -#define T_tvtyp 26 -#define A_ARGV 27 -#define F_graph 28 -#define F_subg 29 -#define F_issubg 30 -#define F_fstsubg 31 -#define F_nxtsubg 32 -#define F_node 33 -#define F_addnode 34 -#define F_fstnode 35 -#define F_nxtnode 36 -#define F_nxtnodesg 37 -#define F_isnode 38 -#define F_issubnode 39 -#define F_indegree 40 -#define F_outdegree 41 -#define F_degree 42 -#define F_isin 43 -#define F_edge 44 -#define F_edgesg 45 -#define F_addedge 46 -#define F_fstout 47 -#define F_nxtout 48 -#define F_fstin 49 -#define F_nxtin 50 -#define F_fstedge 51 -#define F_nxtedge 52 -#define F_fstoutsg 53 -#define F_nxtoutsg 54 -#define F_fstinsg 55 -#define F_nxtinsg 56 -#define F_fstedgesg 57 -#define F_nxtedgesg 58 -#define F_compof 59 -#define F_kindof 60 -#define F_index 61 -#define F_rindex 62 -#define F_isedge 63 -#define F_isedgesg 64 -#define F_issubedge 65 -#define F_length 66 -#define F_match 67 -#define F_write 68 -#define F_writeg 69 -#define F_readg 70 -#define F_fwriteg 71 -#define F_freadg 72 -#define F_openf 73 -#define F_closef 74 -#define F_readl 75 -#define F_induce 76 -#define F_isdirect 77 -#define F_isstrict 78 -#define F_delete 79 -#define F_clone 80 -#define F_copy 81 -#define F_copya 82 -#define F_lock 83 -#define F_nnodes 84 -#define F_nedges 85 -#define F_sqrt 86 -#define F_cos 87 -#define F_sin 88 -#define F_atan2 89 -#define F_exp 90 -#define F_pow 91 -#define F_log 92 -#define F_min 93 -#define F_max 94 -#define F_sys 95 -#define F_xof 96 -#define F_yof 97 -#define F_llof 98 -#define F_urof 99 -#define F_canon 100 -#define F_get 101 -#define F_set 102 -#define F_dget 103 -#define F_dset 104 -#define F_hasattr 105 -#define F_isattr 106 -#define F_fstattr 107 -#define F_nxtattr 108 -#define C_flat 109 -#define C_ne 110 -#define C_en 111 -#define C_bfs 112 -#define C_dfs 113 -#define C_fwd 114 -#define C_rev 115 -#define C_postdfs 116 -#define C_postfwd 117 -#define C_postrev 118 -#define C_prepostdfs 119 -#define C_prepostfwd 120 -#define C_prepostrev 121 -#define C_null 122 - -#define LAST_V 9 -#define LAST_M 21 -#define MINNAME 1 -#define MAXNAME 122 - -static Exid_t symbols[] = { - EX_ID ( "$", ID, V_this, T_obj, 0), - EX_ID ( "$G", ID, V_thisg, T_graph, 0), - EX_ID ( "$T", ID, V_targt, T_graph, 0), - EX_ID ( "$O", ID, V_outgraph, T_graph, 0), - EX_ID ( "$tgtname", ID, V_tgtname, STRING, 0), - EX_ID ( "$F", ID, V_infname, STRING, 0), - EX_ID ( "$tvroot", ID, V_travroot, T_node, 0), - EX_ID ( "$tvtype", ID, V_travtype, T_tvtyp, 0), - EX_ID ( "ARGC", ID, V_ARGC, INTEGER, 0), - EX_ID ( "degree", ID, M_degree, INTEGER, 0), - EX_ID ( "head", ID, M_head, T_node, 0), - EX_ID ( "tail", ID, M_tail, T_node, 0), - EX_ID ( "name", ID, M_name, STRING, 0), - EX_ID ( "indegree", ID, M_indegree, INTEGER, 0), - EX_ID ( "outdegree", ID, M_outdegree, INTEGER, 0), - EX_ID ( "root", ID, M_root, T_graph, 0), - EX_ID ( "parent", ID, M_parent, T_graph, 0), - EX_ID ( "n_edges", ID, M_n_edges, INTEGER, 0), - EX_ID ( "n_nodes", ID, M_n_nodes, INTEGER, 0), - EX_ID ( "directed", ID, M_directed, INTEGER, 0), - EX_ID ( "strict", ID, M_strict, INTEGER, 0), - EX_ID ( "node_t", DECLARE, T_node, T_node, 0), - EX_ID ( "edge_t", DECLARE, T_edge, T_edge, 0), - EX_ID ( "graph_t", DECLARE, T_graph, T_graph, 0), - EX_ID ( "obj_t", DECLARE, T_obj, T_obj, 0), - EX_ID ( "tvtype_t", DECLARE, T_tvtyp, T_tvtyp, 0), - EX_ID ( "ARGV", ARRAY, A_ARGV, S|A(1,I), 0), - EX_ID ( "graph", FUNCTION, F_graph, G|A(1,S)|A(2,S), 0), - EX_ID ( "subg", FUNCTION, F_subg, G|A(1,G)|A(2,S), 0), - EX_ID ( "isSubg", FUNCTION, F_issubg, G|A(1,G)|A(2,S), 0), - EX_ID ( "fstsubg", FUNCTION, F_fstsubg, G|A(1,G), 0), - EX_ID ( "nxtsubg", FUNCTION, F_nxtsubg, G|A(1,G), 0), - EX_ID ( "node", FUNCTION, F_node, V|A(1,G)|A(2,S), 0), - EX_ID ( "subnode", FUNCTION, F_addnode, V|A(1,G)|A(2,V), 0), - EX_ID ( "fstnode", FUNCTION, F_fstnode, V|A(1,G), 0), - EX_ID ( "nxtnode", FUNCTION, F_nxtnode, V|A(1,V), 0), - EX_ID ( "nxtnode_sg", FUNCTION, F_nxtnodesg, V|A(1,G)|A(2,V), 0), - EX_ID ( "isNode", FUNCTION, F_isnode, V|A(1,G)|A(2,S), 0), - EX_ID ( "isSubnode", FUNCTION, F_issubnode, I|A(1,G)|A(2,V), 0), - EX_ID ( "indegreeOf", FUNCTION, F_indegree, I|A(1,G)|A(2,V), 0), - EX_ID ( "outdegreeOf", FUNCTION, F_outdegree, I|A(1,G)|A(2,V), 0), - EX_ID ( "degreeOf", FUNCTION, F_degree, I|A(1,G)|A(2,V), 0), - EX_ID ( "isIn", FUNCTION, F_isin, I|A(1,G)|A(2,O), 0), - EX_ID ( "edge", FUNCTION, F_edge, E|A(1,V)|A(2,V)|A(3,S), 0), - EX_ID ( "edge_sg", FUNCTION, F_edgesg, E|A(1,G)|A(2,V)|A(3,V)|A(4,S), 0), - EX_ID ( "subedge", FUNCTION, F_addedge, E|A(1,G)|A(2,E), 0), - EX_ID ( "fstout", FUNCTION, F_fstout, E|A(1,V), 0), - EX_ID ( "nxtout", FUNCTION, F_nxtout, E|A(1,E), 0), - EX_ID ( "fstin", FUNCTION, F_fstin, E|A(1,V), 0), - EX_ID ( "nxtin", FUNCTION, F_nxtin, E|A(1,E), 0), - EX_ID ( "fstedge", FUNCTION, F_fstedge, E|A(1,V), 0), - EX_ID ( "nxtedge", FUNCTION, F_nxtedge, E|A(1,E)|A(2,V), 0), - EX_ID ( "fstout_sg", FUNCTION, F_fstoutsg, E|A(1,G)|A(2,V), 0), - EX_ID ( "nxtout_sg", FUNCTION, F_nxtoutsg, E|A(1,G)|A(2,E), 0), - EX_ID ( "fstin_sg", FUNCTION, F_fstinsg, E|A(1,G)|A(2,V), 0), - EX_ID ( "nxtin_sg", FUNCTION, F_nxtinsg, E|A(1,G)|A(2,E), 0), - EX_ID ( "fstedge_sg", FUNCTION, F_fstedgesg, E|A(1,G)|A(2,V), 0), - EX_ID ( "nxtedge_sg", FUNCTION, F_nxtedgesg, E|A(1,G)|A(2,E)|A(3,V), 0), - EX_ID ( "compOf", FUNCTION, F_compof, G|A(1,G)|A(2,V), 0), - EX_ID ( "kindOf", FUNCTION, F_kindof, S|A(1,O), 0), - EX_ID ( "index", FUNCTION, F_index, I|A(1,S)|A(2,S), 0), - EX_ID ( "rindex", FUNCTION, F_rindex, I|A(1,S)|A(2,S), 0), - EX_ID ( "isEdge", FUNCTION, F_isedge, E|A(1,V)|A(2,V)|A(3,S), 0), - EX_ID ( "isEdge_sg", FUNCTION, F_isedgesg, E|A(1,G)|A(2,V)|A(3,V)|A(4,S), 0), - EX_ID ( "isSubedge", FUNCTION, F_issubedge, I|A(1,G)|A(2,E), 0), - EX_ID ( "length", FUNCTION, F_length, I|A(1,S), 0), - EX_ID ( "match", FUNCTION, F_match, I|A(1,S)|A(2,S), 0), - EX_ID ( "write", FUNCTION, F_write, I|A(1,G), 0), - EX_ID ( "writeG", FUNCTION, F_writeg, I|A(1,G)|A(2,S), 0), - EX_ID ( "readG", FUNCTION, F_readg, G|A(1,S), 0), - EX_ID ( "fwriteG", FUNCTION, F_fwriteg, I|A(1,G)|A(2,I), 0), - EX_ID ( "freadG", FUNCTION, F_freadg, G|A(1,I), 0), - EX_ID ( "openF", FUNCTION, F_openf, I|A(1,S)|A(2,S), 0), - EX_ID ( "closeF", FUNCTION, F_closef, I|A(1,I), 0), - EX_ID ( "readL", FUNCTION, F_readl, S|A(1,I), 0), - EX_ID ( "induce", FUNCTION, F_induce, I|A(1,G), 0), - EX_ID ( "isDirect", FUNCTION, F_isdirect, I|A(1,G), 0), - EX_ID ( "isStrict", FUNCTION, F_isstrict, I|A(1,G), 0), - EX_ID ( "delete", FUNCTION, F_delete, I|A(1,G)|A(2,O), 0), - EX_ID ( "clone", FUNCTION, F_clone, O|A(1,G)|A(2,O), 0), - EX_ID ( "copy", FUNCTION, F_copy, O|A(1,G)|A(2,O), 0), - EX_ID ( "copyA", FUNCTION, F_copya, I|A(1,O)|A(2,O), 0), - EX_ID ( "lock", FUNCTION, F_lock, I|A(1,G)|A(2,I), 0), - EX_ID ( "nNodes", FUNCTION, F_nnodes, I|A(1,G), 0), - EX_ID ( "nEdges", FUNCTION, F_nedges, I|A(1,G), 0), - EX_ID ( "sqrt", FUNCTION, F_sqrt, F|A(1,F), 0), - EX_ID ( "cos", FUNCTION, F_cos, F|A(1,F), 0), - EX_ID ( "sin", FUNCTION, F_sin, F|A(1,F), 0), - EX_ID ( "atan2", FUNCTION, F_atan2, F|A(1,F)|A(2,F), 0), - EX_ID ( "exp", FUNCTION, F_exp, F|A(1,F), 0), - EX_ID ( "pow", FUNCTION, F_pow, F|A(1,F)|A(2,F), 0), - EX_ID ( "log", FUNCTION, F_log, F|A(1,F), 0), - EX_ID ( "MIN", FUNCTION, F_min, F|A(1,F)|A(2,F), 0), - EX_ID ( "MAX", FUNCTION, F_max, F|A(1,F)|A(2,F), 0), - EX_ID ( "system", FUNCTION, F_sys, I|A(1,S), 0), - EX_ID ( "xOf", FUNCTION, F_xof, S|A(1,S), 0), - EX_ID ( "yOf", FUNCTION, F_yof, S|A(1,S), 0), - EX_ID ( "llOf", FUNCTION, F_llof, S|A(1,S), 0), - EX_ID ( "urOf", FUNCTION, F_urof, S|A(1,S), 0), - EX_ID ( "canon", FUNCTION, F_canon, S|A(1,S), 0), - EX_ID ( "aget", FUNCTION, F_get, S|A(1,O)|A(2,S), 0), - EX_ID ( "aset", FUNCTION, F_set, I|A(1,O)|A(2,S)|A(3,S), 0), - EX_ID ( "getDflt", FUNCTION, F_dget, S|A(1,G)|A(2,S)|A(3,S), 0), - EX_ID ( "setDflt", FUNCTION, F_dset, I|A(1,G)|A(2,S)|A(3,S)|A(4,S), 0), - EX_ID ( "hasAttr", FUNCTION, F_hasattr, I|A(1,O)|A(2,S), 0), - EX_ID ( "isAttr", FUNCTION, F_isattr, I|A(1,G)|A(2,S)|A(3,S), 0), - EX_ID ( "fstAttr", FUNCTION, F_fstattr, S|A(1,G)|A(2,S), 0), - EX_ID ( "nxtAttr", FUNCTION, F_nxtattr, S|A(1,G)|A(2,S)|A(3,S), 0), - EX_ID ( "TV_flat", CONSTANT, C_flat, T_tvtyp, 0), - EX_ID ( "TV_ne", CONSTANT, C_ne, T_tvtyp, 0), - EX_ID ( "TV_en", CONSTANT, C_en, T_tvtyp, 0), - EX_ID ( "TV_bfs", CONSTANT, C_bfs, T_tvtyp, 0), - EX_ID ( "TV_dfs", CONSTANT, C_dfs, T_tvtyp, 0), - EX_ID ( "TV_fwd", CONSTANT, C_fwd, T_tvtyp, 0), - EX_ID ( "TV_rev", CONSTANT, C_rev, T_tvtyp, 0), - EX_ID ( "TV_postdfs", CONSTANT, C_postdfs, T_tvtyp, 0), - EX_ID ( "TV_postfwd", CONSTANT, C_postfwd, T_tvtyp, 0), - EX_ID ( "TV_postrev", CONSTANT, C_postrev, T_tvtyp, 0), - EX_ID ( "TV_prepostdfs", CONSTANT, C_prepostdfs, T_tvtyp, 0), - EX_ID ( "TV_prepostfwd", CONSTANT, C_prepostfwd, T_tvtyp, 0), - EX_ID ( "TV_prepostrev", CONSTANT, C_prepostrev, T_tvtyp, 0), - EX_ID ( "NULL", CONSTANT, C_null, T_obj, 0), - EX_ID ( {0}, 0, 0, 0, 0) -}; - -static char* typenames[] = { - "node_t", - "edge_t", - "graph_t", - "obj_t", - "tvtype_t", -}; - -typedef unsigned short tctype; - -static tctype tchk[][2] = { - { 0, 0 }, - { 0, YALL }, - { 0, Y(G) }, - { 0, Y(G) }, - { 0, Y(G) }, - { 0, Y(S) }, - { 0, Y(S) }, - { 0, Y(V) }, - { 0, Y(TV) }, - { 0, Y(I) }, - { Y(V), Y(I) }, - { Y(E), Y(V) }, - { Y(E), Y(V) }, - { YALL, Y(S) }, - { Y(V), Y(I) }, - { Y(V), Y(I) }, - { YALL, Y(G) }, - { Y(G), Y(G) }, - { Y(G), Y(I) }, - { Y(G), Y(I) }, - { Y(G), Y(I) }, - { Y(G), Y(I) }, -}; - -#endif -- 2.40.0