33 int G_getl(
char *buf,
int n, FILE *fd)
62 if (buf ==
NULL || fd ==
NULL || n <= 1) {
66 if (fgets(buf, n, fd) ==
NULL) {
71 int len = strlen(buf);
72 if (len > 0 && buf[len - 1] ==
'\n') {
75 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.