__ses_layout_lines2()
authoryu.dongliang <18588496441@163.com>
Sat, 4 Nov 2023 03:14:20 +0000 (11:14 +0800)
committeryu.dongliang <18588496441@163.com>
Sat, 4 Nov 2023 03:14:20 +0000 (11:14 +0800)
ses_layout.c

index f702e84d1d8bf0b54d06395156c4e27c9eec649a..180d91edf29b68528667712cfd8452fc48cfc37f 100644 (file)
@@ -341,6 +341,20 @@ int ses_lines_same_components(ScfEfunction* f)
        }
 
        qsort(f->elines, f->n_elines, sizeof(ScfEline*), eline_cmp);
+       return 0;
+}
+
+static int __ses_layout_lines2(ScfEfunction* f)
+{
+       ScfEline* tmp;
+       ScfEline* el0;
+       ScfEline* el1;
+       ScfEconn* ec;
+
+       size_t i;
+       size_t j;
+       size_t k0;
+       size_t k1;
 
        if (f->n_elines <= 2)
                return 0;
@@ -502,6 +516,10 @@ static int __ses_layout_lines(ScfEfunction* f, int d)
 
        size_t i;
 
+       int ret = __ses_layout_lines2(f);
+       if (ret < 0)
+               return ret;
+
        for (i = 0; i < f->n_elines; i++) {
                el        = f->elines[i];
 
@@ -522,6 +540,8 @@ static int __ses_layout_lines(ScfEfunction* f, int d)
                if (f->h < l->y0)
                        f->h = l->y0;
        }
+
+       return 0;
 }
 
 static void __ses_layout_components(ScfEfunction* f, int d)