File: frame_ref

package info (click to toggle)
fped 0.1%2B201210-1.2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 968 kB
  • sloc: ansic: 12,651; yacc: 1,112; sh: 974; lex: 204; makefile: 140; awk: 75
file content (149 lines) | stat: -rwxr-xr-x 2,080 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/sh
. ./Common

###############################################################################

fped_dump "frame reference: \"frame\" (origin)" <<EOF
frame f {}
frame f @
EOF
expect <<EOF
/* MACHINE-GENERATED ! */

frame f {
}

package "_"
unit mm

frame f @
EOF

#------------------------------------------------------------------------------

fped_dump "frame reference: \"%frame\" (current frame origin)" <<EOF
frame f {}
%frame f @
EOF
expect <<EOF
/* MACHINE-GENERATED ! */

frame f {
}

package "_"
unit mm

frame f @
EOF

#------------------------------------------------------------------------------

fped_dump "frame reference: \"%frame\" (current frame vector)" <<EOF
frame f {}
v: vec @(0mm, 0mm)
%frame f v
EOF
expect <<EOF
/* MACHINE-GENERATED ! */

frame f {
}

package "_"
unit mm

v: vec @(0mm, 0mm)
frame f .
EOF

#------------------------------------------------------------------------------

fped_dump "frame reference: \"%frame\" (other frame origin)" <<EOF
frame f {}
frame g {}
%frame f g.@
EOF
expect <<EOF
/* MACHINE-GENERATED ! */

frame f {
}

frame g {
	frame f @
}

package "_"
unit mm

EOF

#------------------------------------------------------------------------------

fped_dump "frame reference: \"%frame\" (other frame base)" <<EOF
frame f {}
frame g {
    v: vec @(0mm, 0mm)
}
%frame f g.v
EOF
expect <<EOF
/* MACHINE-GENERATED ! */

frame f {
}

frame g {
	v: vec @(0mm, 0mm)
	frame f .
}

package "_"
unit mm

EOF

#------------------------------------------------------------------------------

fped_fail "frame reference: \"%frame\" (cycle)" <<EOF
frame f {
}

frame g {
    frame f @
}

%frame g f.@
EOF
expect <<EOF
8: frame "g" is a parent of "f" near "@"
EOF

#------------------------------------------------------------------------------

fped_dump "frame reference: \"%frame\" (out-of-order)" <<EOF
frame f {
}

frame g {
}

%frame g f.@
EOF
expect <<EOF
/* MACHINE-GENERATED ! */

frame g {
}

frame f {
	frame g @
}

package "_"
unit mm

EOF

###############################################################################