/* ARGSUSED */ static int mdoc_root_pre(MDOC_ARGS) { struct htmlpair tag[3]; struct tag *t, *tt; char b[BUFSIZ], title[BUFSIZ]; strlcpy(b, m->vol, BUFSIZ); if (m->arch) { strlcat(b, " (", BUFSIZ); strlcat(b, m->arch, BUFSIZ); strlcat(b, ")", BUFSIZ); } snprintf(title, BUFSIZ - 1, "%s(%s)", m->title, m->msec); PAIR_SUMMARY_INIT(&tag[0], "Document Header"); PAIR_CLASS_INIT(&tag[1], "head"); if (NULL == h->style) { PAIR_INIT(&tag[2], ATTR_WIDTH, "100%"); t = print_otag(h, TAG_TABLE, 3, 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); } else t = print_otag(h, TAG_TABLE, 2, 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); print_text(h, title); print_stagq(h, tt); PAIR_CLASS_INIT(&tag[0], "head-vol"); if (NULL == h->style) { PAIR_INIT(&tag[1], ATTR_ALIGN, "center"); print_otag(h, TAG_TD, 2, tag); } else print_otag(h, TAG_TD, 1, tag); print_text(h, b); print_stagq(h, tt); PAIR_CLASS_INIT(&tag[0], "head-rtitle"); if (NULL == h->style) { PAIR_INIT(&tag[1], ATTR_ALIGN, "right"); print_otag(h, TAG_TD, 2, tag); } else print_otag(h, TAG_TD, 1, tag); print_text(h, title); print_tagq(h, t); return(1); }
/* ARGSUSED */ static void man_root_post(MAN_ARGS) { struct htmlpair tag[3]; struct tag *t, *tt; PAIR_SUMMARY_INIT(&tag[0], "Document Footer"); PAIR_CLASS_INIT(&tag[1], "foot"); PAIR_INIT(&tag[2], ATTR_WIDTH, "100%"); t = print_otag(h, TAG_TABLE, 3, tag); PAIR_INIT(&tag[0], 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); assert(man->date); print_text(h, man->date); print_stagq(h, tt); PAIR_CLASS_INIT(&tag[0], "foot-os"); PAIR_INIT(&tag[1], ATTR_ALIGN, "right"); print_otag(h, TAG_TD, 2, tag); if (man->source) print_text(h, man->source); print_tagq(h, t); }
/* ARGSUSED */ static void man_root_pre(MAN_ARGS) { struct htmlpair tag[3]; struct tag *t, *tt; char b[BUFSIZ], title[BUFSIZ]; b[0] = 0; if (man->vol) (void)strlcat(b, man->vol, BUFSIZ); assert(man->title); assert(man->msec); snprintf(title, BUFSIZ - 1, "%s(%s)", man->title, man->msec); PAIR_SUMMARY_INIT(&tag[0], "Document Header"); PAIR_CLASS_INIT(&tag[1], "head"); PAIR_INIT(&tag[2], ATTR_WIDTH, "100%"); t = print_otag(h, TAG_TABLE, 3, 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); 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); 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); print_text(h, b); print_stagq(h, tt); PAIR_CLASS_INIT(&tag[0], "head-rtitle"); PAIR_INIT(&tag[1], ATTR_ALIGN, "right"); print_otag(h, TAG_TD, 2, tag); print_text(h, title); print_tagq(h, t); }
/* ARGSUSED */ static void mdoc_root_post(MDOC_ARGS) { struct htmlpair tag[3]; struct tag *t, *tt; PAIR_SUMMARY_INIT(&tag[0], "Document Footer"); PAIR_CLASS_INIT(&tag[1], "foot"); if (NULL == h->style) { PAIR_INIT(&tag[2], ATTR_WIDTH, "100%"); t = print_otag(h, TAG_TABLE, 3, tag); PAIR_INIT(&tag[0], ATTR_WIDTH, "50%"); print_otag(h, TAG_COL, 1, tag); print_otag(h, TAG_COL, 1, tag); } else t = print_otag(h, TAG_TABLE, 2, tag); t = 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); print_text(h, m->date); print_stagq(h, tt); PAIR_CLASS_INIT(&tag[0], "foot-os"); if (NULL == h->style) { PAIR_INIT(&tag[1], ATTR_ALIGN, "right"); print_otag(h, TAG_TD, 2, tag); } else print_otag(h, TAG_TD, 1, tag); print_text(h, m->os); print_tagq(h, t); }