FreeCalypso > hg > ueda-linux
comparison ueda/uschem-netlist/pintonet.c @ 0:cd92449fdb51
initial import of ueda and ifctf-part-lib from ifctfvax CVS
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 20 Jul 2015 00:24:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cd92449fdb51 |
---|---|
1 #include <sys/types.h> | |
2 #include <stdio.h> | |
3 #include "netlist.h" | |
4 #include "../libuschem/schemstruct.h" | |
5 | |
6 extern struct net *get_nethead_for_netname(); | |
7 | |
8 check_compinst_pintonet(obj) | |
9 register struct schemobj *obj; | |
10 { | |
11 register struct decoration *decor; | |
12 | |
13 for (decor = obj->obj_decorations; decor; decor = decor->decor_next) | |
14 switch (decor->decor_type) { | |
15 case DECOR_TYPE_PINTONET: | |
16 handle_pintonet(obj, decor); | |
17 continue; | |
18 case DECOR_TYPE_NOCONNECT: | |
19 handle_noconnect_decor(obj, decor); | |
20 continue; | |
21 } | |
22 } | |
23 | |
24 handle_pintonet(comp, decor) | |
25 struct schemobj *comp; | |
26 register struct decoration *decor; | |
27 { | |
28 register char *soughtpin; | |
29 int bynum; | |
30 register struct net *n; | |
31 | |
32 soughtpin = decor->decorpincon_pin; | |
33 if (soughtpin[0] == '#') { | |
34 soughtpin++; | |
35 bynum = 1; | |
36 } else | |
37 bynum = 0; | |
38 n = get_nethead_for_netname(decor->decorpincon_netname); | |
39 do_connect(n, comp, soughtpin, bynum, decor->decor_lineno); | |
40 } | |
41 | |
42 handle_noconnect_decor(comp, decor) | |
43 struct schemobj *comp; | |
44 register struct decoration *decor; | |
45 { | |
46 register char *soughtpin; | |
47 int bynum; | |
48 | |
49 soughtpin = decor->decorpincon_pin; | |
50 if (soughtpin[0] == '#') { | |
51 soughtpin++; | |
52 bynum = 1; | |
53 } else | |
54 bynum = 0; | |
55 do_noconnect(comp, soughtpin, bynum, decor->decor_lineno); | |
56 } |