add bsd fgetln function

optimized to avoid allocation and return lines directly out of the
stream buffer whenever possible.
This commit is contained in:
Rich Felker
2012-08-11 18:10:38 -04:00
parent 2b964b010e
commit 617182734c
4 changed files with 25 additions and 1 deletions

View File

@ -172,6 +172,10 @@ int getw(FILE *);
int putw(int, FILE *);
#endif
#ifdef _BSD_SOURCE
char *fgetln(FILE *, size_t *);
#endif
#ifdef _GNU_SOURCE
int asprintf(char **, const char *, ...);
int vasprintf(char **, const char *, va_list);