Debian Codegraph @

src/gen/lib/cgraph/node__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.cgraph;
47 import static gen.lib.cdt.dtsize__c.dtsize_;
48 import static gen.lib.cgraph.attr__c.AgDataRecName;
49 import static gen.lib.cgraph.attr__c.agnodeattr_init;
50 import static gen.lib.cgraph.edge__c.agsubrep;
51 import static gen.lib.cgraph.graph__c.agnextseq;
52 import static gen.lib.cgraph.id__c.agmapnametoid;
53 import static gen.lib.cgraph.id__c.agregister;
54 import static gen.lib.cgraph.mem__c.agalloc;
55 import static gen.lib.cgraph.obj__c.agmethod_init;
56 import static gen.lib.cgraph.obj__c.agroot;
57 import static gen.lib.cgraph.rec__c.agbindrec;
58 import static gen.lib.cgraph.subg__c.agparent;
59 import static smetana.core.JUtils.EQ;
60 import static smetana.core.JUtils.LOG2;
61 import static smetana.core.JUtils.NEQ;
62 import static smetana.core.JUtils.sizeof;
63 import static smetana.core.JUtilsDebug.ENTERING;
64 import static smetana.core.JUtilsDebug.LEAVING;
65 import static smetana.core.Macro.AGID;
66 import static smetana.core.Macro.AGNODE;
67 import static smetana.core.Macro.AGSEQ;
68 import static smetana.core.Macro.AGTYPE;
69 import static smetana.core.Macro.N;
70 import static smetana.core.Macro.UNSUPPORTED;
71 import h.ST_Agattr_s;
72 import h.ST_Agdesc_s;
73 import h.ST_Agnode_s;
74 import h.ST_Agraph_s;
75 import h.ST_Agsubnode_s;
76 import h.ST_Agtag_s;
77 import h.ST_dt_s;
78 import h.ST_dtdisc_s;
79 import smetana.core.CString;
80 import smetana.core.Z;
81 import smetana.core.__ptr__;
82
83 public class node__c {
84 //1 9k44uhd5foylaeoekf3llonjq
85 // extern Dtmethod_t* Dtset
86
87
88 //1 1ahfywsmzcpcig2oxm7pt9ihj
89 // extern Dtmethod_t* Dtbag
90
91
92 //1 anhghfj3k7dmkudy2n7rvt31v
93 // extern Dtmethod_t* Dtoset
94
95
96 //1 5l6oj1ux946zjwvir94ykejbc
97 // extern Dtmethod_t* Dtobag
98
99
100 //1 2wtf222ak6cui8cfjnw6w377z
101 // extern Dtmethod_t* Dtlist
102
103
104 //1 d1s1s6ibtcsmst88e3057u9r7
105 // extern Dtmethod_t* Dtstack
106
107
108 //1 axa7mflo824p6fspjn1rdk0mt
109 // extern Dtmethod_t* Dtqueue
110
111
112 //1 ega812utobm4xx9oa9w9ayij6
113 // extern Dtmethod_t* Dtdeque
114
115
116 //1 cyfr996ur43045jv1tjbelzmj
117 // extern Dtmethod_t* Dtorder
118
119
120 //1 wlofoiftbjgrrabzb2brkycg
121 // extern Dtmethod_t* Dttree
122
123
124 //1 12bds94t7voj7ulwpcvgf6agr
125 // extern Dtmethod_t* Dthash
126
127
128 //1 9lqknzty480cy7zsubmabkk8h
129 // extern Dtmethod_t _Dttree
130
131
132 //1 bvn6zkbcp8vjdhkccqo1xrkrb
133 // extern Dtmethod_t _Dthash
134
135
136 //1 9lidhtd6nsmmv3e7vjv9e10gw
137 // extern Dtmethod_t _Dtlist
138
139
140 //1 34ujfamjxo7xn89u90oh2k6f8
141 // extern Dtmethod_t _Dtqueue
142
143
144 //1 3jy4aceckzkdv950h89p4wjc8
145 // extern Dtmethod_t _Dtstack
146
147
148 //1 8dfqgf3u1v830qzcjqh9o8ha7
149 // extern Agmemdisc_t AgMemDisc
150
151
152 //1 18k2oh2t6llfsdc5x0wlcnby8
153 // extern Agiddisc_t AgIdDisc
154
155
156 //1 a4r7hi80gdxtsv4hdoqpyiivn
157 // extern Agiodisc_t AgIoDisc
158
159
160 //1 bnzt5syjb7mgeru19114vd6xx
161 // extern Agdisc_t AgDefaultDisc
162
163
164 //1 35y2gbegsdjilegaribes00mg
165 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
166
167
168 //1 c2rygslq6bcuka3awmvy2b3ow
169 // typedef Agsubnode_t Agnoderef_t
170
171
172 //1 xam6yv0dcsx57dtg44igpbzn
173 // typedef Dtlink_t Agedgeref_t
174
175
176 //1 6ayavpu39aihwyojkx093pcy3
177 // extern Agraph_t *Ag_G_global
178
179
180 //1 871mxtg9l6ffpxdl9kniwusf7
181 // extern char *AgDataRecName
182
183
184 //1 c0o2kmml0tn6hftuwo0u4shwd
185 // extern Dtdisc_t Ag_subnode_id_disc
186
187
188 //1 8k15pyu256unm2kpd9zf5pf7k
189 // extern Dtdisc_t Ag_subnode_seq_disc
190
191
192 //1 e3d820y06gpeusn6atgmj8bzd
193 // extern Dtdisc_t Ag_mainedge_id_disc
194
195
196 //1 cbr0772spix9h1aw7h5v7dv9j
197 // extern Dtdisc_t Ag_subedge_id_disc
198
199
200 //1 akd0c3v0j7m2npxcb9acit1fa
201 // extern Dtdisc_t Ag_mainedge_seq_disc
202
203
204 //1 12d8la07351ww7vwfzucjst8m
205 // extern Dtdisc_t Ag_subedge_seq_disc
206
207
208 //1 29eokk7v88e62g8o6lizmo967
209 // extern Dtdisc_t Ag_subgraph_id_disc
210
211
212 //1 4xd9cbgy6hk5g6nhjcbpzkx14
213 // extern Agcbdisc_t AgAttrdisc
214
215
216
217
218 //private static __struct__<Agsubnode_s> template = JUtils.from(Agsubnode_s.class);
219 //private static __struct__<Agnode_s> dummy = JUtils.from(Agnode_s.class);
220 //3 4w89du6uel405pm3vxsr3ayxt
221 // Agnode_t *agfindnode_by_id(Agraph_t * g, unsigned long id)
222 public static ST_Agnode_s agfindnode_by_id(ST_Agraph_s g, int id) {
223 ENTERING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id");
224 try {
225 ST_Agsubnode_s sn;
226 ((ST_Agtag_s)Z.z().dummy.base.tag).id = id;
227 Z.z().template.node = Z.z().dummy;
228 sn = (ST_Agsubnode_s) (g.n_id.searchf.exe(g.n_id, Z.z().template,0000004));
229 return (ST_Agnode_s) (sn!=null ? sn.node : null);
230 } finally {
231 LEAVING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id");
232 }
233 }
234
235
236
237
238 //3 1ibow5tsw9y9hfbt65y10nw0r
239 // Agnode_t *agfindnode_by_name(Agraph_t * g, char *name)
240 public static Object agfindnode_by_name(Object... arg) {
241 UNSUPPORTED("jjckyz5rvj2kpvd0vw02o8yj"); // Agnode_t *agfindnode_by_name(Agraph_t * g, char *name)
242 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
243 UNSUPPORTED("5v0qr6wzw47z083l6jupv94gw"); // unsigned long id;
244 UNSUPPORTED("7xzjyxv5eprg0vhj8q61h9d84"); // if (agmapnametoid(g, AGNODE, name, &id, (0)))
245 UNSUPPORTED("5rhbsviec1b9h1qedfo3hrgt0"); // return agfindnode_by_id(g, id);
246 UNSUPPORTED("div10atae09n36x269sl208r1"); // else
247 UNSUPPORTED("afujljwagn2n2w7aqkq94dyud"); // return ((Agnode_t*)0);
248 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
249
250 throw new UnsupportedOperationException();
251 }
252
253
254
255
256 //3 55wopi2gd93zpmycxoywlxm0y
257 // Agnode_t *agfstnode(Agraph_t * g)
258 public static ST_Agnode_s agfstnode(ST_Agraph_s g) {
259 ENTERING("55wopi2gd93zpmycxoywlxm0y","agfstnode");
260 try {
261 ST_Agsubnode_s sn;
262 sn = (ST_Agsubnode_s) g.n_seq.searchf.exe(g.n_seq,null,0000200);
263 return sn!=null ? (ST_Agnode_s) sn.node : null;
264 } finally {
265 LEAVING("55wopi2gd93zpmycxoywlxm0y","agfstnode");
266 }
267 }
268
269
270
271
272 //3 bek79ccvjys1j9q404i3y6oh8
273 // Agnode_t *agnxtnode(Agraph_t * g, Agnode_t * n)
274 public static int NB = 0;
275 public static ST_Agnode_s agnxtnode(ST_Agraph_s g, ST_Agnode_s n) {
276 ENTERING("bek79ccvjys1j9q404i3y6oh8","agnxtnode");
277 try {
278 //ZOOTO
279 if (NB==0) {
280 //StructureDefinition.from(IMapEntry_t.class);
281 }
282 NB++;
283 LOG2("NB="+NB);
284 ST_Agsubnode_s sn;
285 sn = agsubrep(g, n);
286 LOG2("sn1="+sn);
287 if (sn!=null) sn = (ST_Agsubnode_s) g.n_seq.searchf.exe(g.n_seq,sn,0000010);
288 LOG2("sn2="+sn);
289 final __ptr__ result = sn!=null ? sn.node : null;
290 LOG2("result="+result);
291 return (ST_Agnode_s) result;
292 } finally {
293 LEAVING("bek79ccvjys1j9q404i3y6oh8","agnxtnode");
294 }
295 }
296
297
298
299
300 //3 17tu6ipvtgbjfrggkvyz3nasf
301 // Agnode_t *aglstnode(Agraph_t * g)
302 public static Object aglstnode(Object... arg) {
303 UNSUPPORTED("4lnse8d2e11zapjwbkulyywtz"); // Agnode_t *aglstnode(Agraph_t * g)
304 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
305 UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn;
306 UNSUPPORTED("37449tqynatc8j0u8sohjqujf"); // sn = (Agsubnode_t *) (*(((Dt_t*)(g->n_seq))->searchf))((g->n_seq),(void*)(0),0000400);
307 UNSUPPORTED("b550764xq8bvu8hoqv0fe2noi"); // return sn ? sn->node : ((Agnode_t*)0);
308 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
309
310 throw new UnsupportedOperationException();
311 }
312
313
314
315
316 //3 3qloij26jbl7m0ftyb0ouesq4
317 // Agnode_t *agprvnode(Agraph_t * g, Agnode_t * n)
318 public static Object agprvnode(Object... arg) {
319 UNSUPPORTED("8ichcmu1fmaap5w9hqfiohi13"); // Agnode_t *agprvnode(Agraph_t * g, Agnode_t * n)
320 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
321 UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); // Agsubnode_t *sn;
322 UNSUPPORTED("b0wzl2qtz6anq1dhlxtmvwvgn"); // sn = agsubrep(g, n);
323 UNSUPPORTED("8efe1mjxltxjuin6v0msyzwfb"); // if (sn) sn = ((Agsubnode_t *) (*(((Dt_t*)(g->n_seq))->searchf))((g->n_seq),(void*)(sn),0000020));
324 UNSUPPORTED("b550764xq8bvu8hoqv0fe2noi"); // return sn ? sn->node : ((Agnode_t*)0);
325 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
326
327 throw new UnsupportedOperationException();
328 }
329
330
331
332
333 //3 dzb7m0p5xsngvtyr8zs912og4
334 // static Agnode_t *newnode(Agraph_t * g, unsigned long id, unsigned long seq)
335 public static ST_Agnode_s newnode(ST_Agraph_s g, int id, int seq) {
336 ENTERING("dzb7m0p5xsngvtyr8zs912og4","newnode");
337 try {
338 ST_Agnode_s n;
339 n = (ST_Agnode_s) ((__ptr__)agalloc(g, sizeof(ST_Agnode_s.class))).castTo(ST_Agnode_s.class);
340 AGTYPE(n, AGNODE);
341 AGID(n, id);
342 AGSEQ(n, seq);
343 n.setPtr("root", agroot(g));
344 if (((ST_Agdesc_s)agroot(g).desc).has_attrs!=0)
345 agbindrec(n, AgDataRecName, sizeof(ST_Agattr_s.class), false);
346 /* nodeattr_init and method_init will be called later, from the
347 * subgraph where the node was actually created, but first it has
348 * to be installed in all the (sub)graphs up to root. */
349 return n;
350 } finally {
351 LEAVING("dzb7m0p5xsngvtyr8zs912og4","newnode");
352 }
353 }
354
355
356
357
358 //3 4m26dpgaiw44hcleugjy71eus
359 // static void installnode(Agraph_t * g, Agnode_t * n)
360 public static void installnode(ST_Agraph_s g, ST_Agnode_s n) {
361 ENTERING("4m26dpgaiw44hcleugjy71eus","installnode");
362 try {
363 ST_Agsubnode_s sn;
364 int osize;
365 osize = dtsize_((ST_dt_s)g.n_id);
366 if (EQ(g, agroot(g))) sn = (ST_Agsubnode_s) n.mainsub;
367 else sn = (ST_Agsubnode_s) ((__ptr__)agalloc(g, sizeof(ST_Agsubnode_s.class))).castTo(ST_Agsubnode_s.class);
368 sn.setPtr("node", n);
369 g.n_id.searchf.exe(g.n_id,sn,0000001);
370 g.n_seq.searchf.exe(g.n_seq,sn,0000001);
371 } finally {
372 LEAVING("4m26dpgaiw44hcleugjy71eus","installnode");
373 }
374 }
375
376
377
378
379 //3 3mfxjcaeepn8nitirs3yoqaed
380 // static void installnodetoroot(Agraph_t * g, Agnode_t * n)
381 public static void installnodetoroot(ST_Agraph_s g, ST_Agnode_s n) {
382 ENTERING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot");
383 try {
384 ST_Agraph_s par;
385 installnode(g, n);
386 if ((par = agparent(g))!=null)
387 installnodetoroot(par, n);
388 } finally {
389 LEAVING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot");
390 }
391 }
392
393
394
395
396 //3 85bb9mezhsgtzar3kqz95mq1
397 // static void initnode(Agraph_t * g, Agnode_t * n)
398 public static void initnode(ST_Agraph_s g, ST_Agnode_s n) {
399 ENTERING("85bb9mezhsgtzar3kqz95mq1","initnode");
400 try {
401 if (((ST_Agdesc_s)agroot(g).desc).has_attrs!=0)
402 agnodeattr_init(g,n);
403 agmethod_init(g, n);
404 } finally {
405 LEAVING("85bb9mezhsgtzar3kqz95mq1","initnode");
406 }
407 }
408
409
410
411
412 //3 1m6sl9df2yaolmufyq5i577a3
413 // Agnode_t *agidnode(Agraph_t * g, unsigned long id, int cflag)
414 public static ST_Agnode_s agidnode(ST_Agraph_s g, int id, int cflag) {
415 ENTERING("1m6sl9df2yaolmufyq5i577a3","agidnode");
416 try {
417 ST_Agraph_s root;
418 ST_Agnode_s n;
419 n = agfindnode_by_id(g, id);
420 if ((n == null) && cflag!=0) {
421 UNSUPPORTED("7zol2448bccu90sqoxkvnbuif"); // root = agroot(g);
422 UNSUPPORTED("1zcb29h7sxm7axw8qeuz9f38w"); // if ((g != root) && ((n = agfindnode_by_id(root, id)))) /*old */
423 UNSUPPORTED("9fusma9293koujpr79eyfhxn6"); // agsubnode(g, n, (!(0))); /* insert locally */
424 UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else {
425 UNSUPPORTED("5pefvv55zys4ya7lgh0v8595s"); // if (agallocid(g, AGNODE, id)) { /* new */
426 UNSUPPORTED("dfn6cx0kwd44mv0ntbzf3p463"); // n = newnode(g, id, agnextseq(g, AGNODE));
427 UNSUPPORTED("6qcjp92a88ggl3ea7mxel9cn"); // installnodetoroot(g, n);
428 UNSUPPORTED("45uf6o7ubd9hy5s65g0f0bbgj"); // initnode(g, n);
429 UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else
430 UNSUPPORTED("5l8briolxhuic5avv0112aj90"); // n = ((Agnode_t*)0); /* allocid for new node failed */
431 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
432 }
433 /* else return probe result */
434 return n;
435 } finally {
436 LEAVING("1m6sl9df2yaolmufyq5i577a3","agidnode");
437 }
438 }
439
440
441
442
443 //3 4yh1h1cwoitzb1t8869b79e3g
444 // Agnode_t *agnode(Agraph_t * g, char *name, int cflag)
445 public static ST_Agnode_s agnode(ST_Agraph_s g, CString name, boolean cflag) {
446 ENTERING("4yh1h1cwoitzb1t8869b79e3g","agnode");
447 try {
448 ST_Agraph_s root;
449 ST_Agnode_s n;
450 int id[] = new int[1];
451 root = agroot(g);
452 /* probe for existing node */
453 if (agmapnametoid(g, AGNODE, name, id, false)!=0) {
454 if ((n = agfindnode_by_id(g, id[0]))!=null)
455 return n;
456 /* might already exist globally, but need to insert locally */
457 if (cflag && NEQ(g, root) && ((n = agfindnode_by_id(root, id[0])))!=null) {
458 return agsubnode(g, n, (N(0)));
459 }
460 }
461 if (cflag && agmapnametoid(g, AGNODE, name, id, (N(0)))!=0) { /* reserve id */
462 n = newnode(g, id[0], agnextseq(g, AGNODE));
463 installnodetoroot(g, n);
464 initnode(g, n);
465
466 agregister(g, AGNODE, n); /* register in external namespace */
467 return n;
468 }
469 return null;
470 } finally {
471 LEAVING("4yh1h1cwoitzb1t8869b79e3g","agnode");
472 }
473 }
474
475
476
477
478 //3 acahmq5kvzn3o31mluqgw7q9p
479 // void agdelnodeimage(Agraph_t * g, Agnode_t * n, void *ignored)
480 public static Object agdelnodeimage(Object... arg) {
481 UNSUPPORTED("elm2o1y1nn2deregqtwfd0fm"); // void agdelnodeimage(Agraph_t * g, Agnode_t * n, void *ignored)
482 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
483 UNSUPPORTED("109gqpvjmuv5lwcih97x4uwqa"); // Agedge_t *e, *f;
484 UNSUPPORTED("2v9cpnwjfya0wz9qq2q8rqx02"); // static Agsubnode_t template;
485 UNSUPPORTED("8cy87pxkco1cies0ck9zpn66"); // template.node = n;
486 UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); // (void) ignored;
487 UNSUPPORTED("8dskgcobu9u3m4ejmwjq00r5m"); // for (e = agfstedge(g, n); e; e = f) {
488 UNSUPPORTED("8tmx79zo3pcrz4238v132mjqg"); // f = agnxtedge(g, e, n);
489 UNSUPPORTED("ezikicsrlgi4g2anmg80iyxy5"); // agdeledgeimage(g, e, 0);
490 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
491 UNSUPPORTED("5x2emh00yohuaush1f65cqnx3"); // /* If the following lines are switched, switch the discpline using
492 UNSUPPORTED("35l6nf11aakz6sn2g7wfh60xr"); // * free_subnode below.
493 UNSUPPORTED("5xkmfp82pyue09k1egerh5ezz"); // */
494 UNSUPPORTED("a3umom4df7zkjo9g37dn0xnnl"); // (*(((Dt_t*)(g->n_id))->searchf))((g->n_id),(void*)(&template),0000002);
495 UNSUPPORTED("enu2k7akluqzw4eos6263usdr"); // (*(((Dt_t*)(g->n_seq))->searchf))((g->n_seq),(void*)(&template),0000002);
496 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
497
498 throw new UnsupportedOperationException();
499 }
500
501
502
503
504 //3 d7hac3hpizqk8mmx6oxiv6d3q
505 // int agdelnode(Agraph_t * g, Agnode_t * n)
506 public static Object agdelnode(Object... arg) {
507 UNSUPPORTED("5vrhjcls5tltlk3dn4ssxzusq"); // int agdelnode(Agraph_t * g, Agnode_t * n)
508 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
509 UNSUPPORTED("109gqpvjmuv5lwcih97x4uwqa"); // Agedge_t *e, *f;
510 UNSUPPORTED("3ly27irmwairjdexym3up87uk"); // if (!agfindnode_by_id(g, AGID(n)))
511 UNSUPPORTED("a1gf07w8a7uwaryezfqx6en21"); // return -1; /* bad arg */
512 UNSUPPORTED("ackx3cor82a94trjk4owh3083"); // if (g == agroot(g)) {
513 UNSUPPORTED("7n4rwpvryjg5anpy2d43bthxh"); // for (e = agfstedge(g, n); e; e = f) {
514 UNSUPPORTED("98oagw83x0w96uuzccetdi9ws"); // f = agnxtedge(g, e, n);
515 UNSUPPORTED("7m6mvhicrmgkuyrwkvblruld0"); // agdeledge(g, e);
516 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
517 UNSUPPORTED("5247bml3o0pwzg9fc9q1xhhnc"); // if (g->desc.has_attrs)
518 UNSUPPORTED("d4mqrcccn3toqvhii6rjrrwwu"); // agnodeattr_delete(n);
519 UNSUPPORTED("7zcf3kp28b1wgy3i2on67h98u"); // agmethod_delete(g, n);
520 UNSUPPORTED("eqkdptzmrk2vxj9fe3y4eb24l"); // agrecclose((Agobj_t *) n);
521 UNSUPPORTED("d6jhz9spbq2ywt2efhyikkcdi"); // agfreeid(g, AGNODE, AGID(n));
522 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
523 UNSUPPORTED("86yxjnabv1fuv7zhtuhgex4gx"); // if (agapply (g, (Agobj_t *) n, (agobjfn_t) agdelnodeimage, ((Agnode_t*)0), (0)) == 0) {
524 UNSUPPORTED("6tlwlx478gb1clm2fykihi2zk"); // if (g == agroot(g))
525 UNSUPPORTED("d4sehv0200tcylmbpt9pqc7h1"); // agfree(g, n);
526 UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
527 UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else
528 UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
529 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
530
531 throw new UnsupportedOperationException();
532 }
533
534
535
536
537 //3 dytehp1u14cb4j9zsmlesojkq
538 // static void dict_relabel(Agnode_t * n, void *arg)
539 public static Object dict_relabel(Object... arg) {
540 UNSUPPORTED("44mem1e9kck28s208xgn5g04k"); // static void dict_relabel(Agnode_t * n, void *arg)
541 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
542 UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g;
543 UNSUPPORTED("8hr8p3jy96bfcwujkauwdvd92"); // unsigned long new_id;
544 UNSUPPORTED("38tgkes5dhr4oloxpg73baq10"); // g = agraphof(n);
545 UNSUPPORTED("5jv37sfftjuyu9m95lz2avmjk"); // new_id = *(unsigned long *) arg;
546 UNSUPPORTED("90u0hwihh4q8uosu25ewbzhox"); // (*(((Dt_t*)(g->n_id))->searchf))((g->n_id),(void*)(n),0000002); /* wrong, should be subrep */
547 UNSUPPORTED("9d38am0gg0kj6jhq5tri5ac34"); // AGID(n) = new_id;
548 UNSUPPORTED("3qkq6d6yv4tvsurangttsbn0z"); // (*(((Dt_t*)(g->n_id))->searchf))((g->n_id),(void*)(n),0000001); /* also wrong */
549 UNSUPPORTED("dwcdffxfxvt11kvrq2e8l9dg9"); // /* because all the subgraphs share the same node now, this
550 UNSUPPORTED("8sf7kiafqj2eexpzvr30nmsle"); // now requires a separate deletion and insertion phase */
551 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
552
553 throw new UnsupportedOperationException();
554 }
555
556
557
558
559 //3 a29io0pb5tx5bwevwjtr1hg1r
560 // int agrelabel_node(Agnode_t * n, char *newname)
561 public static Object agrelabel_node(Object... arg) {
562 UNSUPPORTED("838qr3zz1vpfb75cfio36192j"); // int agrelabel_node(Agnode_t * n, char *newname)
563 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
564 UNSUPPORTED("1dbyk58q3r4fyfxxo7ovemkpu"); // Agraph_t *g;
565 UNSUPPORTED("8hr8p3jy96bfcwujkauwdvd92"); // unsigned long new_id;
566 UNSUPPORTED("5c0nzsud433f31yaxkbl4z4gs"); // g = agroot(agraphof(n));
567 UNSUPPORTED("1vy801jhp4mbvo2tujvg565wz"); // if (agfindnode_by_name(g, newname))
568 UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
569 UNSUPPORTED("3swbd27n6ds70cn294m0ef8f5"); // if (agmapnametoid(g, AGNODE, newname, &new_id, (!(0)))) {
570 UNSUPPORTED("5xgainykf6klfsmk4014aw0e2"); // if (agfindnode_by_id(agroot(g), new_id) == ((Agnode_t*)0)) {
571 UNSUPPORTED("5rjwy8imxqiwj9ia955vyoh9l"); // agfreeid(g, AGNODE, AGID(n));
572 UNSUPPORTED("asbts6liah2fjm74ps7do0e1m"); // agapply(g, (Agobj_t *) n, (agobjfn_t) dict_relabel,
573 UNSUPPORTED("9trirys0q5ojk3sb1jgw8tmdf"); // (void *) &new_id, (0));
574 UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0;
575 UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
576 UNSUPPORTED("7w7v3j2z1voanzyg3oghk1o2t"); // agfreeid(g, AGNODE, new_id); /* couldn't use it after all */
577 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
578 UNSUPPORTED("eaoz5g3p9152utcqjz5d2fgdf"); // /* obj* is unchanged, so no need to re agregister() */
579 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
580 UNSUPPORTED("8azkpi8o0wzdufa90lw8hpt6q"); // return -1;
581 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
582
583 throw new UnsupportedOperationException();
584 }
585
586
587
588
589 //3 d5farp22buvesyi4pydjam4g2
590 // Agnode_t *agsubnode(Agraph_t * g, Agnode_t * n0, int cflag)
591 public static ST_Agnode_s agsubnode(ST_Agraph_s g, ST_Agnode_s n0, boolean cflag) {
592 ENTERING("d5farp22buvesyi4pydjam4g2","agsubnode");
593 try {
594 ST_Agraph_s par;
595 ST_Agnode_s n;
596 if (NEQ(agroot(g), n0.root))
597 return null;
598 n = agfindnode_by_id(g, AGID(n0));
599 if ((n == null) && cflag) {
600 if ((par = agparent(g))!=null) {
601 n = agsubnode(par, n0, cflag);
602 installnode(g, n);
603 /* no callback for existing node insertion in subgraph (?) */
604 }
605 /* else impossible that <n> doesn't belong to <g> */
606 }
607 /* else lookup succeeded */
608 return n;
609 } finally {
610 LEAVING("d5farp22buvesyi4pydjam4g2","agsubnode");
611 }
612 }
613
614
615
616
617 //3 awwiazixy9c76hvyxlkvvb3vo
618 // int agsubnodeidcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc)
619 public static int agsubnodeidcmpf(ST_dt_s d, __ptr__ arg0, __ptr__ arg1, ST_dtdisc_s disc) {
620 ENTERING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf");
621 try {
622 int v;
623 ST_Agsubnode_s sn0, sn1;
624 sn0 = (ST_Agsubnode_s) arg0.castTo(ST_Agsubnode_s.class);
625 sn1 = (ST_Agsubnode_s) arg1.castTo(ST_Agsubnode_s.class);
626 v = (AGID(sn0.node) - AGID(sn1.node));
627 return ((v==0)?0:(v<0?-1:1));
628 } finally {
629 LEAVING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf");
630 }
631 }
632
633
634
635
636 //3 41fjseux0nxzpr0aq7igym9ux
637 // int agsubnodeseqcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc)
638 public static int agsubnodeseqcmpf(ST_dt_s d, __ptr__ arg0, __ptr__ arg1, ST_dtdisc_s disc) {
639 ENTERING("41fjseux0nxzpr0aq7igym9ux","agsubnodeseqcmpf");
640 try {
641 ST_Agsubnode_s sn0, sn1;
642 int v;
643 sn0 = (ST_Agsubnode_s) arg0.castTo(ST_Agsubnode_s.class);
644 sn1 = (ST_Agsubnode_s) arg1.castTo(ST_Agsubnode_s.class);
645 v = (AGSEQ(sn0.node) - AGSEQ(sn1.node));
646 return ((v==0)?0:(v<0?-1:1));
647 } finally {
648 LEAVING("41fjseux0nxzpr0aq7igym9ux","agsubnodeseqcmpf");
649 }
650 }
651
652
653
654
655 //3 a7tb3b1kvq6ykrxzhbaduvg9r
656 // static void free_subnode (Dt_t* d, Agsubnode_t* sn, Dtdisc_t * disc)
657 public static Object free_subnode(Object... arg) {
658 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
659 UNSUPPORTED("9e4h6d4hxsvsnaiuubzlmccsm"); // free_subnode (Dt_t* d, Agsubnode_t* sn, Dtdisc_t * disc)
660 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
661 UNSUPPORTED("eiac02o593gy0a55vv1w8mkmi"); // if (!AGSNMAIN(sn))
662 UNSUPPORTED("263bmzd9ilyyeb9w34squ7iw8"); // agfree (sn->node->root, sn);
663 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
664
665 throw new UnsupportedOperationException();
666 }
667
668
669 //1 us7d1n3fefkf0qyr6thv1sai
670 // Dtdisc_t Ag_subnode_id_disc =
671 /*public static final __struct__<_dtdisc_s> Ag_subnode_id_disc = JUtils.from(_dtdisc_s.class);
672 static {
673 Ag_subnode_id_disc.setInt("key", 0);
674 Ag_subnode_id_disc.setInt("size", 0);
675 Ag_subnode_id_disc.setInt("link", OFFSET.create(Agsubnode_s.class, "id_link").toInt()); // id_link is the second field in Agsubnode_t
676 Ag_subnode_id_disc.setPtr("makef", null);
677 Ag_subnode_id_disc.setPtr("freef", null);
678 Ag_subnode_id_disc.setPtr("comparf", function(node__c.class, "agsubnodeidcmpf"));
679 Ag_subnode_id_disc.setPtr("hashf", null);
680 Ag_subnode_id_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem"));
681 Ag_subnode_id_disc.setPtr("eventf", null);
682 }*/
683
684 //1 3gqjvodjfsv6wz1tk75zy19p9
685 // Dtdisc_t Ag_subnode_seq_disc =
686 /*public static final __struct__<_dtdisc_s> Ag_subnode_seq_disc = JUtils.from(_dtdisc_s.class);
687 static {
688 Ag_subnode_seq_disc.setInt("key", 0);
689 Ag_subnode_seq_disc.setInt("size", 0);
690 Ag_subnode_seq_disc.setInt("link", OFFSET.create(Agsubnode_s.class, "seq_link").toInt()); // link is the first field in Agsubnode_t
691 Ag_subnode_seq_disc.setPtr("makef", null);
692 Ag_subnode_seq_disc.setPtr("freef", function(node__c.class, "free_subnode"));
693 Ag_subnode_seq_disc.setPtr("comparf", function(node__c.class, "agsubnodeseqcmpf"));
694 Ag_subnode_seq_disc.setPtr("hashf", null);
695 Ag_subnode_seq_disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem"));
696 Ag_subnode_seq_disc.setPtr("eventf", null);
697 }*/
698
699 }