shithub: mc

Download patch

ref: cb4e2d4b69b663b99271bd4b29efceb873603f53
parent: ac3035a2c5d8b9580a81852ec9493831b6e13e27
author: Ori Bernstein <[email protected]>
date: Mon Jun 11 09:29:55 EDT 2012

Print labels correctly.

--- a/opt/df.c
+++ b/opt/df.c
@@ -118,7 +118,13 @@
     for (j = 0; j < cfg->nbb; j++) {
         bb = cfg->bb[j];
         fprintf(fd, "\n");
-        fprintf(fd, "Bb: %d\n", bb->id);
+        fprintf(fd, "Bb: %d labels=(", bb->id);
+        sep = "";
+        for (i = 0; i < bb->nlbls; i++) {
+            fprintf(fd, "%s%s", bb->lbls[i], sep);
+            sep = ",";
+        }
+        fprintf(fd, ")\n");
 
         /* in edges */
         fprintf(fd, "In:  ");
@@ -134,7 +140,7 @@
         fprintf(fd, "Out: ");
         sep = "";
         for (i = 0; i < bsmax(bb->out); i++) {
-             if (bshas(bb->in, i)) {
+             if (bshas(bb->out, i)) {
                 fprintf(fd, "%d%s", i, sep);
                 sep = ",";
              }