c-md/srcs/utils/io/read_line.c.md
lohhiiccc 80f7a1b9b6 feat(build): add build instructions in README and convert sources to .c.md format
- Add detailed build and bootstrap instructions to README.md.
 - Convert all source and header files from .c/.h to .c.md/.h.md.
 - Add bootstrap.sh script for automated building across version history.
 - Update Makefile and sources.mk to reflect new markdown-based source organization.
2026-01-12 14:54:49 +01:00

26 lines
305 B
Markdown

```c
#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <sys/types.h>
#include "utils.h"
char *
read_line(FILE *f)
{
char *line;
size_t len;
ssize_t read;
line = NULL;
len = 0;
read = getline(&line, &len, f);
if (-1 == read)
{
free(line);
return (NULL);
}
return (line);
}
```