Debian Codegraph @

src/gen/lib/cgraph/mem__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 smetana.core.JUtilsDebug.ENTERING;
48 import static smetana.core.JUtilsDebug.LEAVING;
49 import static smetana.core.Macro.UNSUPPORTED;
50 import h.ST_Agdisc_s;
51 import h.ST_Agraph_s;
52 import smetana.core.__ptr__;
53 import smetana.core.size_t;
54
55 public class mem__c {
56 //1 9k44uhd5foylaeoekf3llonjq
57 // extern Dtmethod_t* Dtset
58
59
60 //1 1ahfywsmzcpcig2oxm7pt9ihj
61 // extern Dtmethod_t* Dtbag
62
63
64 //1 anhghfj3k7dmkudy2n7rvt31v
65 // extern Dtmethod_t* Dtoset
66
67
68 //1 5l6oj1ux946zjwvir94ykejbc
69 // extern Dtmethod_t* Dtobag
70
71
72 //1 2wtf222ak6cui8cfjnw6w377z
73 // extern Dtmethod_t* Dtlist
74
75
76 //1 d1s1s6ibtcsmst88e3057u9r7
77 // extern Dtmethod_t* Dtstack
78
79
80 //1 axa7mflo824p6fspjn1rdk0mt
81 // extern Dtmethod_t* Dtqueue
82
83
84 //1 ega812utobm4xx9oa9w9ayij6
85 // extern Dtmethod_t* Dtdeque
86
87
88 //1 cyfr996ur43045jv1tjbelzmj
89 // extern Dtmethod_t* Dtorder
90
91
92 //1 wlofoiftbjgrrabzb2brkycg
93 // extern Dtmethod_t* Dttree
94
95
96 //1 12bds94t7voj7ulwpcvgf6agr
97 // extern Dtmethod_t* Dthash
98
99
100 //1 9lqknzty480cy7zsubmabkk8h
101 // extern Dtmethod_t _Dttree
102
103
104 //1 bvn6zkbcp8vjdhkccqo1xrkrb
105 // extern Dtmethod_t _Dthash
106
107
108 //1 9lidhtd6nsmmv3e7vjv9e10gw
109 // extern Dtmethod_t _Dtlist
110
111
112 //1 34ujfamjxo7xn89u90oh2k6f8
113 // extern Dtmethod_t _Dtqueue
114
115
116 //1 3jy4aceckzkdv950h89p4wjc8
117 // extern Dtmethod_t _Dtstack
118
119
120 //1 8dfqgf3u1v830qzcjqh9o8ha7
121 // extern Agmemdisc_t AgMemDisc
122
123
124 //1 18k2oh2t6llfsdc5x0wlcnby8
125 // extern Agiddisc_t AgIdDisc
126
127
128 //1 a4r7hi80gdxtsv4hdoqpyiivn
129 // extern Agiodisc_t AgIoDisc
130
131
132 //1 bnzt5syjb7mgeru19114vd6xx
133 // extern Agdisc_t AgDefaultDisc
134
135
136 //1 35y2gbegsdjilegaribes00mg
137 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
138
139
140 //1 c2rygslq6bcuka3awmvy2b3ow
141 // typedef Agsubnode_t Agnoderef_t
142
143
144 //1 xam6yv0dcsx57dtg44igpbzn
145 // typedef Dtlink_t Agedgeref_t
146
147
148 //1 6ayavpu39aihwyojkx093pcy3
149 // extern Agraph_t *Ag_G_global
150
151
152 //1 871mxtg9l6ffpxdl9kniwusf7
153 // extern char *AgDataRecName
154
155
156 //1 c0o2kmml0tn6hftuwo0u4shwd
157 // extern Dtdisc_t Ag_subnode_id_disc
158
159
160 //1 8k15pyu256unm2kpd9zf5pf7k
161 // extern Dtdisc_t Ag_subnode_seq_disc
162
163
164 //1 e3d820y06gpeusn6atgmj8bzd
165 // extern Dtdisc_t Ag_mainedge_id_disc
166
167
168 //1 cbr0772spix9h1aw7h5v7dv9j
169 // extern Dtdisc_t Ag_subedge_id_disc
170
171
172 //1 akd0c3v0j7m2npxcb9acit1fa
173 // extern Dtdisc_t Ag_mainedge_seq_disc
174
175
176 //1 12d8la07351ww7vwfzucjst8m
177 // extern Dtdisc_t Ag_subedge_seq_disc
178
179
180 //1 29eokk7v88e62g8o6lizmo967
181 // extern Dtdisc_t Ag_subgraph_id_disc
182
183
184 //1 4xd9cbgy6hk5g6nhjcbpzkx14
185 // extern Agcbdisc_t AgAttrdisc
186
187
188
189
190 //3 akq0jgwdspf75ypeatgcnfn8w
191 // static void *memopen(Agdisc_t* disc)
192 public static Object memopen(ST_Agdisc_s disc) {
193 ENTERING("akq0jgwdspf75ypeatgcnfn8w","memopen");
194 try {
195 return null;
196 } finally {
197 LEAVING("akq0jgwdspf75ypeatgcnfn8w","memopen");
198 }
199 }
200
201
202
203
204 //3 9mtjrx0vjzwuecjwpxylr9tag
205 // static void *memalloc(void *heap, size_t request)
206 public static __ptr__ memalloc(__ptr__ heap, size_t request) {
207 ENTERING("9mtjrx0vjzwuecjwpxylr9tag","memalloc");
208 try {
209 __ptr__ rv;
210 rv = (__ptr__) request.malloc();
211 return rv;
212 } finally {
213 LEAVING("9mtjrx0vjzwuecjwpxylr9tag","memalloc");
214 }
215 }
216
217
218
219
220 //3 18v2hhjculhnb3b7fc4tx3yjw
221 // static void *memresize(void *heap, void *ptr, size_t oldsize, size_t request)
222 public static __ptr__ memresize(__ptr__ heap, __ptr__ ptr, size_t oldsize, size_t request) {
223 ENTERING("18v2hhjculhnb3b7fc4tx3yjw","memresize");
224 try {
225 request.realloc(ptr);
226 return ptr;
227 } finally {
228 LEAVING("18v2hhjculhnb3b7fc4tx3yjw","memresize");
229 }
230 //UNSUPPORTED("1s6udii0nias7f8g4vimpkefh"); // static void *memresize(void *heap, void *ptr, size_t oldsize,
231 //UNSUPPORTED("8zs6530gai5ogf503wd0333qh"); // size_t request)
232 //UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
233 //UNSUPPORTED("5ccnu5m92hidffpixzo964tna"); // void *rv;
234 //UNSUPPORTED("74rq74mh7lnfr9i3qmwsbx2hd"); // (void) heap;
235 //UNSUPPORTED("ebomd3babnm180zhyrfeg59wi"); // rv = realloc(ptr, request);
236 //UNSUPPORTED("bzgpl0js1bzsovafg9g24v4ya"); // if (request > oldsize)
237 //UNSUPPORTED("9cjvc6kya9bwic7bue6mcj8yf"); // memset((char *) rv + oldsize, 0, request - oldsize);
238 //UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv;
239 //UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
240 //
241 //throw new UnsupportedOperationException();
242 }
243
244
245
246
247 //3 c320bstcg5nctel3onh2pserl
248 // static void memfree(void *heap, void *ptr)
249 public static Object memfree(Object... arg) {
250 UNSUPPORTED("5yxdf2sc5xnic9d5j24m0a7yf"); // static void memfree(void *heap, void *ptr)
251 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
252 UNSUPPORTED("74rq74mh7lnfr9i3qmwsbx2hd"); // (void) heap;
253 UNSUPPORTED("f0evk2zajcoprskea22bm18e8"); // free(ptr);
254 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
255
256 throw new UnsupportedOperationException();
257 }
258
259
260 //1 1cni5q244gsprpvtjsq7gs17m
261 // Agmemdisc_t AgMemDisc =
262 /*public static final __struct__<Agmemdisc_s> AgMemDisc = JUtils.from(Agmemdisc_s.class);
263 static {
264 AgMemDisc.setPtr("open", function(mem__c.class, "memopen"));
265 AgMemDisc.setPtr("alloc", function(mem__c.class, "memalloc"));
266 AgMemDisc.setPtr("resize", function(mem__c.class, "memresize"));
267 AgMemDisc.setPtr("free", function(mem__c.class, "memfree"));
268 AgMemDisc.setPtr("close", null);
269 }*/
270
271
272
273 //3 7newv1hmzvt4vtttc9cxdxfpn
274 // void *agalloc(Agraph_t * g, size_t size)
275 public static __ptr__ agalloc(ST_Agraph_s g, size_t size) {
276 ENTERING("7newv1hmzvt4vtttc9cxdxfpn","agalloc");
277 try {
278 __ptr__ mem;
279 mem = (__ptr__) g.clos.disc.mem.alloc.exe(g.clos.state.mem, size);
280 if (mem == null)
281 System.err.println("memory allocation failure");
282 return mem;
283 } finally {
284 LEAVING("7newv1hmzvt4vtttc9cxdxfpn","agalloc");
285 }
286 }
287
288
289
290
291 //3 55lm0cse6lsgqblx6puxpjs3j
292 // void *agrealloc(Agraph_t * g, void *ptr, size_t oldsize, size_t size)
293 public static Object agrealloc(Object... arg) {
294 UNSUPPORTED("910gd4otiivsz2zpsiwlsy00v"); // void *agrealloc(Agraph_t * g, void *ptr, size_t oldsize, size_t size)
295 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
296 UNSUPPORTED("11l1m9u5ne2xf2nff6278od59"); // void *mem;
297 UNSUPPORTED("b9ag6d7eml860kbycrkuz14b7"); // if (size > 0) {
298 UNSUPPORTED("zjrd9sttelcubi228vbizqq0"); // if (ptr == 0)
299 UNSUPPORTED("vr97hnk6c4k8muqake3c3c46"); // mem = agalloc(g, size);
300 UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
301 UNSUPPORTED("2n0yfzx569kr1oinsronhmsus"); // mem =
302 UNSUPPORTED("agphdu4vmb8hu0s57ry4i4axp"); // ((g)->clos->disc.mem)->resize(((g)->clos->state.mem), ptr, oldsize, size);
303 UNSUPPORTED("60qvwgrubred6pojjs425ctzr"); // if (mem == ((void *)0))
304 UNSUPPORTED("9vomh5w83j5mf3src00h8g8g0"); // agerr(AGERR,"memory re-allocation failure");
305 UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); // } else
306 UNSUPPORTED("6jbj3fx0j7m0vyvwn0za7bxle"); // mem = ((void *)0);
307 UNSUPPORTED("a5guhlttwqpai3dhdhdx6shnu"); // return mem;
308 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
309
310 throw new UnsupportedOperationException();
311 }
312
313
314
315
316 //3 5cy6dl95ayyuzq0m35179g1a1
317 // void agfree(Agraph_t * g, void *ptr)
318 public static Object agfree(Object... arg) {
319 UNSUPPORTED("4i7lm2j8h5unocyz6c4isbh2f"); // void agfree(Agraph_t * g, void *ptr)
320 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
321 UNSUPPORTED("72fdcloikkmdo51qrcdovcy5v"); // if (ptr)
322 UNSUPPORTED("efvuftmcvfsswtq39k8vdrgmd"); // (((g)->clos->disc.mem)->free) (((g)->clos->state.mem), ptr);
323 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
324
325 throw new UnsupportedOperationException();
326 }
327
328
329 }