char *name;
char *kind;
char *uniqueName;
- size_t len;
Level++;
stp->attrsNotWritten = AGATTRWF(g);
if (!top && agparent(g)) {
/* this must be anonymous graph */
- len = strlen(name) + sizeof("N_");
- char *bp = gv_calloc(len, sizeof(bp[0]));
- sprintf(bp, "N_%s", name);
+ agxbuf buf = {0};
+ agxbprint(&buf, "N_%s", name);
+ char *bp = agxbuse(&buf);
if (idexists(stp->idList, bp) || !legalGXLName(bp)) {
bp = createNodeId(stp->idList);
} else {
tabover(gxlFile);
fprintf(gxlFile, "<node id=\"%s\">\n", bp);
+ agxbfree(&buf);
Level++;
} else {
Tailport = agattr(g, AGEDGE, "tailport", NULL);