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

Annotation of mandoc/private.h, Revision 1.42

1.42    ! kristaps    1: /* $Id: private.h,v 1.41 2008/12/15 01:54:58 kristaps Exp $ */
1.1       kristaps    2: /*
                      3:  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
                      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
                      7:  * above copyright notice and this permission notice appear in all
                      8:  * copies.
                      9:  *
                     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.
                     18:  */
                     19: #ifndef PRIVATE_H
                     20: #define PRIVATE_H
                     21:
1.41      kristaps   22: #include "mdoc.h"
1.27      kristaps   23:
1.41      kristaps   24: struct mdoc {
                     25:        void             *data;
                     26:        struct mdoc_cb    cb;
                     27:        void             *htab;
                     28:        struct mdoc_node *last;
                     29:        struct mdoc_node *first;
1.42    ! kristaps   30:
        !            31:        enum mdoc_sec     sec_lastn;
        !            32:        enum mdoc_sec     sec_last;
1.36      kristaps   33: };
                     34:
1.41      kristaps   35: struct mdoc_macro {
                     36:        int     (*fp)(struct mdoc *, int, int, int *, char *);
                     37:        int       flags;
                     38: #define        MDOC_CALLABLE   (1 << 0)
                     39: #define        MDOC_EXPLICIT   (1 << 1)
1.8       kristaps   40: };
1.5       kristaps   41:
1.41      kristaps   42: extern const struct mdoc_macro *const mdoc_macros;
1.24      kristaps   43:
1.1       kristaps   44: __BEGIN_DECLS
                     45:
1.41      kristaps   46: int              mdoc_err(struct mdoc *, int, int, enum mdoc_err);
                     47: int              mdoc_warn(struct mdoc *, int, int, enum mdoc_warn);
                     48: void             mdoc_msg(struct mdoc *, int, const char *, ...);
                     49: int              mdoc_macro(struct mdoc *, int, int, int *, char *);
                     50: int              mdoc_find(const struct mdoc *, const char *);
                     51: void             mdoc_word_alloc(struct mdoc *, int, const char *);
                     52: void             mdoc_elem_alloc(struct mdoc *, int, int,
                     53:                        size_t, const struct mdoc_arg *,
                     54:                        size_t, const char **);
                     55: void             mdoc_block_alloc(struct mdoc *, int, int,
                     56:                        size_t, const struct mdoc_arg *);
                     57: void             mdoc_head_alloc(struct mdoc *,
                     58:                        int, int, size_t, const char **);
                     59: void             mdoc_body_alloc(struct mdoc *, int, int);
                     60: void             mdoc_node_free(struct mdoc_node *);
                     61: void             mdoc_sibling(struct mdoc *, int, struct mdoc_node **,
                     62:                        struct mdoc_node **, struct mdoc_node *);
                     63: void            *mdoc_hash_alloc(void);
                     64: int              mdoc_hash_find(const void *, const char *);
                     65: void             mdoc_hash_free(void *);
1.42    ! kristaps   66: int              mdoc_isdelim(const char *);
1.35      kristaps   67:
1.1       kristaps   68: __END_DECLS
                     69:
                     70: #endif /*!PRIVATE_H*/

CVSweb