return 0;
}
+int epin_cmp_npn_c(const void* v0, const void* v1, void* arg)
+{
+ const uint64_t* t0 = v0;
+ const uint64_t* t1 = v1;
+
+ ScfEfunction* f = arg;
+ ScfEcomponent* c0 = f->components[t0[0]];
+ ScfEcomponent* c1 = f->components[t1[0]];
+ ScfEpin* p0 = c0->pins[t0[1]];
+ ScfEpin* p1 = c1->pins[t1[1]];
+
+ if (SCF_EDA_NPN != c0->type)
+ return 1;
+ if (SCF_EDA_NPN != c1->type)
+ return -1;
+
+ if (SCF_EDA_NPN_E != p0->id)
+ return 1;
+ if (SCF_EDA_NPN_E != p1->id)
+ return -1;
+
+ ScfEpin* pb0 = c0->pins[SCF_EDA_NPN_B];
+ ScfEpin* pb1 = c1->pins[SCF_EDA_NPN_B];
+
+ if (pb0->y < pb1->y)
+ return -1;
+ if (pb0->y > pb1->y)
+ return 1;
+
+ return 0;
+}
+
int epin_cmp_color(const void* v0, const void* v1, void* arg)
{
const uint64_t* t0 = v0;