Diff for /libaitio/example/test.c between versions 1.1.1.1.2.3 and 1.1.1.1.2.4

version 1.1.1.1.2.3, 2010/03/04 09:54:23 version 1.1.1.1.2.4, 2010/03/04 12:16:39
Line 1 Line 1
 #include <stdio.h>  #include <stdio.h>
   #include <string.h>
 #include <aitio.h>  #include <aitio.h>
   
   
 int main(int argc, char **argv)  int main(int argc, char **argv)
 {  {
         int ret;          int ret;
        char str[256], *s;        char str[256], *s, s0[2][256];
   
         if (argc < 2) {          if (argc < 2) {
                 printf("std:: %s ioPromptRead(NULL) -> %d\n", str, ioPromptRead(NULL, NULL, str, 256));                  printf("std:: %s ioPromptRead(NULL) -> %d\n", str, ioPromptRead(NULL, NULL, str, 256));
Line 34  int main(int argc, char **argv) Line 35  int main(int argc, char **argv)
                 free(s);                  free(s);
         }          }
   
           if (argc > 2) {
                   printf("test p=%s f=%s path2file=%d\n", s0[0], s0[1], io_Path2File(argv[2], s0[0], 256, s0[1], 256));
                   return 0;
           }
   
         if (argc > 1) {          if (argc > 1) {
                 struct tagIOURL URL;                  struct tagIOURL URL;
                 int ret = 0;                  int ret = 0;
Line 54  int main(int argc, char **argv) Line 60  int main(int argc, char **argv)
   
                 printf("URL:: Get sizeofArray=%d\n", io_SizeArray(URL.url_args.value, "&"));                  printf("URL:: Get sizeofArray=%d\n", io_SizeArray(URL.url_args.value, "&"));
   
                   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));
                 printf("Get_url:: %s Attribute=sg %d\n", szVal, ioURLGetValue(&URL, "sg", szVal, BUFSIZ));                  printf("Get_url:: %s Attribute=sg %d\n", szVal, ioURLGetValue(&URL, "sg", szVal, BUFSIZ));
                 printf("Get_url:: %s Attribute=sgg %d\n", szVal, ioURLGetValue(&URL, "sgg", szVal, BUFSIZ));                  printf("Get_url:: %s Attribute=sgg %d\n", szVal, ioURLGetValue(&URL, "sgg", szVal, BUFSIZ));
                 printf("Get_url:: %s Attribute=sfsf %d\n", szVal, ioURLGetValue(&URL, "sfsf", NULL, BUFSIZ));                  printf("Get_url:: %s Attribute=sfsf %d\n", szVal, ioURLGetValue(&URL, "sfsf", NULL, BUFSIZ));
                 printf("Get_url:: %s Attribute=vv %d\n", szVal, ioURLGetValue(&URL, "vv", NULL, 0));                  printf("Get_url:: %s Attribute=vv %d\n", szVal, ioURLGetValue(&URL, "vv", NULL, 0));
                 printf("Get_url:: %s Attribute=vv %d\n", szVal, ioURLGetValue(&URL, "vv", szVal, BUFSIZ));                  printf("Get_url:: %s Attribute=vv %d\n", szVal, ioURLGetValue(&URL, "vv", 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_MakeArray(URL.url_args.value, "&", &item, 4));
                 for (ret = 0; ret < 4 && item; ret++)                  for (ret = 0; ret < 4 && item; ret++)

Removed from v.1.1.1.1.2.3  
changed lines
  Added in v.1.1.1.1.2.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>