1*260e9a87SYuri Pankov /* $Id: main.h,v 1.20 2014/12/31 16:52:40 schwarze Exp $ */ 295c635efSGarrett D'Amore /* 395c635efSGarrett D'Amore * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4*260e9a87SYuri Pankov * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> 595c635efSGarrett D'Amore * 695c635efSGarrett D'Amore * Permission to use, copy, modify, and distribute this software for any 795c635efSGarrett D'Amore * purpose with or without fee is hereby granted, provided that the above 895c635efSGarrett D'Amore * copyright notice and this permission notice appear in all copies. 995c635efSGarrett D'Amore * 1095c635efSGarrett D'Amore * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1195c635efSGarrett D'Amore * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1295c635efSGarrett D'Amore * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1395c635efSGarrett D'Amore * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1495c635efSGarrett D'Amore * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1595c635efSGarrett D'Amore * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1695c635efSGarrett D'Amore * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1795c635efSGarrett D'Amore */ 1895c635efSGarrett D'Amore 1995c635efSGarrett D'Amore #define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) 2095c635efSGarrett D'Amore 21*260e9a87SYuri Pankov __BEGIN_DECLS 22*260e9a87SYuri Pankov 23*260e9a87SYuri Pankov struct mchars; 24*260e9a87SYuri Pankov struct mdoc; 25*260e9a87SYuri Pankov struct man; 2695c635efSGarrett D'Amore 2795c635efSGarrett D'Amore /* 2895c635efSGarrett D'Amore * Definitions for main.c-visible output device functions, e.g., -Thtml 2995c635efSGarrett D'Amore * and -Tascii. Note that ascii_alloc() is named as such in 3095c635efSGarrett D'Amore * anticipation of latin1_alloc() and so on, all of which map into the 3195c635efSGarrett D'Amore * terminal output routines with different character settings. 3295c635efSGarrett D'Amore */ 3395c635efSGarrett D'Amore 34*260e9a87SYuri Pankov void *html_alloc(const struct mchars *, char *); 3595c635efSGarrett D'Amore void html_mdoc(void *, const struct mdoc *); 3695c635efSGarrett D'Amore void html_man(void *, const struct man *); 3795c635efSGarrett D'Amore void html_free(void *); 3895c635efSGarrett D'Amore 3995c635efSGarrett D'Amore void tree_mdoc(void *, const struct mdoc *); 4095c635efSGarrett D'Amore void tree_man(void *, const struct man *); 4195c635efSGarrett D'Amore 4295c635efSGarrett D'Amore void man_mdoc(void *, const struct mdoc *); 4395c635efSGarrett D'Amore void man_man(void *, const struct man *); 4495c635efSGarrett D'Amore 45*260e9a87SYuri Pankov void *locale_alloc(const struct mchars *, char *); 46*260e9a87SYuri Pankov void *utf8_alloc(const struct mchars *, char *); 47*260e9a87SYuri Pankov void *ascii_alloc(const struct mchars *, char *); 4895c635efSGarrett D'Amore void ascii_free(void *); 49*260e9a87SYuri Pankov void ascii_sepline(void *); 5095c635efSGarrett D'Amore 51*260e9a87SYuri Pankov void *pdf_alloc(const struct mchars *, char *); 52*260e9a87SYuri Pankov void *ps_alloc(const struct mchars *, char *); 5395c635efSGarrett D'Amore void pspdf_free(void *); 5495c635efSGarrett D'Amore 5595c635efSGarrett D'Amore void terminal_mdoc(void *, const struct mdoc *); 5695c635efSGarrett D'Amore void terminal_man(void *, const struct man *); 5795c635efSGarrett D'Amore 5895c635efSGarrett D'Amore __END_DECLS 59