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.5/8.14.5) with ESMTP id s8R9K4jS013093 for ; Sat, 27 Sep 2014 05:20:04 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s8R9K4ma021806; Sat, 27 Sep 2014 05:20:04 -0400 (EDT) Date: Sat, 27 Sep 2014 05:20:04 -0400 (EDT) Message-Id: <201409270920.s8R9K4ma021806@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: HTML5-isation: remove more alignments. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- HTML5-isation: remove more alignments. Modified Files: -------------- mdocml: example.style.css html.c html.h man_html.c mdoc_html.c style.css Revision Data ------------- Index: style.css =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/style.css,v retrieving revision 1.28 retrieving revision 1.29 diff -Lstyle.css -Lstyle.css -u -p -r1.28 -r1.29 --- style.css +++ style.css @@ -28,7 +28,7 @@ td.foot-date { width: 50%; } /* Document td.foot-os { width: 50%; } /* Document footer: OS/source. */ table.head { font-size: smaller; margin-bottom: 1em; border-bottom: 1px dotted #dddddd; } /* Document header. */ td.head-ltitle { width: 10%; } /* Document header: left-title. */ -td.head-vol { width: 80%; text-align: center; } /* Document header: volume. */ +td.head-vol { width: 80%; } /* Document header: volume. */ td.head-rtitle { width: 10%; } /* Document header: right-title. */ /* General font modes. */ Index: html.h =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.h,v retrieving revision 1.58 retrieving revision 1.59 diff -Lhtml.h -Lhtml.h -u -p -r1.58 -r1.59 --- html.h +++ html.h @@ -64,7 +64,6 @@ enum htmlattr { ATTR_STYLE, ATTR_WIDTH, ATTR_ID, - ATTR_ALIGN, ATTR_COLSPAN, ATTR_CHARSET, ATTR_MAX Index: man_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v retrieving revision 1.100 retrieving revision 1.101 diff -Lman_html.c -Lman_html.c -u -p -r1.100 -r1.101 --- man_html.c +++ man_html.c @@ -299,7 +299,7 @@ a2width(const struct man_node *n, struct static void man_root_pre(MAN_ARGS) { - struct htmlpair tag[2]; + struct htmlpair tag; struct tag *t, *tt; char *title; @@ -307,31 +307,30 @@ man_root_pre(MAN_ARGS) assert(man->msec); mandoc_asprintf(&title, "%s(%s)", man->title, man->msec); - PAIR_CLASS_INIT(&tag[0], "head"); - t = print_otag(h, TAG_TABLE, 1, tag); - PAIR_INIT(&tag[0], ATTR_WIDTH, "30%"); - print_otag(h, TAG_COL, 1, tag); - print_otag(h, TAG_COL, 1, tag); - print_otag(h, TAG_COL, 1, tag); + PAIR_CLASS_INIT(&tag, "head"); + t = print_otag(h, TAG_TABLE, 1, &tag); + PAIR_INIT(&tag, ATTR_WIDTH, "30%"); + print_otag(h, TAG_COL, 1, &tag); + print_otag(h, TAG_COL, 1, &tag); + print_otag(h, TAG_COL, 1, &tag); print_otag(h, TAG_TBODY, 0, NULL); tt = print_otag(h, TAG_TR, 0, NULL); - PAIR_CLASS_INIT(&tag[0], "head-ltitle"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "head-ltitle"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, title); print_stagq(h, tt); - PAIR_CLASS_INIT(&tag[0], "head-vol"); - PAIR_INIT(&tag[1], ATTR_ALIGN, "center"); - print_otag(h, TAG_TD, 2, tag); + PAIR_CLASS_INIT(&tag, "head-vol"); + print_otag(h, TAG_TD, 1, &tag); if (NULL != man->vol) print_text(h, man->vol); print_stagq(h, tt); - PAIR_CLASS_INIT(&tag[0], "head-rtitle"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "head-rtitle"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, title); print_tagq(h, t); free(title); @@ -340,26 +339,26 @@ man_root_pre(MAN_ARGS) static void man_root_post(MAN_ARGS) { - struct htmlpair tag[2]; + struct htmlpair tag; struct tag *t, *tt; - PAIR_CLASS_INIT(&tag[0], "foot"); - t = print_otag(h, TAG_TABLE, 1, tag); - PAIR_INIT(&tag[0], ATTR_WIDTH, "50%"); - print_otag(h, TAG_COL, 1, tag); - print_otag(h, TAG_COL, 1, tag); + PAIR_CLASS_INIT(&tag, "foot"); + t = print_otag(h, TAG_TABLE, 1, &tag); + PAIR_INIT(&tag, ATTR_WIDTH, "50%"); + print_otag(h, TAG_COL, 1, &tag); + print_otag(h, TAG_COL, 1, &tag); tt = print_otag(h, TAG_TR, 0, NULL); - PAIR_CLASS_INIT(&tag[0], "foot-date"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "foot-date"); + print_otag(h, TAG_TD, 1, &tag); assert(man->date); print_text(h, man->date); print_stagq(h, tt); - PAIR_CLASS_INIT(&tag[0], "foot-os"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "foot-os"); + print_otag(h, TAG_TD, 1, &tag); if (man->source) print_text(h, man->source); Index: html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v retrieving revision 1.168 retrieving revision 1.169 diff -Lhtml.c -Lhtml.c -u -p -r1.168 -r1.169 --- html.c +++ html.c @@ -87,7 +87,6 @@ static const char *const htmlattrs[ATTR_ "style", /* ATTR_STYLE */ "width", /* ATTR_WIDTH */ "id", /* ATTR_ID */ - "align", /* ATTR_ALIGN */ "colspan", /* ATTR_COLSPAN */ "charset", /* ATTR_CHARSET */ }; @@ -202,7 +201,8 @@ print_gen_head(struct html *h) */ t = print_otag(h, TAG_STYLE, 0, NULL); print_text(h, "table.head, table.foot { width: 100%; }\n" - "td.head-rtitle, td.foot-os { text-align: right; }\n"); + "td.head-rtitle, td.foot-os { text-align: right; }\n" + "td.head-vol { text-align: center; }\n"); print_tagq(h, t); if (h->style) { Index: mdoc_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v retrieving revision 1.203 retrieving revision 1.204 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.203 -r1.204 --- mdoc_html.c +++ mdoc_html.c @@ -484,26 +484,26 @@ print_mdoc_node(MDOC_ARGS) static void mdoc_root_post(MDOC_ARGS) { - struct htmlpair tag[2]; + struct htmlpair tag; struct tag *t, *tt; - PAIR_CLASS_INIT(&tag[0], "foot"); - t = print_otag(h, TAG_TABLE, 1, tag); - PAIR_INIT(&tag[0], ATTR_WIDTH, "50%"); - print_otag(h, TAG_COL, 1, tag); - print_otag(h, TAG_COL, 1, tag); + PAIR_CLASS_INIT(&tag, "foot"); + t = print_otag(h, TAG_TABLE, 1, &tag); + PAIR_INIT(&tag, ATTR_WIDTH, "50%"); + print_otag(h, TAG_COL, 1, &tag); + print_otag(h, TAG_COL, 1, &tag); print_otag(h, TAG_TBODY, 0, NULL); tt = print_otag(h, TAG_TR, 0, NULL); - PAIR_CLASS_INIT(&tag[0], "foot-date"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "foot-date"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, meta->date); print_stagq(h, tt); - PAIR_CLASS_INIT(&tag[0], "foot-os"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "foot-os"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, meta->os); print_tagq(h, t); } @@ -511,7 +511,7 @@ mdoc_root_post(MDOC_ARGS) static int mdoc_root_pre(MDOC_ARGS) { - struct htmlpair tag[2]; + struct htmlpair tag; struct tag *t, *tt; char *volume, *title; @@ -527,30 +527,29 @@ mdoc_root_pre(MDOC_ARGS) mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); - PAIR_CLASS_INIT(&tag[0], "head"); - t = print_otag(h, TAG_TABLE, 1, tag); - PAIR_INIT(&tag[0], ATTR_WIDTH, "30%"); - print_otag(h, TAG_COL, 1, tag); - print_otag(h, TAG_COL, 1, tag); - print_otag(h, TAG_COL, 1, tag); + PAIR_CLASS_INIT(&tag, "head"); + t = print_otag(h, TAG_TABLE, 1, &tag); + PAIR_INIT(&tag, ATTR_WIDTH, "30%"); + print_otag(h, TAG_COL, 1, &tag); + print_otag(h, TAG_COL, 1, &tag); + print_otag(h, TAG_COL, 1, &tag); print_otag(h, TAG_TBODY, 0, NULL); tt = print_otag(h, TAG_TR, 0, NULL); - PAIR_CLASS_INIT(&tag[0], "head-ltitle"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "head-ltitle"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, title); print_stagq(h, tt); - PAIR_CLASS_INIT(&tag[0], "head-vol"); - PAIR_INIT(&tag[1], ATTR_ALIGN, "center"); - print_otag(h, TAG_TD, 2, tag); + PAIR_CLASS_INIT(&tag, "head-vol"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, volume); print_stagq(h, tt); - PAIR_CLASS_INIT(&tag[0], "head-rtitle"); - print_otag(h, TAG_TD, 1, tag); + PAIR_CLASS_INIT(&tag, "head-rtitle"); + print_otag(h, TAG_TD, 1, &tag); print_text(h, title); print_tagq(h, t); Index: example.style.css =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/example.style.css,v retrieving revision 1.51 retrieving revision 1.52 diff -Lexample.style.css -Lexample.style.css -u -p -r1.51 -r1.52 --- example.style.css +++ example.style.css @@ -20,11 +20,11 @@ div.mandoc div.subsection { } /* Sub-sec div.mandoc table.synopsis { } /* SYNOPSIS section table. */ div.mandoc table.foot { } /* Document footer. */ div.mandoc td.foot-date { width: 50%; } /* Document footer: date. */ -div.mandoc td.foot-os { width: 50%; text-align: right; } /* Document footer: OS/source. */ +div.mandoc td.foot-os { width: 50%; } /* Document footer: OS/source. */ div.mandoc table.head { } /* Document header. */ div.mandoc td.head-ltitle { width: 10%; } /* Document header: left-title. */ -div.mandoc td.head-vol { width: 80%; text-align: center; } /* Document header: volume. */ -div.mandoc td.head-rtitle { width: 10%; text-align: right; } /* Document header: right-title. */ +div.mandoc td.head-vol { width: 80%; } /* Document header: volume. */ +div.mandoc td.head-rtitle { width: 10%; } /* Document header: right-title. */ div.mandoc .display { } /* All Bd, D1, Dl. */ div.mandoc .list { } /* All Bl. */ div.mandoc i { } /* Italic: BI, IB, I, (implicit). */ -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv