Debian Codegraph @

src/gen/lib/cdt/dtclose__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.cdt;
47 import static gen.lib.cdt.dtsize__c.dtsize_;
48 import static smetana.core.JUtilsDebug.ENTERING;
49 import static smetana.core.JUtilsDebug.LEAVING;
50 import static smetana.core.Macro.N;
51 import static smetana.core.Macro.UNSUPPORTED;
52 import h.ST_dt_s;
53 import h.ST_dtdisc_s;
54 import smetana.core.Memory;
55
56 public class dtclose__c {
57 //1 9k44uhd5foylaeoekf3llonjq
58 // extern Dtmethod_t* Dtset
59
60
61 //1 1ahfywsmzcpcig2oxm7pt9ihj
62 // extern Dtmethod_t* Dtbag
63
64
65 //1 anhghfj3k7dmkudy2n7rvt31v
66 // extern Dtmethod_t* Dtoset
67
68
69 //1 5l6oj1ux946zjwvir94ykejbc
70 // extern Dtmethod_t* Dtobag
71
72
73 //1 2wtf222ak6cui8cfjnw6w377z
74 // extern Dtmethod_t* Dtlist
75
76
77 //1 d1s1s6ibtcsmst88e3057u9r7
78 // extern Dtmethod_t* Dtstack
79
80
81 //1 axa7mflo824p6fspjn1rdk0mt
82 // extern Dtmethod_t* Dtqueue
83
84
85 //1 ega812utobm4xx9oa9w9ayij6
86 // extern Dtmethod_t* Dtdeque
87
88
89 //1 cyfr996ur43045jv1tjbelzmj
90 // extern Dtmethod_t* Dtorder
91
92
93 //1 wlofoiftbjgrrabzb2brkycg
94 // extern Dtmethod_t* Dttree
95
96
97 //1 12bds94t7voj7ulwpcvgf6agr
98 // extern Dtmethod_t* Dthash
99
100
101 //1 9lqknzty480cy7zsubmabkk8h
102 // extern Dtmethod_t _Dttree
103
104
105 //1 bvn6zkbcp8vjdhkccqo1xrkrb
106 // extern Dtmethod_t _Dthash
107
108
109 //1 9lidhtd6nsmmv3e7vjv9e10gw
110 // extern Dtmethod_t _Dtlist
111
112
113 //1 34ujfamjxo7xn89u90oh2k6f8
114 // extern Dtmethod_t _Dtqueue
115
116
117 //1 3jy4aceckzkdv950h89p4wjc8
118 // extern Dtmethod_t _Dtstack
119
120
121
122
123 //3 7ggbhlblmrfr1wq1k20npwyxb
124 // int dtclose(register Dt_t* dt)
125 public static int dtclose(ST_dt_s dt) {
126 ENTERING("7ggbhlblmrfr1wq1k20npwyxb","dtclose");
127 try {
128 ST_dtdisc_s disc;
129 int ev = 0;
130 if(N(dt) || dt.nview > 0 ) /* can't close if being viewed */
131 return -1;
132 /* announce the close event to see if we should continue */
133 disc = (ST_dtdisc_s) dt.disc;
134 if(disc.eventf!=null &&
135 (ev = (Integer)disc.eventf.exe(dt, 2, null, disc)) < 0)
136 return -1;
137 if(dt.view!=null) /* turn off viewing */
138 UNSUPPORTED("1xbo7gf92fmqmu2tzpfeuc0wk"); // dtview(dt,((Dt_t*)0));
139 if(ev == 0) /* release all allocated data */ {
140 dt.meth.searchf.exe(dt, null, 0000100);
141 if(dtsize_(dt) > 0)
142 return -1;
143 if(dt.data.ntab > 0)
144 UNSUPPORTED("4ugmcpi8vkb013vuo4wykn0a3"); // (*dt->memoryf)(dt,(void*)dt->data->hh._htab,0,disc);
145 dt.memoryf.exe(dt, dt.data, null, disc);
146 }
147 if(dt.type == 0)
148 Memory.free(dt);
149 else if(ev == 0 && dt.type == 1)
150 UNSUPPORTED("6wqxv1f7tzvjk0lwmqdrcq8la"); // (*dt->memoryf)(dt, (void*)dt, 0, disc);
151 if(disc.eventf!=null)
152 UNSUPPORTED("8bce06bdd64ypwb17ddloqzu8"); // (void)(*disc->eventf)(dt, 6, ((void*)0), disc);
153 return 0;
154 } finally {
155 LEAVING("7ggbhlblmrfr1wq1k20npwyxb","dtclose");
156 }
157 }
158
159
160 }