diff --git a/buddy/ChangeLog b/buddy/ChangeLog index 19934f202..b45674bc0 100644 --- a/buddy/ChangeLog +++ b/buddy/ChangeLog @@ -1,3 +1,8 @@ +2010-01-21 Alexandre Duret-Lutz + + * src/bddio.c (bdd_load): Check the return value of fscanf() to + kill a warning. + 2009-12-09 Alexandre Duret-Lutz Inline bdd_addref() and bdd_delref() to speedup BDD operations. diff --git a/buddy/src/bddio.c b/buddy/src/bddio.c index 689ff29ff..f5bdc4fe9 100644 --- a/buddy/src/bddio.c +++ b/buddy/src/bddio.c @@ -125,7 +125,7 @@ void bdd_printall(void) void bdd_fprintall(FILE *ofile) { int n; - + for (n=0 ; n\\ $\ldots$ \\ < $x_{N,1}:c_{N,1},\ldots,x_{N,n_3}:c_{N,n_3}$ > } - \end{Ill} + \end{Ill} Where the $x$'s are variable numbers (and the position in the current order) and the $c$'s are the possible assignments to these. Each set of brackets designates @@ -232,7 +232,7 @@ void bdd_printset(BDD r) void bdd_fprintset(FILE *ofile, BDD r) { int *set; - + if (r < 2) { fprintf(ofile, "%s", r == 0 ? "F" : "T"); @@ -244,7 +244,7 @@ void bdd_fprintset(FILE *ofile, BDD r) bdd_error(BDD_MEMORY); return; } - + memset(set, 0, sizeof(int) * bddvarnum); bdd_printset_rec(ofile, r, set); free(set); @@ -255,7 +255,7 @@ static void bdd_printset_rec(FILE *ofile, int r, int *set) { int n; int first; - + if (r == 0) return; else @@ -263,7 +263,7 @@ static void bdd_printset_rec(FILE *ofile, int r, int *set) { fprintf(ofile, "<"); first = 1; - + for (n=0 ; n 0) @@ -285,10 +285,10 @@ static void bdd_printset_rec(FILE *ofile, int r, int *set) { set[LEVEL(r)] = 1; bdd_printset_rec(ofile, LOW(r), set); - + set[LEVEL(r)] = 2; bdd_printset_rec(ofile, HIGH(r), set); - + set[LEVEL(r)] = 0; } } @@ -356,7 +356,7 @@ static void bdd_fprintdot_rec(FILE* ofile, BDD r) fprintf(ofile, "%d -> %d [style=filled];\n", r, HIGH(r)); SETMARK(r); - + bdd_fprintdot_rec(ofile, LOW(r)); bdd_fprintdot_rec(ofile, HIGH(r)); } @@ -401,7 +401,7 @@ int bdd_save(FILE *ofile, BDD r) fprintf(ofile, "0 0 %d\n", r); return 0; } - + bdd_markcount(r, &n); bdd_unmark(r); fprintf(ofile, "%d %d\n", n, bddvarnum); @@ -409,7 +409,7 @@ int bdd_save(FILE *ofile, BDD r) for (n=0 ; n bddvarnum) bdd_setvarnum(vnum); if ((lh_table=(LoadHash*)malloc(lh_nodenum*sizeof(LoadHash))) == NULL) return bdd_error(BDD_MEMORY); - + for (n=0 ; n