From 2f3c511c16f175df1fbf5973d40c6322e6b86aeb Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 25 Jun 2018 14:00:28 +0000 Subject: Delete support for style=width attributes, which are no longer used. --- html.c | 40 ---------------------------------------- mandoc_html.3 | 24 ------------------------ 2 files changed, 64 deletions(-) diff --git a/html.c b/html.c index 818c41b4..8179e4fb 100644 --- a/html.c +++ b/html.c @@ -120,7 +120,6 @@ static const char *const roffscales[SCALE_MAX] = { /* Avoid duplicate HTML id= attributes. */ static struct ohash id_unique; -static void a2width(const char *, struct roffsu *); static void print_byte(struct html *, char); static void print_endword(struct html *); static void print_indent(struct html *); @@ -687,21 +686,6 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...) case 'u': su = va_arg(ap, struct roffsu *); break; - case 'w': - if ((arg2 = va_arg(ap, char *)) != NULL) { - su = &mysu; - a2width(arg2, su); - } - if (*fmt == '+') { - if (su != NULL) { - /* Make even bold text fit. */ - su->scale *= 1.2; - /* Add padding. */ - su->scale += 3.0; - } - fmt++; - } - break; default: abort(); } @@ -715,12 +699,6 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...) case 'l': attr = "margin-left"; break; - case 'w': - attr = "width"; - break; - case 'W': - attr = "min-width"; - break; case '?': attr = arg1; arg1 = va_arg(ap, char *); @@ -1035,21 +1013,3 @@ print_word(struct html *h, const char *cp) while (*cp != '\0') print_byte(h, *cp++); } - -/* - * Calculate the scaling unit passed in a `-width' argument. This uses - * either a native scaling unit (e.g., 1i, 2m) or the string length of - * the value. - */ -static void -a2width(const char *p, struct roffsu *su) -{ - const char *end; - - end = a2roffsu(p, su, SCALE_MAX); - if (end == NULL || *end != '\0') { - su->unit = SCALE_EN; - su->scale = html_strlen(p); - } else if (su->scale < 0.0) - su->scale = 0.0; -} diff --git a/mandoc_html.3 b/mandoc_html.3 index a5411751..732575fa 100644 --- a/mandoc_html.3 +++ b/mandoc_html.3 @@ -233,22 +233,6 @@ argument, used as a style value. Requires one .Vt struct roffsu * argument, used as a length. -.It Cm w -Requires one -.Vt char * -argument, interpreted as an -.Xr mdoc 7 Ns -style -width specifier. -If the argument is -.Dv NULL , -nothing is printed for this pair. -.Pp -The -.Cm w -argument type letter can optionally be followed by the modifier -.Cm + -which increases the width by 20% to make even bold text fit -and adds three units for padding between columns. .El .Pp Style name letters decide what to do with the preceding argument: @@ -257,14 +241,6 @@ Style name letters decide what to do with the preceding argument: Set .Cm margin-left to the given length. -.It Cm w -Set -.Cm width -to the given length. -.It Cm W -Set -.Cm min-width -to the given length. .It Cm \&? The special pair .Cm s? -- cgit