27 lines
536 B
C
27 lines
536 B
C
#include "get_next_line.h"
|
|
#include <stdio.h>
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
int main(void)
|
|
{
|
|
int fd = open("tester", O_RDONLY);
|
|
char *str;
|
|
str = get_next_line(fd);
|
|
printf("%s", str);
|
|
free(str);
|
|
str = get_next_line(fd);
|
|
printf("%s", str);
|
|
free(str);
|
|
str = get_next_line(fd);
|
|
printf("%s", str);
|
|
free(str);
|
|
// printf("%s", get_next_line(fd));
|
|
// printf("%s", get_next_line(fd));
|
|
// printf("%s", get_next_line(fd));
|
|
// printf("%s", get_next_line(fd));
|
|
// printf("%s", get_next_line(fd));
|
|
|
|
}
|