Advertisement
Guest User

Untitled

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