Warn if there is no newline at the end of the group file.

PR:		51256
Submitted by:	Brian D Gallaway <bdg730@makserver0.usask.ca>
Reviewed by:	tjr, -audit
Approved by:	tjr
This commit is contained in:
Peter Pentchev 2003-06-06 07:10:39 +00:00
parent 173cc338ed
commit f02cd7c7d0

View File

@ -74,6 +74,10 @@ main(int argc, char *argv[])
while (++n) {
if ((line = fgetln(gf, &len)) == NULL)
break;
if (len > 0 && line[len - 1] != '\n') {
warnx("%s: line %d: no newline character", gfn, n);
e++;
}
while (len && isspace(line[len-1]))
len--;