4 static void html_doc_beg(int fd
)
6 file_put(fd
, "<body>\n");
9 static void html_doc_end(int fd
)
11 file_put(fd
, "</body>\n");
14 static int last_head
= 0;
16 static void html_head_beg(int fd
, int level
)
19 sprintf(buf
, "<h%d>", level
+ 1);
24 static void html_head_end(int fd
)
27 sprintf(buf
, "</h%d>", last_head
);
31 static void html_par_beg(int fd
)
33 file_put(fd
, "<p>\n");
36 static void html_par_end(int fd
)
40 static void html_put(int fd
, char *s
)
45 static void html_list_beg(int fd
)
47 file_put(fd
, "<ul>\n");
50 static void html_list_end(int fd
)
52 file_put(fd
, "</ul>\n");
55 static void html_item_beg(int fd
)
60 static void html_item_end(int fd
)
62 file_put(fd
, "</li>");
65 static void html_pre_beg(int fd
)
67 file_put(fd
, "<pre>");
70 static void html_pre_end(int fd
)
72 file_put(fd
, "</pre>");
75 static void html_formula_beg(int fd
)
77 file_put(fd
, "<p><i>");
80 static void html_formula_end(int fd
)
82 file_put(fd
, "</i>\n");
85 static void html_put_emph(int fd
, char *s
)
92 static void html_put_raw(int fd
, char *s
)
97 static void html_put_ref(int fd
, char *s
)
102 struct fmt_ops html_ops
= {
103 .doc_beg
= html_doc_beg
,
104 .doc_end
= html_doc_end
,
105 .head_beg
= html_head_beg
,
106 .head_end
= html_head_end
,
107 .par_beg
= html_par_beg
,
108 .par_end
= html_par_end
,
109 .list_beg
= html_list_beg
,
110 .list_end
= html_list_end
,
111 .item_beg
= html_item_beg
,
112 .item_end
= html_item_end
,
113 .pre_beg
= html_pre_beg
,
114 .pre_end
= html_pre_end
,
115 .formula_beg
= html_formula_beg
,
116 .formula_end
= html_formula_end
,
117 .put_emph
= html_put_emph
,
118 .put_raw
= html_put_raw
,
119 .put_ref
= html_put_ref
,