]>
git.cameronkatri.com Git - mandoc.git/blob - out.h
1 /* $Id: out.h,v 1.15 2011/01/05 15:37:23 kristaps Exp $ */
3 * Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
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.
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.
25 size_t width
; /* width of cell */
26 size_t decimal
; /* decimal position in cell */
29 typedef size_t (*tbl_strlen
)(const char *, void *);
30 typedef size_t (*tbl_len
)(size_t, void *);
33 tbl_strlen slen
; /* calculate string length */
34 tbl_len len
; /* produce width of empty space */
35 struct roffcol
*cols
; /* master column specifiers */
36 void *arg
; /* passed to slen and len */
55 DECO_SPECIAL
, /* special character */
56 DECO_SSPECIAL
, /* single-char special */
57 DECO_RESERVED
, /* reserved word */
58 DECO_BOLD
, /* bold font */
59 DECO_ITALIC
, /* italic font */
60 DECO_ROMAN
, /* "normal" undecorated font */
61 DECO_PREVIOUS
, /* revert to previous font */
62 DECO_NOSPACE
, /* suppress spacing */
64 DECO_FFONT
, /* font family */
73 #define SCALE_VS_INIT(p, v) \
74 do { (p)->unit = SCALE_VS; \
76 while (/* CONSTCOND */ 0)
78 #define SCALE_HS_INIT(p, v) \
79 do { (p)->unit = SCALE_BU; \
81 while (/* CONSTCOND */ 0)
83 int a2roffsu(const char *, struct roffsu
*, enum roffscale
);
84 int a2roffdeco(enum roffdeco
*, const char **, size_t *);
85 void time2a(time_t, char *, size_t);
86 void tblcalc(struct rofftbl
*tbl
, const struct tbl_span
*);