diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-06-25 13:59:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-06-25 13:59:34 +0000 |
commit | 35d446b174778d24b61f69f685834a299094aaf6 (patch) | |
tree | 6378c78d04d3a79edbf5192c67e1ae93b1f33adb /usr.bin | |
parent | faca289bbcdc1ceed1852562465ef86349426723 (diff) |
Delete support for style=width attributes, which are no longer used.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/html.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c index 5bbd8d5edab..6436cf8eee6 100644 --- a/usr.bin/mandoc/html.c +++ b/usr.bin/mandoc/html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: html.c,v 1.105 2018/06/25 13:46:01 schwarze Exp $ */ +/* $OpenBSD: html.c,v 1.106 2018/06/25 13:59:33 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -118,7 +118,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 *); @@ -685,21 +684,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(); } @@ -713,12 +697,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 *); @@ -1033,21 +1011,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; -} |