From: yu.dongliang <18588496441@163.com> Date: Fri, 10 Nov 2023 04:20:17 +0000 (+0800) Subject: __ses_layout_npn() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=b2b441cdeb33a19b074a3a7902eacc98b9c0c56f;p=ses.git __ses_layout_npn() --- diff --git a/ses_layout.c b/ses_layout.c index 0833fc9..b2fd915 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -688,22 +688,14 @@ end: return ret; } -static int __ses_layout_lines2(ScfEfunction* f) +static void __ses_layout_npn(ScfEfunction* f) { - ScfEline* tmp; ScfEline* el0; ScfEline* el1; - ScfEconn* ec; size_t i; size_t j; - size_t m; - if (f->n_elines <= 2) - return 0; - - __ses_layout_lines4(f); -#if 1 for (i = 0; i < f->n_elines; i++) { el0 = f->elines[i]; @@ -727,7 +719,7 @@ static int __ses_layout_lines2(ScfEfunction* f) if (SCF_EDA_NPN_C == p->id) cflag = 1; - m = __ses_find_eline_index(f, c->pins[SCF_EDA_NPN_B]->lid); + intptr_t m = __ses_find_eline_index(f, c->pins[SCF_EDA_NPN_B]->lid); if (ib > m) ib = m; @@ -741,7 +733,26 @@ static int __ses_layout_lines2(ScfEfunction* f) scf_logi("mov el%ld [%ld] <--> [%ld] el%ld\n", el0->id, i, ib, el1->id); } } -#endif +} + +static int __ses_layout_lines2(ScfEfunction* f) +{ + ScfEline* tmp; + ScfEline* el0; + ScfEline* el1; + ScfEconn* ec; + + size_t i; + size_t j; + size_t m; + + if (f->n_elines <= 2) + return 0; + + __ses_layout_lines4(f); + + __ses_layout_npn(f); + #if 1 for (i = 0; i < f->n_elines; i++) { el0 = f->elines[i]; @@ -1670,8 +1681,8 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_ if (l->x0 > l->x1) continue; - if (!prev) { - snprintf(text, sizeof(text) - 1, "%ld", el->id); + if (1 || !prev) { + snprintf(text, sizeof(text) - 1, "%ld_%ld", el->id, k); cairo_move_to (cr, l->x0 - 30, l->y0 + 5); cairo_show_text(cr, text);