Commit 5b4ef503 by Alan Mishchenko

Fixed Cudd_DumpDot() to not print leading zeros because of OS-dependent fprintf switch %p.

parent 9d02679e
...@@ -483,9 +483,7 @@ Cudd_DumpDot( ...@@ -483,9 +483,7 @@ Cudd_DumpDot(
scan = nodelist[j]; scan = nodelist[j];
while (scan != NULL) { while (scan != NULL) {
if (st_is_member(visited,(char *) scan)) { if (st_is_member(visited,(char *) scan)) {
retval = fprintf(fp,"\"%p\";\n", retval = fprintf(fp,"\"%lx\";\n", ((mask & (ptrint) scan) / sizeof(DdNode)));
(void *) ((mask & (ptrint) scan) /
sizeof(DdNode)));
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
} }
scan = scan->next; scan = scan->next;
...@@ -506,8 +504,7 @@ Cudd_DumpDot( ...@@ -506,8 +504,7 @@ Cudd_DumpDot(
scan = nodelist[j]; scan = nodelist[j];
while (scan != NULL) { while (scan != NULL) {
if (st_is_member(visited,(char *) scan)) { if (st_is_member(visited,(char *) scan)) {
retval = fprintf(fp,"\"%p\";\n", retval = fprintf(fp,"\"%lx\";\n", ((mask & (ptrint) scan) / sizeof(DdNode)));
(void *) ((mask & (ptrint) scan) / sizeof(DdNode)));
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
} }
scan = scan->next; scan = scan->next;
...@@ -527,11 +524,9 @@ Cudd_DumpDot( ...@@ -527,11 +524,9 @@ Cudd_DumpDot(
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
/* Account for the possible complement on the root. */ /* Account for the possible complement on the root. */
if (Cudd_IsComplement(f[i])) { if (Cudd_IsComplement(f[i])) {
retval = fprintf(fp," -> \"%p\" [style = dotted];\n", retval = fprintf(fp," -> \"%lx\" [style = dotted];\n", ((mask & (ptrint) f[i]) / sizeof(DdNode)));
(void *) ((mask & (ptrint) f[i]) / sizeof(DdNode)));
} else { } else {
retval = fprintf(fp," -> \"%p\" [style = solid];\n", retval = fprintf(fp," -> \"%lx\" [style = solid];\n", ((mask & (ptrint) f[i]) / sizeof(DdNode)));
(void *) ((mask & (ptrint) f[i]) / sizeof(DdNode)));
} }
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
} }
...@@ -545,27 +540,18 @@ Cudd_DumpDot( ...@@ -545,27 +540,18 @@ Cudd_DumpDot(
scan = nodelist[j]; scan = nodelist[j];
while (scan != NULL) { while (scan != NULL) {
if (st_is_member(visited,(char *) scan)) { if (st_is_member(visited,(char *) scan)) {
retval = fprintf(fp, retval = fprintf(fp, "\"%lx\" -> \"%lx\";\n",
"\"%p\" -> \"%p\";\n", ((mask & (ptrint) scan) / sizeof(DdNode)),
(void *) ((mask & (ptrint) scan) / ((mask & (ptrint) cuddT(scan)) / sizeof(DdNode)));
sizeof(DdNode)),
(void *) ((mask & (ptrint) cuddT(scan)) /
sizeof(DdNode)));
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
if (Cudd_IsComplement(cuddE(scan))) { if (Cudd_IsComplement(cuddE(scan))) {
retval = fprintf(fp, retval = fprintf(fp,"\"%lx\" -> \"%lx\" [style = dotted];\n",
"\"%p\" -> \"%p\" [style = dotted];\n", ((mask & (ptrint) scan) / sizeof(DdNode)),
(void *) ((mask & (ptrint) scan) / ((mask & (ptrint) cuddE(scan)) / sizeof(DdNode)));
sizeof(DdNode)),
(void *) ((mask & (ptrint) cuddE(scan)) /
sizeof(DdNode)));
} else { } else {
retval = fprintf(fp, retval = fprintf(fp, "\"%lx\" -> \"%lx\" [style = dashed];\n",
"\"%p\" -> \"%p\" [style = dashed];\n", ((mask & (ptrint) scan) / sizeof(DdNode)),
(void *) ((mask & (ptrint) scan) / ((mask & (ptrint) cuddE(scan)) / sizeof(DdNode)));
sizeof(DdNode)),
(void *) ((mask & (ptrint) cuddE(scan)) /
sizeof(DdNode)));
} }
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
} }
...@@ -582,9 +568,8 @@ Cudd_DumpDot( ...@@ -582,9 +568,8 @@ Cudd_DumpDot(
scan = nodelist[j]; scan = nodelist[j];
while (scan != NULL) { while (scan != NULL) {
if (st_is_member(visited,(char *) scan)) { if (st_is_member(visited,(char *) scan)) {
retval = fprintf(fp,"\"%p\" [label = \"%g\"];\n", retval = fprintf(fp,"\"%lx\" [label = \"%g\"];\n",
(void *) ((mask & (ptrint) scan) / sizeof(DdNode)), ((mask & (ptrint) scan) / sizeof(DdNode)), cuddV(scan));
cuddV(scan));
if (retval == EOF) goto failure; if (retval == EOF) goto failure;
} }
scan = scan->next; scan = scan->next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment