1 #ifndef _APPS_STD_SKEL_H
2 #define _APPS_STD_SKEL_H
3 /*
4 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
15 * * Neither the name of The Linux Foundation nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
26 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
29 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 #include "apps_std.h"
32 #ifndef _QAIC_ENV_H
33 #define _QAIC_ENV_H
34
35 #ifdef __GNUC__
36 #ifdef __clang__
37 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
38 #else
39 #pragma GCC diagnostic ignored "-Wpragmas"
40 #endif
41 #pragma GCC diagnostic ignored "-Wuninitialized"
42 #pragma GCC diagnostic ignored "-Wunused-parameter"
43 #pragma GCC diagnostic ignored "-Wunused-function"
44 #endif
45
46 #ifndef _ATTRIBUTE_UNUSED
47
48 #ifdef _WIN32
49 #define _ATTRIBUTE_UNUSED
50 #else
51 #define _ATTRIBUTE_UNUSED __attribute__ ((unused))
52 #endif
53
54 #endif // _ATTRIBUTE_UNUSED
55
56 #ifndef __QAIC_REMOTE
57 #define __QAIC_REMOTE(ff) ff
58 #endif //__QAIC_REMOTE
59
60 #ifndef __QAIC_HEADER
61 #define __QAIC_HEADER(ff) ff
62 #endif //__QAIC_HEADER
63
64 #ifndef __QAIC_HEADER_EXPORT
65 #define __QAIC_HEADER_EXPORT
66 #endif // __QAIC_HEADER_EXPORT
67
68 #ifndef __QAIC_HEADER_ATTRIBUTE
69 #define __QAIC_HEADER_ATTRIBUTE
70 #endif // __QAIC_HEADER_ATTRIBUTE
71
72 #ifndef __QAIC_IMPL
73 #define __QAIC_IMPL(ff) ff
74 #endif //__QAIC_IMPL
75
76 #ifndef __QAIC_IMPL_EXPORT
77 #define __QAIC_IMPL_EXPORT
78 #endif // __QAIC_IMPL_EXPORT
79
80 #ifndef __QAIC_IMPL_ATTRIBUTE
81 #define __QAIC_IMPL_ATTRIBUTE
82 #endif // __QAIC_IMPL_ATTRIBUTE
83
84 #ifndef __QAIC_STUB
85 #define __QAIC_STUB(ff) ff
86 #endif //__QAIC_STUB
87
88 #ifndef __QAIC_STUB_EXPORT
89 #define __QAIC_STUB_EXPORT
90 #endif // __QAIC_STUB_EXPORT
91
92 #ifndef __QAIC_STUB_ATTRIBUTE
93 #define __QAIC_STUB_ATTRIBUTE
94 #endif // __QAIC_STUB_ATTRIBUTE
95
96 #ifndef __QAIC_SKEL
97 #define __QAIC_SKEL(ff) ff
98 #endif //__QAIC_SKEL__
99
100 #ifndef __QAIC_SKEL_EXPORT
101 #define __QAIC_SKEL_EXPORT
102 #endif // __QAIC_SKEL_EXPORT
103
104 #ifndef __QAIC_SKEL_ATTRIBUTE
105 #define __QAIC_SKEL_ATTRIBUTE
106 #endif // __QAIC_SKEL_ATTRIBUTE
107
108 #ifdef __QAIC_DEBUG__
109 #ifndef __QAIC_DBG_PRINTF__
110 #include <stdio.h>
111 #define __QAIC_DBG_PRINTF__( ee ) do { printf ee ; } while(0)
112 #endif
113 #else
114 #define __QAIC_DBG_PRINTF__( ee ) (void)0
115 #endif
116
117
118 #define _OFFSET(src, sof) ((void*)(((char*)(src)) + (sof)))
119
120 #define _COPY(dst, dof, src, sof, sz) \
121 do {\
122 struct __copy { \
123 char ar[sz]; \
124 };\
125 *(struct __copy*)_OFFSET(dst, dof) = *(struct __copy*)_OFFSET(src, sof);\
126 } while (0)
127
128 #define _COPYIF(dst, dof, src, sof, sz) \
129 do {\
130 if(_OFFSET(dst, dof) != _OFFSET(src, sof)) {\
131 _COPY(dst, dof, src, sof, sz); \
132 } \
133 } while (0)
134
135 _ATTRIBUTE_UNUSED
_qaic_memmove(void * dst,void * src,int size)136 static __inline void _qaic_memmove(void* dst, void* src, int size) {
137 int i;
138 for(i = 0; i < size; ++i) {
139 ((char*)dst)[i] = ((char*)src)[i];
140 }
141 }
142
143 #define _MEMMOVEIF(dst, src, sz) \
144 do {\
145 if(dst != src) {\
146 _qaic_memmove(dst, src, sz);\
147 } \
148 } while (0)
149
150
151 #define _ASSIGN(dst, src, sof) \
152 do {\
153 dst = OFFSET(src, sof); \
154 } while (0)
155
156 #define _STD_STRLEN_IF(str) (str == 0 ? 0 : strlen(str))
157
158 #include "AEEStdErr.h"
159
160 #define _TRY(ee, func) \
161 do { \
162 if (AEE_SUCCESS != ((ee) = func)) {\
163 __QAIC_DBG_PRINTF__((__FILE__ ":%d:error:%d:%s\n", __LINE__, (int)(ee),#func));\
164 goto ee##bail;\
165 } \
166 } while (0)
167
168 #define _CATCH(exception) exception##bail: if (exception != AEE_SUCCESS)
169
170 #define _ASSERT(nErr, ff) _TRY(nErr, 0 == (ff) ? AEE_EBADPARM : AEE_SUCCESS)
171
172 #ifdef __QAIC_DEBUG__
173 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, __FILE_LINE__, size, alignment, (void**)&pv))
174 #else
175 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, 0, size, alignment, (void**)&pv))
176 #endif
177
178
179 #endif // _QAIC_ENV_H
180
181 #include "remote.h"
182 #include <string.h>
183 #ifndef _ALLOCATOR_H
184 #define _ALLOCATOR_H
185
186 #include <stdlib.h>
187 #include <stdint.h>
188
189 typedef struct _heap _heap;
190 struct _heap {
191 _heap* pPrev;
192 const char* loc;
193 uint64_t buf;
194 };
195
196 typedef struct _allocator {
197 _heap* pheap;
198 uint8_t* stack;
199 uint8_t* stackEnd;
200 int nSize;
201 } _allocator;
202
203 _ATTRIBUTE_UNUSED
_heap_alloc(_heap ** ppa,const char * loc,int size,void ** ppbuf)204 static __inline int _heap_alloc(_heap** ppa, const char* loc, int size, void** ppbuf) {
205 _heap* pn = 0;
206 pn = malloc(size + sizeof(_heap) - sizeof(uint64_t));
207 if(pn != 0) {
208 pn->pPrev = *ppa;
209 pn->loc = loc;
210 *ppa = pn;
211 *ppbuf = (void*)&(pn->buf);
212 return 0;
213 } else {
214 return -1;
215 }
216 }
217 #define _ALIGN_SIZE(x, y) (((x) + (y-1)) & ~(y-1))
218
219 _ATTRIBUTE_UNUSED
_allocator_alloc(_allocator * me,const char * loc,int size,unsigned int al,void ** ppbuf)220 static __inline int _allocator_alloc(_allocator* me,
221 const char* loc,
222 int size,
223 unsigned int al,
224 void** ppbuf) {
225 if(size < 0) {
226 return -1;
227 } else if (size == 0) {
228 *ppbuf = 0;
229 return 0;
230 }
231 if((_ALIGN_SIZE((uintptr_t)me->stackEnd, al) + size) < (uintptr_t)me->stack + me->nSize) {
232 *ppbuf = (uint8_t*)_ALIGN_SIZE((uintptr_t)me->stackEnd, al);
233 me->stackEnd = (uint8_t*)_ALIGN_SIZE((uintptr_t)me->stackEnd, al) + size;
234 return 0;
235 } else {
236 return _heap_alloc(&me->pheap, loc, size, ppbuf);
237 }
238 }
239
240 _ATTRIBUTE_UNUSED
_allocator_deinit(_allocator * me)241 static __inline void _allocator_deinit(_allocator* me) {
242 _heap* pa = me->pheap;
243 while(pa != 0) {
244 _heap* pn = pa;
245 const char* loc = pn->loc;
246 (void)loc;
247 pa = pn->pPrev;
248 free(pn);
249 }
250 }
251
252 _ATTRIBUTE_UNUSED
_allocator_init(_allocator * me,uint8_t * stack,int stackSize)253 static __inline void _allocator_init(_allocator* me, uint8_t* stack, int stackSize) {
254 me->stack = stack;
255 me->stackEnd = stack + stackSize;
256 me->nSize = stackSize;
257 me->pheap = 0;
258 }
259
260
261 #endif // _ALLOCATOR_H
262
263 #ifndef SLIM_H
264 #define SLIM_H
265
266 #include <stdint.h>
267
268 //a C data structure for the idl types that can be used to implement
269 //static and dynamic language bindings fairly efficiently.
270 //
271 //the goal is to have a minimal ROM and RAM footprint and without
272 //doing too many allocations. A good way to package these things seemed
273 //like the module boundary, so all the idls within one module can share
274 //all the type references.
275
276
277 #define PARAMETER_IN 0x0
278 #define PARAMETER_OUT 0x1
279 #define PARAMETER_INOUT 0x2
280 #define PARAMETER_ROUT 0x3
281 #define PARAMETER_INROUT 0x4
282
283 //the types that we get from idl
284 #define TYPE_OBJECT 0x0
285 #define TYPE_INTERFACE 0x1
286 #define TYPE_PRIMITIVE 0x2
287 #define TYPE_ENUM 0x3
288 #define TYPE_STRING 0x4
289 #define TYPE_WSTRING 0x5
290 #define TYPE_STRUCTURE 0x6
291 #define TYPE_UNION 0x7
292 #define TYPE_ARRAY 0x8
293 #define TYPE_SEQUENCE 0x9
294
295 //these require the pack/unpack to recurse
296 //so it's a hint to those languages that can optimize in cases where
297 //recursion isn't necessary.
298 #define TYPE_COMPLEX_STRUCTURE (0x10 | TYPE_STRUCTURE)
299 #define TYPE_COMPLEX_UNION (0x10 | TYPE_UNION)
300 #define TYPE_COMPLEX_ARRAY (0x10 | TYPE_ARRAY)
301 #define TYPE_COMPLEX_SEQUENCE (0x10 | TYPE_SEQUENCE)
302
303
304 typedef struct Type Type;
305
306 #define INHERIT_TYPE\
307 int32_t nativeSize; /*in the simple case its the same as wire size and alignment*/\
308 union {\
309 struct {\
310 const uintptr_t p1;\
311 const uintptr_t p2;\
312 } _cast;\
313 struct {\
314 uint32_t iid;\
315 uint32_t bNotNil;\
316 } object;\
317 struct {\
318 const Type *arrayType;\
319 int32_t nItems;\
320 } array;\
321 struct {\
322 const Type *seqType;\
323 int32_t nMaxLen;\
324 } seqSimple; \
325 struct {\
326 uint32_t bFloating;\
327 uint32_t bSigned;\
328 } prim; \
329 const SequenceType* seqComplex;\
330 const UnionType *unionType;\
331 const StructType *structType;\
332 int32_t stringMaxLen;\
333 uint8_t bInterfaceNotNil;\
334 } param;\
335 uint8_t type;\
336 uint8_t nativeAlignment\
337
338 typedef struct UnionType UnionType;
339 typedef struct StructType StructType;
340 typedef struct SequenceType SequenceType;
341 struct Type {
342 INHERIT_TYPE;
343 };
344
345 struct SequenceType {
346 const Type * seqType;
347 uint32_t nMaxLen;
348 uint32_t inSize;
349 uint32_t routSizePrimIn;
350 uint32_t routSizePrimROut;
351 };
352
353 //byte offset from the start of the case values for
354 //this unions case value array. it MUST be aligned
355 //at the alignment requrements for the descriptor
356 //
357 //if negative it means that the unions cases are
358 //simple enumerators, so the value read from the descriptor
359 //can be used directly to find the correct case
360 typedef union CaseValuePtr CaseValuePtr;
361 union CaseValuePtr {
362 const uint8_t* value8s;
363 const uint16_t* value16s;
364 const uint32_t* value32s;
365 const uint64_t* value64s;
366 };
367
368 //these are only used in complex cases
369 //so I pulled them out of the type definition as references to make
370 //the type smaller
371 struct UnionType {
372 const Type *descriptor;
373 uint32_t nCases;
374 const CaseValuePtr caseValues;
375 const Type * const *cases;
376 int32_t inSize;
377 int32_t routSizePrimIn;
378 int32_t routSizePrimROut;
379 uint8_t inAlignment;
380 uint8_t routAlignmentPrimIn;
381 uint8_t routAlignmentPrimROut;
382 uint8_t inCaseAlignment;
383 uint8_t routCaseAlignmentPrimIn;
384 uint8_t routCaseAlignmentPrimROut;
385 uint8_t nativeCaseAlignment;
386 uint8_t bDefaultCase;
387 };
388
389 struct StructType {
390 uint32_t nMembers;
391 const Type * const *members;
392 int32_t inSize;
393 int32_t routSizePrimIn;
394 int32_t routSizePrimROut;
395 uint8_t inAlignment;
396 uint8_t routAlignmentPrimIn;
397 uint8_t routAlignmentPrimROut;
398 };
399
400 typedef struct Parameter Parameter;
401 struct Parameter {
402 INHERIT_TYPE;
403 uint8_t mode;
404 uint8_t bNotNil;
405 };
406
407 #define SLIM_IFPTR32(is32,is64) (sizeof(uintptr_t) == 4 ? (is32) : (is64))
408 #define SLIM_SCALARS_IS_DYNAMIC(u) (((u) & 0x00ffffff) == 0x00ffffff)
409
410 typedef struct Method Method;
411 struct Method {
412 uint32_t uScalars; //no method index
413 int32_t primInSize;
414 int32_t primROutSize;
415 int maxArgs;
416 int numParams;
417 const Parameter * const *params;
418 uint8_t primInAlignment;
419 uint8_t primROutAlignment;
420 };
421
422 typedef struct Interface Interface;
423
424 struct Interface {
425 int nMethods;
426 const Method * const *methodArray;
427 int nIIds;
428 const uint32_t *iids;
429 const uint16_t* methodStringArray;
430 const uint16_t* methodStrings;
431 const char* strings;
432 };
433
434
435 #endif //SLIM_H
436
437
438 #ifndef _APPS_STD_SLIM_H
439 #define _APPS_STD_SLIM_H
440 #include "remote.h"
441 #include <stdint.h>
442
443 #ifndef __QAIC_SLIM
444 #define __QAIC_SLIM(ff) ff
445 #endif
446 #ifndef __QAIC_SLIM_EXPORT
447 #define __QAIC_SLIM_EXPORT
448 #endif
449
450 static const Type types[7];
451 static const Type* const typeArrays[15] = {&(types[2]),&(types[2]),&(types[2]),&(types[5]),&(types[5]),&(types[2]),&(types[2]),&(types[6]),&(types[6]),&(types[6]),&(types[6]),&(types[6]),&(types[6]),&(types[3]),&(types[4])};
452 static const StructType structTypes[3] = {{0x1,&(typeArrays[0]),0x8,0x0,0x8,0x8,0x1,0x8},{0x2,&(typeArrays[13]),0x104,0x0,0x104,0x4,0x1,0x4},{0xd,&(typeArrays[0]),0x60,0x0,0x60,0x8,0x1,0x8}};
453 static const SequenceType sequenceTypes[1] = {{&(types[1]),0x0,0x4,0x4,0x0}};
454 static const Type types[7] = {{0x1,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x1},{SLIM_IFPTR32(0x8,0x10),{{(const uintptr_t)0x0,0}}, 4,SLIM_IFPTR32(0x4,0x8)},{0x8,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x8},{0x4,{{(const uintptr_t)0,(const uintptr_t)1}}, 2,0x4},{0xff,{{(const uintptr_t)&(types[0]),(const uintptr_t)0xff}}, 8,0x1},{0x4,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x4},{0x8,{{(const uintptr_t)0,(const uintptr_t)1}}, 2,0x8}};
455 static const Parameter parameters[16] = {{SLIM_IFPTR32(0x8,0x10),{{(const uintptr_t)0x0,0}}, 4,SLIM_IFPTR32(0x4,0x8),0,0},{0x4,{{(const uintptr_t)0,(const uintptr_t)1}}, 2,0x4,3,0},{0x4,{{(const uintptr_t)0,(const uintptr_t)1}}, 2,0x4,0,0},{SLIM_IFPTR32(0x8,0x10),{{(const uintptr_t)&(types[0]),(const uintptr_t)0x0}}, 9,SLIM_IFPTR32(0x4,0x8),3,0},{SLIM_IFPTR32(0x8,0x10),{{(const uintptr_t)&(types[0]),(const uintptr_t)0x0}}, 9,SLIM_IFPTR32(0x4,0x8),0,0},{0x4,{{0,0}}, 3,0x4,0,0},{0x8,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x8,3,0},{SLIM_IFPTR32(0x8,0x10),{{(const uintptr_t)0x0,0}}, 4,SLIM_IFPTR32(0x4,0x8),3,0},{SLIM_IFPTR32(0x8,0x10),{{(const uintptr_t)&(sequenceTypes[0]),0}}, 25,SLIM_IFPTR32(0x4,0x8),3,0},{0x4,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x4,3,0},{0x2,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x2,3,0},{0x1,{{(const uintptr_t)0,(const uintptr_t)0}}, 2,0x1,3,0},{0x8,{{(const uintptr_t)&(structTypes[0]),0}}, 6,0x8,3,0},{0x8,{{(const uintptr_t)&(structTypes[0]),0}}, 6,0x8,0,0},{0x104,{{(const uintptr_t)&(structTypes[1]),0}}, 6,0x4,3,0},{0x60,{{(const uintptr_t)&(structTypes[2]),0}}, 6,0x8,3,0}};
456 static const Parameter* const parameterArrays[44] = {(&(parameters[0])),(&(parameters[0])),(&(parameters[8])),(&(parameters[9])),(&(parameters[10])),(&(parameters[0])),(&(parameters[0])),(&(parameters[0])),(&(parameters[0])),(&(parameters[1])),(&(parameters[2])),(&(parameters[4])),(&(parameters[1])),(&(parameters[1])),(&(parameters[2])),(&(parameters[3])),(&(parameters[1])),(&(parameters[1])),(&(parameters[2])),(&(parameters[0])),(&(parameters[0])),(&(parameters[1])),(&(parameters[13])),(&(parameters[14])),(&(parameters[1])),(&(parameters[0])),(&(parameters[0])),(&(parameters[2])),(&(parameters[0])),(&(parameters[7])),(&(parameters[1])),(&(parameters[2])),(&(parameters[2])),(&(parameters[5])),(&(parameters[0])),(&(parameters[15])),(&(parameters[0])),(&(parameters[12])),(&(parameters[0])),(&(parameters[11])),(&(parameters[2])),(&(parameters[6])),(&(parameters[2])),(&(parameters[1]))};
457 static const Method methods[23] = {{REMOTE_SCALARS_MAKEX(0,0,0x3,0x1,0x0,0x0),0x8,0x4,3,3,(&(parameterArrays[7])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x3,0x1,0x0,0x0),0xc,0x4,4,4,(&(parameterArrays[18])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x0,0x0,0x0),0x4,0x0,1,1,(&(parameterArrays[10])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x2,0x0,0x0),0x8,0x8,6,4,(&(parameterArrays[14])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x1,0x0,0x0),0x8,0x8,5,4,(&(parameterArrays[10])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x2,0x0,0x0),0x8,0x4,5,3,(&(parameterArrays[14])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x0,0x0,0x0),0x8,0x0,3,2,(&(parameterArrays[10])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x1,0x0,0x0),0x4,0x4,2,2,(&(parameterArrays[42])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x0,0x0,0x0),0xc,0x0,3,3,(&(parameterArrays[31])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x1,0x0,0x0),0x4,0x8,2,2,(&(parameterArrays[40])),0x4,0x8},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x0,0x0,0x0),0x4,0x0,1,1,(&(parameterArrays[0])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x2,0x0,0x0),0x8,0x4,5,3,(&(parameterArrays[28])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x3,0x0,0x0,0x0),0xc,0x0,3,3,(&(parameterArrays[25])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x5,0x1,0x0,0x0),0x10,0x4,5,5,(&(parameterArrays[5])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,255,255,15,15),0xc,0x6,7,5,(&(parameterArrays[0])),0x4,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x1,0x0,0x0),0x4,0x1,2,2,(&(parameterArrays[38])),0x4,0x1},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x1,0x0,0x0),0x4,0x8,2,2,(&(parameterArrays[36])),0x4,0x8},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x0,0x0,0x0),0x8,0x0,1,1,(&(parameterArrays[22])),0x8,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x1,0x0,0x0),0x8,0x108,3,3,(&(parameterArrays[22])),0x8,0x4},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x0,0x0,0x0),0x8,0x0,2,2,(&(parameterArrays[26])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x2,0x1,0x0,0x0),0x4,0x60,2,2,(&(parameterArrays[34])),0x4,0x8},{REMOTE_SCALARS_MAKEX(0,0,0x1,0x0,0x0,0x0),0x8,0x0,2,2,(&(parameterArrays[31])),0x4,0x0},{REMOTE_SCALARS_MAKEX(0,0,0x3,0x0,0x0,0x0),0x8,0x0,2,2,(&(parameterArrays[0])),0x4,0x0}};
458 static const Method* const methodArrays[34] = {&(methods[0]),&(methods[1]),&(methods[2]),&(methods[2]),&(methods[3]),&(methods[4]),&(methods[5]),&(methods[6]),&(methods[7]),&(methods[8]),&(methods[9]),&(methods[2]),&(methods[7]),&(methods[7]),&(methods[2]),&(methods[10]),&(methods[11]),&(methods[12]),&(methods[10]),&(methods[13]),&(methods[5]),&(methods[14]),&(methods[15]),&(methods[2]),&(methods[10]),&(methods[7]),&(methods[16]),&(methods[17]),&(methods[18]),&(methods[19]),&(methods[10]),&(methods[20]),&(methods[21]),&(methods[22])};
459 static const char strings[530] = "get_search_paths_with_env\0fdopen_decrypt\0fopen_with_env\0print_string\0bytesWritten\0fileExists\0maxPathLen\0envvarname\0ctimensec\0mtimensec\0atimensec\0valLenReq\0posLenReq\0bytesRead\0closedir\0numPaths\0unsetenv\0override\0clearerr\0newname\0oldname\0frename\0readdir\0opendir\0fremove\0fsetpos\0fgetpos\0freopen\0ftrunc\0dirent\0handle\0exists\0getenv\0ferror\0rewind\0whence\0offset\0fwrite\0fclose\0fflush\0ctime\0mtime\0atime\0nlink\0rmdir\0mkdir\0fsync\0paths\0fgets\0delim\0fseek\0ftell\0fread\0psout\0fopen\0size\0rdev\0stat\0path\0feof\0flen\0bEOF\0mode\0tsz\0ino\0val\0str\0buf\0sin\0";
460 static const uint16_t methodStrings[129] = {476,110,476,506,472,510,501,394,471,466,388,135,382,125,376,115,244,180,306,299,510,110,496,0,104,430,418,184,93,41,104,430,110,501,454,355,526,522,69,496,448,526,522,165,496,284,526,110,501,454,252,110,180,306,424,526,522,496,195,110,514,202,320,110,514,145,436,526,348,341,276,526,272,155,460,110,501,454,236,228,220,292,526,348,406,110,501,175,180,306,26,526,454,82,481,313,327,526,216,486,526,496,491,526,492,442,526,272,268,526,272,400,110,260,110,412,526,193,110,56,518,211,526,334,526,362,526,369,526};
461 static const uint16_t methodStringsArrays[34] = {74,45,127,125,40,35,70,108,105,66,102,123,99,96,121,119,62,58,117,29,54,23,93,115,113,90,50,87,16,84,111,0,81,78};
462 __QAIC_SLIM_EXPORT const Interface __QAIC_SLIM(apps_std_slim) = {34,&(methodArrays[0]),0,0,&(methodStringsArrays [0]),methodStrings,strings};
463 #endif //_APPS_STD_SLIM_H
464 extern int adsp_mmap_fd_getinfo(int, uint32_t *);
465 #ifdef __cplusplus
466 extern "C" {
467 #endif
_skel_method(int (* _pfn)(char *,char *),uint32_t _sc,remote_arg * _pra)468 static __inline int _skel_method(int (*_pfn)(char*, char*), uint32_t _sc, remote_arg* _pra) {
469 remote_arg* _praEnd;
470 uint32_t _in0[1];
471 char* _in1[1];
472 uint32_t _in1Len[1];
473 char* _in2[1];
474 uint32_t _in2Len[1];
475 uint32_t* _primIn;
476 remote_arg* _praIn;
477 int _nErr = 0;
478 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
479 _ASSERT(_nErr, (_pra + ((3 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
480 _ASSERT(_nErr, _pra[0].buf.nLen >= 12);
481 _primIn = _pra[0].buf.pv;
482 _COPY(_in0, 0, _primIn, 0, 4);
483 _COPY(_in1Len, 0, _primIn, 4, 4);
484 _praIn = (_pra + 1);
485 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in1Len[0]));
486 _in1[0] = _praIn[0].buf.pv;
487 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
488 _COPY(_in2Len, 0, _primIn, 8, 4);
489 _ASSERT(_nErr, (int)((_praIn[1].buf.nLen / 1)) >= (int)(_in2Len[0]));
490 _in2[0] = _praIn[1].buf.pv;
491 _ASSERT(_nErr, (_in2Len[0] > 0) && (_in2[0][(_in2Len[0] - 1)] == 0));
492 _TRY(_nErr, _pfn(*_in1, *_in2));
493 _CATCH(_nErr) {}
494 return _nErr;
495 }
_skel_method_1(int (* _pfn)(uint32_t,uint32_t),uint32_t _sc,remote_arg * _pra)496 static __inline int _skel_method_1(int (*_pfn)(uint32_t, uint32_t), uint32_t _sc, remote_arg* _pra) {
497 remote_arg* _praEnd;
498 uint32_t _in0[1];
499 uint32_t _in1[1];
500 uint32_t _in2[1];
501 uint32_t* _primIn;
502 int _nErr = 0;
503 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
504 _ASSERT(_nErr, (_pra + ((1 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
505 _ASSERT(_nErr, _pra[0].buf.nLen >= 12);
506 _primIn = _pra[0].buf.pv;
507 _COPY(_in0, 0, _primIn, 0, 4);
508 _COPY(_in1, 0, _primIn, 4, 4);
509 _COPY(_in2, 0, _primIn, 8, 4);
510 _TRY(_nErr, _pfn(*_in1, *_in2));
511 _CATCH(_nErr) {}
512 return _nErr;
513 }
_skel_method_2(int (* _pfn)(char *,uint64_t *),uint32_t _sc,remote_arg * _pra)514 static __inline int _skel_method_2(int (*_pfn)(char*, uint64_t*), uint32_t _sc, remote_arg* _pra) {
515 remote_arg* _praEnd;
516 uint32_t _in0[1];
517 char* _in1[1];
518 uint32_t _in1Len[1];
519 uint64_t _rout2[12];
520 uint32_t* _primIn;
521 int _numIn[1];
522 uint64_t* _primROut;
523 remote_arg* _praIn;
524 int _nErr = 0;
525 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
526 _ASSERT(_nErr, (_pra + ((2 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
527 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
528 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
529 _primIn = _pra[0].buf.pv;
530 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 96);
531 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
532 _COPY(_in0, 0, _primIn, 0, 4);
533 _COPY(_in1Len, 0, _primIn, 4, 4);
534 _praIn = (_pra + 1);
535 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in1Len[0]));
536 _in1[0] = _praIn[0].buf.pv;
537 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
538 _TRY(_nErr, _pfn(*_in1, _rout2));
539 _COPY(_primROut, 0, _rout2, 0, 96);
540 _CATCH(_nErr) {}
541 return _nErr;
542 }
_skel_invoke(uint32_t _mid,uint32_t _sc,remote_arg * _pra)543 static __inline int _skel_invoke(uint32_t _mid, uint32_t _sc, remote_arg* _pra) {
544 switch(_mid)
545 {
546 case 31:
547 return _skel_method_2((void*)__QAIC_IMPL(apps_std_stat), _sc, _pra);
548 case 32:
549 return _skel_method_1((void*)__QAIC_IMPL(apps_std_ftrunc), _sc, _pra);
550 case 33:
551 return _skel_method((void*)__QAIC_IMPL(apps_std_frename), _sc, _pra);
552 }
553 return AEE_EUNSUPPORTED;
554 }
_skel_method_3(int (* _pfn)(char *),uint32_t _sc,remote_arg * _pra)555 static __inline int _skel_method_3(int (*_pfn)(char*), uint32_t _sc, remote_arg* _pra) {
556 remote_arg* _praEnd;
557 char* _in0[1];
558 uint32_t _in0Len[1];
559 uint32_t* _primIn;
560 remote_arg* _praIn;
561 int _nErr = 0;
562 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
563 _ASSERT(_nErr, (_pra + ((2 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
564 _ASSERT(_nErr, _pra[0].buf.nLen >= 4);
565 _primIn = _pra[0].buf.pv;
566 _COPY(_in0Len, 0, _primIn, 0, 4);
567 _praIn = (_pra + 1);
568 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
569 _in0[0] = _praIn[0].buf.pv;
570 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
571 _TRY(_nErr, _pfn(*_in0));
572 _CATCH(_nErr) {}
573 return _nErr;
574 }
_skel_method_4(int (* _pfn)(char *,uint32_t),uint32_t _sc,remote_arg * _pra)575 static __inline int _skel_method_4(int (*_pfn)(char*, uint32_t), uint32_t _sc, remote_arg* _pra) {
576 remote_arg* _praEnd;
577 char* _in0[1];
578 uint32_t _in0Len[1];
579 uint32_t _in1[1];
580 uint32_t* _primIn;
581 remote_arg* _praIn;
582 int _nErr = 0;
583 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
584 _ASSERT(_nErr, (_pra + ((2 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
585 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
586 _primIn = _pra[0].buf.pv;
587 _COPY(_in0Len, 0, _primIn, 0, 4);
588 _praIn = (_pra + 1);
589 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
590 _in0[0] = _praIn[0].buf.pv;
591 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
592 _COPY(_in1, 0, _primIn, 4, 4);
593 _TRY(_nErr, _pfn(*_in0, *_in1));
594 _CATCH(_nErr) {}
595 return _nErr;
596 }
_skel_method_5(int (* _pfn)(uint64_t *,uint32_t *,uint32_t *),uint32_t _sc,remote_arg * _pra)597 static __inline int _skel_method_5(int (*_pfn)(uint64_t*, uint32_t*, uint32_t*), uint32_t _sc, remote_arg* _pra) {
598 remote_arg* _praEnd;
599 uint64_t _in0[1];
600 uint32_t _rout1[65];
601 uint32_t _rout2[1];
602 uint64_t* _primIn;
603 int _numIn[1];
604 uint32_t* _primROut;
605 int _nErr = 0;
606 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
607 _ASSERT(_nErr, (_pra + ((1 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
608 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
609 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
610 _primIn = _pra[0].buf.pv;
611 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 264);
612 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
613 _COPY(_in0, 0, _primIn, 0, 8);
614 _TRY(_nErr, _pfn(_in0, _rout1, _rout2));
615 _COPY(_primROut, 0, _rout1, 0, 260);
616 _COPY(_primROut, 260, _rout2, 0, 4);
617 _CATCH(_nErr) {}
618 return _nErr;
619 }
_skel_method_6(int (* _pfn)(uint64_t *),uint32_t _sc,remote_arg * _pra)620 static __inline int _skel_method_6(int (*_pfn)(uint64_t*), uint32_t _sc, remote_arg* _pra) {
621 remote_arg* _praEnd;
622 uint64_t _in0[1];
623 uint64_t* _primIn;
624 int _nErr = 0;
625 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
626 _ASSERT(_nErr, (_pra + ((1 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
627 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
628 _primIn = _pra[0].buf.pv;
629 _COPY(_in0, 0, _primIn, 0, 8);
630 _TRY(_nErr, _pfn(_in0));
631 _CATCH(_nErr) {}
632 return _nErr;
633 }
_skel_method_7(int (* _pfn)(char *,uint64_t *),uint32_t _sc,remote_arg * _pra)634 static __inline int _skel_method_7(int (*_pfn)(char*, uint64_t*), uint32_t _sc, remote_arg* _pra) {
635 remote_arg* _praEnd;
636 char* _in0[1];
637 uint32_t _in0Len[1];
638 uint64_t _rout1[1];
639 uint32_t* _primIn;
640 int _numIn[1];
641 uint64_t* _primROut;
642 remote_arg* _praIn;
643 int _nErr = 0;
644 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
645 _ASSERT(_nErr, (_pra + ((2 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
646 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
647 _ASSERT(_nErr, _pra[0].buf.nLen >= 4);
648 _primIn = _pra[0].buf.pv;
649 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 8);
650 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
651 _COPY(_in0Len, 0, _primIn, 0, 4);
652 _praIn = (_pra + 1);
653 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
654 _in0[0] = _praIn[0].buf.pv;
655 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
656 _TRY(_nErr, _pfn(*_in0, _rout1));
657 _COPY(_primROut, 0, _rout1, 0, 8);
658 _CATCH(_nErr) {}
659 return _nErr;
660 }
_skel_method_8(int (* _pfn)(uint32_t,uint32_t *),uint32_t _sc,remote_arg * _pra)661 static __inline int _skel_method_8(int (*_pfn)(uint32_t, uint32_t*), uint32_t _sc, remote_arg* _pra) {
662 remote_arg* _praEnd;
663 uint32_t _in0[1];
664 uint32_t _rout1[1];
665 uint32_t* _primIn;
666 int _numIn[1];
667 uint32_t* _primROut;
668 int _nErr = 0;
669 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
670 _ASSERT(_nErr, (_pra + ((1 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
671 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
672 _ASSERT(_nErr, _pra[0].buf.nLen >= 4);
673 _primIn = _pra[0].buf.pv;
674 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 4);
675 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
676 _COPY(_in0, 0, _primIn, 0, 4);
677 _TRY(_nErr, _pfn(*_in0, _rout1));
678 _COPY(_primROut, 0, _rout1, 0, 4);
679 _CATCH(_nErr) {}
680 return _nErr;
681 }
_skel_method_9(int (* _pfn)(uint32_t),uint32_t _sc,remote_arg * _pra)682 static __inline int _skel_method_9(int (*_pfn)(uint32_t), uint32_t _sc, remote_arg* _pra) {
683 remote_arg* _praEnd;
684 uint32_t _in0[1];
685 uint32_t* _primIn;
686 int _nErr = 0;
687 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
688 _ASSERT(_nErr, (_pra + ((1 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
689 _ASSERT(_nErr, _pra[0].buf.nLen >= 4);
690 _primIn = _pra[0].buf.pv;
691 _COPY(_in0, 0, _primIn, 0, 4);
692 _TRY(_nErr, _pfn(*_in0));
693 _CATCH(_nErr) {}
694 return _nErr;
695 }
_skel_method_10(int (* _pfn)(char *,uint8_t *),uint32_t _sc,remote_arg * _pra)696 static __inline int _skel_method_10(int (*_pfn)(char*, uint8_t*), uint32_t _sc, remote_arg* _pra) {
697 remote_arg* _praEnd;
698 char* _in0[1];
699 uint32_t _in0Len[1];
700 uint8_t _rout1[1];
701 uint32_t* _primIn;
702 int _numIn[1];
703 uint8_t* _primROut;
704 remote_arg* _praIn;
705 int _nErr = 0;
706 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
707 _ASSERT(_nErr, (_pra + ((2 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
708 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
709 _ASSERT(_nErr, _pra[0].buf.nLen >= 4);
710 _primIn = _pra[0].buf.pv;
711 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 1);
712 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
713 _COPY(_in0Len, 0, _primIn, 0, 4);
714 _praIn = (_pra + 1);
715 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
716 _in0[0] = _praIn[0].buf.pv;
717 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
718 _TRY(_nErr, _pfn(*_in0, _rout1));
719 _COPY(_primROut, 0, _rout1, 0, 1);
720 _CATCH(_nErr) {}
721 return _nErr;
722 }
_skel_pack(remote_arg * _praROutPost,remote_arg * _ppraROutPost[1],void * _primROut,char * _rout0[1],uint32_t _rout0Len[1])723 static __inline int _skel_pack(remote_arg* _praROutPost, remote_arg* _ppraROutPost[1], void* _primROut, char* _rout0[1], uint32_t _rout0Len[1]) {
724 int _nErr = 0;
725 remote_arg* _praROutPostStart = _praROutPost;
726 remote_arg** _ppraROutPostStart = _ppraROutPost;
727 _ppraROutPost = &_praROutPost;
728 _ppraROutPostStart[0] += (_praROutPost - _praROutPostStart) +1;
729 return _nErr;
730 }
_skel_unpack(_allocator * _al,remote_arg * _praIn,remote_arg * _ppraIn[1],remote_arg * _praROut,remote_arg * _ppraROut[1],remote_arg * _praHIn,remote_arg * _ppraHIn[1],remote_arg * _praHROut,remote_arg * _ppraHROut[1],void * _primIn,void * _primROut,char * _rout0[1],uint32_t _rout0Len[1])731 static __inline int _skel_unpack(_allocator* _al, remote_arg* _praIn, remote_arg* _ppraIn[1], remote_arg* _praROut, remote_arg* _ppraROut[1], remote_arg* _praHIn, remote_arg* _ppraHIn[1], remote_arg* _praHROut, remote_arg* _ppraHROut[1], void* _primIn, void* _primROut, char* _rout0[1], uint32_t _rout0Len[1]) {
732 int _nErr = 0;
733 remote_arg* _praInStart = _praIn;
734 remote_arg** _ppraInStart = _ppraIn;
735 remote_arg* _praROutStart = _praROut;
736 remote_arg** _ppraROutStart = _ppraROut;
737 _ppraIn = &_praIn;
738 _ppraROut = &_praROut;
739 _COPY(_rout0Len, 0, _primIn, 0, 4);
740 _ASSERT(_nErr, (int)((_praROut[0].buf.nLen / 1)) >= (int)(_rout0Len[0]));
741 _rout0[0] = _praROut[0].buf.pv;
742 _ppraInStart[0] += (_praIn - _praInStart) + 0;
743 _ppraROutStart[0] += (_praROut - _praROutStart) +1;
744 _CATCH(_nErr) {}
745 return _nErr;
746 }
_skel_method_11(int (* _pfn)(char *,char *,void *,uint32_t,uint32_t *,uint16_t *),uint32_t _sc,remote_arg * _pra)747 static __inline int _skel_method_11(int (*_pfn)(char*, char*, void*, uint32_t, uint32_t*, uint16_t*), uint32_t _sc, remote_arg* _pra) {
748 remote_arg* _praEnd;
749 char* _in0[1];
750 uint32_t _in0Len[1];
751 char* _in1[1];
752 uint32_t _in1Len[1];
753 void* _rout2[1];
754 uint32_t _rout2Len[1];
755 uint32_t _rout3[1];
756 uint16_t _rout4[1];
757 uint32_t* _primIn;
758 int _numIn[1];
759 uint32_t* _primROut;
760 int _numInH[1];
761 int _numROut[1];
762 remote_arg* _praIn;
763 remote_arg* _praROut;
764 remote_arg* _praROutPost;
765 remote_arg** _ppraROutPost = &_praROutPost;
766 _allocator _al[1] = {{0}};
767 remote_arg** _ppraIn = &_praIn;
768 remote_arg** _ppraROut = &_praROut;
769 remote_arg* _praHIn = 0;
770 remote_arg** _ppraHIn = &_praHIn;
771 remote_arg* _praHROut = 0;
772 remote_arg** _ppraHROut = &_praHROut;
773 char* _seq_primIn2;
774 char* _seq_nat2;
775 int _ii;
776 int _nErr = 0;
777 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
778 _ASSERT(_nErr, (_pra + ((4 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
779 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
780 _ASSERT(_nErr, _pra[0].buf.nLen >= 12);
781 _primIn = _pra[0].buf.pv;
782 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 6);
783 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
784 _numInH[0] = REMOTE_SCALARS_INHANDLES(_sc);
785 _numROut[0] = REMOTE_SCALARS_OUTBUFS(_sc);
786 _praIn = (_pra + 1);
787 _praROut = (_praIn + _numIn[0] + 1);
788 _praROutPost = _praROut;
789 _COPY(_in0Len, 0, _primIn, 0, 4);
790 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
791 _in0[0] = _praIn[0].buf.pv;
792 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
793 _COPY(_in1Len, 0, _primIn, 4, 4);
794 _ASSERT(_nErr, (int)((_praIn[1].buf.nLen / 1)) >= (int)(_in1Len[0]));
795 _in1[0] = _praIn[1].buf.pv;
796 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
797 _COPY(_rout2Len, 0, _primIn, 8, 4);
798 _allocator_init(_al, 0, 0);
799 if(_praHIn == 0)
800 {
801 _praHIn = ((_praROut + _numROut[0]) + 1);
802 }
803 if(_praHROut == 0)
804 (_praHROut = _praHIn + _numInH[0] + 0);
805 _ASSERT(_nErr, (int)((_praIn[2].buf.nLen / 4)) >= (int)(_rout2Len[0]));
806 _ALLOCATE(_nErr, _al, (_rout2Len[0] * SLIM_IFPTR32(8, 16)), SLIM_IFPTR32(4, 8), _rout2[0]);
807 for(_ii = 0, _seq_primIn2 = (char*)_praIn[2].buf.pv, _seq_nat2 = (char*)_rout2[0];_ii < (int)_rout2Len[0];++_ii, _seq_primIn2 = (_seq_primIn2 + 4), _seq_nat2 = (_seq_nat2 + SLIM_IFPTR32(8, 16)))
808 {
809 _TRY(_nErr, _skel_unpack(_al, (_praIn + 3), _ppraIn, (_praROut + 0), _ppraROut, _praHIn, _ppraHIn, _praHROut, _ppraHROut, _seq_primIn2, 0, SLIM_IFPTR32((char**)&(((uint32_t*)_seq_nat2)[0]), (char**)&(((uint64_t*)_seq_nat2)[0])), SLIM_IFPTR32((uint32_t*)&(((uint32_t*)_seq_nat2)[1]), (uint32_t*)&(((uint32_t*)_seq_nat2)[2]))));
810 }
811 _TRY(_nErr, _pfn(*_in0, *_in1, *_rout2, *_rout2Len, _rout3, _rout4));
812 for(_ii = 0, _seq_nat2 = (char*)_rout2[0];_ii < (int)_rout2Len[0];++_ii, _seq_nat2 = (_seq_nat2 + SLIM_IFPTR32(8, 16)))
813 {
814 _TRY(_nErr, _skel_pack((_praROutPost + 0), _ppraROutPost, 0, SLIM_IFPTR32((char**)&(((uint32_t*)_seq_nat2)[0]), (char**)&(((uint64_t*)_seq_nat2)[0])), SLIM_IFPTR32((uint32_t*)&(((uint32_t*)_seq_nat2)[1]), (uint32_t*)&(((uint32_t*)_seq_nat2)[2]))));
815 }
816 _COPY(_primROut, 0, _rout3, 0, 4);
817 _COPY(_primROut, 4, _rout4, 0, 2);
818 _CATCH(_nErr) {}
819 _allocator_deinit(_al);
820 return _nErr;
821 }
_skel_method_12(int (* _pfn)(uint32_t,char *,uint32_t,uint32_t *),uint32_t _sc,remote_arg * _pra)822 static __inline int _skel_method_12(int (*_pfn)(uint32_t, char*, uint32_t, uint32_t*), uint32_t _sc, remote_arg* _pra) {
823 remote_arg* _praEnd;
824 uint32_t _in0[1];
825 char* _rout1[1];
826 uint32_t _rout1Len[1];
827 uint32_t _rout2[1];
828 uint32_t* _primIn;
829 int _numIn[1];
830 uint32_t* _primROut;
831 remote_arg* _praIn;
832 remote_arg* _praROut;
833 int _nErr = 0;
834 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
835 _ASSERT(_nErr, (_pra + ((1 + 2) + (((0 + 0) + 0) + 0))) <= _praEnd);
836 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
837 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
838 _primIn = _pra[0].buf.pv;
839 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 4);
840 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
841 _COPY(_in0, 0, _primIn, 0, 4);
842 _COPY(_rout1Len, 0, _primIn, 4, 4);
843 _praIn = (_pra + 1);
844 _praROut = (_praIn + _numIn[0] + 1);
845 _ASSERT(_nErr, (int)((_praROut[0].buf.nLen / 1)) >= (int)(_rout1Len[0]));
846 _rout1[0] = _praROut[0].buf.pv;
847 _TRY(_nErr, _pfn(*_in0, *_rout1, *_rout1Len, _rout2));
848 _COPY(_primROut, 0, _rout2, 0, 4);
849 _CATCH(_nErr) {}
850 return _nErr;
851 }
_skel_method_13(int (* _pfn)(char *,char *,char *,char *,uint32_t *),uint32_t _sc,remote_arg * _pra)852 static __inline int _skel_method_13(int (*_pfn)(char*, char*, char*, char*, uint32_t*), uint32_t _sc, remote_arg* _pra) {
853 remote_arg* _praEnd;
854 char* _in0[1];
855 uint32_t _in0Len[1];
856 char* _in1[1];
857 uint32_t _in1Len[1];
858 char* _in2[1];
859 uint32_t _in2Len[1];
860 char* _in3[1];
861 uint32_t _in3Len[1];
862 uint32_t _rout4[1];
863 uint32_t* _primIn;
864 int _numIn[1];
865 uint32_t* _primROut;
866 remote_arg* _praIn;
867 int _nErr = 0;
868 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
869 _ASSERT(_nErr, (_pra + ((5 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
870 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
871 _ASSERT(_nErr, _pra[0].buf.nLen >= 16);
872 _primIn = _pra[0].buf.pv;
873 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 4);
874 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
875 _COPY(_in0Len, 0, _primIn, 0, 4);
876 _praIn = (_pra + 1);
877 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
878 _in0[0] = _praIn[0].buf.pv;
879 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
880 _COPY(_in1Len, 0, _primIn, 4, 4);
881 _ASSERT(_nErr, (int)((_praIn[1].buf.nLen / 1)) >= (int)(_in1Len[0]));
882 _in1[0] = _praIn[1].buf.pv;
883 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
884 _COPY(_in2Len, 0, _primIn, 8, 4);
885 _ASSERT(_nErr, (int)((_praIn[2].buf.nLen / 1)) >= (int)(_in2Len[0]));
886 _in2[0] = _praIn[2].buf.pv;
887 _ASSERT(_nErr, (_in2Len[0] > 0) && (_in2[0][(_in2Len[0] - 1)] == 0));
888 _COPY(_in3Len, 0, _primIn, 12, 4);
889 _ASSERT(_nErr, (int)((_praIn[3].buf.nLen / 1)) >= (int)(_in3Len[0]));
890 _in3[0] = _praIn[3].buf.pv;
891 _ASSERT(_nErr, (_in3Len[0] > 0) && (_in3[0][(_in3Len[0] - 1)] == 0));
892 _TRY(_nErr, _pfn(*_in0, *_in1, *_in2, *_in3, _rout4));
893 _COPY(_primROut, 0, _rout4, 0, 4);
894 _CATCH(_nErr) {}
895 return _nErr;
896 }
_skel_method_14(int (* _pfn)(char *,char *,uint32_t),uint32_t _sc,remote_arg * _pra)897 static __inline int _skel_method_14(int (*_pfn)(char*, char*, uint32_t), uint32_t _sc, remote_arg* _pra) {
898 remote_arg* _praEnd;
899 char* _in0[1];
900 uint32_t _in0Len[1];
901 char* _in1[1];
902 uint32_t _in1Len[1];
903 uint32_t _in2[1];
904 uint32_t* _primIn;
905 remote_arg* _praIn;
906 int _nErr = 0;
907 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
908 _ASSERT(_nErr, (_pra + ((3 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
909 _ASSERT(_nErr, _pra[0].buf.nLen >= 12);
910 _primIn = _pra[0].buf.pv;
911 _COPY(_in0Len, 0, _primIn, 0, 4);
912 _praIn = (_pra + 1);
913 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
914 _in0[0] = _praIn[0].buf.pv;
915 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
916 _COPY(_in1Len, 0, _primIn, 4, 4);
917 _ASSERT(_nErr, (int)((_praIn[1].buf.nLen / 1)) >= (int)(_in1Len[0]));
918 _in1[0] = _praIn[1].buf.pv;
919 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
920 _COPY(_in2, 0, _primIn, 8, 4);
921 _TRY(_nErr, _pfn(*_in0, *_in1, *_in2));
922 _CATCH(_nErr) {}
923 return _nErr;
924 }
_skel_method_15(int (* _pfn)(char *,char *,uint32_t,uint32_t *),uint32_t _sc,remote_arg * _pra)925 static __inline int _skel_method_15(int (*_pfn)(char*, char*, uint32_t, uint32_t*), uint32_t _sc, remote_arg* _pra) {
926 remote_arg* _praEnd;
927 char* _in0[1];
928 uint32_t _in0Len[1];
929 char* _rout1[1];
930 uint32_t _rout1Len[1];
931 uint32_t _rout2[1];
932 uint32_t* _primIn;
933 int _numIn[1];
934 uint32_t* _primROut;
935 remote_arg* _praIn;
936 remote_arg* _praROut;
937 int _nErr = 0;
938 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
939 _ASSERT(_nErr, (_pra + ((2 + 2) + (((0 + 0) + 0) + 0))) <= _praEnd);
940 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
941 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
942 _primIn = _pra[0].buf.pv;
943 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 4);
944 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
945 _COPY(_in0Len, 0, _primIn, 0, 4);
946 _praIn = (_pra + 1);
947 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
948 _in0[0] = _praIn[0].buf.pv;
949 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
950 _COPY(_rout1Len, 0, _primIn, 4, 4);
951 _praROut = (_praIn + _numIn[0] + 1);
952 _ASSERT(_nErr, (int)((_praROut[0].buf.nLen / 1)) >= (int)(_rout1Len[0]));
953 _rout1[0] = _praROut[0].buf.pv;
954 _TRY(_nErr, _pfn(*_in0, *_rout1, *_rout1Len, _rout2));
955 _COPY(_primROut, 0, _rout2, 0, 4);
956 _CATCH(_nErr) {}
957 return _nErr;
958 }
_skel_method_16(int (* _pfn)(uint32_t,uint64_t *),uint32_t _sc,remote_arg * _pra)959 static __inline int _skel_method_16(int (*_pfn)(uint32_t, uint64_t*), uint32_t _sc, remote_arg* _pra) {
960 remote_arg* _praEnd;
961 uint32_t _in0[1];
962 uint64_t _rout1[1];
963 uint32_t* _primIn;
964 int _numIn[1];
965 uint64_t* _primROut;
966 int _nErr = 0;
967 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
968 _ASSERT(_nErr, (_pra + ((1 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
969 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
970 _ASSERT(_nErr, _pra[0].buf.nLen >= 4);
971 _primIn = _pra[0].buf.pv;
972 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 8);
973 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
974 _COPY(_in0, 0, _primIn, 0, 4);
975 _TRY(_nErr, _pfn(*_in0, _rout1));
976 _COPY(_primROut, 0, _rout1, 0, 8);
977 _CATCH(_nErr) {}
978 return _nErr;
979 }
_skel_method_17(int (* _pfn)(uint32_t,uint32_t,uint32_t),uint32_t _sc,remote_arg * _pra)980 static __inline int _skel_method_17(int (*_pfn)(uint32_t, uint32_t, uint32_t), uint32_t _sc, remote_arg* _pra) {
981 remote_arg* _praEnd;
982 uint32_t _in0[1];
983 uint32_t _in1[1];
984 uint32_t _in2[1];
985 uint32_t* _primIn;
986 int _nErr = 0;
987 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
988 _ASSERT(_nErr, (_pra + ((1 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
989 _ASSERT(_nErr, _pra[0].buf.nLen >= 12);
990 _primIn = _pra[0].buf.pv;
991 _COPY(_in0, 0, _primIn, 0, 4);
992 _COPY(_in1, 0, _primIn, 4, 4);
993 _COPY(_in2, 0, _primIn, 8, 4);
994 _TRY(_nErr, _pfn(*_in0, *_in1, *_in2));
995 _CATCH(_nErr) {}
996 return _nErr;
997 }
_skel_method_18(int (* _pfn)(uint32_t,char *,uint32_t),uint32_t _sc,remote_arg * _pra)998 static __inline int _skel_method_18(int (*_pfn)(uint32_t, char*, uint32_t), uint32_t _sc, remote_arg* _pra) {
999 remote_arg* _praEnd;
1000 uint32_t _in0[1];
1001 char* _in1[1];
1002 uint32_t _in1Len[1];
1003 uint32_t* _primIn;
1004 remote_arg* _praIn;
1005 int _nErr = 0;
1006 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
1007 _ASSERT(_nErr, (_pra + ((2 + 0) + (((0 + 0) + 0) + 0))) <= _praEnd);
1008 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
1009 _primIn = _pra[0].buf.pv;
1010 _COPY(_in0, 0, _primIn, 0, 4);
1011 _COPY(_in1Len, 0, _primIn, 4, 4);
1012 _praIn = (_pra + 1);
1013 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in1Len[0]));
1014 _in1[0] = _praIn[0].buf.pv;
1015 _TRY(_nErr, _pfn(*_in0, *_in1, *_in1Len));
1016 _CATCH(_nErr) {}
1017 return _nErr;
1018 }
_skel_method_19(int (* _pfn)(uint32_t,char *,uint32_t,uint32_t *,uint32_t *),uint32_t _sc,remote_arg * _pra)1019 static __inline int _skel_method_19(int (*_pfn)(uint32_t, char*, uint32_t, uint32_t*, uint32_t*), uint32_t _sc, remote_arg* _pra) {
1020 remote_arg* _praEnd;
1021 uint32_t _in0[1];
1022 char* _in1[1];
1023 uint32_t _in1Len[1];
1024 uint32_t _rout2[1];
1025 uint32_t _rout3[1];
1026 uint32_t* _primIn;
1027 int _numIn[1];
1028 uint32_t* _primROut;
1029 remote_arg* _praIn;
1030 int _nErr = 0;
1031 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
1032 _ASSERT(_nErr, (_pra + ((2 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
1033 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
1034 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
1035 _primIn = _pra[0].buf.pv;
1036 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 8);
1037 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
1038 _COPY(_in0, 0, _primIn, 0, 4);
1039 _COPY(_in1Len, 0, _primIn, 4, 4);
1040 _praIn = (_pra + 1);
1041 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in1Len[0]));
1042 _in1[0] = _praIn[0].buf.pv;
1043 _TRY(_nErr, _pfn(*_in0, *_in1, *_in1Len, _rout2, _rout3));
1044 _COPY(_primROut, 0, _rout2, 0, 4);
1045 _COPY(_primROut, 4, _rout3, 0, 4);
1046 _CATCH(_nErr) {}
1047 return _nErr;
1048 }
_skel_method_20(int (* _pfn)(uint32_t,char *,uint32_t,uint32_t *,uint32_t *),uint32_t _sc,remote_arg * _pra)1049 static __inline int _skel_method_20(int (*_pfn)(uint32_t, char*, uint32_t, uint32_t*, uint32_t*), uint32_t _sc, remote_arg* _pra) {
1050 remote_arg* _praEnd;
1051 uint32_t _in0[1];
1052 char* _rout1[1];
1053 uint32_t _rout1Len[1];
1054 uint32_t _rout2[1];
1055 uint32_t _rout3[1];
1056 uint32_t* _primIn;
1057 int _numIn[1];
1058 uint32_t* _primROut;
1059 remote_arg* _praIn;
1060 remote_arg* _praROut;
1061 int _nErr = 0;
1062 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
1063 _ASSERT(_nErr, (_pra + ((1 + 2) + (((0 + 0) + 0) + 0))) <= _praEnd);
1064 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
1065 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
1066 _primIn = _pra[0].buf.pv;
1067 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 8);
1068 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
1069 _COPY(_in0, 0, _primIn, 0, 4);
1070 _COPY(_rout1Len, 0, _primIn, 4, 4);
1071 _praIn = (_pra + 1);
1072 _praROut = (_praIn + _numIn[0] + 1);
1073 _ASSERT(_nErr, (int)((_praROut[0].buf.nLen / 1)) >= (int)(_rout1Len[0]));
1074 _rout1[0] = _praROut[0].buf.pv;
1075 _TRY(_nErr, _pfn(*_in0, *_rout1, *_rout1Len, _rout2, _rout3));
1076 _COPY(_primROut, 0, _rout2, 0, 4);
1077 _COPY(_primROut, 4, _rout3, 0, 4);
1078 _CATCH(_nErr) {}
1079 return _nErr;
1080 }
_skel_method_21(int (* _pfn)(uint32_t,char *,char *,uint32_t *),uint32_t _sc,remote_arg * _pra)1081 static __inline int _skel_method_21(int (*_pfn)(uint32_t, char*, char*, uint32_t*), uint32_t _sc, remote_arg* _pra) {
1082 remote_arg* _praEnd;
1083 uint32_t _in0[1];
1084 char* _in1[1];
1085 uint32_t _in1Len[1];
1086 char* _in2[1];
1087 uint32_t _in2Len[1];
1088 uint32_t _rout3[1];
1089 uint32_t* _primIn;
1090 int _numIn[1];
1091 uint32_t* _primROut;
1092 remote_arg* _praIn;
1093 int _nErr = 0;
1094 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
1095 _ASSERT(_nErr, (_pra + ((3 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
1096 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
1097 _ASSERT(_nErr, _pra[0].buf.nLen >= 12);
1098 _primIn = _pra[0].buf.pv;
1099 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 4);
1100 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
1101 _COPY(_in0, 0, _primIn, 0, 4);
1102 _COPY(_in1Len, 0, _primIn, 4, 4);
1103 _praIn = (_pra + 1);
1104 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in1Len[0]));
1105 _in1[0] = _praIn[0].buf.pv;
1106 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
1107 _COPY(_in2Len, 0, _primIn, 8, 4);
1108 _ASSERT(_nErr, (int)((_praIn[1].buf.nLen / 1)) >= (int)(_in2Len[0]));
1109 _in2[0] = _praIn[1].buf.pv;
1110 _ASSERT(_nErr, (_in2Len[0] > 0) && (_in2[0][(_in2Len[0] - 1)] == 0));
1111 _TRY(_nErr, _pfn(*_in0, *_in1, *_in2, _rout3));
1112 _COPY(_primROut, 0, _rout3, 0, 4);
1113 _CATCH(_nErr) {}
1114 return _nErr;
1115 }
_skel_method_22(int (* _pfn)(char *,char *,uint32_t *),uint32_t _sc,remote_arg * _pra)1116 static __inline int _skel_method_22(int (*_pfn)(char*, char*, uint32_t*), uint32_t _sc, remote_arg* _pra) {
1117 remote_arg* _praEnd;
1118 char* _in0[1];
1119 uint32_t _in0Len[1];
1120 char* _in1[1];
1121 uint32_t _in1Len[1];
1122 uint32_t _rout2[1];
1123 uint32_t* _primIn;
1124 int _numIn[1];
1125 uint32_t* _primROut;
1126 remote_arg* _praIn;
1127 int _nErr = 0;
1128 _praEnd = ((_pra + REMOTE_SCALARS_INBUFS(_sc)) + REMOTE_SCALARS_OUTBUFS(_sc) + REMOTE_SCALARS_INHANDLES(_sc) + REMOTE_SCALARS_OUTHANDLES(_sc));
1129 _ASSERT(_nErr, (_pra + ((3 + 1) + (((0 + 0) + 0) + 0))) <= _praEnd);
1130 _numIn[0] = (REMOTE_SCALARS_INBUFS(_sc) - 1);
1131 _ASSERT(_nErr, _pra[0].buf.nLen >= 8);
1132 _primIn = _pra[0].buf.pv;
1133 _ASSERT(_nErr, _pra[(_numIn[0] + 1)].buf.nLen >= 4);
1134 _primROut = _pra[(_numIn[0] + 1)].buf.pv;
1135 _COPY(_in0Len, 0, _primIn, 0, 4);
1136 _praIn = (_pra + 1);
1137 _ASSERT(_nErr, (int)((_praIn[0].buf.nLen / 1)) >= (int)(_in0Len[0]));
1138 _in0[0] = _praIn[0].buf.pv;
1139 _ASSERT(_nErr, (_in0Len[0] > 0) && (_in0[0][(_in0Len[0] - 1)] == 0));
1140 _COPY(_in1Len, 0, _primIn, 4, 4);
1141 _ASSERT(_nErr, (int)((_praIn[1].buf.nLen / 1)) >= (int)(_in1Len[0]));
1142 _in1[0] = _praIn[1].buf.pv;
1143 _ASSERT(_nErr, (_in1Len[0] > 0) && (_in1[0][(_in1Len[0] - 1)] == 0));
1144 _TRY(_nErr, _pfn(*_in0, *_in1, _rout2));
1145 _COPY(_primROut, 0, _rout2, 0, 4);
1146 _CATCH(_nErr) {}
1147 return _nErr;
1148 }
__QAIC_SKEL(apps_std_skel_invoke)1149 __QAIC_SKEL_EXPORT int __QAIC_SKEL(apps_std_skel_invoke)(uint32_t _sc, remote_arg* _pra) __QAIC_SKEL_ATTRIBUTE {
1150 switch(REMOTE_SCALARS_METHOD(_sc))
1151 {
1152 case 0:
1153 return _skel_method_22((void*)__QAIC_IMPL(apps_std_fopen), _sc, _pra);
1154 case 1:
1155 return _skel_method_21((void*)__QAIC_IMPL(apps_std_freopen), _sc, _pra);
1156 case 2:
1157 return _skel_method_9((void*)__QAIC_IMPL(apps_std_fflush), _sc, _pra);
1158 case 3:
1159 return _skel_method_9((void*)__QAIC_IMPL(apps_std_fclose), _sc, _pra);
1160 case 4:
1161 return _skel_method_20((void*)__QAIC_IMPL(apps_std_fread), _sc, _pra);
1162 case 5:
1163 return _skel_method_19((void*)__QAIC_IMPL(apps_std_fwrite), _sc, _pra);
1164 case 6:
1165 return _skel_method_12((void*)__QAIC_IMPL(apps_std_fgetpos), _sc, _pra);
1166 case 7:
1167 return _skel_method_18((void*)__QAIC_IMPL(apps_std_fsetpos), _sc, _pra);
1168 case 8:
1169 return _skel_method_8((void*)__QAIC_IMPL(apps_std_ftell), _sc, _pra);
1170 case 9:
1171 return _skel_method_17((void*)__QAIC_IMPL(apps_std_fseek), _sc, _pra);
1172 case 10:
1173 return _skel_method_16((void*)__QAIC_IMPL(apps_std_flen), _sc, _pra);
1174 case 11:
1175 return _skel_method_9((void*)__QAIC_IMPL(apps_std_rewind), _sc, _pra);
1176 case 12:
1177 return _skel_method_8((void*)__QAIC_IMPL(apps_std_feof), _sc, _pra);
1178 case 13:
1179 return _skel_method_8((void*)__QAIC_IMPL(apps_std_ferror), _sc, _pra);
1180 case 14:
1181 return _skel_method_9((void*)__QAIC_IMPL(apps_std_clearerr), _sc, _pra);
1182 case 15:
1183 return _skel_method_3((void*)__QAIC_IMPL(apps_std_print_string), _sc, _pra);
1184 case 16:
1185 return _skel_method_15((void*)__QAIC_IMPL(apps_std_getenv), _sc, _pra);
1186 case 17:
1187 return _skel_method_14((void*)__QAIC_IMPL(apps_std_setenv), _sc, _pra);
1188 case 18:
1189 return _skel_method_3((void*)__QAIC_IMPL(apps_std_unsetenv), _sc, _pra);
1190 case 19:
1191 return _skel_method_13((void*)__QAIC_IMPL(apps_std_fopen_with_env), _sc, _pra);
1192 case 20:
1193 return _skel_method_12((void*)__QAIC_IMPL(apps_std_fgets), _sc, _pra);
1194 case 21:
1195 return _skel_method_11((void*)__QAIC_IMPL(apps_std_get_search_paths_with_env), _sc, _pra);
1196 case 22:
1197 return _skel_method_10((void*)__QAIC_IMPL(apps_std_fileExists), _sc, _pra);
1198 case 23:
1199 return _skel_method_9((void*)__QAIC_IMPL(apps_std_fsync), _sc, _pra);
1200 case 24:
1201 return _skel_method_3((void*)__QAIC_IMPL(apps_std_fremove), _sc, _pra);
1202 case 25:
1203 return _skel_method_8((void*)__QAIC_IMPL(apps_std_fdopen_decrypt), _sc, _pra);
1204 case 26:
1205 return _skel_method_7((void*)__QAIC_IMPL(apps_std_opendir), _sc, _pra);
1206 case 27:
1207 return _skel_method_6((void*)__QAIC_IMPL(apps_std_closedir), _sc, _pra);
1208 case 28:
1209 return _skel_method_5((void*)__QAIC_IMPL(apps_std_readdir), _sc, _pra);
1210 case 29:
1211 return _skel_method_4((void*)__QAIC_IMPL(apps_std_mkdir), _sc, _pra);
1212 case 30:
1213 return _skel_method_3((void*)__QAIC_IMPL(apps_std_rmdir), _sc, _pra);
1214 case 31:
1215 {
1216 uint32_t* _mid;
1217 if(REMOTE_SCALARS_INBUFS(_sc) < 1 || _pra[0].buf.nLen < 4) { return AEE_EBADPARM; }
1218 _mid = (uint32_t*)_pra[0].buf.pv;
1219 return _skel_invoke(*_mid, _sc, _pra);
1220 }
1221 }
1222 return AEE_EUNSUPPORTED;
1223 }
1224 #ifdef __cplusplus
1225 }
1226 #endif
1227 #endif //_APPS_STD_SKEL_H
1228