1ADDPHCON(3) MBK PHYSICAL FUNCTIONS ADDPHCON(3)
2
3
4
6 addphcon - create a physical connector
7
9 #include "mph.h"
10 phcon_list ∗addphcon(ptfig, orient, conname, x, y, layer, width)
11 phfig_list ∗ptfig;
12 char orient;
13 char ∗conname;
14 long x, y;
15 char layer;
16 long width;
17
19 ptfig Pointer to the figure in which the connector should
20 be added
21
22 orient Face of the connector
23
24 conname Name of the connector
25
26 x, y Absolute connector coordinates
27
28 layer Connector symbolic layer
29
30 width Connector symbolic width
31
33 addphcon creates a new connector called conname and adds it to the list
34 of connectors pointed to by ptfig->PHCON. The new connector is added in
35 front of the list, and becomes itself the list head.
36 The parameters conname, orient, x, y, layer, width fill respectivly the
37 NAME, ORIENT, XCON, YCON, LAYER, WIDTH fields of the phcon structure.
38 See phcon(3) for details.
39 The INDEX field is computed by the addphcon function in order to war‐
40 ranty index unicity. A topological sort is performed, checking x, then
41 y, then the layer. So for a given figure, each connector will have a
42 constant INDEX.
43 The x, y coordinates must be placed inside the butment box of the fig‐
44 ure.
45 The width is a layer extension that takes place in parallel to the con‐
46 nector face.
47 For a list of valid orient and layers, see locon(3).
48
50 addphcon returns a pointer to the newly created connector.
51
53 "∗∗∗ mbk error ∗∗∗ illegal addphcon unknown layer layer in conname"
54 The layer parameter is out of range, and does not represent a
55 legal symbolic layer. See locon(3) for a complete list of lay‐
56 ers.
57 "∗∗∗ mbk error ∗∗∗ illegal addphcon connector conname not in abutment
58 box"
59 The connector coordinates are not included in the rectangle of
60 the figure abutment box. This means that the abutment box field
61 of the phfig must be filled befor any call to addphcon.
62 "∗∗∗ mbk error ∗∗∗ illegal addphcon orientation is orient in conname"
63 The orient parameter is not in the set of legal values. See
64 locon(3) for the complete list of orientations.
65
67 #include "mph.h"
68 phcon_list ∗du_con(ptfig, ptcon) /∗ duplicate connector ∗/
69 phfig_list ∗ptfig;
70 phcon_list ∗ptcon;
71 {
72 /∗ the index depends from what's in ptfig->PHCON, not from me ∗/
73 return addphcon(ptfig, ptcon->ORIENT, ptcon->NAME,
74 ptcon->XCON, ptcon->YCON,
75 ptcon->LAYER, ptcon->WIDTH);
76 }
77
79 mbk(1), phfig(3), phcon(3), getphcon(3), delphcon(3), locon(3).
80
81
82
83
84
85
86ASIM/LIP6 October 1, 1997 ADDPHCON(3)