--- libaitio/example/Attic/astvar.c 2011/12/13 02:23:07 1.3 +++ libaitio/example/Attic/astvar.c 2012/12/19 11:03:04 1.4 @@ -4,7 +4,7 @@ int main(int argc, char **argv) { - char *str; + char *str, szStr[BUFSIZ]; if (argc < 2) { printf("Syntax: %s \n", argv[0]); @@ -19,6 +19,29 @@ main(int argc, char **argv) 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); + + 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; }