]>
git.cameronkatri.com Git - mandoc.git/blob - html.h
1 /* $Id: html.h,v 1.18 2009/11/10 16:20:22 kristaps Exp $ */
3 * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
88 #define PAIR_CLASS_INIT(p, v) \
89 do { (p)->key = ATTR_CLASS; \
90 (p)->val = (v); } while (/* CONSTCOND */ 0)
91 #define PAIR_HREF_INIT(p, v) \
92 do { (p)->key = ATTR_HREF; \
93 (p)->val = (v); } while (/* CONSTCOND */ 0)
94 #define PAIR_STYLE_INIT(p, h) \
95 do { (p)->key = ATTR_STYLE; \
96 (p)->val = (h)->buf; } while (/* CONSTCOND */ 0)
97 #define PAIR_SUMMARY_INIT(p, v) \
98 do { (p)->key = ATTR_SUMMARY; \
99 (p)->val = (v); } while (/* CONSTCOND */ 0)
103 #define HTML_NOSPACE (1 << 0)
104 #define HTML_NEWLINE (1 << 1)
105 #define HTML_IGNDELIM (1 << 2)
116 #define METAF_BOLD (1 << 0)
117 #define METAF_UNDER (1 << 1)
123 void print_gen_doctype(struct html
*);
124 void print_gen_head(struct html
*);
125 struct tag
*print_otag(struct html
*, enum htmltag
,
126 int, const struct htmlpair
*);
127 void print_tagq(struct html
*, const struct tag
*);
128 void print_stagq(struct html
*, const struct tag
*);
129 void print_text(struct html
*, const char *);
131 void bufcat_su(struct html
*, const char *,
132 const struct roffsu
*);
133 void buffmt_man(struct html
*,
134 const char *, const char *);
135 void buffmt_includes(struct html
*, const char *);
136 void buffmt(struct html
*, const char *, ...);
137 void bufcat(struct html
*, const char *);
138 void bufcat_style(struct html
*,
139 const char *, const char *);
140 void bufncat(struct html
*, const char *, size_t);
141 void bufinit(struct html
*);
143 void html_idcat(char *, const char *, int);