[BACK]Return to mandoc.h CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/mandoc.h, Revision 1.12

1.12    ! kristaps    1: /*     $Id: mandoc.h,v 1.11 2010/06/12 10:09:19 kristaps Exp $ */
1.1       kristaps    2: /*
                      3:  * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
                      4:  *
                      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.
                      8:  *
                      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.
                     16:  */
                     17: #ifndef MANDOC_H
                     18: #define MANDOC_H
1.7       kristaps   19:
                     20: #define ASCII_NBRSP     31  /* non-breaking space */
                     21: #define        ASCII_HYPH       30  /* breakable hyphen */
                     22:
1.1       kristaps   23:
                     24: __BEGIN_DECLS
                     25:
                     26: enum   mandocerr {
                     27:        MANDOCERR_OK,
1.5       kristaps   28:        MANDOCERR_UPPERCASE, /* text should be uppercase */
1.9       kristaps   29:        MANDOCERR_SECOOO, /* sections out of conventional order */
1.5       kristaps   30:        MANDOCERR_SECREP, /* section name repeats */
                     31:        MANDOCERR_PROLOGOOO, /* out of order prologue */
                     32:        MANDOCERR_PROLOGREP, /* repeated prologue entry */
                     33:        MANDOCERR_LISTFIRST, /* list type must come first */
                     34:        MANDOCERR_BADSTANDARD, /* bad standard */
                     35:        MANDOCERR_BADLIB, /* bad library */
                     36:        MANDOCERR_BADESCAPE, /* bad escape sequence */
                     37:        MANDOCERR_BADQUOTE, /* unterminated quoted string */
                     38:        MANDOCERR_NOWIDTHARG, /* argument requires the width argument */
1.12    ! kristaps   39:        /* FIXME: merge with MANDOCERR_IGNARGV. */
1.5       kristaps   40:        MANDOCERR_WIDTHARG, /* superfluous width argument */
1.12    ! kristaps   41:        MANDOCERR_IGNARGV, /* macro ignoring argv */
1.5       kristaps   42:        MANDOCERR_BADDATE, /* bad date argument */
                     43:        MANDOCERR_BADWIDTH, /* bad width argument */
1.9       kristaps   44:        MANDOCERR_BADMSEC, /* unknown manual section */
1.5       kristaps   45:        MANDOCERR_SECMSEC, /* section not in conventional manual section */
                     46:        MANDOCERR_EOLNSPACE, /* end of line whitespace */
1.1       kristaps   47:        MANDOCERR_SCOPEEXIT, /* scope open on exit */
1.4       kristaps   48: #define        MANDOCERR_WARNING       MANDOCERR_SCOPEEXIT
                     49:
1.5       kristaps   50:        MANDOCERR_NAMESECFIRST, /* NAME section must come first */
                     51:        MANDOCERR_BADBOOL, /* bad Boolean value */
                     52:        MANDOCERR_CHILD, /* child violates parent syntax */
                     53:        MANDOCERR_BADATT, /* bad AT&T symbol */
                     54:        MANDOCERR_LISTREP, /* list type repeated */
                     55:        MANDOCERR_DISPREP, /* display type repeated */
                     56:        MANDOCERR_ARGVREP, /* argument repeated */
                     57:        MANDOCERR_NONAME, /* manual name not yet set */
                     58:        MANDOCERR_MACROOBS, /* obsolete macro ignored */
                     59:        MANDOCERR_MACROEMPTY, /* empty macro ignored */
                     60:        MANDOCERR_BADBODY, /* macro not allowed in body */
                     61:        MANDOCERR_BADPROLOG, /* macro not allowed in prologue */
                     62:        MANDOCERR_BADCHAR, /* bad character */
                     63:        MANDOCERR_BADNAMESEC, /* bad NAME section contents */
                     64:        MANDOCERR_NOBLANKLN, /* no blank lines */
                     65:        MANDOCERR_NOTEXT, /* no text in this context */
                     66:        MANDOCERR_BADCOMMENT, /* bad comment style */
                     67:        MANDOCERR_MACRO, /* unknown macro will be lost */
                     68:        MANDOCERR_LINESCOPE, /* line scope broken */
                     69:        MANDOCERR_SCOPE, /* scope broken */
                     70:        MANDOCERR_ARGCOUNT, /* argument count wrong */
1.1       kristaps   71:        MANDOCERR_NOSCOPE, /* request scope close w/none open */
1.5       kristaps   72:        MANDOCERR_SCOPEREP, /* scope already open */
                     73:        /* FIXME: merge following with MANDOCERR_ARGCOUNT */
                     74:        MANDOCERR_NOARGS, /* macro requires line argument(s) */
                     75:        MANDOCERR_NOBODY, /* macro requires body argument(s) */
                     76:        MANDOCERR_NOARGV, /* macro requires argument(s) */
                     77:        MANDOCERR_NOTITLE, /* no title in document */
1.10      kristaps   78:        MANDOCERR_LISTTYPE, /* missing list type */
1.11      kristaps   79:        MANDOCERR_DISPTYPE, /* missing display type */
1.5       kristaps   80:        MANDOCERR_ARGSLOST, /* line argument(s) will be lost */
                     81:        MANDOCERR_BODYLOST, /* body argument(s) will be lost */
1.6       schwarze   82: #define        MANDOCERR_ERROR         MANDOCERR_BODYLOST
1.1       kristaps   83:
1.8       kristaps   84:        MANDOCERR_COLUMNS, /* column syntax is inconsistent */
1.5       kristaps   85:        /* FIXME: this should be a MANDOCERR_ERROR */
                     86:        MANDOCERR_FONTTYPE, /* missing font type */
                     87:        /* FIXME: this should be a MANDOCERR_ERROR */
                     88:        MANDOCERR_NESTEDDISP, /* displays may not be nested */
1.11      kristaps   89:        MANDOCERR_BADDISP, /* unsupported display type */
1.5       kristaps   90:        MANDOCERR_SYNTNOSCOPE, /* request scope close w/none open */
                     91:        MANDOCERR_SYNTSCOPE, /* scope broken, syntax violated */
                     92:        MANDOCERR_SYNTLINESCOPE, /* line scope broken, syntax violated */
                     93:        MANDOCERR_SYNTARGVCOUNT, /* argument count wrong, violates syntax */
                     94:        MANDOCERR_SYNTCHILD, /* child violates parent syntax */
                     95:        MANDOCERR_SYNTARGCOUNT, /* argument count wrong, violates syntax */
                     96:        MANDOCERR_NODOCBODY, /* no document body */
                     97:        MANDOCERR_NODOCPROLOG, /* no document prologue */
                     98:        MANDOCERR_UTSNAME, /* utsname() system call failed */
1.1       kristaps   99:        MANDOCERR_MEM, /* memory exhausted */
                    100: #define        MANDOCERR_FATAL         MANDOCERR_MEM
                    101:
                    102:        MANDOCERR_MAX
                    103: };
                    104:
                    105: typedef        int     (*mandocmsg)(enum mandocerr,
                    106:                        void *, int, int, const char *);
                    107:
                    108: __END_DECLS
                    109:
                    110: #endif /*!MANDOC_H*/

CVSweb