]>
git.cameronkatri.com Git - mandoc.git/blob - ml.h
1 /* $Id: ml.h,v 1.10 2008/12/08 12:46:28 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.
33 int (*ml_begin
)(struct md_mbuf
*,
34 const struct md_args
*,
36 const char *, const char *,
37 enum roffmsec
, const char *);
38 int (*ml_end
)(struct md_mbuf
*,
39 const struct md_args
*);
40 ssize_t (*ml_beginstring
)(struct md_mbuf
*,
41 const struct md_args
*,
42 const char *, size_t);
43 ssize_t (*ml_endstring
)(struct md_mbuf
*,
44 const struct md_args
*,
45 const char *, size_t);
46 ssize_t (*ml_endtag
)(struct md_mbuf
*,
47 void *, const struct md_args
*,
49 ssize_t (*ml_begintag
)(struct md_mbuf
*,
50 void *, const struct md_args
*,
52 const int *, const char **);
53 int (*ml_alloc
)(void **);
54 void (*ml_free
)(void *);
59 int ml_putstring(struct md_mbuf
*,
60 const char *, size_t *);
61 int ml_nputstring(struct md_mbuf
*,
62 const char *, size_t, size_t *);
63 int ml_nputs(struct md_mbuf
*,
64 const char *, size_t, size_t *);
65 int ml_puts(struct md_mbuf
*, const char *, size_t *);
66 int ml_putchars(struct md_mbuf
*,
67 char, size_t, size_t *);
68 char *ml_literal(int, const int *,
69 const char **, const char **);
70 char *ml_section(enum roffmsec
);
72 struct md_mlg
*mlg_alloc(const struct md_args
*,
73 const struct md_rbuf
*, struct md_mbuf
*,
74 const struct ml_cbs
*);
75 int mlg_exit(struct md_mlg
*, int);
76 int mlg_line(struct md_mlg
*, char *);