aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/page.cc
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-12-25 17:53:10 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-12-25 17:53:10 +0000
commit80647123fe63c15caa93687028a45f9efee5b669 (patch)
tree6fe6df04e4b2cd506323ad2994b9527dd1ed7193 /mpm/page.cc
parent6db6db4b7f38f7760b90ec861a39b5ccb9df5ba9 (diff)
downloadsrc-vendor/heirloom-doctools.tar.gz
src-vendor/heirloom-doctools.zip
Notes
Notes: svn path=/vendor/heirloom-doctools/dist/; revision=310550 svn path=/vendor/heirloom-doctools/20161106/; revision=310551; tag=vendor/heirloom-doctools/20161106
Diffstat (limited to 'mpm/page.cc')
-rw-r--r--mpm/page.cc20
1 files changed, 2 insertions, 18 deletions
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))