From 525bba04a58f9cc4f3a97562a6937e40e8524028 Mon Sep 17 00:00:00 2001 From: erg Date: Mon, 29 Mar 2010 20:22:04 +0000 Subject: [PATCH] Modify block names used when root graph is anonymous. Otherwise, agwrite doesn't writ them. --- cmd/tools/bcomps.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/tools/bcomps.c b/cmd/tools/bcomps.c index 26e15393a..5b65fc554 100644 --- a/cmd/tools/bcomps.c +++ b/cmd/tools/bcomps.c @@ -102,14 +102,17 @@ static char *blockName(char *gname, int d) static int bufsz; int sz; - sz = strlen(gname) + 32; + sz = strlen(gname) + 128; if (sz > bufsz) { if (buf) free(buf); buf = (char *) malloc(sz); } - sprintf(buf, "%s_bcc_%d", gname, d); + if (*gname == '%') /* anonymous graph */ + sprintf(buf, "_%s_bcc_%d", gname, d); + else + sprintf(buf, "%s_bcc_%d", gname, d); return buf; } -- 2.40.0