Fix floating point handling: When converting double to size_t,
authorschwarze <schwarze@openbsd.org>
Fri, 8 Aug 2014 16:02:55 +0000 (16:02 +0000)
committerschwarze <schwarze@openbsd.org>
Fri, 8 Aug 2014 16:02:55 +0000 (16:02 +0000)
commit7c776b600a048be404ca8331f99c5efc3fc211f0
tree4cd0bd6c47ac6cbb2b2684fa8173d465ace15ffe
parent20dc34ffa5bdd448ae85195878e59a9a7d5db52c
Fix floating point handling: When converting double to size_t,
properly round to the nearest M (=0.001m), which is the smallest
available unit.

This avoids weirdness like (size_t)(0.6 * 10.0) == 5
by instead calculating (size_t)(0.6 * 10.0 + 0.0005) == 6,
and so it fixes the indentation of the readline(3) manual.
usr.bin/mandoc/term.c