예제 #1
0
파일: man_html.c 프로젝트: jashank/freebsd
static void
print_man(MAN_ARGS)
{
	struct tag	*t, *tt;
	struct htmlpair	 tag;

	PAIR_CLASS_INIT(&tag, "mandoc");

	if ( ! (HTML_FRAGMENT & h->oflags)) {
		print_gen_decls(h);
		t = print_otag(h, TAG_HTML, 0, NULL);
		tt = print_otag(h, TAG_HEAD, 0, NULL);
		print_man_head(man, n, mh, h);
		print_tagq(h, tt);
		print_otag(h, TAG_BODY, 0, NULL);
		print_otag(h, TAG_DIV, 1, &tag);
	} else
		t = print_otag(h, TAG_DIV, 1, &tag);

	print_man_nodelist(man, n, mh, h);
	print_tagq(h, t);
}
예제 #2
0
파일: man_html.c 프로젝트: mulichao/freebsd
void
html_man(void *arg, const struct roff_man *man)
{
	struct html	*h;
	struct tag	*t;

	h = (struct html *)arg;

	if ((h->oflags & HTML_FRAGMENT) == 0) {
		print_gen_decls(h);
		print_otag(h, TAG_HTML, "");
		t = print_otag(h, TAG_HEAD, "");
		print_man_head(&man->meta, man->first, h);
		print_tagq(h, t);
		print_otag(h, TAG_BODY, "");
	}

	man_root_pre(&man->meta, man->first, h);
	t = print_otag(h, TAG_DIV, "c", "manual-text");
	print_man_nodelist(&man->meta, man->first->child, h);
	print_tagq(h, t);
	man_root_post(&man->meta, man->first, h);
	print_tagq(h, NULL);
}