19
19
static int iTab = 0;
20
20
void insert_indent(void)
23
for(i = 0 ; i < iTab ; i++)
29
int get_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
30
int get_list_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
31
int get_double_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
32
int get_poly_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
33
int get_boolean_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
34
int get_sparse_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
35
int get_bsparse_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
36
int get_integer_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
37
int get_string_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
38
int get_pointer_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
40
int common_read(char *fname,unsigned long fname_len)
47
CheckInputArgument(pvApiCtx, 1, 1);
49
sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
52
printError(&sciErr, 0);
56
get_info(1, NULL, piAddr, 0);
57
AssignOutputVariable(1) = 0;
61
int get_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
67
sciErr = getVarType(pvApiCtx, _piAddr, &iType);
71
iRet = get_double_info(_iRhs, _piParent, _piAddr, _iItemPos);
74
iRet = get_poly_info(_iRhs, _piParent, _piAddr, _iItemPos);
77
iRet = get_boolean_info(_iRhs, _piParent, _piAddr, _iItemPos);
80
iRet = get_sparse_info(_iRhs, _piParent, _piAddr, _iItemPos);
82
case sci_boolean_sparse :
83
iRet = get_bsparse_info(_iRhs, _piParent, _piAddr, _iItemPos);
86
iRet = get_integer_info(_iRhs, _piParent, _piAddr, _iItemPos);
89
iRet = get_string_info(_iRhs, _piParent, _piAddr, _iItemPos);
94
iRet = get_list_info(_iRhs, _piParent, _piAddr, _iItemPos);
99
iRet = get_list_info(_iRhs, _piParent, _piAddr, _iItemPos);
104
iRet = get_list_info(_iRhs, _piParent, _piAddr, _iItemPos);
107
iRet = get_pointer_info(_iRhs, _piParent, _piAddr, _iItemPos);
111
sciprint("Unknown type\n");
117
int get_list_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
125
sciErr = getListItemNumber(pvApiCtx, _piAddr, &iItem);
128
printError(&sciErr, 0);
132
sciprint("(%d)\n", iItem);
133
for(i = 0 ; i < iItem ; i++)
135
sciErr = getListItemAddress(pvApiCtx, _piAddr, i + 1, &piChild);
138
printError(&sciErr, 0);
143
iRet = get_info(_iRhs, _piAddr, piChild, i + 1);
149
int get_double_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
154
double* pdblReal = NULL;
155
double* pdblImg = NULL;
159
if(isVarComplex(pvApiCtx, _piAddr))
161
sciErr = getComplexMatrixOfDouble(pvApiCtx, _piAddr, &iRows, &iCols, &pdblReal, &pdblImg);
165
sciErr = getMatrixOfDouble(pvApiCtx, _piAddr, &iRows, &iCols, &pdblReal);
170
if(isVarComplex(pvApiCtx, _piAddr))
172
sciErr = getComplexMatrixOfDoubleInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &pdblReal, &pdblImg);
176
sciErr = getMatrixOfDoubleInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &pdblReal);
182
printError(&sciErr, 0);
187
sciprint("Double (%d x %d)\n", iRows, iCols);
191
int get_poly_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
200
double** pdblReal = NULL;
201
double** pdblImg = NULL;
203
sciErr = getPolyVariableName(pvApiCtx, _piAddr, pstVar, &iLen);
206
printError(&sciErr, 0);
212
sciErr = getMatrixOfPoly(pvApiCtx, _piAddr, &iRows, &iCols, NULL, NULL);
215
printError(&sciErr, 0);
219
piCoeff = (int*)malloc(sizeof(int) * iRows * iCols);
220
sciErr = getMatrixOfPoly(pvApiCtx, _piAddr, &iRows, &iCols, piCoeff, NULL);
223
printError(&sciErr, 0);
227
pdblReal = (double**)malloc(sizeof(double*) * iRows * iCols);
228
pdblImg = (double**)malloc(sizeof(double*) * iRows * iCols);
230
for(i = 0 ; i < iRows * iCols ; i++)
232
pdblReal[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
233
pdblImg[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
236
if(isVarComplex(pvApiCtx, _piAddr))
238
sciErr = getComplexMatrixOfPoly(pvApiCtx, _piAddr, &iRows, &iCols, piCoeff, pdblReal, pdblImg);
241
printError(&sciErr, 0);
247
sciErr = getMatrixOfPoly(pvApiCtx, _piAddr, &iRows, &iCols, piCoeff, pdblReal);
250
printError(&sciErr, 0);
257
sciErr = getMatrixOfPolyInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, NULL, NULL);
260
printError(&sciErr, 0);
264
piCoeff = (int*)malloc(sizeof(int) * iRows * iCols);
266
sciErr = getMatrixOfPolyInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, piCoeff, NULL);
269
printError(&sciErr, 0);
273
pdblReal = (double**)malloc(sizeof(double*) * iRows * iCols);
274
pdblImg = (double**)malloc(sizeof(double*) * iRows * iCols);
276
for(i = 0 ; i < iRows * iCols ; i++)
278
pdblReal[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
279
pdblImg[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
282
if(isVarComplex(pvApiCtx, _piAddr))
284
sciErr = getComplexMatrixOfPolyInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, piCoeff, pdblReal, pdblImg);
288
sciErr = getMatrixOfPolyInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, piCoeff, pdblReal);
294
printError(&sciErr, 0);
299
sciprint("Poly (%d x %d), varname : \'%s\'\n", iRows, iCols, pstVar);
301
for(i = 0 ; i < iRows * iCols ; i++)
312
int get_boolean_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
321
sciErr = getMatrixOfBoolean(pvApiCtx, _piAddr, &iRows, &iCols, &piBool);
325
sciErr = getMatrixOfBooleanInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &piBool);
330
printError(&sciErr, 0);
335
sciprint("Boolean (%d x %d)\n", iRows, iCols);
338
int get_sparse_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
345
int* piColPos = NULL;
346
double* pdblReal = NULL;
347
double* pdblImg = NULL;
351
if(isVarComplex(pvApiCtx, _piAddr))
353
sciErr = getComplexSparseMatrix(pvApiCtx, _piAddr, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal, &pdblImg);
357
sciErr = getSparseMatrix(pvApiCtx, _piAddr, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal);
362
if(isVarComplex(pvApiCtx, _piAddr))
364
sciErr = getComplexSparseMatrixInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal, &pdblImg);
368
sciErr = getSparseMatrixInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal);
373
sciprint("Sparse (%d x %d), Item(s) : %d \n", iRows, iCols, iItem);
377
int get_bsparse_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
384
int* piColPos = NULL;
388
sciErr = getBooleanSparseMatrix(pvApiCtx, _piAddr, &iRows, &iCols, &iItem, &piNbRow, &piColPos);
392
sciErr = getBooleanSparseMatrixInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &iItem, &piNbRow, &piColPos);
397
printError(&sciErr, 0);
402
sciprint("Boolean Sparse (%d x %d), Item(s) : %d \n", iRows, iCols, iItem);
405
int get_integer_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
412
short* psData = NULL;
414
unsigned char* pucData = NULL;
415
unsigned short* pusData = NULL;
416
unsigned int* puiData = NULL;
420
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, _piAddr, &iPrec);
423
printError(&sciErr, 0);
430
sciErr = getMatrixOfInteger8(pvApiCtx, _piAddr, &iRows, &iCols, &pcData);
433
sciErr = getMatrixOfInteger16(pvApiCtx, _piAddr, &iRows, &iCols, &psData);
436
sciErr = getMatrixOfInteger32(pvApiCtx, _piAddr, &iRows, &iCols, &piData);
439
sciErr = getMatrixOfUnsignedInteger8(pvApiCtx, _piAddr, &iRows, &iCols, &pucData);
442
sciErr = getMatrixOfUnsignedInteger16(pvApiCtx, _piAddr, &iRows, &iCols, &pusData);
445
sciErr = getMatrixOfUnsignedInteger32(pvApiCtx, _piAddr, &iRows, &iCols, &puiData);
453
sciErr = getMatrixOfIntegerPrecision(pvApiCtx, _piAddr, &iPrec);
456
printError(&sciErr, 0);
463
sciErr = getMatrixOfInteger8InList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &pcData);
466
sciErr = getMatrixOfInteger16InList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &psData);
469
sciErr = getMatrixOfInteger32InList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &piData);
472
sciErr = getMatrixOfUnsignedInteger8InList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &pucData);
475
sciErr = getMatrixOfUnsignedInteger16InList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &pusData);
478
sciErr = getMatrixOfUnsignedInteger32InList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, &puiData);
487
printError(&sciErr, 0);
495
sciprint("Unsigned ");
498
sciprint("Integer %d bits (%d x %d)\n", (iPrec % 10) * 8, iRows, iCols);
501
int get_string_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
508
char **pstData = NULL;
512
sciErr = getMatrixOfString(pvApiCtx, _piAddr, &iRows, &iCols, NULL, NULL);
515
printError(&sciErr, 0);
519
piLen = (int*)malloc(sizeof(int) * iRows * iCols);
520
sciErr = getMatrixOfString(pvApiCtx, _piAddr, &iRows, &iCols, piLen, NULL);
523
printError(&sciErr, 0);
527
pstData = (char**)malloc(sizeof(char*) * iRows * iCols);
529
for(i = 0 ; i < iRows * iCols ; i++)
531
pstData[i] = (char*)malloc(sizeof(char) * (piLen[i] + 1));//+ 1 for null termination
534
sciErr = getMatrixOfString(pvApiCtx, _piAddr, &iRows, &iCols, piLen, pstData);
537
printError(&sciErr, 0);
543
sciErr = getMatrixOfStringInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, NULL, NULL);
546
printError(&sciErr, 0);
550
piLen = (int*)malloc(sizeof(int) * iRows * iCols);
552
sciErr = getMatrixOfStringInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, piLen, NULL);
555
printError(&sciErr, 0);
559
pstData = (char**)malloc(sizeof(char*) * iRows * iCols);
561
for(i = 0 ; i < iRows * iCols ; i++)
563
pstData[i] = (char*)malloc(sizeof(char) * (piLen[i] + 1));//+ 1 for null termination
566
sciErr = getMatrixOfStringInList(pvApiCtx, _piParent, _iItemPos, &iRows, &iCols, piLen, pstData);
569
printError(&sciErr, 0);
575
printError(&sciErr, 0);
580
sciprint("Strings (%d x %d)\n", iRows, iCols);
583
int get_pointer_info(int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
590
sciErr = getPointer(pvApiCtx, _piAddr, &pvPtr);
594
sciErr = getPointerInList(pvApiCtx, _piParent, _iItemPos, &pvPtr);
599
printError(&sciErr, 0);
604
sciprint("Pointer : 0x%08X\n", pvPtr);
23
for (i = 0 ; i < iTab ; i++)
29
int get_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
30
int get_list_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
31
int get_double_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
32
int get_poly_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
33
int get_boolean_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
34
int get_sparse_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
35
int get_bsparse_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
36
int get_integer_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
37
int get_string_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
38
int get_pointer_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos);
40
int common_read(char *fname, unsigned long fname_len)
47
CheckInputArgument(pvApiCtx, 1, 1);
49
sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
52
printError(&sciErr, 0);
56
get_info(pvApiCtx, 1, NULL, piAddr, 0);
57
AssignOutputVariable(pvApiCtx, 1) = 0;
61
int get_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
67
sciErr = getVarType(_pvCtx, _piAddr, &iType);
71
iRet = get_double_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
74
iRet = get_poly_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
77
iRet = get_boolean_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
80
iRet = get_sparse_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
82
case sci_boolean_sparse :
83
iRet = get_bsparse_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
86
iRet = get_integer_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
89
iRet = get_string_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
94
iRet = get_list_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
99
iRet = get_list_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
104
iRet = get_list_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
107
iRet = get_pointer_info(_pvCtx, _iRhs, _piParent, _piAddr, _iItemPos);
111
sciprint("Unknown type\n");
117
int get_list_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
125
sciErr = getListItemNumber(_pvCtx, _piAddr, &iItem);
128
printError(&sciErr, 0);
132
sciprint("(%d)\n", iItem);
133
for (i = 0 ; i < iItem ; i++)
135
sciErr = getListItemAddress(_pvCtx, _piAddr, i + 1, &piChild);
138
printError(&sciErr, 0);
143
iRet = get_info(_pvCtx, _iRhs, _piAddr, piChild, i + 1);
149
int get_double_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
154
double* pdblReal = NULL;
155
double* pdblImg = NULL;
160
if (isVarComplex(_pvCtx, _piAddr))
162
sciErr = getComplexMatrixOfDouble(_pvCtx, _piAddr, &iRows, &iCols, &pdblReal, &pdblImg);
166
sciErr = getMatrixOfDouble(_pvCtx, _piAddr, &iRows, &iCols, &pdblReal);
171
if (isVarComplex(_pvCtx, _piAddr))
173
sciErr = getComplexMatrixOfDoubleInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &pdblReal, &pdblImg);
177
sciErr = getMatrixOfDoubleInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &pdblReal);
183
printError(&sciErr, 0);
188
sciprint("Double (%d x %d)\n", iRows, iCols);
192
int get_poly_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
201
double** pdblReal = NULL;
202
double** pdblImg = NULL;
204
sciErr = getPolyVariableName(_pvCtx, _piAddr, pstVar, &iLen);
207
printError(&sciErr, 0);
214
sciErr = getMatrixOfPoly(_pvCtx, _piAddr, &iRows, &iCols, NULL, NULL);
217
printError(&sciErr, 0);
221
piCoeff = (int*)malloc(sizeof(int) * iRows * iCols);
222
sciErr = getMatrixOfPoly(_pvCtx, _piAddr, &iRows, &iCols, piCoeff, NULL);
225
printError(&sciErr, 0);
229
pdblReal = (double**)malloc(sizeof(double*) * iRows * iCols);
230
pdblImg = (double**)malloc(sizeof(double*) * iRows * iCols);
232
for (i = 0 ; i < iRows * iCols ; i++)
234
pdblReal[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
235
pdblImg[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
238
if (isVarComplex(_pvCtx, _piAddr))
240
sciErr = getComplexMatrixOfPoly(_pvCtx, _piAddr, &iRows, &iCols, piCoeff, pdblReal, pdblImg);
243
printError(&sciErr, 0);
249
sciErr = getMatrixOfPoly(_pvCtx, _piAddr, &iRows, &iCols, piCoeff, pdblReal);
252
printError(&sciErr, 0);
259
sciErr = getMatrixOfPolyInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, NULL, NULL);
262
printError(&sciErr, 0);
266
piCoeff = (int*)malloc(sizeof(int) * iRows * iCols);
268
sciErr = getMatrixOfPolyInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, piCoeff, NULL);
271
printError(&sciErr, 0);
275
pdblReal = (double**)malloc(sizeof(double*) * iRows * iCols);
276
pdblImg = (double**)malloc(sizeof(double*) * iRows * iCols);
278
for (i = 0 ; i < iRows * iCols ; i++)
280
pdblReal[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
281
pdblImg[i] = (double*)malloc(sizeof(double) * piCoeff[i]);
284
if (isVarComplex(_pvCtx, _piAddr))
286
sciErr = getComplexMatrixOfPolyInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, piCoeff, pdblReal, pdblImg);
290
sciErr = getMatrixOfPolyInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, piCoeff, pdblReal);
296
printError(&sciErr, 0);
301
sciprint("Poly (%d x %d), varname : \'%s\'\n", iRows, iCols, pstVar);
303
for (i = 0 ; i < iRows * iCols ; i++)
314
int get_boolean_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
323
sciErr = getMatrixOfBoolean(_pvCtx, _piAddr, &iRows, &iCols, &piBool);
327
sciErr = getMatrixOfBooleanInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &piBool);
332
printError(&sciErr, 0);
337
sciprint("Boolean (%d x %d)\n", iRows, iCols);
340
int get_sparse_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
347
int* piColPos = NULL;
348
double* pdblReal = NULL;
349
double* pdblImg = NULL;
354
if (isVarComplex(_pvCtx, _piAddr))
356
sciErr = getComplexSparseMatrix(_pvCtx, _piAddr, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal, &pdblImg);
360
sciErr = getSparseMatrix(_pvCtx, _piAddr, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal);
365
if (isVarComplex(_pvCtx, _piAddr))
367
sciErr = getComplexSparseMatrixInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal, &pdblImg);
371
sciErr = getSparseMatrixInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &iItem, &piNbRow, &piColPos, &pdblReal);
376
sciprint("Sparse (%d x %d), Item(s) : %d \n", iRows, iCols, iItem);
380
int get_bsparse_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
387
int* piColPos = NULL;
392
sciErr = getBooleanSparseMatrix(_pvCtx, _piAddr, &iRows, &iCols, &iItem, &piNbRow, &piColPos);
396
sciErr = getBooleanSparseMatrixInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &iItem, &piNbRow, &piColPos);
401
printError(&sciErr, 0);
406
sciprint("Boolean Sparse (%d x %d), Item(s) : %d \n", iRows, iCols, iItem);
409
int get_integer_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
416
short* psData = NULL;
418
unsigned char* pucData = NULL;
419
unsigned short* pusData = NULL;
420
unsigned int* puiData = NULL;
425
sciErr = getMatrixOfIntegerPrecision(_pvCtx, _piAddr, &iPrec);
428
printError(&sciErr, 0);
435
sciErr = getMatrixOfInteger8(_pvCtx, _piAddr, &iRows, &iCols, &pcData);
438
sciErr = getMatrixOfInteger16(_pvCtx, _piAddr, &iRows, &iCols, &psData);
441
sciErr = getMatrixOfInteger32(_pvCtx, _piAddr, &iRows, &iCols, &piData);
444
sciErr = getMatrixOfUnsignedInteger8(_pvCtx, _piAddr, &iRows, &iCols, &pucData);
447
sciErr = getMatrixOfUnsignedInteger16(_pvCtx, _piAddr, &iRows, &iCols, &pusData);
450
sciErr = getMatrixOfUnsignedInteger32(_pvCtx, _piAddr, &iRows, &iCols, &puiData);
458
sciErr = getMatrixOfIntegerPrecision(_pvCtx, _piAddr, &iPrec);
461
printError(&sciErr, 0);
468
sciErr = getMatrixOfInteger8InList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &pcData);
471
sciErr = getMatrixOfInteger16InList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &psData);
474
sciErr = getMatrixOfInteger32InList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &piData);
477
sciErr = getMatrixOfUnsignedInteger8InList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &pucData);
480
sciErr = getMatrixOfUnsignedInteger16InList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &pusData);
483
sciErr = getMatrixOfUnsignedInteger32InList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, &puiData);
492
printError(&sciErr, 0);
500
sciprint("Unsigned ");
503
sciprint("Integer %d bits (%d x %d)\n", (iPrec % 10) * 8, iRows, iCols);
506
int get_string_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
513
char **pstData = NULL;
518
sciErr = getMatrixOfString(_pvCtx, _piAddr, &iRows, &iCols, NULL, NULL);
521
printError(&sciErr, 0);
525
piLen = (int*)malloc(sizeof(int) * iRows * iCols);
526
sciErr = getMatrixOfString(_pvCtx, _piAddr, &iRows, &iCols, piLen, NULL);
529
printError(&sciErr, 0);
533
pstData = (char**)malloc(sizeof(char*) * iRows * iCols);
535
for (i = 0 ; i < iRows * iCols ; i++)
537
pstData[i] = (char*)malloc(sizeof(char) * (piLen[i] + 1));//+ 1 for null termination
540
sciErr = getMatrixOfString(_pvCtx, _piAddr, &iRows, &iCols, piLen, pstData);
543
printError(&sciErr, 0);
549
sciErr = getMatrixOfStringInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, NULL, NULL);
552
printError(&sciErr, 0);
556
piLen = (int*)malloc(sizeof(int) * iRows * iCols);
558
sciErr = getMatrixOfStringInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, piLen, NULL);
561
printError(&sciErr, 0);
565
pstData = (char**)malloc(sizeof(char*) * iRows * iCols);
567
for (i = 0 ; i < iRows * iCols ; i++)
569
pstData[i] = (char*)malloc(sizeof(char) * (piLen[i] + 1));//+ 1 for null termination
572
sciErr = getMatrixOfStringInList(_pvCtx, _piParent, _iItemPos, &iRows, &iCols, piLen, pstData);
575
printError(&sciErr, 0);
581
printError(&sciErr, 0);
586
sciprint("Strings (%d x %d)\n", iRows, iCols);
589
int get_pointer_info(void* _pvCtx, int _iRhs, int* _piParent, int *_piAddr, int _iItemPos)
596
sciErr = getPointer(_pvCtx, _piAddr, &pvPtr);
600
sciErr = getPointerInList(_pvCtx, _piParent, _iItemPos, &pvPtr);
605
printError(&sciErr, 0);
610
sciprint("Pointer : 0x%08X\n", pvPtr);