]>
git.cameronkatri.com Git - mandoc.git/blob - mdoc.h
1 /* $Id: mdoc.h,v 1.145 2017/04/24 23:06:18 schwarze Exp $ */
3 * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
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.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS 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.
20 MDOC_Split
, /* -split */
21 MDOC_Nosplit
, /* -nospli */
22 MDOC_Ragged
, /* -ragged */
23 MDOC_Unfilled
, /* -unfilled */
24 MDOC_Literal
, /* -literal */
25 MDOC_File
, /* -file */
26 MDOC_Offset
, /* -offset */
27 MDOC_Bullet
, /* -bullet */
28 MDOC_Dash
, /* -dash */
29 MDOC_Hyphen
, /* -hyphen */
30 MDOC_Item
, /* -item */
31 MDOC_Enum
, /* -enum */
33 MDOC_Diag
, /* -diag */
34 MDOC_Hang
, /* -hang */
35 MDOC_Ohang
, /* -ohang */
36 MDOC_Inset
, /* -inset */
37 MDOC_Column
, /* -column */
38 MDOC_Width
, /* -width */
39 MDOC_Compact
, /* -compact */
41 MDOC_Filled
, /* -filled */
42 MDOC_Words
, /* -words */
43 MDOC_Emphasis
, /* -emphasis */
44 MDOC_Symbolic
, /* -symbolic */
45 MDOC_Nested
, /* -nested */
46 MDOC_Centred
, /* -centered */
51 * An argument to a macro (multiple values = `-column xxx yyy').
54 enum mdocargt arg
; /* type of argument */
57 size_t sz
; /* elements in "value" */
58 char **value
; /* argument strings */
62 * Reference-counted macro arguments. These are refcounted because
63 * blocks have multiple instances of the same arguments spread across
64 * the HEAD, BODY, TAIL, and BLOCK node types.
68 struct mdoc_argv
*argv
;
74 LIST_bullet
, /* -bullet */
75 LIST_column
, /* -column */
76 LIST_dash
, /* -dash */
77 LIST_diag
, /* -diag */
78 LIST_enum
, /* -enum */
79 LIST_hang
, /* -hang */
80 LIST_hyphen
, /* -hyphen */
81 LIST_inset
, /* -inset */
82 LIST_item
, /* -item */
83 LIST_ohang
, /* -ohang */
90 DISP_centered
, /* -centered */
91 DISP_ragged
, /* -ragged */
92 DISP_unfilled
, /* -unfilled */
93 DISP_filled
, /* -filled */
94 DISP_literal
/* -literal */
99 AUTH_split
, /* -split */
100 AUTH_nosplit
/* -nosplit */
105 FONT_Em
, /* Em, -emphasis */
106 FONT_Li
, /* Li, -literal */
107 FONT_Sy
/* Sy, -symbolic */
111 const char *offs
; /* -offset */
112 enum mdoc_disp type
; /* -ragged, etc. */
113 int comp
; /* -compact */
117 const char *width
; /* -width */
118 const char *offs
; /* -offset */
119 enum mdoc_list type
; /* -tag, -enum, etc. */
120 int comp
; /* -compact */
121 size_t ncols
; /* -column arg count */
122 const char **cols
; /* -column val ptr */
123 int count
; /* -enum counter */
127 enum mdoc_font font
; /* font */
131 enum mdoc_auth auth
; /* -split, etc. */
135 int quote_T
; /* whether to quote %T */
139 * Consists of normalised node arguments. These should be used instead
140 * of iterating through the mdoc_arg pointers of a node: defaults are
148 struct roff_node
*Es
;
152 /* Names of macro args. Index is enum mdocargt. */
153 extern const char *const *mdoc_argnames
;
155 void mdoc_validate(struct roff_man
*);