Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
tcldot-util.c File Reference
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include "tcldot.h"
#include <cgraph/strcasecmp.h>
#include <cgraph/unreachable.h>
#include <gvc/gvc.h>
Include dependency graph for tcldot-util.c:

Go to the source code of this file.

Functions

size_t Tcldot_string_writer (GVJ_t *job, const char *s, size_t len)
 
size_t Tcldot_channel_writer (GVJ_t *job, const char *s, size_t len)
 
Agraph_tcmd2g (char *cmd)
 
Agnode_tcmd2n (char *cmd)
 
Agedge_tcmd2e (char *cmd)
 
char * obj2cmd (void *obj)
 
void deleteEdge (gctx_t *gctx, Agraph_t *g, Agedge_t *e)
 
static void deleteNodeEdges (gctx_t *gctx, Agraph_t *g, Agnode_t *n)
 
void deleteNode (gctx_t *gctx, Agraph_t *g, Agnode_t *n)
 
static void deleteGraphNodes (gctx_t *gctx, Agraph_t *g)
 
void deleteGraph (gctx_t *gctx, Agraph_t *g)
 
static void myagxset (void *obj, Agsym_t *a, char *val)
 
void setgraphattributes (Agraph_t *g, char *argv[], int argc)
 
void setedgeattributes (Agraph_t *g, Agedge_t *e, char *argv[], int argc)
 
void setnodeattributes (Agraph_t *g, Agnode_t *n, char *argv[], int argc)
 
void listGraphAttrs (Tcl_Interp *interp, Agraph_t *g)
 
void listNodeAttrs (Tcl_Interp *interp, Agraph_t *g)
 
void listEdgeAttrs (Tcl_Interp *interp, Agraph_t *g)
 
void tcldot_layout (GVC_t *gvc, Agraph_t *g, char *engine)
 

Function Documentation

◆ cmd2e()

Agedge_t * cmd2e ( char *  cmd)

Definition at line 54 of file tcldot-util.c.

References cmd, and NULL.

Referenced by edgecmd().

Here is the caller graph for this function:

◆ cmd2g()

Agraph_t * cmd2g ( char *  cmd)

Definition at line 40 of file tcldot-util.c.

References cmd, and NULL.

Referenced by graphcmd().

Here is the caller graph for this function:

◆ cmd2n()

Agnode_t * cmd2n ( char *  cmd)

Definition at line 47 of file tcldot-util.c.

References cmd, and NULL.

Referenced by graphcmd(), and nodecmd().

Here is the caller graph for this function:

◆ deleteEdge()

void deleteEdge ( gctx_t gctx,
Agraph_t g,
Agedge_t e 
)

Definition at line 79 of file tcldot-util.c.

References agdelete(), gctx_t::g, gctx_t::ictx, ictx_t::interp, and obj2cmd().

Referenced by deleteNodeEdges(), and edgecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteGraph()

void deleteGraph ( gctx_t gctx,
Agraph_t g 
)

Definition at line 123 of file tcldot-util.c.

References agclose(), agdelsubg(), agfstsubg(), agnxtsubg(), agroot(), deleteGraph(), deleteGraphNodes(), gctx_t::ictx, ictx_t::interp, and obj2cmd().

Referenced by deleteGraph(), and graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteGraphNodes()

static void deleteGraphNodes ( gctx_t gctx,
Agraph_t g 
)
static

Definition at line 112 of file tcldot-util.c.

References agfstnode(), agnxtnode(), and deleteNode().

Referenced by deleteGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteNode()

void deleteNode ( gctx_t gctx,
Agraph_t g,
Agnode_t n 
)

Definition at line 100 of file tcldot-util.c.

References agdelete(), deleteNodeEdges(), gctx_t::g, gctx_t::ictx, ictx_t::interp, and obj2cmd().

Referenced by deleteGraphNodes(), and nodecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteNodeEdges()

static void deleteNodeEdges ( gctx_t gctx,
Agraph_t g,
Agnode_t n 
)
static

Definition at line 89 of file tcldot-util.c.

References agfstedge(), agnxtedge(), and deleteEdge().

Referenced by deleteNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listEdgeAttrs()

void listEdgeAttrs ( Tcl_Interp *  interp,
Agraph_t g 
)

Definition at line 224 of file tcldot-util.c.

References AGEDGE, agnxtattr(), Agsym_s::name, and NULL.

Referenced by edgecmd(), and graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listGraphAttrs()

void listGraphAttrs ( Tcl_Interp *  interp,
Agraph_t g 
)

Definition at line 210 of file tcldot-util.c.

References agnxtattr(), AGRAPH, Agsym_s::name, and NULL.

Referenced by graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listNodeAttrs()

void listNodeAttrs ( Tcl_Interp *  interp,
Agraph_t g 
)

Definition at line 217 of file tcldot-util.c.

References AGNODE, agnxtattr(), Agsym_s::name, and NULL.

Referenced by graphcmd(), and nodecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ myagxset()

static void myagxset ( void *  obj,
Agsym_t a,
char *  val 
)
static

Definition at line 142 of file tcldot-util.c.

References agraphof(), agstrdup_html(), agxset(), free(), len(), and Agsym_s::name.

Referenced by setedgeattributes(), setgraphattributes(), and setnodeattributes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ obj2cmd()

char * obj2cmd ( void *  obj)

Definition at line 65 of file tcldot-util.c.

References AGINEDGE, AGNODE, AGOUTEDGE, AGRAPH, AGTYPE, and UNREACHABLE.

Referenced by deleteEdge(), deleteGraph(), deleteNode(), dotnew(), dotread(), dotstring(), edgecmd(), graphcmd(), myiddisc_idregister(), and nodecmd().

Here is the caller graph for this function:

◆ setedgeattributes()

void setedgeattributes ( Agraph_t g,
Agedge_t e,
char *  argv[],
int  argc 
)

Definition at line 169 of file tcldot-util.c.

References agattr(), AGEDGE, agfindedgeattr, agroot(), and myagxset().

Referenced by edgecmd(), graphcmd(), and nodecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setgraphattributes()

void setgraphattributes ( Agraph_t g,
char *  argv[],
int  argc 
)

Definition at line 157 of file tcldot-util.c.

References agattr(), agfindgraphattr, AGRAPH, agroot(), and myagxset().

Referenced by dotnew(), and graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setnodeattributes()

void setnodeattributes ( Agraph_t g,
Agnode_t n,
char *  argv[],
int  argc 
)

Definition at line 192 of file tcldot-util.c.

References agattr(), agfindnodeattr, AGNODE, agroot(), and myagxset().

Referenced by graphcmd(), and nodecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Tcldot_channel_writer()

size_t Tcldot_channel_writer ( GVJ_t job,
const char *  s,
size_t  len 
)

Definition at line 26 of file tcldot-util.c.

References len(), and GVJ_s::output_file.

Referenced by graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tcldot_layout()

void tcldot_layout ( GVC_t gvc,
Agraph_t g,
char *  engine 
)

Definition at line 232 of file tcldot-util.c.

References agisdirected(), engine, gvc, gvFreeLayout(), gvLayout(), Nop, POINTS_PER_INCH, and PSinputscale.

Referenced by graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Tcldot_string_writer()

size_t Tcldot_string_writer ( GVJ_t job,
const char *  s,
size_t  len 
)

Definition at line 19 of file tcldot-util.c.

References GVJ_s::context, tcldot_context_t::interp, len(), and NULL.

Referenced by graphcmd().

Here is the call graph for this function:
Here is the caller graph for this function: