Debian Codegraph @

src/gen/lib/label/rectangle__c.java

raw symbols SCIP
1 /* ========================================================================
2 * PlantUML : a free UML diagram generator
3 * ========================================================================
4 *
5 * Project Info: http://plantuml.com
6 *
7 * If you like this project or if you find it useful, you can support us at:
8 *
9 * http://plantuml.com/patreon (only 1$ per month!)
10 * http://plantuml.com/paypal
11 *
12 * This file is part of Smetana.
13 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
14 *
15 * (C) Copyright 2009-2020, Arnaud Roques
16 *
17 * This translation is distributed under the same Licence as the original C program:
18 *
19 *************************************************************************
20 * Copyright (c) 2011 AT&T Intellectual Property
21 * All rights reserved. This program and the accompanying materials
22 * are made available under the terms of the Eclipse Public License v1.0
23 * which accompanies this distribution, and is available at
24 * http://www.eclipse.org/legal/epl-v10.html
25 *
26 * Contributors: See CVS logs. Details at http://www.graphviz.org/
27 *************************************************************************
28 *
29 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
30 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
31 *
32 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
33 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
34 *
35 * You may obtain a copy of the License at
36 *
37 * http://www.eclipse.org/legal/epl-v10.html
38 *
39 * Unless required by applicable law or agreed to in writing, software
40 * distributed under the License is distributed on an "AS IS" BASIS,
41 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 * See the License for the specific language governing permissions and
43 * limitations under the License.
44 *
45 */
46 package gen.lib.label;
47 import static smetana.core.JUtilsDebug.ENTERING;
48 import static smetana.core.JUtilsDebug.LEAVING;
49 import static smetana.core.Macro.N;
50 import static smetana.core.Macro.UNSUPPORTED;
51 import h.ST_Rect_t;
52
53 public class rectangle__c {
54 //1 9k44uhd5foylaeoekf3llonjq
55 // extern Dtmethod_t* Dtset
56
57
58 //1 1ahfywsmzcpcig2oxm7pt9ihj
59 // extern Dtmethod_t* Dtbag
60
61
62 //1 anhghfj3k7dmkudy2n7rvt31v
63 // extern Dtmethod_t* Dtoset
64
65
66 //1 5l6oj1ux946zjwvir94ykejbc
67 // extern Dtmethod_t* Dtobag
68
69
70 //1 2wtf222ak6cui8cfjnw6w377z
71 // extern Dtmethod_t* Dtlist
72
73
74 //1 d1s1s6ibtcsmst88e3057u9r7
75 // extern Dtmethod_t* Dtstack
76
77
78 //1 axa7mflo824p6fspjn1rdk0mt
79 // extern Dtmethod_t* Dtqueue
80
81
82 //1 ega812utobm4xx9oa9w9ayij6
83 // extern Dtmethod_t* Dtdeque
84
85
86 //1 cyfr996ur43045jv1tjbelzmj
87 // extern Dtmethod_t* Dtorder
88
89
90 //1 wlofoiftbjgrrabzb2brkycg
91 // extern Dtmethod_t* Dttree
92
93
94 //1 12bds94t7voj7ulwpcvgf6agr
95 // extern Dtmethod_t* Dthash
96
97
98 //1 9lqknzty480cy7zsubmabkk8h
99 // extern Dtmethod_t _Dttree
100
101
102 //1 bvn6zkbcp8vjdhkccqo1xrkrb
103 // extern Dtmethod_t _Dthash
104
105
106 //1 9lidhtd6nsmmv3e7vjv9e10gw
107 // extern Dtmethod_t _Dtlist
108
109
110 //1 34ujfamjxo7xn89u90oh2k6f8
111 // extern Dtmethod_t _Dtqueue
112
113
114 //1 3jy4aceckzkdv950h89p4wjc8
115 // extern Dtmethod_t _Dtstack
116
117
118 //1 8dfqgf3u1v830qzcjqh9o8ha7
119 // extern Agmemdisc_t AgMemDisc
120
121
122 //1 18k2oh2t6llfsdc5x0wlcnby8
123 // extern Agiddisc_t AgIdDisc
124
125
126 //1 a4r7hi80gdxtsv4hdoqpyiivn
127 // extern Agiodisc_t AgIoDisc
128
129
130 //1 bnzt5syjb7mgeru19114vd6xx
131 // extern Agdisc_t AgDefaultDisc
132
133
134 //1 35y2gbegsdjilegaribes00mg
135 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
136
137
138 //1 c2rygslq6bcuka3awmvy2b3ow
139 // typedef Agsubnode_t Agnoderef_t
140
141
142 //1 xam6yv0dcsx57dtg44igpbzn
143 // typedef Dtlink_t Agedgeref_t
144
145
146 //1 9mnpt3mibocomreg5h1kk860g
147 // extern Rect_t CoverAll
148
149
150
151
152 //3 1wtvfzwbzj03e6w5rw4k7qdax
153 // void InitRect(Rect_t * r)
154 public static void InitRect(ST_Rect_t r) {
155 ENTERING("1wtvfzwbzj03e6w5rw4k7qdax","InitRect");
156 try {
157 int i;
158 for (i = 0; i < 2*2; i++)
159 r.boundary[i]=0;
160 } finally {
161 LEAVING("1wtvfzwbzj03e6w5rw4k7qdax","InitRect");
162 }
163 }
164
165
166
167
168 //3 bvazxgli5q4yxvzl5kn1vjqpm
169 // Rect_t NullRect()
170 public static ST_Rect_t NullRect() {
171 ENTERING("bvazxgli5q4yxvzl5kn1vjqpm","NullRect");
172 try {
173 ST_Rect_t r = new ST_Rect_t();
174 int i;
175 r.boundary[0]=1;
176 r.boundary[2]=-1;
177 for (i = 1; i < 2; i++) {
178 r.boundary[i]=0;
179 r.boundary[i+2]=0;
180 }
181 return r;
182 } finally {
183 LEAVING("bvazxgli5q4yxvzl5kn1vjqpm","NullRect");
184 }
185 }
186
187
188
189
190 //3 1ijarur71gcahchxz8vqf69na
191 // unsigned int RectArea(Rect_t * r)
192 public static int RectArea(ST_Rect_t r) {
193 ENTERING("1ijarur71gcahchxz8vqf69na","RectArea");
194 try {
195 int i;
196 int area=1, a=1;
197 // assert(r);
198 if (r.boundary[0] > r.boundary[2]) return 0;
199 /*
200 * XXX add overflow checks
201 */
202 area = 1;
203 for (i = 0; i < 2; i++) {
204 int b = r.boundary[i+2] - r.boundary[i];
205 a *= b;
206 if( (a / b ) != area) {
207 UNSUPPORTED("6qc59bm54jy4hv9gw8a50rk0u"); // agerr (AGERR, "label: area too large for rtree\n");
208 UNSUPPORTED("awx87c59fwl0w8r64jfd86jrd"); // return UINT_MAX;
209 }
210 area = a;
211 }
212 return area;
213 } finally {
214 LEAVING("1ijarur71gcahchxz8vqf69na","RectArea");
215 }
216 }
217
218
219
220
221 //3 tgmhi1wshyhqky2pappb6w6w
222 // Rect_t CombineRect(Rect_t * r, Rect_t * rr)
223 public static ST_Rect_t CombineRect(ST_Rect_t r, ST_Rect_t rr) {
224 ENTERING("tgmhi1wshyhqky2pappb6w6w","CombineRect");
225 try {
226 int i, j;
227 ST_Rect_t new_ = new ST_Rect_t();
228 // assert(r && rr);
229 if (r.boundary[0] > r.boundary[2])
230 return (ST_Rect_t) rr.copy();
231 if (rr.boundary[0] > rr.boundary[2])
232 return (ST_Rect_t) r.copy();
233 for (i = 0; i < 2; i++) {
234 new_.boundary[i] = Math.min(r.boundary[i], rr.boundary[i]);
235 j = i + 2;
236 new_.boundary[j] = Math.max(r.boundary[j], rr.boundary[j]);
237 }
238 return new_;
239 } finally {
240 LEAVING("tgmhi1wshyhqky2pappb6w6w","CombineRect");
241 }
242 }
243
244
245
246
247 //3 9glce34jzknoqj98agg96k03o
248 // int Overlap(Rect_t * r, Rect_t * s)
249 public static boolean Overlap(ST_Rect_t r, ST_Rect_t s) {
250 ENTERING("9glce34jzknoqj98agg96k03o","Overlap");
251 try {
252 int i, j;
253 // assert(r && s);
254 for (i = 0; i < 2; i++) {
255 j = i + 2; /* index for high sides */
256 if (r.boundary[i] > s.boundary[j]
257 || s.boundary[i] > r.boundary[j])
258 return false;
259 }
260 return (N(0));
261 } finally {
262 LEAVING("9glce34jzknoqj98agg96k03o","Overlap");
263 }
264 }
265
266
267
268
269 //3 b2epj09d2wxyndbn4bgdsxr2q
270 // int Contained(Rect_t * r, Rect_t * s)
271 public static Object Contained(Object... arg) {
272 UNSUPPORTED("733zc41b58sdh3p9oeu9fj9l4"); // int Contained(Rect_t * r, Rect_t * s)
273 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
274 UNSUPPORTED("9awzjr4cb2zjgf6gos90frckl"); // register int i, j, result;
275 UNSUPPORTED("3ilt6jfw7dcaebocva6xawiui"); // assert(r && s);
276 UNSUPPORTED("ef38prhqw1mt7m82qf23llthz"); // /* undefined rect is contained in any other */
277 UNSUPPORTED("61el74qdlszr9b7htgajgnncw"); // if (((r)->boundary[0] > (r)->boundary[2]))
278 UNSUPPORTED("3adr32h5e1fehu4g7j2u24asz"); // return (!(0));
279 UNSUPPORTED("97iyq13885wpg4001abrkjhuk"); // /* no rect (except an undefined one) is contained in an undef rect */
280 UNSUPPORTED("ex7jjwy9foumvka1ks3pzhm6u"); // if (((s)->boundary[0] > (s)->boundary[2]))
281 UNSUPPORTED("e6i1m837bi402fjvy87uxgyf"); // return (0);
282 UNSUPPORTED("41048mrirr0adiwxs12neylq8"); // result = (!(0));
283 UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) {
284 UNSUPPORTED("71gqfx1xze9ccjzy9ids9x8cj"); // j = i + 2; /* index for high sides */
285 UNSUPPORTED("59et7tzqav7nffmkllv6u1kbt"); // result = result && r->boundary[i] >= s->boundary[i]
286 UNSUPPORTED("4tdt6ca6zi1rw9kklpgicedap"); // && r->boundary[j] <= s->boundary[j];
287 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
288 UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result;
289 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
290
291 throw new UnsupportedOperationException();
292 }
293
294
295 }