diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-06-25 14:00:28 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-06-25 14:00:28 +0000 |
commit | 5d4ebc3a30c7755302de93ea988b23b5448d9f02 (patch) | |
tree | 1c657f110ac623fe3dce79ebc8f5bbfba2d8ab01 | |
parent | cd60376212be08cbdf5862b0b39179db69535f4f (diff) | |
download | mandoc-5d4ebc3a30c7755302de93ea988b23b5448d9f02.tar.gz mandoc-5d4ebc3a30c7755302de93ea988b23b5448d9f02.tar.zst mandoc-5d4ebc3a30c7755302de93ea988b23b5448d9f02.zip |
Delete support for style=width attributes, which are no longer used.
-rw-r--r-- | html.c | 42 | ||||
-rw-r--r-- | mandoc_html.3 | 26 |
2 files changed, 2 insertions, 66 deletions
@@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.235 2018/06/25 13:45:57 schwarze Exp $ */ +/* $Id: html.c,v 1.236 2018/06/25 14:00:28 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -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 c5730b09..b99a63bd 100644 --- a/mandoc_html.3 +++ b/mandoc_html.3 @@ -1,4 +1,4 @@ -.\" $Id: mandoc_html.3,v 1.14 2018/06/25 13:26:57 schwarze Exp $ +.\" $Id: mandoc_html.3,v 1.15 2018/06/25 14:00:28 schwarze Exp $ .\" .\" Copyright (c) 2014, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> .\" @@ -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? |