]>
git.cameronkatri.com Git - mandoc.git/blob - html.h
1 /* $Id: html.h,v 1.76 2017/01/18 19:22:22 schwarze Exp $ */
3 * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
4 * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
88 #define HTML_NOSPACE (1 << 0) /* suppress next space */
89 #define HTML_IGNDELIM (1 << 1)
90 #define HTML_KEEP (1 << 2)
91 #define HTML_PREKEEP (1 << 3)
92 #define HTML_NONOSPACE (1 << 4) /* never add spaces */
93 #define HTML_LITERAL (1 << 5) /* literal (e.g., <PRE>) context */
94 #define HTML_SKIPCHAR (1 << 6) /* skip the next character */
95 #define HTML_NOSPLIT (1 << 7) /* do not break line before .An */
96 #define HTML_SPLIT (1 << 8) /* break line before .An */
97 #define HTML_NONEWLINE (1 << 9) /* No line break in nofill mode. */
98 #define HTML_NLDONE (1 << 10) /* Just started a new line of HTML. */
99 int indent
; /* current output indentation level */
100 int noindent
; /* indent disabled by <pre> */
101 struct tagq tags
; /* stack of open tags */
102 struct rofftbl tbl
; /* current table */
103 struct tag
*tblt
; /* current open table scope */
104 char *base_man
; /* base for manpage href */
105 char *base_includes
; /* base for include href */
106 char *style
; /* style-sheet URI */
107 struct tag
*metaf
; /* current open font scope */
108 enum htmlfont metal
; /* last used font */
109 enum htmlfont metac
; /* current font mode */
110 int oflags
; /* output options */
111 #define HTML_FRAGMENT (1 << 0) /* don't emit HTML/HEAD/BODY */
118 void print_gen_decls(struct html
*);
119 void print_gen_head(struct html
*);
120 struct tag
*print_otag(struct html
*, enum htmltag
, const char *, ...);
121 void print_tagq(struct html
*, const struct tag
*);
122 void print_stagq(struct html
*, const struct tag
*);
123 void print_text(struct html
*, const char *);
124 void print_tblclose(struct html
*);
125 void print_tbl(struct html
*, const struct tbl_span
*);
126 void print_eqn(struct html
*, const struct eqn
*);
127 void print_paragraph(struct html
*);
129 int html_strlen(const char *);