version 1.2.4.1, 2012/05/23 15:14:41
|
version 1.3.4.1, 2013/01/17 13:54:53
|
Line 1
|
Line 1
|
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
#include <aitsess.h> |
#include <aitsess.h> |
#include <aitio.h> | #include <elwix.h> |
|
|
|
|
int main(int argc, char **argv) |
int main(int argc, char **argv) |
Line 11 int main(int argc, char **argv)
|
Line 11 int main(int argc, char **argv)
|
ait_val_t *v; |
ait_val_t *v; |
int i; |
int i; |
|
|
inp = io_arrayInit(argc); | inp = array_Init(argc); |
for (i = 0; i < argc; i++) { |
for (i = 0; i < argc; i++) { |
v = io_allocVar(); | v = ait_allocVar(); |
AIT_SET_STR(v, argv[i]); |
AIT_SET_STR(v, argv[i]); |
io_arraySet(inp, i, v); | array_Set(inp, i, v); |
} |
} |
|
|
/* |
/* |
Line 56 int main(int argc, char **argv)
|
Line 56 int main(int argc, char **argv)
|
return 2; |
return 2; |
} |
} |
sess_freeSession(&n); |
sess_freeSession(&n); |
for (i = 0; i < io_arraySize(inp); i++) | for (i = 0; i < array_Size(inp); i++) |
AIT_FREE_VAL(io_arrayGet(inp, i)); | AIT_FREE_VAL(array_Get(inp, i)); |
io_arrayFree(inp); | array_Free(inp); |
io_arrayDestroy(&inp); | array_Destroy(&inp); |
printf("set session"); |
printf("set session"); |
getchar(); |
getchar(); |
sess_initSession(SHARED_IPC, "/tmp/abra-kadabra-321", &n); |
sess_initSession(SHARED_IPC, "/tmp/abra-kadabra-321", &n); |
Line 74 int main(int argc, char **argv)
|
Line 74 int main(int argc, char **argv)
|
sess_freeSession(&n); |
sess_freeSession(&n); |
return 3; |
return 3; |
} |
} |
for (i = 0; i < io_arraySize(inp); i++) | for (i = 0; i < array_Size(inp); i++) |
printf("i=%d->%s\n", i, AIT_GET_STR(io_array(inp, i, ait_val_t*))); | printf("i=%d->%s\n", i, AIT_GET_STR(array(inp, i, ait_val_t*))); |
sess_doneSession(n, &inp); |
sess_doneSession(n, &inp); |
sess_freeSession(&n); |
sess_freeSession(&n); |
getchar(); |
getchar(); |
Line 91 int main(int argc, char **argv)
|
Line 91 int main(int argc, char **argv)
|
sess_freeSession(&n); |
sess_freeSession(&n); |
return 4; |
return 4; |
} |
} |
AIT_FREE_VAL(io_array(inp, 2, ait_val_t*)); | AIT_FREE_VAL(array(inp, 2, ait_val_t*)); |
AIT_SET_STR(io_array(inp, 2, ait_val_t*), "djmy"); | AIT_SET_STR(array(inp, 2, ait_val_t*), "djmy"); |
for (i = 0; i < io_arraySize(inp); i++) | for (i = 0; i < array_Size(inp); i++) |
printf("i=%d->%s\n", i, AIT_GET_STR(io_array(inp, i, ait_val_t*))); | printf("i=%d->%s\n", i, AIT_GET_STR(array(inp, i, ait_val_t*))); |
sess_commitSession(n, inp); |
sess_commitSession(n, inp); |
for (i = 0; i < io_arraySize(inp); i++) | for (i = 0; i < array_Size(inp); i++) |
AIT_FREE_VAL(io_arrayGet(inp, i)); | AIT_FREE_VAL(array_Get(inp, i)); |
sess_doneSession(n, &inp); |
sess_doneSession(n, &inp); |
sess_freeSession(&n); |
sess_freeSession(&n); |
getchar(); |
getchar(); |
Line 113 int main(int argc, char **argv)
|
Line 113 int main(int argc, char **argv)
|
sess_freeSession(&n); |
sess_freeSession(&n); |
return 3; |
return 3; |
} |
} |
for (i = 0; i < io_arraySize(inp); i++) | for (i = 0; i < array_Size(inp); i++) |
printf("i=%d->%s\n", i, AIT_GET_STR(io_array(inp, i, ait_val_t*))); | printf("i=%d->%s\n", i, AIT_GET_STR(array(inp, i, ait_val_t*))); |
/* |
/* |
for (i = 0; i < io_arraySize(inp); i++) | for (i = 0; i < array_Size(inp); i++) |
AIT_FREE_VAL(io_arrayGet(inp, i)); | AIT_FREE_VAL(array_Get(inp, i)); |
*/ |
*/ |
sess_doneSession(n, &inp); |
sess_doneSession(n, &inp); |
FREE_MEMORY(n); |
FREE_MEMORY(n); |