Debian Codegraph @

src/gen/lib/cdt/dtrestore__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 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.Dtsearch_f;
52 import h.ST_dt_s;
53 import h.ST_dtlink_s;
54
55 public class dtrestore__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
121
122 //3 8dfut8799tvg4tjvn2yz48d7h
123 // int dtrestore(register Dt_t* dt, register Dtlink_t* list)
124 public static int dtrestore(ST_dt_s dt, ST_dtlink_s list) {
125 ENTERING("8dfut8799tvg4tjvn2yz48d7h","dtrestore");
126 try {
127 ST_dtlink_s t;
128 //Dtlink_t **s, **ends;
129 int type;
130 Dtsearch_f searchf = (Dtsearch_f) dt.meth.searchf;
131 type = dt.data.type&010000;
132 if(N(list)) /* restoring a flattened dictionary */
133 { if(N(type))
134 return -1;
135 list = (ST_dtlink_s) dt.data.here;
136 }
137 else /* restoring an extracted list of elements */
138 { if(dt.data.size != 0)
139 return -1;
140 type = 0;
141 }
142 dt.data.setInt("type", dt.data.type & ~010000);
143 if((dt.data.type&(0000001|0000002))!=0)
144 { //dt->data->here = ((Dtlink_t*)0);
145 UNSUPPORTED("4xawc48hce5sov89n8h4j7xw0"); // if(type) /* restoring a flattened dictionary */
146 UNSUPPORTED("3yrjmgus9a9415ocrrtj1e733"); // { for(ends = (s = dt->data->hh._htab) + dt->data->ntab; s < ends; ++s)
147 UNSUPPORTED("7s6h8lg0p1wwil85e1p2msogy"); // { if((t = *s) )
148 UNSUPPORTED("2j3e40zcb5znwl73hbk12t6va"); // { *s = list;
149 UNSUPPORTED("ef469bao0q1pw0jwv7pmoly31"); // list = t->right;
150 UNSUPPORTED("29gliugc08l5pj89nfqoctwqi"); // t->right = ((Dtlink_t*)0);
151 UNSUPPORTED("cysnuxd51taci3hbg5lifz8ce"); // }
152 UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // }
153 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
154 UNSUPPORTED("dri3t8bbbtcxexw436q0kqnxd"); // else /* restoring an extracted list of elements */
155 UNSUPPORTED("efiynrcqevfta9kp0bfbujmn5"); // { dt->data->size = 0;
156 UNSUPPORTED("afqkqg6k8jxzgjyj7tb6kw1fc"); // while(list)
157 UNSUPPORTED("4rgxhjb5r159n4fh7vilshms9"); // { t = list->right;
158 UNSUPPORTED("6fq6k0xv0ofue3nmsm3tcbmxc"); // (*searchf)(dt,(void*)list,0000040);
159 UNSUPPORTED("8dsqgg8k8zwg5ae8ltd5xs9yc"); // list = t;
160 UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // }
161 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
162 }
163 else
164 { if((dt.data.type&(0000004|0000010))!=0)
165 dt.data.here = list;
166 else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
167 {UNSUPPORTED("79wu0m7edfdq02msgoqkzb32"); // { dt->data->here = ((Dtlink_t*)0);
168 UNSUPPORTED("c8q10nh3f6o4rjxtacmbgjxqj"); // dt->data->hh._head = list;
169 }
170 if(N(type))
171 dt.data.setInt("size", -1);
172 }
173 return 0;
174 } finally {
175 LEAVING("8dfut8799tvg4tjvn2yz48d7h","dtrestore");
176 }
177 }
178
179
180 }