xref: /freebsd/contrib/mandoc/main.h (revision 7648bc9fee8dec6cb3c4941e0165a930fbe8dcb0)
1*7295610fSBaptiste Daroussin /*	$Id: main.h,v 1.30 2019/03/03 13:02:11 schwarze Exp $ */
261d06d6bSBaptiste Daroussin /*
361d06d6bSBaptiste Daroussin  * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4*7295610fSBaptiste Daroussin  * Copyright (c) 2014, 2015, 2019 Ingo Schwarze <schwarze@openbsd.org>
561d06d6bSBaptiste Daroussin  *
661d06d6bSBaptiste Daroussin  * Permission to use, copy, modify, and distribute this software for any
761d06d6bSBaptiste Daroussin  * purpose with or without fee is hereby granted, provided that the above
861d06d6bSBaptiste Daroussin  * copyright notice and this permission notice appear in all copies.
961d06d6bSBaptiste Daroussin  *
1061d06d6bSBaptiste Daroussin  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
1161d06d6bSBaptiste Daroussin  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1261d06d6bSBaptiste Daroussin  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
1361d06d6bSBaptiste Daroussin  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1461d06d6bSBaptiste Daroussin  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1561d06d6bSBaptiste Daroussin  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1661d06d6bSBaptiste Daroussin  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1761d06d6bSBaptiste Daroussin  */
1861d06d6bSBaptiste Daroussin 
19*7295610fSBaptiste Daroussin struct	roff_meta;
2061d06d6bSBaptiste Daroussin struct	manoutput;
2161d06d6bSBaptiste Daroussin 
2261d06d6bSBaptiste Daroussin /*
2361d06d6bSBaptiste Daroussin  * Definitions for main.c-visible output device functions, e.g., -Thtml
2461d06d6bSBaptiste Daroussin  * and -Tascii.  Note that ascii_alloc() is named as such in
2561d06d6bSBaptiste Daroussin  * anticipation of latin1_alloc() and so on, all of which map into the
2661d06d6bSBaptiste Daroussin  * terminal output routines with different character settings.
2761d06d6bSBaptiste Daroussin  */
2861d06d6bSBaptiste Daroussin 
2961d06d6bSBaptiste Daroussin void		 *html_alloc(const struct manoutput *);
30*7295610fSBaptiste Daroussin void		  html_mdoc(void *, const struct roff_meta *);
31*7295610fSBaptiste Daroussin void		  html_man(void *, const struct roff_meta *);
32*7295610fSBaptiste Daroussin void		  html_reset(void *);
3361d06d6bSBaptiste Daroussin void		  html_free(void *);
3461d06d6bSBaptiste Daroussin 
35*7295610fSBaptiste Daroussin void		  tree_mdoc(void *, const struct roff_meta *);
36*7295610fSBaptiste Daroussin void		  tree_man(void *, const struct roff_meta *);
3761d06d6bSBaptiste Daroussin 
38*7295610fSBaptiste Daroussin void		  man_mdoc(void *, const struct roff_meta *);
3961d06d6bSBaptiste Daroussin 
4061d06d6bSBaptiste Daroussin void		 *locale_alloc(const struct manoutput *);
4161d06d6bSBaptiste Daroussin void		 *utf8_alloc(const struct manoutput *);
4261d06d6bSBaptiste Daroussin void		 *ascii_alloc(const struct manoutput *);
4361d06d6bSBaptiste Daroussin void		  ascii_free(void *);
4461d06d6bSBaptiste Daroussin 
4561d06d6bSBaptiste Daroussin void		 *pdf_alloc(const struct manoutput *);
4661d06d6bSBaptiste Daroussin void		 *ps_alloc(const struct manoutput *);
4761d06d6bSBaptiste Daroussin void		  pspdf_free(void *);
4861d06d6bSBaptiste Daroussin 
49*7295610fSBaptiste Daroussin void		  terminal_mdoc(void *, const struct roff_meta *);
50*7295610fSBaptiste Daroussin void		  terminal_man(void *, const struct roff_meta *);
5161d06d6bSBaptiste Daroussin void		  terminal_sepline(void *);
5261d06d6bSBaptiste Daroussin 
53*7295610fSBaptiste Daroussin void		  markdown_mdoc(void *, const struct roff_meta *);
54