Index: fparseln.c =================================================================== RCS file: /cvs/src/lib/libutil/fparseln.c,v retrieving revision 1.7 diff -u -p -u -r1.7 fparseln.c --- fparseln.c 5 Dec 2012 23:20:06 -0000 1.7 +++ fparseln.c 24 Dec 2014 10:14:23 -0000 @@ -71,7 +71,7 @@ fparseln(FILE *fp, size_t *size, size_t int flags) { static const char dstr[3] = { '\\', '\\', '#' }; - char *buf = NULL, *ptr, *cp, esc, con, nl, com; + char *buf = NULL, *ptr, *cp, esc, con, com; size_t s, len = 0; int cnt = 1; @@ -82,12 +82,6 @@ fparseln(FILE *fp, size_t *size, size_t con = str[1]; com = str[2]; - /* - * XXX: it would be cool to be able to specify the newline character, - * but unfortunately, fgetln does not let us - */ - nl = '\n'; - while (cnt) { cnt = 0; @@ -106,10 +100,10 @@ fparseln(FILE *fp, size_t *size, size_t } } - if (s && nl) { /* Check and eliminate newlines */ + if (s) { /* Check and eliminate newlines */ cp = &ptr[s - 1]; - if (*cp == nl) + if (*cp == '\n') s--; /* forget newline */ }