Graphviz 13.0.0~dev.20250511.0440
|
#include "../tcl-compat.h"
#include <math.h>
#include <stddef.h>
#include "tcldot.h"
#include <gvc/gvc.h>
#include <util/alloc.h>
#include <util/strcasecmp.h>
#include <util/streq.h>
#include <util/unreachable.h>
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_t * | cmd2g (const char *cmd) |
Agnode_t * | cmd2n (const char *cmd) |
Agedge_t * | cmd2e (const 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, const char *val) |
void | setgraphattributes (Agraph_t *g, char *argv[], Tcl_Size argc) |
void | setedgeattributes (Agraph_t *g, Agedge_t *e, char *argv[], Tcl_Size argc) |
void | setnodeattributes (Agraph_t *g, Agnode_t *n, char *argv[], Tcl_Size 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, const char *engine) |
char ** | tcldot_argv_dup (Tcl_Size argc, const char *argv[]) |
duplicate the strings pointed to by argv as non-const strings | |
void | tcldot_argv_free (Tcl_Size argc, char *argv[]) |
free the strings pointed to by argv | |
Agedge_t * cmd2e | ( | const char * | cmd | ) |
Definition at line 54 of file tcldot-util.c.
Referenced by edgecmd_internal().
Agraph_t * cmd2g | ( | const char * | cmd | ) |
Definition at line 40 of file tcldot-util.c.
Referenced by graphcmd_internal().
Agnode_t * cmd2n | ( | const char * | cmd | ) |
Definition at line 47 of file tcldot-util.c.
Referenced by graphcmd_internal(), and nodecmd_internal().
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_internal().
Definition at line 113 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_internal().
Definition at line 105 of file tcldot-util.c.
References agfstnode(), agnxtnode(), deleteNode(), and NULL.
Referenced by deleteGraph().
Definition at line 95 of file tcldot-util.c.
References agdelete(), deleteNodeEdges(), gctx_t::g, gctx_t::ictx, ictx_t::interp, and obj2cmd().
Referenced by deleteGraphNodes(), and nodecmd_internal().
Definition at line 87 of file tcldot-util.c.
References agfstedge(), agnxtedge(), deleteEdge(), and NULL.
Referenced by deleteNode().
void listEdgeAttrs | ( | Tcl_Interp * | interp, |
Agraph_t * | g | ||
) |
Definition at line 203 of file tcldot-util.c.
References AGEDGE, agnxtattr(), Agsym_s::name, and NULL.
Referenced by edgecmd_internal(), and graphcmd_internal().
void listGraphAttrs | ( | Tcl_Interp * | interp, |
Agraph_t * | g | ||
) |
Definition at line 189 of file tcldot-util.c.
References agnxtattr(), AGRAPH, Agsym_s::name, and NULL.
Referenced by graphcmd_internal().
void listNodeAttrs | ( | Tcl_Interp * | interp, |
Agraph_t * | g | ||
) |
Definition at line 196 of file tcldot-util.c.
References AGNODE, agnxtattr(), Agsym_s::name, and NULL.
Referenced by graphcmd_internal(), and nodecmd_internal().
|
static |
Definition at line 129 of file tcldot-util.c.
References agraphof(), agstrdup_html(), agxset(), free(), gv_strdup(), len(), Agsym_s::name, and streq().
Referenced by setedgeattributes(), setgraphattributes(), and setnodeattributes().
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_internal(), dotread(), dotstring(), edgecmd_internal(), graphcmd_internal(), myiddisc_idregister(), and nodecmd_internal().
Definition at line 152 of file tcldot-util.c.
References agattr_text(), AGEDGE, agfindedgeattr, agroot(), myagxset(), streq(), and Tcl_Size.
Referenced by edgecmd_internal(), graphcmd_internal(), and nodecmd_internal().
Definition at line 142 of file tcldot-util.c.
References agattr_text(), agfindgraphattr, AGRAPH, agroot(), myagxset(), and Tcl_Size.
Referenced by dotnew_internal(), and graphcmd_internal().
Definition at line 173 of file tcldot-util.c.
References agattr_text(), agfindnodeattr, AGNODE, agroot(), myagxset(), and Tcl_Size.
Referenced by graphcmd_internal(), and nodecmd_internal().
char ** tcldot_argv_dup | ( | Tcl_Size | argc, |
const char * | argv[] | ||
) |
Definition at line 232 of file tcldot-util.c.
References gv_calloc(), gv_strdup(), and Tcl_Size.
Referenced by dotnew(), edgecmd(), edgecmd_internal(), graphcmd(), graphcmd_internal(), nodecmd(), and nodecmd_internal().
void tcldot_argv_free | ( | Tcl_Size | argc, |
char * | argv[] | ||
) |
Definition at line 241 of file tcldot-util.c.
References free(), and Tcl_Size.
Referenced by dotnew(), edgecmd(), edgecmd_internal(), graphcmd(), graphcmd_internal(), nodecmd(), and nodecmd_internal().
size_t Tcldot_channel_writer | ( | GVJ_t * | job, |
const char * | s, | ||
size_t | len | ||
) |
Definition at line 28 of file tcldot-util.c.
References len(), GVJ_s::output_file, Tcl_Size, and TCL_SIZE_MAX.
Referenced by graphcmd_internal().
Definition at line 211 of file tcldot-util.c.
References agisdirected(), engine, gvc, gvFreeLayout(), gvLayout(), Nop, POINTS_PER_INCH, and PSinputscale.
Referenced by graphcmd_internal().
size_t Tcldot_string_writer | ( | GVJ_t * | job, |
const char * | s, | ||
size_t | len | ||
) |
Definition at line 21 of file tcldot-util.c.
References GVJ_s::context, tcldot_context_t::interp, len(), and NULL.
Referenced by graphcmd_internal().