diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-02-16 12:21:58 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-02-16 12:21:58 -0800 |
commit | 5b4ef503bd660c1df7e1739d8f1502cb01341904 (patch) | |
tree | 93b555bcfcfa440c0ce66cebb600f63a9f66a96c /src/bdd | |
parent | 9d02679ef74389e18479a732da2b55bc97c0de83 (diff) | |
download | abc-5b4ef503bd660c1df7e1739d8f1502cb01341904.tar.gz abc-5b4ef503bd660c1df7e1739d8f1502cb01341904.tar.bz2 abc-5b4ef503bd660c1df7e1739d8f1502cb01341904.zip |
Fixed Cudd_DumpDot() to not print leading zeros because of OS-dependent fprintf switch %p.
Diffstat (limited to 'src/bdd')
-rw-r--r-- | src/bdd/cudd/cuddExport.c | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/src/bdd/cudd/cuddExport.c b/src/bdd/cudd/cuddExport.c index 255baabf..3b2e989d 100644 --- a/src/bdd/cudd/cuddExport.c +++ b/src/bdd/cudd/cuddExport.c @@ -483,9 +483,7 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,(char *) scan)) { - retval = fprintf(fp,"\"%p\";\n", - (void *) ((mask & (ptrint) scan) / - sizeof(DdNode))); + retval = fprintf(fp,"\"%lx\";\n", ((mask & (ptrint) scan) / sizeof(DdNode))); if (retval == EOF) goto failure; } scan = scan->next; @@ -506,8 +504,7 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,(char *) scan)) { - retval = fprintf(fp,"\"%p\";\n", - (void *) ((mask & (ptrint) scan) / sizeof(DdNode))); + retval = fprintf(fp,"\"%lx\";\n", ((mask & (ptrint) scan) / sizeof(DdNode))); if (retval == EOF) goto failure; } scan = scan->next; @@ -527,11 +524,9 @@ Cudd_DumpDot( if (retval == EOF) goto failure; /* Account for the possible complement on the root. */ if (Cudd_IsComplement(f[i])) { - retval = fprintf(fp," -> \"%p\" [style = dotted];\n", - (void *) ((mask & (ptrint) f[i]) / sizeof(DdNode))); + retval = fprintf(fp," -> \"%lx\" [style = dotted];\n", ((mask & (ptrint) f[i]) / sizeof(DdNode))); } else { - retval = fprintf(fp," -> \"%p\" [style = solid];\n", - (void *) ((mask & (ptrint) f[i]) / sizeof(DdNode))); + retval = fprintf(fp," -> \"%lx\" [style = solid];\n", ((mask & (ptrint) f[i]) / sizeof(DdNode))); } if (retval == EOF) goto failure; } @@ -545,27 +540,18 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,(char *) scan)) { - retval = fprintf(fp, - "\"%p\" -> \"%p\";\n", - (void *) ((mask & (ptrint) scan) / - sizeof(DdNode)), - (void *) ((mask & (ptrint) cuddT(scan)) / - sizeof(DdNode))); + retval = fprintf(fp, "\"%lx\" -> \"%lx\";\n", + ((mask & (ptrint) scan) / sizeof(DdNode)), + ((mask & (ptrint) cuddT(scan)) / sizeof(DdNode))); if (retval == EOF) goto failure; if (Cudd_IsComplement(cuddE(scan))) { - retval = fprintf(fp, - "\"%p\" -> \"%p\" [style = dotted];\n", - (void *) ((mask & (ptrint) scan) / - sizeof(DdNode)), - (void *) ((mask & (ptrint) cuddE(scan)) / - sizeof(DdNode))); + retval = fprintf(fp,"\"%lx\" -> \"%lx\" [style = dotted];\n", + ((mask & (ptrint) scan) / sizeof(DdNode)), + ((mask & (ptrint) cuddE(scan)) / sizeof(DdNode))); } else { - retval = fprintf(fp, - "\"%p\" -> \"%p\" [style = dashed];\n", - (void *) ((mask & (ptrint) scan) / - sizeof(DdNode)), - (void *) ((mask & (ptrint) cuddE(scan)) / - sizeof(DdNode))); + retval = fprintf(fp, "\"%lx\" -> \"%lx\" [style = dashed];\n", + ((mask & (ptrint) scan) / sizeof(DdNode)), + ((mask & (ptrint) cuddE(scan)) / sizeof(DdNode))); } if (retval == EOF) goto failure; } @@ -582,9 +568,8 @@ Cudd_DumpDot( scan = nodelist[j]; while (scan != NULL) { if (st_is_member(visited,(char *) scan)) { - retval = fprintf(fp,"\"%p\" [label = \"%g\"];\n", - (void *) ((mask & (ptrint) scan) / sizeof(DdNode)), - cuddV(scan)); + retval = fprintf(fp,"\"%lx\" [label = \"%g\"];\n", + ((mask & (ptrint) scan) / sizeof(DdNode)), cuddV(scan)); if (retval == EOF) goto failure; } scan = scan->next; |