Anonymous
public text v1 · immutable#define BUFF_SIZE 42
#define READ_SIZE 42
char *get_next_line(const int fd)
{
static char buff_read[BUFF_SIZE];
static int repeat;
static int i;
i = 0;
repeat = read(fd, buff_read, READ_SIZE);
while (buff_read[i] != '\n' && buff_read[i] != '\0' && BUFF_SIZE >= i && READ_SIZE >= i)
{
my_putchar(buff_read[i]);
i++;
}
return (0);
}
int main()
{
get_next_line(0);
get_next_line(0);
}