]>
git.cameronkatri.com Git - mandoc.git/blob - mandoc.h
1 /* $Id: mandoc.h,v 1.6 2010/05/24 01:41:31 schwarze Exp $ */
3 * Copyright (c) 2010 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.
24 MANDOCERR_UPPERCASE
, /* text should be uppercase */
25 MANDOCERR_SECOOO
, /* sections out of conentional order */
26 MANDOCERR_SECREP
, /* section name repeats */
27 MANDOCERR_PROLOGOOO
, /* out of order prologue */
28 MANDOCERR_PROLOGREP
, /* repeated prologue entry */
29 MANDOCERR_LISTFIRST
, /* list type must come first */
30 MANDOCERR_COLUMNS
, /* column syntax is inconsistent */
31 MANDOCERR_BADSTANDARD
, /* bad standard */
32 MANDOCERR_BADLIB
, /* bad library */
33 MANDOCERR_BADESCAPE
, /* bad escape sequence */
34 MANDOCERR_BADQUOTE
, /* unterminated quoted string */
35 MANDOCERR_NOWIDTHARG
, /* argument requires the width argument */
36 MANDOCERR_WIDTHARG
, /* superfluous width argument */
37 MANDOCERR_BADDATE
, /* bad date argument */
38 MANDOCERR_BADWIDTH
, /* bad width argument */
39 MANDOCERR_BADMSEC
, /* unknown manual sction */
40 MANDOCERR_SECMSEC
, /* section not in conventional manual section */
41 MANDOCERR_EOLNSPACE
, /* end of line whitespace */
42 MANDOCERR_SCOPEEXIT
, /* scope open on exit */
43 #define MANDOCERR_WARNING MANDOCERR_SCOPEEXIT
45 MANDOCERR_NAMESECFIRST
, /* NAME section must come first */
46 MANDOCERR_BADBOOL
, /* bad Boolean value */
47 MANDOCERR_CHILD
, /* child violates parent syntax */
48 MANDOCERR_BADATT
, /* bad AT&T symbol */
49 MANDOCERR_LISTREP
, /* list type repeated */
50 MANDOCERR_DISPREP
, /* display type repeated */
51 MANDOCERR_ARGVREP
, /* argument repeated */
52 MANDOCERR_NONAME
, /* manual name not yet set */
53 MANDOCERR_MACROOBS
, /* obsolete macro ignored */
54 MANDOCERR_MACROEMPTY
, /* empty macro ignored */
55 MANDOCERR_BADBODY
, /* macro not allowed in body */
56 MANDOCERR_BADPROLOG
, /* macro not allowed in prologue */
57 MANDOCERR_BADCHAR
, /* bad character */
58 MANDOCERR_BADNAMESEC
, /* bad NAME section contents */
59 MANDOCERR_NOBLANKLN
, /* no blank lines */
60 MANDOCERR_NOTEXT
, /* no text in this context */
61 MANDOCERR_BADCOMMENT
, /* bad comment style */
62 MANDOCERR_MACRO
, /* unknown macro will be lost */
63 MANDOCERR_LINESCOPE
, /* line scope broken */
64 MANDOCERR_SCOPE
, /* scope broken */
65 MANDOCERR_ARGCOUNT
, /* argument count wrong */
66 MANDOCERR_NOSCOPE
, /* request scope close w/none open */
67 MANDOCERR_SCOPEREP
, /* scope already open */
68 /* FIXME: merge following with MANDOCERR_ARGCOUNT */
69 MANDOCERR_NOARGS
, /* macro requires line argument(s) */
70 MANDOCERR_NOBODY
, /* macro requires body argument(s) */
71 MANDOCERR_NOARGV
, /* macro requires argument(s) */
72 MANDOCERR_NOTITLE
, /* no title in document */
73 MANDOCERR_ARGSLOST
, /* line argument(s) will be lost */
74 MANDOCERR_BODYLOST
, /* body argument(s) will be lost */
75 #define MANDOCERR_ERROR MANDOCERR_BODYLOST
77 /* FIXME: this should be a MANDOCERR_ERROR */
78 MANDOCERR_FONTTYPE
, /* missing font type */
79 /* FIXME: this should be a MANDOCERR_ERROR */
80 MANDOCERR_DISPTYPE
, /* missing display type */
81 /* FIXME: this should be a MANDOCERR_ERROR */
82 MANDOCERR_LISTTYPE
, /* missing list type */
83 /* FIXME: this should be a MANDOCERR_ERROR */
84 MANDOCERR_NESTEDDISP
, /* displays may not be nested */
85 MANDOCERR_SYNTNOSCOPE
, /* request scope close w/none open */
86 MANDOCERR_SYNTSCOPE
, /* scope broken, syntax violated */
87 MANDOCERR_SYNTLINESCOPE
, /* line scope broken, syntax violated */
88 MANDOCERR_SYNTARGVCOUNT
, /* argument count wrong, violates syntax */
89 MANDOCERR_SYNTCHILD
, /* child violates parent syntax */
90 MANDOCERR_SYNTARGCOUNT
, /* argument count wrong, violates syntax */
91 MANDOCERR_NODOCBODY
, /* no document body */
92 MANDOCERR_NODOCPROLOG
, /* no document prologue */
93 MANDOCERR_UTSNAME
, /* utsname() system call failed */
94 MANDOCERR_MEM
, /* memory exhausted */
95 #define MANDOCERR_FATAL MANDOCERR_MEM
100 typedef int (*mandocmsg
)(enum mandocerr
,
101 void *, int, int, const char *);