38 *ip = (int)strtol (
s, &endp, 10);
49 *ip = (
unsigned int)strtoul (
s, &endp, 10);
60 rp->
x = strtod (
s, &endp);
66 rp->
y = strtod (
s, &endp);
72 rp->
w = strtod (
s, &endp);
78 rp->
h = strtod (
s, &endp);
98 for (i = 0; i < pp->
cnt; i++) {
99 ps->x = strtod (
s, &endp);
106 ps->y = strtod (
s, &endp);
124 if (!
s || i <= 0)
return 0;
125 while (*
s && *
s !=
'-')
s++;
137 for (
int accounted = 0; accounted < i; ++j) {
144 if (
s[j] !=
'\\' || (j > 0 &&
s[j - 1] ==
'\\')) {
167#define CHK(s) if(!s){*error=1;return 0;}
360 size_t initcnt = x->
cnt;
373 if (x->
cnt == bufsz) {
405typedef int (*
pf)(
void*,
char*, ...);
431 for (
size_t i = 0; i < p->
cnt; i++) {
503 for (i = 0; i < n_stops; i++) {
599 print(
info,
"[%.06f,%.06f,%.06f,%.06f]", r->
x, r->
y, r->
w, r->
h);
605 for (
size_t i = 0; i < p->
cnt; i++) {
717 char *base = (
char *) (x->
ops);
718 for (
size_t i = 0; i < x->
cnt; i++) {
789 base = (
char *) (x->
ops);
790 for (
size_t i = 0; i < x->
cnt; i++) {
804 if (!x || !sp)
return 1;
807 base = (
char *) (x->
ops);
808 for (
size_t i = 0; i < x->
cnt; i++) {
860#define CHK1(s) if(!s){free(stops);return NULL;}
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
static int agxbputc(agxbuf *xb, char c)
add character to buffer
static char * agxbdisown(agxbuf *xb)
Memory allocation wrappers that exit on failure.
static void * gv_recalloc(void *ptr, size_t old_nmemb, size_t new_nmemb, size_t size)
static void * gv_calloc(size_t nmemb, size_t size)
static void * gv_alloc(size_t size)
static void print(Excc_t *cc, Exnode_t *exnode)
static int cnt(Dict_t *d, Dtlink_t **set)
replacements for ctype.h functions
static bool gv_isalnum(int c)
static bool gv_isspace(int c)
static void color(Agraph_t *g)
#define PRISIZE_T
PRIu64 alike for printing size_t
static void printAlign(xdot_align a, pf print, void *info)
void(* print_op)(xdot_op *op, pf print, void *info, int more)
static void printFloat(double f, pf print, void *info, int space)
static void jsonXDot_Op(xdot_op *op, pf print, void *info, int more)
xdot * parseXDotFOn(char *s, drawfunc_t fns[], size_t sz, xdot *x)
static char * linGradient(char *cp, xdot_color *clr)
static void printRect(xdot_rect *r, pf print, void *info)
static char * parseReal(char *s, double *fp)
int(* pf)(void *, char *,...)
char * parseXDotColor(char *cp, xdot_color *clr)
static char * parseString(char *s, char **sp)
static void printXDot_Op(xdot_op *op, pf print, void *info, int more)
static void jsonPolyline(xdot_polyline *p, pf print, void *info)
int statXDot(xdot *x, xdot_stats *sp)
static void printString(char *p, pf print, void *info)
static char * parseRect(char *s, xdot_rect *rp)
static char * parseAlign(char *s, xdot_align *ap)
static void freeXOpData(xdot_op *x)
static void printPolyline(xdot_polyline *p, pf print, void *info)
char * sprintXDot(xdot *x)
static void jsonString(char *p, pf print, void *info)
static char * parseInt(char *s, int *ip)
void freeXDotColor(xdot_color *cp)
void fprintXDot(FILE *fp, xdot *x)
static char * parseOp(xdot_op *op, char *s, drawfunc_t ops[], int *error)
xdot * parseXDotF(char *s, drawfunc_t fns[], size_t sz)
static char * parseUInt(char *s, unsigned int *ip)
xdot * parseXDot(char *s)
static void _printXDot(xdot *x, pf print, void *info, print_op ofn)
static void jsonRect(xdot_rect *r, pf print, void *info)
static void toGradString(agxbuf *xb, xdot_color *cp)
static char * parsePolyline(char *s, xdot_polyline *pp)
static char * radGradient(char *cp, xdot_color *clr)
void jsonXDot(FILE *fp, xdot *x)
parsing and deparsing of xdot operations
void(* freefunc_t)(xdot_op *)
void(* drawfunc_t)(xdot_op *, int)