=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.227 retrieving revision 1.229 diff -u -p -r1.227 -r1.229 --- mandoc/roff.c 2014/09/06 22:39:36 1.227 +++ mandoc/roff.c 2014/09/07 00:21:53 1.229 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.227 2014/09/06 22:39:36 schwarze Exp $ */ +/* $Id: roff.c,v 1.229 2014/09/07 00:21:53 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -60,6 +60,7 @@ enum rofft { ROFF_nh, ROFF_nr, ROFF_ns, + ROFF_pl, ROFF_ps, ROFF_rm, ROFF_rr, @@ -256,6 +257,7 @@ static struct roffmac roffs[ROFF_MAX] = { { "nh", roff_line_ignore, NULL, NULL, 0, NULL }, { "nr", roff_nr, NULL, NULL, 0, NULL }, { "ns", roff_line_ignore, NULL, NULL, 0, NULL }, + { "pl", roff_line_ignore, NULL, NULL, 0, NULL }, { "ps", roff_line_ignore, NULL, NULL, 0, NULL }, { "rm", roff_rm, NULL, NULL, 0, NULL }, { "rr", roff_rr, NULL, NULL, 0, NULL }, @@ -758,6 +760,15 @@ roff_parseln(struct roff *r, int ln, char **bufp, return(tbl_read(r->tbl, ln, *bufp, pos)); 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,