1ADDPHSEG(3) MBK PHYSICAL FUNCTIONS ADDPHSEG(3)
2
3
4
6 addphseg - create a physical segment
7
9 #include "mph.h"
10 phseg_list ∗addphseg(ptfig, layer, width, x1, y1, x2, y2, nodename)
11 phfig_list ∗ptfig;
12 char layer;
13 long width;
14 long x1, y1, x2, y2;
15 char ∗nodename;
16
18 ptfig Pointer to the figure in which the segment should
19 be added
20
21 layer Segment symbolic layer
22
23 width Segment symbolic width
24
25 x1, y1, x2, y2 Segment endpoints coordinates
26
27 nodename Name of the segment
28
30 addphseg creates a new segment at the given coordinates, possibly
31 called segname, and adds it to the list of segments pointed to by
32 ptfig->PHSEG. The new segment is added in front of the list, and
33 becomes itself the list head. The segment name is an optional informa‐
34 tion, and does not allow the segment identification. When not needed,
35 this parameter should be set to NULL.
36 The parameters nodename, layer and width fill respectivly the NAME,
37 LAYER and WIDTH fields of the phseg structure.
38 x1, y1, x2, y2 are sorted to warranty that the fields X1 and Y1 contain
39 the minimum of, respectivly, x1, x2 and y1, y2, and the X2, Y2 fields
40 the maximum.
41 The TYPE field is computed by the addphseg function. It will be either
42 VER if x1 equals x2, or HOR if y1 equals y2.
43 The width is a layer extension that takes place in perpendicular to the
44 segment TYPE.
45 For a list of valid layers, and details on the structure, see phseg(3).
46
48 addphseg returns a pointer to the newly created segment.
49
51 "∗∗∗ mbk error ∗∗∗ illegal addphseg wrong layer code layer in x1, y1,
52 x2, y2"
53 The layer parameter is out of range, and does not represent a
54 legal symbolic layer. See phseg(3) for a complete list of lay‐
55 ers.
56 "∗∗∗ mbk error ∗∗∗ illegal addphseg : x1, y1, x2, y2"
57 The segment coordinates are such that the segment is neither
58 vertical nor horizontal. So it's not a legal symbolic segment.
59
61 #include "mph.h"
62 phseg_list ∗du_seg(pfd, pfs)
63 phfig_list ∗pfd, ∗pfs;
64 {
65 phseg_list ∗ps;
66 /∗ names don't matter ∗/
67 for (ps = pfs->PHSEG; ps != NULL; ps = ps->NEXT)
68 addphseg(pfd, ps->LAYER, ps->WIDTH, ps->X1, ps->Y1,
69 ps->X2, ps->Y2, NULL);
70 }
71
73 mbk(1), phfig(3), phseg(3), delphseg(3).
74
75
76
77
78
79
80ASIM/LIP6 October 1, 1997 ADDPHSEG(3)