]>
git.cameronkatri.com Git - mandoc.git/blob - mdoc.h
1 /* $Id: mdoc.h,v 1.2 2008/12/15 03:13:01 kristaps Exp $ */
3 * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the
7 * above copyright notice and this permission notice appear in all
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
22 #define MDOC_LINEARG_MAX 9
133 #define MDOC_Nosplit 1
134 #define MDOC_Ragged 2
135 #define MDOC_Unfilled 3
136 #define MDOC_Literal 4
138 #define MDOC_Offset 6
139 #define MDOC_Bullet 7
141 #define MDOC_Hyphen 9
147 #define MDOC_Ohang 15
148 #define MDOC_Inset 16
149 #define MDOC_Column 17
150 #define MDOC_Width 18
151 #define MDOC_Compact 19
153 #define MDOC_p1003_1_88 21
154 #define MDOC_p1003_1_90 22
155 #define MDOC_p1003_1_96 23
156 #define MDOC_p1003_1_2001 24
157 #define MDOC_p1003_1_2004 25
158 #define MDOC_p1003_1 26
159 #define MDOC_p1003_1b 27
160 #define MDOC_p1003_1b_93 28
161 #define MDOC_p1003_1c_95 29
162 #define MDOC_p1003_1g_2000 30
163 #define MDOC_p1003_2_92 31
164 #define MDOC_p1387_2_95 32
165 #define MDOC_p1003_2 33
166 #define MDOC_p1387_2 34
167 #define MDOC_isoC_90 35
168 #define MDOC_isoC_amd1 36
169 #define MDOC_isoC_tcor1 37
170 #define MDOC_isoC_tcor2 38
171 #define MDOC_isoC_99 39
172 #define MDOC_ansiC 40
173 #define MDOC_ansiC_89 41
174 #define MDOC_ansiC_99 42
175 #define MDOC_ieee754 43
176 #define MDOC_iso8802_3 44
179 #define MDOC_xpg4_2 47
180 #define MDOC_xpg4_3 48
185 #define MDOC_xns5_2d2_0 53
186 #define MDOC_xcurses4_2 54
187 #define MDOC_susv2 55
188 #define MDOC_susv3 56
189 #define MDOC_svid4 57
190 #define MDOC_Filled 58
191 #define MDOC_Words 59
192 #define MDOC_ARG_MAX 60
321 struct mdoc_arg
*argv
;
339 struct mdoc_arg
*argv
;
343 struct mdoc_text text
;
344 struct mdoc_elem elem
;
345 struct mdoc_body body
;
346 struct mdoc_head head
;
347 struct mdoc_block block
;
351 struct mdoc_node
*parent
;
352 struct mdoc_node
*child
;
353 struct mdoc_node
*next
;
355 union mdoc_data data
;
359 int (*mdoc_err
)(void *, int, int, enum mdoc_err
);
360 int (*mdoc_warn
)(void *, int, int, enum mdoc_warn
);
361 void (*mdoc_msg
)(void *, int, const char *);
364 extern const char *const *mdoc_macronames
;
365 extern const char *const *mdoc_argnames
;
371 void mdoc_free(struct mdoc
*);
372 struct mdoc
*mdoc_alloc(void *data
, const struct mdoc_cb
*);
373 int mdoc_parseln(struct mdoc
*, char *buf
);
374 const struct mdoc_node
375 *mdoc_result(struct mdoc
*);