char* p;
#ifdef WITH_CGRAPH
- p = late_nnstring(g,agattr(g,AGRAPH,"charset",(char*)0),"utf-8");
+ p = late_nnstring(g,agattr(g,AGRAPH,"charset", NULL),"utf-8");
#else
p = late_nnstring(g,agfindattr(g,"charset"),"utf-8");
#endif
#ifdef WITH_CGRAPH
GD_drawing(g)->quantum =
- late_double(g, agattr(g, AGRAPH, "quantum",(char*)0), 0.0, 0.0);
+ late_double(g, agattr(g, AGRAPH, "quantum", NULL), 0.0, 0.0);
#else
GD_drawing(g)->quantum =
late_double(g, agfindattr(g, "quantum"), 0.0, 0.0);
SET_RANKDIR (g, (rankdir << 2));
#ifdef WITH_CGRAPH
- xf = late_double(g, agattr(g, AGRAPH, "nodesep",(char*)0),
+ xf = late_double(g, agattr(g, AGRAPH, "nodesep", NULL),
DEFAULT_NODESEP, MIN_NODESEP);
#else
xf = late_double(g, agfindattr(g, "nodesep"),
GD_ranksep(g) = POINTS(xf);
#ifdef WITH_CGRAPH
- GD_showboxes(g) = late_int(g, agattr(g,AGRAPH, "showboxes",(char*)0), 0, 0);
- p = late_string(g, agattr(g, AGRAPH,"fontnames",(char*)0), NULL);
+ GD_showboxes(g) = late_int(g, agattr(g,AGRAPH, "showboxes", NULL), 0, 0);
+ p = late_string(g, agattr(g, AGRAPH,"fontnames", NULL), NULL);
#else
GD_showboxes(g) = late_int(g, agfindattr(g, "showboxes"), 0, 0);
p = late_string(g, agfindattr(g, "fontnames"), NULL);
/* initialize nodes */
#ifdef WITH_CGRAPH
- N_height = agattr(g, AGNODE,"height",(char*)0);
- N_width = agattr(g, AGNODE, "width",(char*)0);
- N_shape = agattr(g, AGNODE, "shape",(char*)0);
- N_color = agattr(g, AGNODE, "color",(char*)0);
- N_fillcolor = agattr(g, AGNODE, "fillcolor",(char*)0);
- N_style = agattr(g, AGNODE, "style",(char*)0);
- N_fontsize = agattr(g, AGNODE, "fontsize",(char*)0);
- N_fontname = agattr(g, AGNODE, "fontname",(char*)0);
- N_fontcolor = agattr(g, AGNODE, "fontcolor",(char*)0);
- N_label = agattr(g, AGNODE, "label",(char*)0);
- N_showboxes = agattr(g, AGNODE, "showboxes",(char*)0);
- N_penwidth = agattr(g, AGNODE, "penwidth",(char*)0);
+ N_height = agattr(g, AGNODE,"height", NULL);
+ N_width = agattr(g, AGNODE, "width", NULL);
+ N_shape = agattr(g, AGNODE, "shape", NULL);
+ N_color = agattr(g, AGNODE, "color", NULL);
+ N_fillcolor = agattr(g, AGNODE, "fillcolor", NULL);
+ N_style = agattr(g, AGNODE, "style", NULL);
+ N_fontsize = agattr(g, AGNODE, "fontsize", NULL);
+ N_fontname = agattr(g, AGNODE, "fontname", NULL);
+ N_fontcolor = agattr(g, AGNODE, "fontcolor", NULL);
+ N_label = agattr(g, AGNODE, "label", NULL);
+ N_showboxes = agattr(g, AGNODE, "showboxes", NULL);
+ N_penwidth = agattr(g, AGNODE, "penwidth", NULL);
/* attribs for polygon shapes */
- N_sides = agattr(g, AGNODE, "sides",(char*)0);
- N_peripheries = agattr(g, AGNODE, "peripheries",(char*)0);
- N_skew = agattr(g, AGNODE, "skew",(char*)0);
- N_orientation = agattr(g, AGNODE, "orientation",(char*)0);
- N_distortion = agattr(g, AGNODE, "distortion",(char*)0);
- N_fixed = agattr(g, AGNODE, "fixedsize",(char*)0);
- N_imagescale = agattr(g, AGNODE, "imagescale",(char*)0);
- N_nojustify = agattr(g, AGNODE, "nojustify",(char*)0);
- N_layer = agattr(g, AGNODE, "layer",(char*)0);
- N_group = agattr(g, AGNODE, "group",(char*)0);
- N_comment = agattr(g, AGNODE, "comment",(char*)0);
- N_vertices = agattr(g, AGNODE, "vertices",(char*)0);
- N_z = agattr(g, AGNODE, "z",(char*)0);
+ N_sides = agattr(g, AGNODE, "sides", NULL);
+ N_peripheries = agattr(g, AGNODE, "peripheries", NULL);
+ N_skew = agattr(g, AGNODE, "skew", NULL);
+ N_orientation = agattr(g, AGNODE, "orientation", NULL);
+ N_distortion = agattr(g, AGNODE, "distortion", NULL);
+ N_fixed = agattr(g, AGNODE, "fixedsize", NULL);
+ N_imagescale = agattr(g, AGNODE, "imagescale", NULL);
+ N_nojustify = agattr(g, AGNODE, "nojustify", NULL);
+ N_layer = agattr(g, AGNODE, "layer", NULL);
+ N_group = agattr(g, AGNODE, "group", NULL);
+ N_comment = agattr(g, AGNODE, "comment", NULL);
+ N_vertices = agattr(g, AGNODE, "vertices", NULL);
+ N_z = agattr(g, AGNODE, "z", NULL);
#else
N_height = agfindattr(g->proto->n, "height");
N_width = agfindattr(g->proto->n, "width");
/* initialize edges */
#ifdef WITH_CGRAPH
- E_weight = agattr(g, AGEDGE, "weight",(char*)0);
- E_color = agattr(g, AGEDGE, "color",(char*)0);
- E_fontsize = agattr(g, AGEDGE, "fontsize",(char*)0);
- E_fontname = agattr(g, AGEDGE, "fontname",(char*)0);
- E_fontcolor = agattr(g, AGEDGE, "fontcolor",(char*)0);
- E_label = agattr(g, AGEDGE, "label",(char*)0);
- E_label_float = agattr(g, AGEDGE, "labelfloat",(char*)0);
+ E_weight = agattr(g, AGEDGE, "weight", NULL);
+ E_color = agattr(g, AGEDGE, "color", NULL);
+ E_fontsize = agattr(g, AGEDGE, "fontsize", NULL);
+ E_fontname = agattr(g, AGEDGE, "fontname", NULL);
+ E_fontcolor = agattr(g, AGEDGE, "fontcolor", NULL);
+ E_label = agattr(g, AGEDGE, "label", NULL);
+ E_label_float = agattr(g, AGEDGE, "labelfloat", NULL);
/* vladimir */
- E_dir = agattr(g, AGEDGE, "dir",(char*)0);
- E_arrowhead = agattr(g, AGEDGE, "arrowhead",(char*)0);
- E_arrowtail = agattr(g, AGEDGE, "arrowtail",(char*)0);
- E_headlabel = agattr(g, AGEDGE, "headlabel",(char*)0);
- E_taillabel = agattr(g, AGEDGE, "taillabel",(char*)0);
- E_labelfontsize = agattr(g, AGEDGE, "labelfontsize",(char*)0);
- E_labelfontname = agattr(g, AGEDGE, "labelfontname",(char*)0);
- E_labelfontcolor = agattr(g, AGEDGE, "labelfontcolor",(char*)0);
- E_labeldistance = agattr(g, AGEDGE, "labeldistance",(char*)0);
- E_labelangle = agattr(g, AGEDGE, "labelangle",(char*)0);
+ E_dir = agattr(g, AGEDGE, "dir", NULL);
+ E_arrowhead = agattr(g, AGEDGE, "arrowhead", NULL);
+ E_arrowtail = agattr(g, AGEDGE, "arrowtail", NULL);
+ E_headlabel = agattr(g, AGEDGE, "headlabel", NULL);
+ E_taillabel = agattr(g, AGEDGE, "taillabel", NULL);
+ E_labelfontsize = agattr(g, AGEDGE, "labelfontsize", NULL);
+ E_labelfontname = agattr(g, AGEDGE, "labelfontname", NULL);
+ E_labelfontcolor = agattr(g, AGEDGE, "labelfontcolor", NULL);
+ E_labeldistance = agattr(g, AGEDGE, "labeldistance", NULL);
+ E_labelangle = agattr(g, AGEDGE, "labelangle", NULL);
/* end vladimir */
- E_minlen = agattr(g, AGEDGE, "minlen",(char*)0);
- E_showboxes = agattr(g, AGEDGE, "showboxes",(char*)0);
- E_style = agattr(g, AGEDGE, "style",(char*)0);
- E_decorate = agattr(g, AGEDGE, "decorate",(char*)0);
- E_arrowsz = agattr(g, AGEDGE, "arrowsize",(char*)0);
- E_constr = agattr(g, AGEDGE, "constraint",(char*)0);
- E_layer = agattr(g, AGEDGE, "layer",(char*)0);
- E_comment = agattr(g, AGEDGE, "comment",(char*)0);
- E_tailclip = agattr(g, AGEDGE, "tailclip",(char*)0);
- E_headclip = agattr(g, AGEDGE, "headclip",(char*)0);
- E_penwidth = agattr(g, AGEDGE, "penwidth",(char*)0);
+ E_minlen = agattr(g, AGEDGE, "minlen", NULL);
+ E_showboxes = agattr(g, AGEDGE, "showboxes", NULL);
+ E_style = agattr(g, AGEDGE, "style", NULL);
+ E_decorate = agattr(g, AGEDGE, "decorate", NULL);
+ E_arrowsz = agattr(g, AGEDGE, "arrowsize", NULL);
+ E_constr = agattr(g, AGEDGE, "constraint", NULL);
+ E_layer = agattr(g, AGEDGE, "layer", NULL);
+ E_comment = agattr(g, AGEDGE, "comment", NULL);
+ E_tailclip = agattr(g, AGEDGE, "tailclip", NULL);
+ E_headclip = agattr(g, AGEDGE, "headclip", NULL);
+ E_penwidth = agattr(g, AGEDGE, "penwidth", NULL);
#else
E_weight = agfindattr(g->proto->e, "weight");
E_color = agfindattr(g->proto->e, "color");
#ifdef WITH_CGRAPH
GD_label(sg) = make_label(agroot(sg), str, (aghtmlstr(str) ? LT_HTML : LT_NONE),
- late_double(sg, agattr(sg,AGRAPH,"fontsize",(char*)0),
+ late_double(sg, agattr(sg,AGRAPH,"fontsize", NULL),
DEFAULT_FONTSIZE, MIN_FONTSIZE),
- late_nnstring(sg, agattr(sg,AGRAPH, "fontname",(char*)0),
+ late_nnstring(sg, agattr(sg,AGRAPH, "fontname", NULL),
DEFAULT_FONTNAME),
- late_nnstring(sg, agattr(sg,AGRAPH, "fontcolor",(char*)0),
+ late_nnstring(sg, agattr(sg,AGRAPH, "fontcolor", NULL),
DEFAULT_COLOR));
#else
GD_label(sg) = make_label((void*)sg, str, (aghtmlstr(str) ? LT_HTML : LT_NONE),
ov_val = agxget(g,ov->index);
ov = agfindattr(dg, attr);
#else /* WITH_CGRAPH */
- if ((ov = agattr(g,AGRAPH, attr,(char*)0))) {
+ if ((ov = agattr(g,AGRAPH, attr, NULL))) {
ov_val = agxget(g,ov);
- ov = agattr(dg,AGRAPH, attr,(char*)0);
+ ov = agattr(dg,AGRAPH, attr, NULL);
#endif /* WITH_CGRAPH */
if (ov)
#ifndef WITH_CGRAPH
#ifndef WITH_CGRAPH
de = agedge(dg, tl, hd);
#else /* WITH_CGRAPH */
- de = agedge(dg, tl, hd,(char*)0,1);
+ de = agedge(dg, tl, hd, NULL,1);
#endif /* WITH_CGRAPH */
else
#ifndef WITH_CGRAPH
de = agedge(dg, hd, tl);
#else /* WITH_CGRAPH */
- de = agedge(dg, hd, tl,(char*)0,1);
+ de = agedge(dg, hd, tl, NULL,1);
agbindrec(de, "Agedgeinfo_t", sizeof(Agedgeinfo_t), TRUE); //node custom data
#endif /* WITH_CGRAPH */
ED_dist(de) = ED_dist(e);
#ifndef WITH_CGRAPH
de = agedge(dg, m, dn);
#else /* WITH_CGRAPH */
- de = agedge(dg, m, dn,(char*)0,1);
+ de = agedge(dg, m, dn, NULL,1);
#endif /* WITH_CGRAPH */
else
#ifndef WITH_CGRAPH
de = agedge(dg, dn, m);
#else /* WITH_CGRAPH */
- de = agedge(dg, dn, m,(char*)0,1);
+ de = agedge(dg, dn, m, NULL,1);
#endif /* WITH_CGRAPH */
ED_dist(de) = ED_dist(pp->e);
ED_factor(de) = ED_factor(pp->e);
infop->G_width = agfindattr(g, "width");
infop->G_height = agfindattr(g, "height");
#else /* WITH_CGRAPH */
- infop->G_coord = agattr(g,AGRAPH, "coords",(char*)0);
- infop->G_width = agattr(g,AGRAPH, "width",(char*)0);
- infop->G_height = agattr(g, AGRAPH,"height",(char*)0);
+ infop->G_coord = agattr(g,AGRAPH, "coords", NULL);
+ infop->G_width = agattr(g,AGRAPH, "width", NULL);
+ infop->G_height = agattr(g, AGRAPH,"height", NULL);
#endif /* WITH_CGRAPH */
infop->rootg = g;
infop->gid = 0;
g->u.ndim = late_int(g, agfindattr(g, "dim"), 2, 2);
Ndim = g->u.ndim = MIN(g->u.ndim, MAXDIM);
#else /* WITH_CGRAPH */
- GD_ndim(g) = late_int(g, agattr(g,AGRAPH, "dim",(char*)0), 2, 2);
+ GD_ndim(g) = late_int(g, agattr(g,AGRAPH, "dim", NULL), 2, 2);
Ndim = GD_ndim(g) = MIN(GD_ndim(g), MAXDIM);
#endif /* WITH_CGRAPH */