diff ueda/sverp-bind/enterinst.c @ 37:ce887659d12e

unet-bind: implemented hier=flip:... hack for 2-pin components
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sun, 16 Aug 2015 01:51:12 +0000
parents dda8e455c863
children
line wrap: on
line diff
--- a/ueda/sverp-bind/enterinst.c	Sun Aug 09 06:38:32 2015 +0000
+++ b/ueda/sverp-bind/enterinst.c	Sun Aug 16 01:51:12 2015 +0000
@@ -13,6 +13,16 @@
 {
 	register struct instance *inst;
 
+	if (!strncmp(hier, "flip:", 5)) {
+		if (oc->npins != 2 || oc->grid_pkg) {
+			fprintf(stderr,
+				"error: hier=flip:... makes no sense for %s\n",
+				oc->name);
+			exit(1);
+		}
+		oc->reverse_2pin = 1;
+		hier += 5;
+	}
 	oc->altname = hier;
 	inst = enter_instance(hier);
 	inst->outcomp = oc;