diff options
author | Cem Keylan <cem@ckyln.com> | 2021-07-14 14:39:31 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2021-07-14 14:39:31 +0300 |
commit | 89c23755c8ab5d8c5bbbfa6e40eb0c6bda109dad (patch) | |
tree | 0619d977ce4ceecca0523f20a0609a293440e030 /usr.bin/mandoc/roff.c | |
parent | 0ea3661a6ba0baaa39b95e836e8f2c87e2f4c20f (diff) | |
download | otools-89c23755c8ab5d8c5bbbfa6e40eb0c6bda109dad.tar.gz |
update CVS
Diffstat (limited to 'usr.bin/mandoc/roff.c')
-rw-r--r-- | usr.bin/mandoc/roff.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 07c977d..484664f 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.248 2020/08/27 12:58:00 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.249 2021/06/27 17:57:13 schwarze Exp $ */ /* * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> @@ -1822,7 +1822,7 @@ roff_parsetext(struct roff *r, struct buf *buf, int pos, int *offs) } int -roff_parseln(struct roff *r, int ln, struct buf *buf, int *offs) +roff_parseln(struct roff *r, int ln, struct buf *buf, int *offs, size_t len) { enum roff_tok t; int e; @@ -1833,6 +1833,14 @@ roff_parseln(struct roff *r, int ln, struct buf *buf, int *offs) ppos = pos = *offs; + if (len > 80 && r->tbl == NULL && r->eqn == NULL && + (r->man->flags & ROFF_NOFILL) == 0 && + strchr(" .\\", buf->buf[pos]) == NULL && + buf->buf[pos] != r->control && + strcspn(buf->buf, " ") < 80) + mandoc_msg(MANDOCERR_TEXT_LONG, ln, (int)len - 1, + "%.20s...", buf->buf + pos); + /* Handle in-line equation delimiters. */ if (r->tbl == NULL && |