]>
git.cameronkatri.com Git - mandoc.git/blob - mdoc.h
1 /* $Id: mdoc.h,v 1.146 2018/12/30 00:49:55 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.
23 MDOC_Split
, /* -split */
24 MDOC_Nosplit
, /* -nospli */
25 MDOC_Ragged
, /* -ragged */
26 MDOC_Unfilled
, /* -unfilled */
27 MDOC_Literal
, /* -literal */
28 MDOC_File
, /* -file */
29 MDOC_Offset
, /* -offset */
30 MDOC_Bullet
, /* -bullet */
31 MDOC_Dash
, /* -dash */
32 MDOC_Hyphen
, /* -hyphen */
33 MDOC_Item
, /* -item */
34 MDOC_Enum
, /* -enum */
36 MDOC_Diag
, /* -diag */
37 MDOC_Hang
, /* -hang */
38 MDOC_Ohang
, /* -ohang */
39 MDOC_Inset
, /* -inset */
40 MDOC_Column
, /* -column */
41 MDOC_Width
, /* -width */
42 MDOC_Compact
, /* -compact */
44 MDOC_Filled
, /* -filled */
45 MDOC_Words
, /* -words */
46 MDOC_Emphasis
, /* -emphasis */
47 MDOC_Symbolic
, /* -symbolic */
48 MDOC_Nested
, /* -nested */
49 MDOC_Centred
, /* -centered */
54 * An argument to a macro (multiple values = `-column xxx yyy').
57 enum mdocargt arg
; /* type of argument */
60 size_t sz
; /* elements in "value" */
61 char **value
; /* argument strings */
65 * Reference-counted macro arguments. These are refcounted because
66 * blocks have multiple instances of the same arguments spread across
67 * the HEAD, BODY, TAIL, and BLOCK node types.
71 struct mdoc_argv
*argv
;
77 LIST_bullet
, /* -bullet */
78 LIST_column
, /* -column */
79 LIST_dash
, /* -dash */
80 LIST_diag
, /* -diag */
81 LIST_enum
, /* -enum */
82 LIST_hang
, /* -hang */
83 LIST_hyphen
, /* -hyphen */
84 LIST_inset
, /* -inset */
85 LIST_item
, /* -item */
86 LIST_ohang
, /* -ohang */
93 DISP_centered
, /* -centered */
94 DISP_ragged
, /* -ragged */
95 DISP_unfilled
, /* -unfilled */
96 DISP_filled
, /* -filled */
97 DISP_literal
/* -literal */
102 AUTH_split
, /* -split */
103 AUTH_nosplit
/* -nosplit */
108 FONT_Em
, /* Em, -emphasis */
109 FONT_Li
, /* Li, -literal */
110 FONT_Sy
/* Sy, -symbolic */
114 const char *offs
; /* -offset */
115 enum mdoc_disp type
; /* -ragged, etc. */
116 int comp
; /* -compact */
120 const char *width
; /* -width */
121 const char *offs
; /* -offset */
122 enum mdoc_list type
; /* -tag, -enum, etc. */
123 int comp
; /* -compact */
124 size_t ncols
; /* -column arg count */
125 const char **cols
; /* -column val ptr */
126 int count
; /* -enum counter */
130 enum mdoc_font font
; /* font */
134 enum mdoc_auth auth
; /* -split, etc. */
138 int quote_T
; /* whether to quote %T */
142 * Consists of normalised node arguments. These should be used instead
143 * of iterating through the mdoc_arg pointers of a node: defaults are
151 struct roff_node
*Es
;
155 /* Names of macro args. Index is enum mdocargt. */
156 extern const char *const *mdoc_argnames
;
158 void mdoc_validate(struct roff_man
*);