version 1.224, 2014/07/06 18:51:13 |
version 1.228, 2014/08/18 21:07:53 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
#include "config.h" |
#endif |
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
Line 222 term_flushln(struct termp *p) |
|
Line 220 term_flushln(struct termp *p) |
|
break; |
break; |
if (' ' == p->buf[i]) { |
if (' ' == p->buf[i]) { |
j = i; |
j = i; |
while (' ' == p->buf[i]) |
while (i < p->col && ' ' == p->buf[i]) |
i++; |
i++; |
dv = (i - j) * (*p->width)(p, ' '); |
dv = (i - j) * (*p->width)(p, ' '); |
vbl += dv; |
vbl += dv; |
Line 769 term_vspan(const struct termp *p, const struct roffsu |
|
Line 767 term_vspan(const struct termp *p, const struct roffsu |
|
|
|
switch (su->unit) { |
switch (su->unit) { |
case SCALE_CM: |
case SCALE_CM: |
r = su->scale * 2; |
r = su->scale * 2.0; |
break; |
break; |
case SCALE_IN: |
case SCALE_IN: |
r = su->scale * 6; |
r = su->scale * 6.0; |
break; |
break; |
case SCALE_PC: |
case SCALE_PC: |
r = su->scale; |
r = su->scale; |
break; |
break; |
case SCALE_PT: |
case SCALE_PT: |
r = su->scale / 8; |
r = su->scale / 8.0; |
break; |
break; |
case SCALE_MM: |
case SCALE_MM: |
r = su->scale / 1000; |
r = su->scale / 1000.0; |
break; |
break; |
case SCALE_VS: |
case SCALE_VS: |
r = su->scale; |
r = su->scale; |
break; |
break; |
default: |
default: |
r = su->scale - 1; |
r = su->scale - 1.0; |
break; |
break; |
} |
} |
|
|
if (r < 0.0) |
if (r < 0.0) |
r = 0.0; |
r = 0.0; |
return((size_t)r); |
return((size_t)(r + 0.0005)); |
} |
} |
|
|
size_t |
size_t |
Line 801 term_hspan(const struct termp *p, const struct roffsu |
|
Line 799 term_hspan(const struct termp *p, const struct roffsu |
|
{ |
{ |
double v; |
double v; |
|
|
v = ((*p->hspan)(p, su)); |
v = (*p->hspan)(p, su); |
if (v < 0.0) |
if (v < 0.0) |
v = 0.0; |
v = 0.0; |
return((size_t)v); |
return((size_t)(v + 0.0005)); |
} |
} |