]>
git.cameronkatri.com Git - mandoc.git/blob - mdoc.h
1 /* $Id: mdoc.h,v 1.11 2009/01/01 20:40:16 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 8
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
195 ERR_SYNTAX_QUOTE
, /* NOTUSED */
212 ERR_SEC_PROLOGUE_REP
,
356 #define META_TITLE_SZ (64)
357 char title
[META_TITLE_SZ
];
358 #define META_OS_SZ (64)
369 struct mdoc_arg
*argv
;
387 struct mdoc_arg
*argv
;
391 struct mdoc_text text
;
392 struct mdoc_elem elem
;
393 struct mdoc_body body
;
394 struct mdoc_head head
;
395 struct mdoc_block block
;
399 struct mdoc_node
*parent
;
400 struct mdoc_node
*child
;
401 struct mdoc_node
*next
;
402 struct mdoc_node
*prev
;
404 union mdoc_data data
;
408 int (*mdoc_err
)(void *, int, int, enum mdoc_err
);
409 int (*mdoc_warn
)(void *, int, int, enum mdoc_warn
);
410 void (*mdoc_msg
)(void *, int, const char *);
413 extern const char *const *mdoc_macronames
;
414 extern const char *const *mdoc_argnames
;
420 void mdoc_free(struct mdoc
*);
421 struct mdoc
*mdoc_alloc(void *data
, const struct mdoc_cb
*);
422 int mdoc_parseln(struct mdoc
*, char *buf
);
423 const struct mdoc_node
424 *mdoc_result(struct mdoc
*);