19 Tcl_AppendResult((Tcl_Interp*)(job->
context), s,
NULL);
25 return Tcl_Write((Tcl_Channel)(job->
output_file), s, len);
33 if (sscanf(cmd,
"graph%p", &g) != 1 || !g)
40 if (sscanf(cmd,
"node%p", &n) != 1 || !n)
47 if (sscanf(cmd,
"edge%p", &e) != 1 || !e)
59 case AGRAPH: sprintf(buf,
"graph%p",obj);
break;
60 case AGNODE: sprintf(buf,
"node%p",obj);
break;
62 case AGOUTEDGE: sprintf(buf,
"edge%p",obj);
break;
91 deleteNodeEdges(gctx, gctx->
g, n);
116 deleteGraphNodes(gctx, g);
127 static void myagxset(
void *obj,
Agsym_t *a,
char *val)
132 if (a->
name[0] ==
'l' && val[0] ==
'<' && strcmp(a->
name,
"label") == 0) {
134 if (val[len-1] ==
'>') {
148 for (i = 0; i < argc; i++) {
151 myagxset(g, a, argv[++i]);
160 for (i = 0; i < argc; i++) {
162 if (strcmp(argv[i],
"key") == 0) {
169 myagxset(e, a, argv[++i]);
183 for (i = 0; i < argc; i++) {
187 myagxset(n, a, argv[++i]);
200 Tcl_AppendElement(interp, a->
name);
207 Tcl_AppendElement(interp, a->
name);
214 Tcl_AppendElement(interp, a->
name);
227 if (!engine || *engine ==
'\0') {
246 fprintf(stderr,
"Layout type: \"%s\" not recognized. Use one of:%s\n",
256 sprintf(buf,
"%d %d %d %d",
260 sprintf(buf,
"%d %d %d %d",
Agraph_t * cmd2g(char *cmd)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, char *value)
void listNodeAttrs(Tcl_Interp *interp, Agraph_t *g)
Agnode_t * cmd2n(char *cmd)
Agsym_t * agnxtattr(Agraph_t *g, int kind, Agsym_t *attr)
void setgraphattributes(Agraph_t *g, char *argv[], int argc)
int agxset(void *obj, Agsym_t *sym, char *value)
char * obj2cmd(void *obj)
CGRAPH_API int agisdirected(Agraph_t *g)
CGRAPH_API long agdelsubg(Agraph_t *g, Agraph_t *sub)
void listGraphAttrs(Tcl_Interp *interp, Agraph_t *g)
CGRAPH_API Agedge_t * agfstedge(Agraph_t *g, Agnode_t *n)
CGRAPH_API int agdelete(Agraph_t *g, void *obj)
int gvFreeLayout(GVC_t *gvc, graph_t *g)
CGRAPH_API Agraph_t * agfstsubg(Agraph_t *g)
CGRAPH_API Agraph_t * agroot(void *obj)
CGRAPH_API char * agstrdup_html(Agraph_t *, char *)
void listEdgeAttrs(Tcl_Interp *interp, Agraph_t *g)
int gvlayout_select(GVC_t *gvc, const char *str)
CGRAPH_API Agraph_t * agraphof(void *obj)
CGRAPH_API Agraph_t * agnxtsubg(Agraph_t *subg)
size_t Tcldot_channel_writer(GVJ_t *job, const char *s, size_t len)
int gvLayoutJobs(GVC_t *gvc, graph_t *g)
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
CGRAPH_API int agclose(Agraph_t *g)
size_t Tcldot_string_writer(GVJ_t *job, const char *s, size_t len)
Agedge_t * cmd2e(char *cmd)
void deleteEdge(gctx_t *gctx, Agraph_t *g, Agedge_t *e)
#define agfindedgeattr(g, a)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
CGRAPH_API Agedge_t * agnxtedge(Agraph_t *g, Agedge_t *e, Agnode_t *n)
#define agfindgraphattr(g, a)
void setedgeattributes(Agraph_t *g, Agedge_t *e, char *argv[], int argc)
int strcasecmp(const char *s1, const char *s2)
char * gvplugin_list(GVC_t *gvc, api_t api, const char *str)
void deleteNode(gctx_t *gctx, Agraph_t *g, Agnode_t *n)
void setnodeattributes(Agraph_t *g, Agnode_t *n, char *argv[], int argc)
void deleteGraph(gctx_t *gctx, Agraph_t *g)
EXTERN double PSinputscale
void tcldot_layout(GVC_t *gvc, Agraph_t *g, char *engine)
#define agfindnodeattr(g, a)