version 1.3.2.1, 2010/09/10 12:21:19
|
version 1.4.8.1, 2011/04/19 21:20:18
|
Line 55 int main(int argc, char **argv)
|
Line 55 int main(int argc, char **argv)
|
if (argc > 1) { |
if (argc > 1) { |
struct tagIOURL URL; |
struct tagIOURL URL; |
int ret = 0; |
int ret = 0; |
char **item = NULL; | array_t *item = NULL; |
char szVal[BUFSIZ]; |
char szVal[BUFSIZ]; |
|
|
printf("URL:: Return=%x --- URL=%s\n", (ret = ioURLGet(argv[1], &URL)), argv[1]); |
printf("URL:: Return=%x --- URL=%s\n", (ret = ioURLGet(argv[1], &URL)), argv[1]); |
Line 70 int main(int argc, char **argv)
|
Line 70 int main(int argc, char **argv)
|
printf("URL:: (%x) args=%s(%d)\n", ret & 64, URL.url_args.value, URL.url_args.vallen); |
printf("URL:: (%x) args=%s(%d)\n", ret & 64, URL.url_args.value, URL.url_args.vallen); |
printf("URL:: (%x) +++reserved=%s\n", ret & 128, URL.url_reserved); |
printf("URL:: (%x) +++reserved=%s\n", ret & 128, URL.url_reserved); |
|
|
printf("URL:: Get sizeofArray=%d\n", io_SizeArray(URL.url_args.value, "&")); | printf("URL:: Get argsNum=%d\n", io_argsNum(URL.url_args.value, "&")); |
|
|
memset(szVal, 0, BUFSIZ); |
memset(szVal, 0, BUFSIZ); |
printf("Get_url:: %s Attribute=piuk %d\n", szVal, ioURLGetValue(&URL, "piuk", szVal, BUFSIZ)); |
printf("Get_url:: %s Attribute=piuk %d\n", szVal, ioURLGetValue(&URL, "piuk", szVal, BUFSIZ)); |
Line 82 int main(int argc, char **argv)
|
Line 82 int main(int argc, char **argv)
|
|
|
printf("File_url:: File=%s %d\n", szVal, ioURLGetFile(&URL, szVal, BUFSIZ)); |
printf("File_url:: File=%s %d\n", szVal, ioURLGetFile(&URL, szVal, BUFSIZ)); |
|
|
printf("URL:: array args=%d\n", io_MakeArray(URL.url_args.value, "&", &item, 4)); | printf("URL:: array args=%d\n", io_arrayMake(URL.url_args.value, 4, "&", &item)); |
for (ret = 0; ret < 4 && item; ret++) | for (ret = 0; ret < 4 && item->arr_data[ret]; ret++) |
printf("array:: item[%d]=%s\n", ret, item[ret]); | printf("array:: item[%d]=%s\n", ret, item->arr_data[ret]); |
if (item) |
if (item) |
free(item); | io_arrayDestroy(&item); |
|
|
printf("URL:: array path=%d\n", io_MakeArray(URL.url_path.value, "/", &item, 2)); | printf("URL:: array path=%d\n", io_arrayMake(URL.url_path.value, 2, "/", &item)); |
for (ret = 0; ret < 2 && item; ret++) | for (ret = 0; ret < 2 && item->arr_data[ret]; ret++) |
printf("array:: item[%d]=%s\n", ret, item[ret]); | printf("array:: item[%d]=%s\n", ret, item->arr_data[ret]); |
if (item) |
if (item) |
free(item); | io_arrayDestroy(&item); |
} |
} |
return 0; |
return 0; |
} |
} |