From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o5PJoNMA008513 for ; Fri, 25 Jun 2010 15:50:24 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o5PJoNC9011154; Fri, 25 Jun 2010 15:50:23 -0400 (EDT) Date: Fri, 25 Jun 2010 15:50:23 -0400 (EDT) Message-Id: <201006251950.o5PJoNC9011154@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Remove "pt" from struct roffsu, as CSS (the only reason it was X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Remove "pt" from struct roffsu, as CSS (the only reason it was there) is unclear about which units accept floats/integers, which leads me to assume that it handles either and rounds as appropriate. Modified Files: -------------- mdocml: html.c out.c out.h term_ascii.c term_ps.c Revision Data ------------- Index: out.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/out.c,v retrieving revision 1.16 retrieving revision 1.17 diff -Lout.c -Lout.c -u -p -r1.16 -r1.17 --- out.c +++ out.c @@ -139,8 +139,6 @@ a2roffsu(const char *src, struct roffsu if ((dst->scale = atof(buf)) < 0) dst->scale = 0; dst->unit = unit; - dst->pt = hasd; - return(1); } Index: term_ascii.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ascii.c,v retrieving revision 1.5 retrieving revision 1.6 diff -Lterm_ascii.c -Lterm_ascii.c -u -p -r1.5 -r1.6 --- term_ascii.c +++ term_ascii.c @@ -79,6 +79,7 @@ ascii_alloc(char *outopts) } +/* ARGSUSED */ static size_t ascii_width(const struct termp *p, char c) { Index: html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v retrieving revision 1.102 retrieving revision 1.103 diff -Lhtml.c -Lhtml.c -u -p -r1.102 -r1.103 --- html.c +++ html.c @@ -718,11 +718,11 @@ bufcat_su(struct html *h, const char *p, break; } - if (su->pt) - buffmt(h, "%s: %f%s;", p, v, u); - else - /* LINTED */ - buffmt(h, "%s: %d%s;", p, (int)v, u); + /* + * XXX: the CSS spec isn't clear as to which types accept + * integer or real numbers, so we just make them all decimals. + */ + buffmt(h, "%s: %.2f%s;", p, v, u); } Index: out.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/out.h,v retrieving revision 1.11 retrieving revision 1.12 diff -Lout.h -Lout.h -u -p -r1.11 -r1.12 --- out.h +++ out.h @@ -53,7 +53,6 @@ enum roffdeco { struct roffsu { enum roffscale unit; double scale; - int pt; }; #define SCALE_INVERT(p) \ @@ -62,14 +61,12 @@ struct roffsu { #define SCALE_VS_INIT(p, v) \ do { (p)->unit = SCALE_VS; \ - (p)->scale = (v); \ - (p)->pt = 0; } \ + (p)->scale = (v); } \ while (/* CONSTCOND */ 0) #define SCALE_HS_INIT(p, v) \ do { (p)->unit = SCALE_BU; \ - (p)->scale = (v); \ - (p)->pt = 0; } \ + (p)->scale = (v); } \ while (/* CONSTCOND */ 0) int a2roffsu(const char *, Index: term_ps.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ps.c,v retrieving revision 1.11 retrieving revision 1.12 diff -Lterm_ps.c -Lterm_ps.c -u -p -r1.11 -r1.12 --- term_ps.c +++ term_ps.c @@ -431,6 +431,7 @@ ps_setfont(struct termp *p, enum termfon } +/* ARGSUSED */ static size_t ps_width(const struct termp *p, char c) { -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv