When reporting that a line is too long, include the line number in the
error message. While I'm here, add a note that the "line too long" message isn't always accurate. PR: 35395 Submitted by: andrew@ugh.net.au
This commit is contained in:
parent
fa8475a7f6
commit
165dbb1a74
@ -505,7 +505,11 @@ scan(fp, pw)
|
||||
* -- The Who
|
||||
*/
|
||||
if (!(p = strchr(line, '\n'))) {
|
||||
warnx("line too long");
|
||||
/*
|
||||
* XXX: This may also happen if the last line in a
|
||||
* file does not have a trailing newline.
|
||||
*/
|
||||
warnx("line #%d too long", lcnt);
|
||||
goto fmt;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user