32 int G_getl(
char *buf,
int n, FILE *fd)
34 if (!fgets(buf, n, fd))
37 for (; *buf && *buf !=
'\n'; buf++)
68 if (buf ==
NULL || fd ==
NULL || n <= 1) {
72 if (fgets(buf, n, fd) ==
NULL) {
77 int len = strlen(buf);
78 if (len > 0 && buf[len - 1] ==
'\n') {
81 if (len > 0 && buf[len - 1] ==
'\r') {
int G_getl2(char *buf, int n, FILE *fd)
Gets a line of text from a file of any pedigree.
int G_getl(char *buf, int n, FILE *fd)
Gets a line of text from a file.