diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-09-06 23:24:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-09-06 23:24:32 +0000 |
commit | 29fda0e9758370f8c242409db0c06dc1d75972df (patch) | |
tree | e368129d4e2bf92c8c4b368fce8d8c95270115ec /roff.c | |
parent | c525d64ed5cfcdc59ac04ab0411b657f2e5e157a (diff) | |
download | mandoc-29fda0e9758370f8c242409db0c06dc1d75972df.tar.gz |
Simplify by handling empty request lines at the one logical place
in the roff parser instead of in three other places in other parsers.
No functional change.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -759,6 +759,15 @@ roff_parseln(struct roff *r, int ln, char **bufp, return(roff_parsetext(bufp, szp, pos, offs)); } + /* Skip empty request lines. */ + + if ((*bufp)[pos] == '"') { + mandoc_msg(MANDOCERR_COMMENT_BAD, r->parse, + ln, pos, NULL); + return(ROFF_IGN); + } else if ((*bufp)[pos] == '\0') + return(ROFF_IGN); + /* * If a scope is open, go to the child handler for that macro, * as it may want to preprocess before doing anything with it. |