Annotation of mandoc/private.h, Revision 1.41
1.41 ! kristaps 1: /* $Id: roff.h,v 1.10 2008/12/10 17:31:57 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.36 kristaps 30: };
31:
1.41 ! kristaps 32: struct mdoc_macro {
! 33: int (*fp)(struct mdoc *, int, int, int *, char *);
! 34: int flags;
! 35: #define MDOC_CALLABLE (1 << 0)
! 36: #define MDOC_EXPLICIT (1 << 1)
1.8 kristaps 37: };
1.5 kristaps 38:
1.41 ! kristaps 39: extern const struct mdoc_macro *const mdoc_macros;
1.24 kristaps 40:
1.1 kristaps 41: __BEGIN_DECLS
42:
1.41 ! kristaps 43: int mdoc_err(struct mdoc *, int, int, enum mdoc_err);
! 44: int mdoc_warn(struct mdoc *, int, int, enum mdoc_warn);
! 45: void mdoc_msg(struct mdoc *, int, const char *, ...);
! 46:
! 47: int mdoc_macro(struct mdoc *, int, int, int *, char *);
! 48: int mdoc_find(const struct mdoc *, const char *);
! 49:
! 50: void mdoc_word_alloc(struct mdoc *, int, const char *);
! 51: void mdoc_elem_alloc(struct mdoc *, int, int,
! 52: size_t, const struct mdoc_arg *,
! 53: size_t, const char **);
! 54: void mdoc_block_alloc(struct mdoc *, int, int,
! 55: size_t, const struct mdoc_arg *);
! 56: void mdoc_head_alloc(struct mdoc *,
! 57: int, int, size_t, const char **);
! 58: void mdoc_body_alloc(struct mdoc *, int, int);
! 59:
! 60: void mdoc_node_free(struct mdoc_node *);
! 61:
! 62: void mdoc_sibling(struct mdoc *, int, struct mdoc_node **,
! 63: struct mdoc_node **, struct mdoc_node *);
! 64:
! 65: void *mdoc_hash_alloc(void);
! 66: int mdoc_hash_find(const void *, const char *);
! 67: void mdoc_hash_free(void *);
1.35 kristaps 68:
1.1 kristaps 69: __END_DECLS
70:
71: #endif /*!PRIVATE_H*/
CVSweb