tmp
authoryu.dongliang <18588496441@163.com>
Thu, 9 Nov 2023 18:19:55 +0000 (02:19 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 9 Nov 2023 18:19:55 +0000 (02:19 +0800)
ses_layout.c

index 41a30bf1cbbd299e2005f882cea6b989d68fb655..c10ad17304da0102acb60bf57d0154329f563fa6 100644 (file)
@@ -736,7 +736,7 @@ static int __ses_layout_lines2(ScfEfunction* f)
                if (cflag && ib < f->n_elines) {
                        el1 = f->elines[ib];
 
-                       eline_mov_before(f, ib, i);
+                       eline_mov_after(f, ib, i);
 
                        scf_logi("mov el%ld [%ld] <--> [%ld] el%ld\n", el0->id, i, ib, el1->id);
                }
@@ -1169,27 +1169,25 @@ static int __ses_de_cross(ScfEfunction* f, int d)
                        scf_loge("**********\n");
                }
 
+               int n = 0;
+
                for (i = 0; i < graph->size; i++) {
                        v         = graph->data[i];
 
+                       c        = v->data;
+
                        if (v->color < 0) {
-                               c = v->data;
+                               c->color = j;
+                               n++;
                                scf_loge("j: %ld, i: %ld, c%ld->color: %ld\n", j, i, c->id, v->color);
-                               break;
-                       }
+                       } else
+                               c->color = v->color;
+                       v->color = 0;
                }
 
-               if (i < graph->size)
+               if (n > 0)
                        break;
 
-               for (i = 0; i < graph->size; i++) {
-                       v         = graph->data[i];
-
-                       c        = v->data;
-                       c->color = v->color;
-                       v->color = 0;
-               }
-
                scf_vector_clear(colors, NULL);
        }
 
@@ -1201,7 +1199,7 @@ static int __ses_de_cross(ScfEfunction* f, int d)
 
        int x1 = 0;
 
-       N = j + 1;
+       N = j;
 
        for (j = 1; j <= N; j++) {
 
@@ -1253,7 +1251,7 @@ static int __ses_de_cross(ScfEfunction* f, int d)
 
        for (i = 0; i < f->n_components; i++) {
                c  =        f->components[i];
-               scf_logd("N: %ld, i: %ld, c%ld->color: %ld\n", N, i, c->id, c->color);
+               scf_logi("N: %ld, i: %ld, c%ld->color: %ld\n", N, i, c->id, c->color);
        }
 
        return 0;