xref: /titanic_51/usr/src/cmd/mandoc/main.h (revision 95c635efb7c3b86efc493e0447eaec7aecca3f0f)
1*95c635efSGarrett D'Amore /*	$Id: main.h,v 1.15 2011/10/06 22:29:12 kristaps Exp $ */
2*95c635efSGarrett D'Amore /*
3*95c635efSGarrett D'Amore  * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4*95c635efSGarrett D'Amore  *
5*95c635efSGarrett D'Amore  * Permission to use, copy, modify, and distribute this software for any
6*95c635efSGarrett D'Amore  * purpose with or without fee is hereby granted, provided that the above
7*95c635efSGarrett D'Amore  * copyright notice and this permission notice appear in all copies.
8*95c635efSGarrett D'Amore  *
9*95c635efSGarrett D'Amore  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*95c635efSGarrett D'Amore  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*95c635efSGarrett D'Amore  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*95c635efSGarrett D'Amore  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*95c635efSGarrett D'Amore  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*95c635efSGarrett D'Amore  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*95c635efSGarrett D'Amore  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*95c635efSGarrett D'Amore  */
17*95c635efSGarrett D'Amore #ifndef	MAIN_H
18*95c635efSGarrett D'Amore #define	MAIN_H
19*95c635efSGarrett D'Amore 
20*95c635efSGarrett D'Amore __BEGIN_DECLS
21*95c635efSGarrett D'Amore 
22*95c635efSGarrett D'Amore struct	mdoc;
23*95c635efSGarrett D'Amore struct	man;
24*95c635efSGarrett D'Amore 
25*95c635efSGarrett D'Amore #define	UNCONST(a)	((void *)(uintptr_t)(const void *)(a))
26*95c635efSGarrett D'Amore 
27*95c635efSGarrett D'Amore 
28*95c635efSGarrett D'Amore /*
29*95c635efSGarrett D'Amore  * Definitions for main.c-visible output device functions, e.g., -Thtml
30*95c635efSGarrett D'Amore  * and -Tascii.  Note that ascii_alloc() is named as such in
31*95c635efSGarrett D'Amore  * anticipation of latin1_alloc() and so on, all of which map into the
32*95c635efSGarrett D'Amore  * terminal output routines with different character settings.
33*95c635efSGarrett D'Amore  */
34*95c635efSGarrett D'Amore 
35*95c635efSGarrett D'Amore void		 *html_alloc(char *);
36*95c635efSGarrett D'Amore void		 *xhtml_alloc(char *);
37*95c635efSGarrett D'Amore void		  html_mdoc(void *, const struct mdoc *);
38*95c635efSGarrett D'Amore void		  html_man(void *, const struct man *);
39*95c635efSGarrett D'Amore void		  html_free(void *);
40*95c635efSGarrett D'Amore 
41*95c635efSGarrett D'Amore void		  tree_mdoc(void *, const struct mdoc *);
42*95c635efSGarrett D'Amore void		  tree_man(void *, const struct man *);
43*95c635efSGarrett D'Amore 
44*95c635efSGarrett D'Amore void		  man_mdoc(void *, const struct mdoc *);
45*95c635efSGarrett D'Amore void		  man_man(void *, const struct man *);
46*95c635efSGarrett D'Amore 
47*95c635efSGarrett D'Amore void		 *locale_alloc(char *);
48*95c635efSGarrett D'Amore void		 *utf8_alloc(char *);
49*95c635efSGarrett D'Amore void		 *ascii_alloc(char *);
50*95c635efSGarrett D'Amore void		  ascii_free(void *);
51*95c635efSGarrett D'Amore 
52*95c635efSGarrett D'Amore void		 *pdf_alloc(char *);
53*95c635efSGarrett D'Amore void		 *ps_alloc(char *);
54*95c635efSGarrett D'Amore void		  pspdf_free(void *);
55*95c635efSGarrett D'Amore 
56*95c635efSGarrett D'Amore void		  terminal_mdoc(void *, const struct mdoc *);
57*95c635efSGarrett D'Amore void		  terminal_man(void *, const struct man *);
58*95c635efSGarrett D'Amore 
59*95c635efSGarrett D'Amore __END_DECLS
60*95c635efSGarrett D'Amore 
61*95c635efSGarrett D'Amore #endif /*!MAIN_H*/
62