fprintf(Output_file, "%% Created by program: %s version %s (%s)\n",
info[0], info[1], info[2]);
fprintf(Output_file, "%% For user: %s\n", user);
- fprintf(Output_file, "%% Title: %s\n", g->name);
+ fprintf(Output_file, "%% Title: %s\n", agnameof(g));
fprintf(Output_file,
"%% Put this between beginfig and endfig. See 1st_read.mp.\n");
fprintf(Output_file, "%% \n");
fprintf(Output_file, "%s Creator: %s version %s (%s)\n",
EscComment, info[0], info[1], info[2]);
fprintf(Output_file, "%s For: %s\n", EscComment, user);
- fprintf(Output_file, "%s Title: %s\n", EscComment, g->name);
+ fprintf(Output_file, "%s Title: %s\n", EscComment, agnameof(g));
}
static void pic_begin_graph(GVC_t * gvc, graph_t * g, box bb, point pb)
static void pic_begin_node(node_t * n)
{
- fprintf(Output_file, "%s\t%s\n", EscComment, n->name);
+ fprintf(Output_file, "%s\t%s\n", EscComment, agnameof(n));
}
static void pic_begin_edge(edge_t * e)
{
- fprintf(Output_file, "%s\t%s -> %s\n", EscComment, e->tail->name,
- e->head->name);
+ fprintf(Output_file, "%s\t%s -> %s\n", EscComment,
+ agnameof(agtail(e)), agnameof(aghead(e)));
}
static void pic_begin_context(void)
if ((pstyle = checkStyle(n, &istyle)))
gvrender_set_style(job, pstyle);
+#ifndef WITH_CGRAPH
if (N_penwidth && ((s=agxget(n, N_penwidth->index)) && s[0])) {
+#else
+ if (N_penwidth && ((s=agxget(n, N_penwidth)) && s[0])) {
+#endif
penwidth = late_double(n, N_penwidth, 1.0, 0.0);
gvrender_set_penwidth(job, penwidth);
}
if ((width < bb.x) || (height < bb.y))
agerr(AGWARN,
"node '%s', graph '%s' size too small for label\n",
- agnameof(n), agraphof(n)->name);
+ agnameof(n), agnameof(agraphof(n)));
bb.x = width;
bb.y = height;
}
resolvePorts (edge_t* e)
{
if (ED_tail_port(e).dyna)
- ED_tail_port(e) = resolvePort(e->tail, e->head, &ED_tail_port(e));
+ ED_tail_port(e) = resolvePort(agtail(e), aghead(e), &ED_tail_port(e));
if (ED_head_port(e).dyna)
- ED_head_port(e) = resolvePort(e->head, e->tail, &ED_head_port(e));
+ ED_head_port(e) = resolvePort(aghead(e), agtail(e), &ED_head_port(e));
}
ap = agraphattr(g, name, "");
#else /* WITH_CGRAPH */
case AGRAPH:
- ap = agattr(g, AGRAPH,name, "",1);
+ ap = agattr(g, AGRAPH,name, "");
#endif /* WITH_CGRAPH */
break;
case AGNODE:
#ifndef WITH_CGRAPH
ap = agnodeattr(g, name, "");
#else /* WITH_CGRAPH */
- ap = agattr(g,AGNODE, name, "",1);
+ ap = agattr(g,AGNODE, name, "");
#endif /* WITH_CGRAPH */
break;
case AGEDGE:
#ifndef WITH_CGRAPH
ap = agedgeattr(g, name, "");
#else /* WITH_CGRAPH */
- ap = agattr(g,AGEDGE, name, "",1);
+ ap = agattr(g,AGEDGE, name, "");
#endif /* WITH_CGRAPH */
break;
}
memset(&(e->u), 0, sizeof(Agedgeinfo_t));
#else /* WITH_CGRAPH */
/*FIX HERE , shallow cleaning may not be enough here */
- agdelrec(agraphof(e), e, "Agedgeinfo_t");
+ agdelrec(e, "Agedgeinfo_t");
#endif /* WITH_CGRAPH */
}
memset(&(n->u), 0, sizeof(Agnodeinfo_t));
#else /* WITH_CGRAPH */
/*FIX HERE , shallow cleaning may not be enough here */
- agdelrec(agraphof(n), n, "Agnodeinfo_t");
+ agdelrec(n, "Agnodeinfo_t");
#endif /* WITH_CGRAPH */
}
extern void enqueue(nodequeue *, Agnode_t *);
extern Agnode_t *dequeue(nodequeue *);
+#ifndef WITH_CGRAPH
extern int late_attr(void *, char *);
+ extern attrsym_t* safe_dcl(graph_t*, void*, char*, char*,
+ attrsym_t * (*fun) (Agraph_t *, char *, char *));
+#else
+ extern attrsym_t* late_attr(void *obj, char *name);
+ extern attrsym_t* safe_dcl(graph_t * g, int obj_kind, char *name, char *def);
+#endif
extern int late_int(void *, Agsym_t *, int, int);
extern double late_double(void *, Agsym_t *, double, double);
extern char *late_nnstring(void *, Agsym_t *, char *);
extern int processClusterEdges(graph_t * g);
extern void undoClusterEdges(graph_t * g);
- extern attrsym_t* safe_dcl(graph_t*, void*, char*, char*,
- attrsym_t * (*fun) (Agraph_t *, char *, char *));
extern char *latin1ToUTF8(char *);
extern char *htmlEntityUTF8(char *);