#ifndef NS_GET_LINE_H #define NS_GET_LINE_H #include #include "ns_str.h" static int ns_fget_line(FILE *stream, Str *str) { char c; while ((c = fgetc(stream)) != '\n') { if (c == EOF) { return EOF; } ns_str_push_char(str, c); } return 1; } #endif