Allow comments at end of line.

Reviewed by: marcel
This commit is contained in:
Simon J. Gerraty 2014-03-04 20:09:23 +00:00
parent 603bc162fb
commit 12a5ad4762

View File

@ -348,6 +348,13 @@ read_word(FILE *fp, char *buf, size_t bufsz)
if (error == -1)
mtree_error("unexpected end of file");
return (error);
case '#': /* comment -- skip to end of line. */
if (!esc) {
error = skip_to(fp, "\n");
if (!error)
continue;
}
break;
case '\\':
esc++;
if (esc == 1)