summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-24 06:19:34 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-24 06:19:34 +0000
commita431e0577bc752f93c6b97e47de59c843d59bd96 (patch)
treebe7d76780c667e7dce07524b2a290c511ef5fd04
parent5328a945994f66136b209f8e2c717cb969c7f013 (diff)
downloadmandoc-a431e0577bc752f93c6b97e47de59c843d59bd96.tar.gz
mandoc-a431e0577bc752f93c6b97e47de59c843d59bd96.tar.zst
mandoc-a431e0577bc752f93c6b97e47de59c843d59bd96.zip
Removed need for superfluous `os' value in overstep calculation (thanks Ingo Schwarze).
-rw-r--r--term.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/term.c b/term.c
index 2a6274ed..c9a5fa52 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.109 2009/10/22 18:19:36 kristaps Exp $ */
+/* $Id: term.c,v 1.110 2009/10/24 06:19:34 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -130,7 +130,7 @@ void
term_flushln(struct termp *p)
{
int i, j;
- size_t vbl, vsz, vis, maxvis, mmax, bp, os;
+ size_t vbl, vsz, vis, maxvis, mmax, bp;
static int overstep = 0;
/*
@@ -143,9 +143,6 @@ term_flushln(struct termp *p)
assert(p->offset < p->rmargin);
assert((int)(p->rmargin - p->offset) - overstep > 0);
- /* Save the overstep. */
- os = (size_t)overstep;
-
maxvis = /* LINTED */
p->rmargin - p->offset - overstep;
mmax = /* LINTED */
@@ -153,7 +150,6 @@ term_flushln(struct termp *p)
bp = TERMP_NOBREAK & p->flags ? mmax : maxvis;
vis = 0;
- overstep = 0;
/*
* If in the standard case (left-justified), then begin with our
@@ -208,8 +204,8 @@ term_flushln(struct termp *p)
vis = 0;
}
/* Remove the overstep width. */
- bp += os;
- os = 0;
+ bp += overstep;
+ overstep = 0;
} else {
for (j = 0; j < (int)vbl; j++)
putchar(' ');
@@ -233,6 +229,7 @@ term_flushln(struct termp *p)
return;
}
+ overstep = 0;
if (TERMP_HANG & p->flags) {
/* We need one blank after the tag. */
overstep = /* LINTED */