while (fgets(line,MAXPATHLEN,f)) {
int l = strlen(line);
- if (l && line[l-1] == '\n') l--;
+ while (l && (line[l-1] == '\n' || line[l-1] == '\r')) l--;
line[l] = 0;
if (line[0] && (line[0] != ';') && (line[0] != '#')) {
/* Skip lines starting with semicolon or pound.