Import mdocml-1.11.3
[dragonfly.git] / contrib / mdocml / main.h
CommitLineData
a4c7eb57 1/* $Id: main.h,v 1.12 2011/05/20 15:48:22 kristaps Exp $ */
80387638
SW
2/*
3 * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
4 *
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.
8 *
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.
16 */
17#ifndef MAIN_H
18#define MAIN_H
19
20__BEGIN_DECLS
21
22struct mdoc;
23struct man;
24
25#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
26
27
28/*
29 * Definitions for main.c-visible output device functions, e.g., -Thtml
30 * and -Tascii. Note that ascii_alloc() is named as such in
31 * anticipation of latin1_alloc() and so on, all of which map into the
32 * terminal output routines with different character settings.
33 */
34
35void *html_alloc(char *);
36void *xhtml_alloc(char *);
37void html_mdoc(void *, const struct mdoc *);
38void html_man(void *, const struct man *);
39void html_free(void *);
40
41void tree_mdoc(void *, const struct mdoc *);
42void tree_man(void *, const struct man *);
43
a4c7eb57
SW
44void *locale_alloc(char *);
45void *utf8_alloc(char *);
80387638
SW
46void *ascii_alloc(char *);
47void ascii_free(void *);
48
49void *pdf_alloc(char *);
50void *ps_alloc(char *);
51void pspdf_free(void *);
52
53void terminal_mdoc(void *, const struct mdoc *);
54void terminal_man(void *, const struct man *);
55
56__END_DECLS
57
58#endif /*!MAIN_H*/