From 80647123fe63c15caa93687028a45f9efee5b669 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 25 Dec 2016 17:53:10 +0000 Subject: Import heirloom doctools 2016-11-06 --- mpm/page.cc | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'mpm/page.cc') diff --git a/mpm/page.cc b/mpm/page.cc index 95efd405ff1a..7476ccc90f57 100644 --- a/mpm/page.cc +++ b/mpm/page.cc @@ -147,25 +147,9 @@ static void justify(stream *scratch, int wantht) } } -// If r were added to s, would the height of the composed result be at most maxht? -int wouldfit(range *r, stream *s, int maxht) -{ - if (r->rawht() + s->rawht() <= maxht) - return 1; // the conservative test succeeded - stream scratch; // local playground for costly test - for (stream cd = *s; cd.more(); cd.advance()) - scratch.append(cd.current()); - scratch.append(r); - movefloats(&scratch, ((double) scratch.rawht())/maxht); - trimspace(&scratch); - int retval = scratch.height() <= maxht; - scratch.freeall(); - return retval; -} - // If s1 were added to s, would the height of the composed result be at most maxht? // The computational structure is similar to that above. -int wouldfit(stream *s1, stream *s, int maxht) +static int wouldfit(stream *s1, stream *s, int maxht) { if (s1->rawht() + s->rawht() <= maxht) return 1; @@ -316,7 +300,7 @@ void multicol::dump() } // From the head of queue qp, peel off a piece whose raw height is at most space. -int peeloff(stream *qp, int space) +static int peeloff(stream *qp, int space) { stream *s1 = qp->current()->children(); if (!(s1 && s1->more() && s1->current()->height() <= space)) -- cgit v1.2.3