source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Delete support for style=width attributes, which are no longer
@ 2018-06-25 14:00 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-06-25 14:00 UTC (permalink / raw)
  To: source

Log Message:
-----------
Delete support for style=width attributes, which are no longer used.

Modified Files:
--------------
    mandoc:
        html.c
        mandoc_html.3

Revision Data
-------------
Index: mandoc_html.3
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc_html.3,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lmandoc_html.3 -Lmandoc_html.3 -u -p -r1.14 -r1.15
--- mandoc_html.3
+++ 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:
@@ -256,14 +240,6 @@ Style name letters decide what to do wit
 .It Cm l
 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
Index: html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/html.c,v
retrieving revision 1.235
retrieving revision 1.236
diff -Lhtml.c -Lhtml.c -u -p -r1.235 -r1.236
--- html.c
+++ html.c
@@ -120,7 +120,6 @@ static	const char	*const roffscales[SCAL
 /* 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 
 		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 
 		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 *);
@@ -1034,22 +1012,4 @@ print_word(struct html *h, const char *c
 {
 	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;
 }
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-06-25 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 14:00 mandoc: Delete support for style=width attributes, which are no longer schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).