Graphviz  2.41.20171026.1811
Data Structures | Macros | Typedefs | Functions
xdot.c File Reference
#include <xdot.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Include dependency graph for xdot.c:

Go to the source code of this file.

Data Structures

struct  agxbuf
 

Macros

#define NEW(t)   (t*)calloc(1, sizeof(t))
 
#define N_NEW(n, t)   (t*)calloc((n), sizeof(t))
 
#define agxbputc(X, C)
 
#define agxbuse(X)   (agxbputc(X,'\0'),(char*)((X)->ptr = (X)->buf))
 
#define CHK(s)   if(!s){*error=1;return 0;}
 
#define XDBSIZE   100
 
#define CHK1(s)   if(!s){free(stops);return NULL;}
 

Typedefs

typedef void(* pf )(char *, void *)
 
typedef void(* print_op )(xdot_op *op, pf print, void *info, int more)
 

Functions

xdotparseXDotFOn (char *s, drawfunc_t fns[], int sz, xdot *x)
 
xdotparseXDotF (char *s, drawfunc_t fns[], int sz)
 
xdotparseXDot (char *s)
 
char * sprintXDot (xdot *x)
 
void fprintXDot (FILE *fp, xdot *x)
 
void jsonXDot (FILE *fp, xdot *x)
 
void freeXDot (xdot *x)
 
int statXDot (xdot *x, xdot_stats *sp)
 
xdot_grad_type colorType (char *cp)
 
char * parseXDotColor (char *cp, xdot_color *clr)
 
void freeXDotColor (xdot_color *cp)
 

Macro Definition Documentation

#define agxbputc (   X,
  C 
)
Value:
((((X)->ptr >= (X)->eptr) ? agxbmore(X,1) : 0), \
(void)(*(X)->ptr++ = ((unsigned char)C)))
#define C
Definition: pack.c:29
int agxbmore(agxbuf *xb, size_t ssz)
Definition: agxbuf.c:44

Definition at line 28 of file xdot.c.

#define agxbuse (   X)    (agxbputc(X,'\0'),(char*)((X)->ptr = (X)->buf))

Definition at line 30 of file xdot.c.

Referenced by sprintXDot().

#define CHK (   s)    if(!s){*error=1;return 0;}

Definition at line 257 of file xdot.c.

#define CHK1 (   s)    if(!s){free(stops);return NULL;}

Definition at line 1044 of file xdot.c.

#define N_NEW (   n,
 
)    (t*)calloc((n), sizeof(t))

Definition at line 19 of file xdot.c.

#define NEW (   t)    (t*)calloc(1, sizeof(t))

Definition at line 18 of file xdot.c.

Referenced by parseXDotFOn().

#define XDBSIZE   100

Definition at line 427 of file xdot.c.

Referenced by parseXDotFOn().

Typedef Documentation

typedef void(* pf)(char *, void *)

Definition at line 501 of file xdot.c.

typedef void(* print_op)(xdot_op *op, pf print, void *info, int more)

Definition at line 646 of file xdot.c.

Function Documentation

xdot_grad_type colorType ( char *  cp)

Definition at line 1026 of file xdot.c.

References xd_linear, xd_none, and xd_radial.

void fprintXDot ( FILE *  fp,
xdot x 
)

Definition at line 894 of file xdot.c.

void freeXDot ( xdot x)

Definition at line 945 of file xdot.c.

References xdot::cnt, xdot::freefunc, xdot::ops, and xdot::sz.

Referenced by graph_cleanup().

void freeXDotColor ( xdot_color cp)
void jsonXDot ( FILE *  fp,
xdot x 
)

Definition at line 899 of file xdot.c.

xdot* parseXDot ( char *  s)

Definition at line 496 of file xdot.c.

References parseXDotF().

char* parseXDotColor ( char *  cp,
xdot_color clr 
)

Definition at line 1130 of file xdot.c.

References xdot_color::clr, NULL, xdot_color::type, xdot_color::u, and xd_none.

xdot* parseXDotF ( char *  s,
drawfunc_t  fns[],
int  sz 
)

Definition at line 491 of file xdot.c.

References NULL, and parseXDotFOn().

Referenced by init_xdot(), and parseXDot().

xdot* parseXDotFOn ( char *  s,
drawfunc_t  fns[],
int  sz,
xdot x 
)

Definition at line 433 of file xdot.c.

References xdot::cnt, xdot::flags, NEW, NULL, xdot::ops, xdot::sz, XDBSIZE, and XDOT_PARSE_ERROR.

Referenced by parseXDotF().

char* sprintXDot ( xdot x)

Definition at line 881 of file xdot.c.

References agxbfree(), agxbinit(), agxbput(), and agxbuse.

int statXDot ( xdot x,
xdot_stats sp 
)