1/* $Id: main.h,v 1.24 2015/11/07 14:01:16 schwarze Exp $ */
| 1/* $Id: main.h,v 1.15 2011/10/06 22:29:12 kristaps Exp $ */
|
2/* 3 * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
| 2/* 3 * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
|
4 * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
| |
5 * 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. 9 *
| 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 *
|
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
| 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
| 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
| 11 * 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. 17 */
| 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
|
18
| 19
|
| 20__BEGIN_DECLS 21 22struct mdoc; 23struct man; 24
|
19#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) 20
| 25#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) 26
|
21struct roff_man; 22struct manoutput;
| |
23
| 27
|
24/*
| 28/*
|
25 * Definitions for main.c-visible output device functions, e.g., -Thtml 26 * and -Tascii. Note that ascii_alloc() is named as such in 27 * anticipation of latin1_alloc() and so on, all of which map into the 28 * terminal output routines with different character settings. 29 */ 30
| 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
|
31void *html_alloc(const struct manoutput *); 32void html_mdoc(void *, const struct roff_man *); 33void html_man(void *, const struct roff_man *);
| 35void *html_alloc(char *); 36void *xhtml_alloc(char *); 37void html_mdoc(void *, const struct mdoc *); 38void html_man(void *, const struct man *);
|
34void html_free(void *); 35
| 39void html_free(void *); 40
|
36void tree_mdoc(void *, const struct roff_man *); 37void tree_man(void *, const struct roff_man *);
| 41void tree_mdoc(void *, const struct mdoc *); 42void tree_man(void *, const struct man *);
|
38
| 43
|
39void man_mdoc(void *, const struct roff_man *); 40void man_man(void *, const struct roff_man *);
| 44void man_mdoc(void *, const struct mdoc *); 45void man_man(void *, const struct man *);
|
41
| 46
|
42void *locale_alloc(const struct manoutput *); 43void *utf8_alloc(const struct manoutput *); 44void *ascii_alloc(const struct manoutput *);
| 47void *locale_alloc(char *); 48void *utf8_alloc(char *); 49void *ascii_alloc(char *);
|
45void ascii_free(void *);
| 50void ascii_free(void *);
|
46void ascii_sepline(void *);
| |
47
| 51
|
48void *pdf_alloc(const struct manoutput *); 49void *ps_alloc(const struct manoutput *);
| 52void *pdf_alloc(char *); 53void *ps_alloc(char *);
|
50void pspdf_free(void *); 51
| 54void pspdf_free(void *); 55
|
52void terminal_mdoc(void *, const struct roff_man *); 53void terminal_man(void *, const struct roff_man *);
| 56void terminal_mdoc(void *, const struct mdoc *); 57void terminal_man(void *, const struct man *); 58 59__END_DECLS 60 61#endif /*!MAIN_H*/
|
| |