summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/html.c b/html.c
index c3a66b8e..1f1d8729 100644
--- a/html.c
+++ b/html.c
@@ -624,24 +624,28 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...)
su = va_arg(ap, struct roffsu *);
break;
case 'w':
- if ((arg2 = va_arg(ap, char *)) == NULL) {
- if (*fmt == '+')
- fmt++;
- if (*fmt == '-')
- fmt++;
- break;
+ if ((arg2 = va_arg(ap, char *)) != NULL) {
+ su = &mysu;
+ a2width(arg2, su);
+ }
+ if (*fmt == '*') {
+ if (su != NULL && su->unit == SCALE_EN &&
+ su->scale > 5.9 && su->scale < 6.1)
+ su = NULL;
+ fmt++;
}
- su = &mysu;
- a2width(arg2, su);
if (*fmt == '+') {
- /* Increase to make even bold text fit. */
- su->scale *= 1.2;
- /* Add padding. */
- su->scale += 3.0;
+ if (su != NULL) {
+ /* Make even bold text fit. */
+ su->scale *= 1.2;
+ /* Add padding. */
+ su->scale += 3.0;
+ }
fmt++;
}
if (*fmt == '-') {
- su->scale *= -1.0;
+ if (su != NULL)
+ su->scale *= -1.0;
fmt++;
}
break;