- fwrite(rhs, 1, sz, stdout);
+
+ if (NULL != (rhs = chars_res2str(h->symtab, p, len, &sz)))
+ fwrite(rhs, 1, sz, stdout);
+}
+
+
+struct tag *
+print_ofont(struct html *h, enum htmlfont font)
+{
+ struct htmlpair tag;
+
+ h->metal = h->metac;
+ h->metac = font;
+
+ /* FIXME: DECO_ROMAN should just close out preexisting. */
+
+ if (h->metaf && h->tags.head == h->metaf)
+ print_tagq(h, h->metaf);
+
+ PAIR_CLASS_INIT(&tag, htmlfonts[font]);
+ h->metaf = print_otag(h, TAG_SPAN, 1, &tag);
+ return(h->metaf);
+}
+
+
+static void
+print_metaf(struct html *h, enum roffdeco deco)
+{
+ enum htmlfont font;
+
+ switch (deco) {
+ case (DECO_PREVIOUS):
+ font = h->metal;
+ break;
+ case (DECO_ITALIC):
+ font = HTMLFONT_ITALIC;
+ break;
+ case (DECO_BOLD):
+ font = HTMLFONT_BOLD;
+ break;
+ case (DECO_ROMAN):
+ font = HTMLFONT_NONE;
+ break;
+ default:
+ abort();
+ /* NOTREACHED */
+ }
+
+ (void)print_ofont(h, font);