if (job->numLayers <= 1)
return TRUE;
+#ifndef WITH_CGRAPH
+ pg = late_string(sg, agfindattr(sg, "layer"), "");
+#else
pg = late_string(sg, agfindattr(sg, "layer"), "");
+#endif
if (selectedlayer(job, pg))
return TRUE;
if (pg[0])
if (flags & GVRENDER_DOES_MAPS) {
s = agget(e, "id");
if (!s || !*s) { /* no external id, so use the internal one */
- sprintf(buf,"edge%d", AGID(e));
+ sprintf(buf,"edge%ld", AGID(e));
s = buf;
}
obj->id = strdup_and_subst_obj(s, (void*)e);
junk = malloc(strlen(str)+1);
rv = sscanf(str, "%lf,%lf,%lf,\'%[^\']\'", &X, &Y, &Z, nodename);
if (rv == 4) {
+#ifndef WITH_CGRAPH
n = agfindnode(g->root, nodename);
+#else
+ n = agnode(g->root, nodename, 0);
+#endif
if (n) {
x = ND_coord(n).x;
y = ND_coord(n).y;
else {
rv = sscanf(str, "%lf,%lf,%lf,%[^,]%s", &X, &Y, &Z, nodename, junk);
if (rv == 4) {
+#ifndef WITH_CGRAPH
n = agfindnode(g->root, nodename);
+#else
+ n = agnode(g->root, nodename, 0);
+#endif
if (n) {
x = ND_coord(n).x;
y = ND_coord(n).y;
}
#ifdef WITH_CGRAPH
-static void global_def(const char *dcl,int kind,
+static void global_def(char *dcl, int kind,
attrsym_t * ((*dclfun) (Agraph_t *, int kind, char *, char *)) )
{
char *p;
- const char *rhs = "true";
+ char *rhs = "true";
attrsym_t *sym;
if ((p = strchr(dcl, '='))) {
sym->fixed = 1;
}
#else
-static void global_def(const char *dcl,
+static void global_def(char *dcl,
attrsym_t * ((*dclfun) (Agraph_t *, char *, char *)))
{
char *p;
- const char *rhs = "true";
+ char *rhs = "true";
attrsym_t *sym;
if ((p = strchr(dcl, '='))) {
void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv)
{
- char c;
- const char *rest, *val;
+ char c, *rest;
+ const char *val;
int i, v, nfiles;
/* establish if we are running in a CGI environment */
case 'G':
if (*rest)
#ifdef WITH_CGRAPH
- global_def(rest,AGRAPH,agattr);
+ global_def(rest, AGRAPH, agattr);
#else
global_def(rest, agraphattr);
#endif
#endif
}
-/* FIXME - there must be a proper way to get port info - these are
- * supposed to be private to libgraph - from libgraph.h */
-#define TAILX 1
-#define HEADX 2
-
/* _write_plain:
*/
void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend)
}
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
+
+/* FIXME - there must be a proper way to get port info - these are
+ * supposed to be private to libgraph - from libgraph.h */
+#define TAILX 1
+#define HEADX 2
+
#ifndef WITH_CGRAPH
if (extend && e->attr) {
tport = e->attr[TAILX];
hport = e->attr[HEADX];
- } else
+ }
#else /* WITH_CGRAPH */
-
- if (extend) { //assuming these two attrs have already been created by cgraph
-
- tport =agget(e,TAILX);
- hport = agget(e,HEADX);
+ if (extend) { //assuming these two attrs have already been created by cgraph
+ tport = agget(e,TAILX);
+ hport = agget(e,HEADX);
}
- else
#endif /* WITH_CGRAPH */
+ else
tport = hport = "";
if (ED_spl(e)) {
splinePoints = 0;
splinePoints += bz.size;
}
fprintf(f, "edge ");
-#ifndef WITH_CGRAPH
- writenodeandport(f, e->tail, tport);
-#else /* WITH_CGRAPH */
writenodeandport(f, agtail(e), tport);
-#endif /* WITH_CGRAPH */
fprintf(f, " ");
-#ifndef WITH_CGRAPH
- writenodeandport(f, e->head, hport);
-#else /* WITH_CGRAPH */
writenodeandport(f, aghead(e), hport);
-#endif /* WITH_CGRAPH */
fprintf(f, " %d", splinePoints);
for (i = 0; i < ED_spl(e)->size; i++) {
bz = ED_spl(e)->list[i];
NIL(Dtevent_f)
};
-static usershape_t *user_init(char *str)
+static usershape_t *user_init(const char *str)
{
char *contents;
char line[BUFSIZ];
void epsf_init(node_t * n)
{
epsf_t *desc;
- char *str;
+ const char *str;
usershape_t *us;
int dx, dy;
desc->offset.x = -us->x - (dx) / 2;
desc->offset.y = -us->y - (dy) / 2;
} else
-#ifndef WITH_CGRAPH
- agerr(AGWARN, "shapefile not set for epsf node %s\n", n->name);
-#else /* WITH_CGRAPH */
agerr(AGWARN, "shapefile not set for epsf node %s\n", agnameof(n));
-#endif /* WITH_CGRAPH */
}
void epsf_free(node_t * n)