From 135785a8d163dcf9961552ae584586e0c1c9e973 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 24 Oct 2009 06:19:34 +0000 Subject: Removed need for superfluous `os' value in overstep calculation (thanks Ingo Schwarze). --- term.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/term.c b/term.c index ad214084..6540eced 100644 --- a/term.c +++ b/term.c @@ -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 */ -- cgit