Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include "header.h"
- void debug()
- {
- write(1, "--- debug ---\n", 14);
- }
- int main()
- {
- t_list *list;
- char c;
- char *str;
- int len;
- str = NULL;
- len = 0;
- while (read(0, &c, 1))
- {
- ft_list_push_back(&list, c);
- len++;
- }
- str = (char*)malloc(sizeof(char) * len + 1);
- ft_list_to_str(list, str);
- printf("%s", str);
- printf("size: %d\n", len);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement