version 1.1.1.1, 2008/08/28 13:18:30
|
version 1.2, 2011/04/30 21:35:21
|
Line 34 int main()
|
Line 34 int main()
|
freeSession(NULL, &n); |
freeSession(NULL, &n); |
*/ |
*/ |
|
|
map_createSession("/tmp/abra-kadabra-123", 1003, 4096, &n); | ipc_createSession("/tmp/abra-kadabra-123", 1003, 4096, &n); |
if (sess_GetErrno()) { |
if (sess_GetErrno()) { |
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
return 2; |
return 2; |
} |
} |
dat = map_attachSession(n, NULL); | ipc_attachSession(n, NULL); |
if (!dat) |
if (!dat) |
return 1; |
return 1; |
// getchar(); | // sess_SetValue(n, "piuk_gniah++", "mryyynnnnn"); |
// printf(">>> String=%s\n", dat); | printf(">>> String=%s\n", n->addr); |
| getchar(); |
printf("12345678 Define? %d\n", ISDEF(sess_GetValue(n, "12345678", szVal, &i))); |
printf("12345678 Define? %d\n", ISDEF(sess_GetValue(n, "12345678", szVal, &i))); |
printf("111 Define? %d\n", ISDEF(sess_SetValue(n, "111", "321"))); |
printf("111 Define? %d\n", ISDEF(sess_SetValue(n, "111", "321"))); |
printf("88 Define? %d\n", ISDEF(sess_GetValue(n, "88", szVal, &i))); |
printf("88 Define? %d\n", ISDEF(sess_GetValue(n, "88", szVal, &i))); |
Line 55 int main()
|
Line 56 int main()
|
printf("00 find=%d value=%s vlen=%d\n", sess_GetValue(n, "00", szVal, &i), szVal, i); |
printf("00 find=%d value=%s vlen=%d\n", sess_GetValue(n, "00", szVal, &i), szVal, i); |
printf("insert Result?%d\n", ISNEW(sess_SetValue(n, "789", "Gniah40"))); |
printf("insert Result?%d\n", ISNEW(sess_SetValue(n, "789", "Gniah40"))); |
printf("00 find=%d value=%s vlen=%d\n", sess_GetValue(n, "00", szVal, &i), szVal, i); |
printf("00 find=%d value=%s vlen=%d\n", sess_GetValue(n, "00", szVal, &i), szVal, i); |
printf(">>> String=%s\n", dat); | printf(">>> String=%s\n", n->addr); |
printf("update Result=%d\n", sess_SetValue(n, "789", NULL)); |
printf("update Result=%d\n", sess_SetValue(n, "789", NULL)); |
// printf(">>> String=%s\n", dat); |
// printf(">>> String=%s\n", dat); |
sess_DelValue(n, "789"); | // sess_DelValue(n, "789"); |
sess_DelValue(n, "GratisT"); |
sess_DelValue(n, "GratisT"); |
sess_DelValue(n, "szUser"); |
sess_DelValue(n, "szUser"); |
getchar(); |
getchar(); |
printf("end %p>>> String=%s\n", n->addr, n->addr); |
printf("end %p>>> String=%s\n", n->addr, n->addr); |
map_detachSession(n); | ipc_detachSession(n); |
getchar(); |
getchar(); |
map_destroySession("/tmp/abra-kadabra-123", &n); | ipc_destroySession("/tmp/abra-kadabra-123", &n); |
return 0; |
return 0; |
} |
} |