version 1.3, 2011/12/13 02:23:07
|
version 1.4, 2012/12/19 11:03:04
|
Line 4
|
Line 4
|
int |
int |
main(int argc, char **argv) |
main(int argc, char **argv) |
{ |
{ |
char *str; | char *str, szStr[BUFSIZ]; |
|
|
if (argc < 2) { |
if (argc < 2) { |
printf("Syntax: %s <var (like {99999[:9:9]})>\n", argv[0]); |
printf("Syntax: %s <var (like {99999[:9:9]})>\n", argv[0]); |
Line 19 main(int argc, char **argv)
|
Line 19 main(int argc, char **argv)
|
|
|
printf(">>> %s\n", str); |
printf(">>> %s\n", str); |
|
|
|
if (io_AV2Path(NULL, "test_av", str, 0, 0) == -1) { |
|
printf("#%d - %s\n", io_GetErrno(), io_GetError()); |
|
free(str); |
|
return 2; |
|
} |
|
if (io_AV2Path(NULL, "test_av", str, 42, 0) == -1) { |
|
printf("#%d - %s\n", io_GetErrno(), io_GetError()); |
|
free(str); |
|
return 3; |
|
} |
|
|
free(str); |
free(str); |
|
|
|
if (io_Path2AV(NULL, "test_av", szStr, sizeof szStr, 0) == -1) { |
|
printf("#%d - %s\n", io_GetErrno(), io_GetError()); |
|
return 4; |
|
} else |
|
printf(">>> %s\n", szStr); |
|
if (io_Path2AV(NULL, "test_av", szStr, sizeof szStr, 42) == -1) { |
|
printf("#%d - %s\n", io_GetErrno(), io_GetError()); |
|
return 5; |
|
} else |
|
printf(">>> %s\n", szStr); |
|
|
return 0; |
return 0; |
} |
} |