version 1.2, 2011/05/03 15:41:00
|
version 1.3, 2011/08/29 12:00:57
|
Line 6 int
|
Line 6 int
|
main(int argc, char **argv) |
main(int argc, char **argv) |
{ |
{ |
sarr_t *a = NULL; |
sarr_t *a = NULL; |
|
array_t *ar; |
|
int i; |
void *d = "MEOWeoeoeoeoe!!!"; |
void *d = "MEOWeoeoeoeoe!!!"; |
|
|
a = io_sarrInit(10, 4); |
a = io_sarrInit(10, 4); |
Line 65 main(int argc, char **argv)
|
Line 67 main(int argc, char **argv)
|
printf("shrink:: array size=%d\n", io_sarrSize(a)); |
printf("shrink:: array size=%d\n", io_sarrSize(a)); |
printf("shrink:: a[1]=%s a[2]=%s\n", io_sarr(a, 1, char*), io_sarr(a, 2, char*)); |
printf("shrink:: a[1]=%s a[2]=%s\n", io_sarr(a, 1, char*), io_sarr(a, 2, char*)); |
|
|
|
ar = io_sarr2array(&a, 1); |
|
if (!ar) { |
|
printf("Error:: in convert sarr2array #%d - %s\n", io_GetErrno(), io_GetError()); |
|
} else |
|
for (i = 0; i < io_arraySize(ar); i++) |
|
printf("arrGet(%d)=%s\n", i, io_array(ar, i, char*)); |
|
a = io_array2sarr(&ar, 4, 0); |
|
if (!a) { |
|
printf("Error:: in convert array2sarr #%d - %s\n", io_GetErrno(), io_GetError()); |
|
} else |
|
for (i = 0; i < io_sarrSize(a); i++) |
|
printf("sarrGet(%d)=%s\n", i, io_sarr(a, i + 1, char*)); |
|
|
|
io_arrayDestroy(&ar); |
io_sarrDestroy(&a); |
io_sarrDestroy(&a); |
return 0; |
return 0; |
} |
} |