version 1.25, 2014/04/20 16:46:05 |
version 1.27, 2014/08/01 19:25:52 |
Line 238 ascii_hspan(const struct termp *p, const struct roffsu |
|
Line 238 ascii_hspan(const struct termp *p, const struct roffsu |
|
|
|
switch (su->unit) { |
switch (su->unit) { |
case SCALE_CM: |
case SCALE_CM: |
r = 4 * su->scale; |
r = su->scale * 4.0; |
break; |
break; |
case SCALE_IN: |
case SCALE_IN: |
r = 10 * su->scale; |
r = su->scale * 10.0; |
break; |
break; |
case SCALE_PC: |
case SCALE_PC: |
r = (10 * su->scale) / 6; |
r = (su->scale * 10.0) / 6.0; |
break; |
break; |
case SCALE_PT: |
case SCALE_PT: |
r = (10 * su->scale) / 72; |
r = (su->scale * 10.0) / 72.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 * 2 - 1; |
r = su->scale * 2.0 - 1.0; |
break; |
break; |
default: |
default: |
r = su->scale; |
r = su->scale; |
Line 269 locale_width(const struct termp *p, int c) |
|
Line 269 locale_width(const struct termp *p, int c) |
|
{ |
{ |
int rc; |
int rc; |
|
|
return((rc = wcwidth(c)) < 0 ? 0 : rc); |
if (c == ASCII_NBRSP) |
|
c = ' '; |
|
rc = wcwidth(c); |
|
if (rc < 0) |
|
rc = 0; |
|
return(rc); |
} |
} |
|
|
static void |
static void |