1 #include <Config/Section.d>
2 #include <__oo2c.h>
3 #include <setjmp.h>
4
Config_Section__ErrorContextDesc_GetTemplate(Config_Section__ErrorContext context,Msg__Msg msg,Msg__LString templ,OOC_LEN templ_0d)5 void Config_Section__ErrorContextDesc_GetTemplate(Config_Section__ErrorContext context, Msg__Msg msg, Msg__LString templ, OOC_LEN templ_0d) {
6 register OOC_INT64 i0,i1;
7 OOC_CHAR16 t[128];
8
9 i0 = (OOC_INT64)msg;
10 i1 = *(OOC_INT32*)((_check_pointer(i0, 838))+16);
11 switch (i1) {
12 case 1:
13 _copy_16((const void*)((OOC_CHAR16[]){78,97,109,101,32,111,102,32,114,111,111,116,32,101,108,101,109,101,110,116,32,109,117,115,116,32,98,101,32,96,36,123,110,97,109,101,125,39,0}),(void*)(OOC_INT64)t,128);
14 goto l6;
15 case 2:
16 _copy_16((const void*)((OOC_CHAR16[]){73,110,118,97,108,105,100,32,99,104,97,114,97,99,116,101,114,32,100,97,116,97,32,105,110,32,114,111,111,116,32,101,108,101,109,101,110,116,0}),(void*)(OOC_INT64)t,128);
17 goto l6;
18 case 3:
19 _copy_16((const void*)((OOC_CHAR16[]){85,110,107,110,111,119,110,32,99,111,110,102,105,103,117,114,97,116,105,111,110,32,115,101,99,116,105,111,110,32,96,36,123,110,97,109,101,125,39,0}),(void*)(OOC_INT64)t,128);
20 goto l6;
21 default:
22 _failed_case(i1, 830);
23 goto l6;
24 }
25 l6:
26 i1 = (OOC_INT64)context;
27 OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 1097)))), XML_Error__ContextDesc_WriteTemplate)),XML_Error__ContextDesc_WriteTemplate)((XML_Error__Context)i1, (Msg__Msg)i0, (void*)(OOC_INT64)t, 128, (void*)(OOC_INT64)templ, templ_0d);
28 return;
29 ;
30 }
31
Config_Section__Init(Config_Section__Section s,const Config_Parser__String id__ref,OOC_LEN id_0d)32 void Config_Section__Init(Config_Section__Section s, const Config_Parser__String id__ref, OOC_LEN id_0d) {
33 register OOC_INT64 i0,i1;
34 OOC_ALLOCATE_VPAR(id,OOC_CHAR16 ,id_0d)
35
36 OOC_INITIALIZE_VPAR(id__ref,id,OOC_CHAR16 ,(id_0d*2))
37 i0 = (OOC_INT64)s;
38 i1 = LongStrings__Length((void*)(OOC_INT64)id, id_0d);
39 *(OOC_INT64*)(_check_pointer(i0, 1217)) = ((OOC_INT64)RT0__NewObject(_td_XML_UnicodeBuffer__CharArray.baseTypes[0], (i1+1)));
40 i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 1268));
41 i0 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 1268));
42 i0 = OOC_ARRAY_LENGTH((_check_pointer(i0, 1274)), 0);
43 _copy_16((const void*)(OOC_INT64)id,(void*)(_check_pointer(i1, 1274)),i0);
44 return;
45 ;
46 }
47
Config_Section__SectionDesc_ProcessElements(Config_Section__Section s,Config_Parser__Element sectionRoot,XML_Locator__ErrorListener errorListener)48 void Config_Section__SectionDesc_ProcessElements(Config_Section__Section s, Config_Parser__Element sectionRoot, XML_Locator__ErrorListener errorListener) {
49
50 return;
51 ;
52 }
53
Config_Section__SectionDesc_DumpContent(Config_Section__Section s,Channel__Channel ch)54 void Config_Section__SectionDesc_DumpContent(Config_Section__Section s, Channel__Channel ch) {
55
56 return;
57 ;
58 }
59
Config_Section__NewSectionList(void)60 Config_Section__SectionList Config_Section__NewSectionList(void) {
61 register OOC_INT64 i0;
62 Config_Section__SectionList sl;
63
64 i0 = (OOC_INT64)RT0__NewObject(_td_Config_Section__SectionList.baseTypes[0]);
65 sl = (Config_Section__SectionList)i0;
66 *(OOC_INT64*)(_check_pointer(i0, 1934)) = 0;
67 return (Config_Section__SectionList)i0;
68 ;
69 }
70
Config_Section__SectionListDesc_Add(Config_Section__SectionList sl,Config_Section__Section section)71 void Config_Section__SectionListDesc_Add(Config_Section__SectionList sl, Config_Section__Section section) {
72 register OOC_INT64 i0,i1;
73 Config_Section__Node _new;
74 auto void Config_Section__SectionListDesc_Add_Insert(Config_Section__Node *list);
75
76 void Config_Section__SectionListDesc_Add_Insert(Config_Section__Node *list) {
77 register OOC_INT64 i0,i1,i2,i3;
78
79 i0 = (OOC_INT64)*list;
80 i1 = i0==(OOC_INT64)0;
81 if (i1) goto l11;
82 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 2211))+8);
83 i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 2220));
84 i2 = (OOC_INT64)section;
85 i3 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i2, 2237));
86 i1 = (
87 _cmp16((const void*)(_check_pointer(i1, 2226)),(const void*)(_check_pointer(i3, 2243))))==0;
88 if (i1) goto l9;
89 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 2345))+8);
90 i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 2354));
91 i2 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i2, 2371));
92 i1 = (
93 _cmp16((const void*)(_check_pointer(i1, 2360)),(const void*)(_check_pointer(i2, 2377))))>0;
94 if (i1) goto l7;
95 Config_Section__SectionListDesc_Add_Insert((void*)(_check_pointer(i0, 2506)));
96 goto l12;
97 l7:
98 i1 = (OOC_INT64)_new;
99 *(OOC_INT64*)(_check_pointer(i1, 2439)) = i0;
100 *list = (Config_Section__Node)i1;
101 goto l12;
102 l9:
103 i1 = (OOC_INT64)_new;
104 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 2318))+8);
105 *(OOC_INT64*)((_check_pointer(i0, 2302))+8) = i1;
106 goto l12;
107 l11:
108 i0 = (OOC_INT64)_new;
109 *list = (Config_Section__Node)i0;
110 l12:
111 return;
112 ;
113 }
114
115
116 i0 = (OOC_INT64)RT0__NewObject(_td_Config_Section__Node.baseTypes[0]);
117 _new = (Config_Section__Node)i0;
118 *(OOC_INT64*)(_check_pointer(i0, 2573)) = 0;
119 i1 = (OOC_INT64)section;
120 *(OOC_INT64*)((_check_pointer(i0, 2595))+8) = i1;
121 i0 = (OOC_INT64)sl;
122 Config_Section__SectionListDesc_Add_Insert((void*)(_check_pointer(i0, 2631)));
123 return;
124 ;
125 }
126
Config_Section__SectionListDesc_Get(Config_Section__SectionList sl,XML_UnicodeBuffer__CharArray name)127 Config_Section__Section Config_Section__SectionListDesc_Get(Config_Section__SectionList sl, XML_UnicodeBuffer__CharArray name) {
128 register OOC_INT64 i0,i1,i2;
129 Config_Section__Node sn;
130
131 i0 = (OOC_INT64)sl;
132 i0 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 2759));
133 sn = (Config_Section__Node)i0;
134 i1 = i0!=0;
135 if (i1) goto l3;
136 i1=0u;
137 goto l5;
138 l3:
139 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 2793))+8);
140 i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 2802));
141 i2 = (OOC_INT64)name;
142 i1 = (
143 _cmp16((const void*)(_check_pointer(i1, 2808)),(const void*)(_check_pointer(i2, 2816))))!=0;
144
145 l5:
146 if (!i1) goto l17;
147 i1 = (OOC_INT64)name;
148
149 l8_loop:
150 i0 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 2836));
151 sn = (Config_Section__Node)i0;
152 i2 = i0!=0;
153 if (i2) goto l11;
154 i2=0u;
155 goto l13;
156 l11:
157 i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 2793))+8);
158 i2 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i2, 2802));
159 i2 = (
160 _cmp16((const void*)(_check_pointer(i2, 2808)),(const void*)(_check_pointer(i1, 2816))))!=0;
161
162 l13:
163 if (i2) goto l8_loop;
164 l17:
165 i1 = i0==0;
166 if (i1) goto l20;
167 i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 2916))+8);
168 return (Config_Section__Section)i0;
169 goto l21;
170 l20:
171 return (Config_Section__Section)0;
172 l21:
173 _failed_function(2679); return 0;
174 ;
175 }
176
Config_Section__SectionListDesc_ProcessElements(Config_Section__SectionList sl,Config_Parser__Element root,const Config_Parser__String rootElementName__ref,OOC_LEN rootElementName_0d,Config_Parser__Parser p)177 void Config_Section__SectionListDesc_ProcessElements(Config_Section__SectionList sl, Config_Parser__Element root, const Config_Parser__String rootElementName__ref, OOC_LEN rootElementName_0d, Config_Parser__Parser p) {
178 register OOC_INT64 i0,i1,i2;
179 OOC_ALLOCATE_VPAR(rootElementName,OOC_CHAR16 ,rootElementName_0d)
180 Msg__Msg lastError;
181 Config_Parser__Node node;
182 Config_Section__Section s;
183 auto void Config_Section__SectionListDesc_ProcessElements_Err(OOC_INT32 code, Config_Parser__Node xmlNode);
184
185 void Config_Section__SectionListDesc_ProcessElements_Err(OOC_INT32 code, Config_Parser__Node xmlNode) {
186 register OOC_INT64 i0,i1,i2,i3,i4;
187
188 i0 = (OOC_INT64)xmlNode;
189 i1 = (OOC_INT64)p;
190 i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 3251))+32);
191 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 3251))+32);
192 i3 = (OOC_INT64)Config_Section__sectionContext;
193 i4 = code;
194 i0 = (OOC_INT64)OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 3266)))), XML_Locator__ErrorListenerDesc_Error)),XML_Locator__ErrorListenerDesc_Error)((XML_Locator__ErrorListener)i1, (XML_Error__Context)i3, i4, 0u, (void*)((_check_pointer(i0, 3311))+8));
195 lastError = (Msg__Msg)i0;
196 return;
197 ;
198 }
199
200
201 OOC_INITIALIZE_VPAR(rootElementName__ref,rootElementName,OOC_CHAR16 ,(rootElementName_0d*2))
202 i0 = (OOC_INT64)root;
203 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 3354))+48);
204 i1 = (
205 _cmp16((const void*)(_check_pointer(i1, 3360)),(const void*)(OOC_INT64)rootElementName))!=0;
206 if (!i1) goto l3;
207 Config_Section__SectionListDesc_ProcessElements_Err(1, (Config_Parser__Node)i0);
208 i0 = (OOC_INT64)Msg__GetLStringPtr((void*)(OOC_INT64)rootElementName, rootElementName_0d);
209 i1 = (OOC_INT64)lastError;
210 OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 3436)))), Msg__MsgDesc_SetLStringAttrib)),Msg__MsgDesc_SetLStringAttrib)((Msg__Msg)i1, (OOC_CHAR8*)"name", 5, (Msg__LStringPtr)i0);
211 l3:
212 i0 = (OOC_INT64)root;
213 i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 3531))+64);
214 node = (Config_Parser__Node)i0;
215 i1 = i0!=(OOC_INT64)0;
216 if (!i1) goto l26;
217 l6_loop:
218 i1 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 3583)))), &_td_Config_Parser__CharDataDesc);
219 if (i1) goto l17;
220 i1 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 3708)))), &_td_Config_Parser__ElementDesc);
221 if (i1) goto l11;
222 _failed_with(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 3702)))), 3702);
223
224 goto l21;
225 l11:
226 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 3754))+48);
227 i2 = (OOC_INT64)sl;
228 i1 = (OOC_INT64)Config_Section__SectionListDesc_Get((Config_Section__SectionList)i2, (XML_UnicodeBuffer__CharArray)i1);
229 s = (Config_Section__Section)i1;
230 i2 = i1==(OOC_INT64)0;
231 if (i2) goto l14;
232 i2 = (OOC_INT64)p;
233 i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i2, 3957))+32);
234 OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 3931)))), Config_Section__SectionDesc_ProcessElements)),Config_Section__SectionDesc_ProcessElements)((Config_Section__Section)i1, (Config_Parser__Element)i0, (XML_Locator__ErrorListener)i2);
235
236 goto l21;
237 l14:
238 Config_Section__SectionListDesc_ProcessElements_Err(3, (Config_Parser__Node)i0);
239 i0 = (OOC_INT64)node;
240 i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 3897))+48);
241 i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 3897))+48);
242 i1 = OOC_ARRAY_LENGTH((_check_pointer(i1, 3903)), 0);
243 i0 = (OOC_INT64)Msg__GetLStringPtr((void*)(_check_pointer(i0, 3903)), i1);
244 i1 = (OOC_INT64)lastError;
245 OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 3846)))), Msg__MsgDesc_SetLStringAttrib)),Msg__MsgDesc_SetLStringAttrib)((Msg__Msg)i1, (OOC_CHAR8*)"name", 5, (Msg__LStringPtr)i0);
246
247 goto l21;
248 l17:
249 i1 = Config_Parser__NodeDesc_IsWhitespace((Config_Parser__Node)i0);
250 i1 = !i1;
251 if (!i1) goto l21;
252 Config_Section__SectionListDesc_ProcessElements_Err(2, (Config_Parser__Node)i0);
253 l21:
254 i0 = (OOC_INT64)node;
255 i0 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 4015));
256 node = (Config_Parser__Node)i0;
257 i1 = i0!=(OOC_INT64)0;
258 if (i1) goto l6_loop;
259 l26:
260 return;
261 ;
262 }
263
Config_Section__SectionListDesc_DumpContent(Config_Section__SectionList sl,Channel__Channel ch)264 void Config_Section__SectionListDesc_DumpContent(Config_Section__SectionList sl, Channel__Channel ch) {
265 register OOC_INT64 i0,i1,i2,i3;
266 TextRider__Writer w;
267 Config_Section__Node n;
268
269 i0 = (OOC_INT64)ch;
270 i1 = (OOC_INT64)TextRider__ConnectWriter((Channel__Channel)i0);
271 w = (TextRider__Writer)i1;
272 i1 = (OOC_INT64)sl;
273 i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 4224));
274 n = (Config_Section__Node)i1;
275 i2 = i1!=0;
276 if (!i2) goto l8;
277 l3_loop:
278 i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 4262))+8);
279 i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 4262))+8);
280 OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 4271)))), Config_Section__SectionDesc_DumpContent)),Config_Section__SectionDesc_DumpContent)((Config_Section__Section)i3, (Channel__Channel)i0);
281 i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 4303));
282 n = (Config_Section__Node)i1;
283 i2 = i1!=0;
284 if (i2) goto l3_loop;
285 l8:
286 return;
287 ;
288 }
289
OOC_Config_Section_init(void)290 void OOC_Config_Section_init(void) {
291 register OOC_INT64 i0;
292
293 i0 = (OOC_INT64)RT0__NewObject(_td_Config_Section__ErrorContext.baseTypes[0]);
294 Config_Section__sectionContext = (Config_Section__ErrorContext)i0;
295 Msg__InitContext((Msg__Context)i0, (OOC_CHAR8*)"Config:Section", 15);
296 return;
297 ;
298 }
299
OOC_Config_Section_destroy(void)300 void OOC_Config_Section_destroy(void) {
301 }
302
303 /* --- */
304