Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1.  
  2. char ***input(int fd)
  3. {
  4.     int  ret;
  5.     char *str;
  6.     char ***arr;
  7.     t_list *test;
  8.     int i;
  9.     t_list *lst;
  10.  
  11.     i = 0;
  12.     lst = ft_lstnew(NULL,0);
  13.     while ((ret = get_next_line(fd, &str)) > 0)
  14.     {
  15.         /*if (!(arr = ft_strsplit(str, ' ')))
  16.             return (NULL);*/
  17.         test = ft_lstnew(ft_strsplit(str, ' '), sizeof(char **));
  18.        
  19.         printf("%d\n", (char **)((test->content)));
  20.         printf("%s\n", str);
  21.         //printarr((test->content));
  22.         //ft_lstadd(&lst, ft_lstnew(ft_strsplit(str, ' '), sizeof(char **)));
  23.         //printarr((char **)lst->content);
  24.     }
  25.     arr = ft_memalloc(sizeof(char **) * ft_list_size(lst));
  26.     //setup_int_arr(arr, lst);
  27.     //printf("%s\n", arr[0][1]);
  28.     return (NULL);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement