diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-06-18 21:16:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-06-18 21:16:12 +0000 |
commit | 2cedd5946f7e5b77fb94daa2d7f6e87ae6375c59 (patch) | |
tree | acb578b5fb745824e511924a33ae6c65b05d2d06 /usr.bin/mandoc/man_term.c | |
parent | 1e6dc97e138ea16fa14720d2f1d5c05220b44834 (diff) |
sync to 1.7.16: catch overflow of the right margin by the .IP macro
currently, this code is deactivated, anyway
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r-- | usr.bin/mandoc/man_term.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 0d13cdde61a..edb532ad915 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.3 2009/06/17 22:27:34 schwarze Exp $ */ +/* $Id: man_term.c,v 1.4 2009/06/18 21:16:11 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -289,9 +289,12 @@ pre_IP(DECL_ARGS) } else offs = strlen(nn->string); - p->offset += offs; -#endif p->flags |= TERMP_NOSPACE; + /* FIXME */ + if ((p->offset += offs) > p->rmargin) + errx(1, "line too long"); +#endif + return(0); } |