2020-09-05 15:42:03 +08:00
|
|
|
/* posix_getline.h
|
|
|
|
* RT-Thread POSIX
|
|
|
|
* getdelim(), getline() - read a delimited record from stream, ersatz implementation
|
2020-09-05 22:09:22 +08:00
|
|
|
* This code is unlicensed -- free and released into the public domain.
|
2020-09-05 15:42:03 +08:00
|
|
|
* https://man7.org/linux/man-pages/man3/getline.3.html
|
|
|
|
* Authors:
|
|
|
|
* https://github.com/ivanrad/getline
|
|
|
|
* https://github.com/mysterywolf/getline/
|
|
|
|
*
|
|
|
|
* Meco Man 2020-09-03 First Version
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef POSIX_GETLINE_H
|
|
|
|
#define POSIX_GETLINE_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2020-09-05 16:59:53 +08:00
|
|
|
#include <sys/types.h>
|
2020-09-05 15:42:03 +08:00
|
|
|
|
|
|
|
ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
|
|
|
|
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
|
|
|
|
|
|
|
|
#endif /* POSIX_GETLINE_H */
|
|
|
|
|