From 66d1d1f3ded2a798ce973fe72b609a76682edccd Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 18 Apr 2008 19:15:47 +0000 Subject: [PATCH] Fix bug 1336 --- lib/common/output.c | 14 +++++--------- lib/graph/graph.h | 1 + 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/common/output.c b/lib/common/output.c index fdf13c580..4a54a6bc6 100644 --- a/lib/common/output.c +++ b/lib/common/output.c @@ -46,10 +46,10 @@ static void writenodeandport(FILE * fp, node_t * node, char *port) { char *name; if (IS_CLUST_NODE(node)) - name = strchr(node->name, ':') + 1; + name = agcanon (strchr(node->name, ':') + 1); else - name = node->name; - fprintf(fp, "%s", agcanonical(name)); /* slimey i know */ + name = agcanonical (node->name); + fprintf(fp, "%s", name); /* slimey i know */ if (port && *port) fprintf(fp, ":%s", agcanonical(port)); } @@ -81,13 +81,9 @@ void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend) fprintf(f, "node %s ", agcanonical(n->name)); printptf(f, ND_coord_i(n)); if (ND_label(n)->html) /* if html, get original text */ - lbl = agxget(n, N_label->index); + lbl = agcanonical (agxget(n, N_label->index)); else - lbl = ND_label(n)->text; - if (lbl) - lbl = agcanonical(lbl); - else - lbl = "\"\""; + lbl = agcanon(ND_label(n)->text); fprintf(f, " %.3f %.3f %s %s %s %s %s\n", ND_width(n), ND_height(n), lbl, late_nnstring(n, N_style, "solid"), diff --git a/lib/graph/graph.h b/lib/graph/graph.h index 7b7111eeb..be537bbbb 100644 --- a/lib/graph/graph.h +++ b/lib/graph/graph.h @@ -136,6 +136,7 @@ extern "C" { #endif extern char *agstrcanon(char *, char *); extern char *agcanonical(char *); + extern char *agcanon(char *); extern int aghtmlstr(char *s); extern char *agget(void *, char *); extern char *agxget(void *, int); -- 2.40.0