]>
git.cameronkatri.com Git - mandoc.git/blob - ml.h
1994ec327a0449078a6797a785c8f5ab9510eaa8
1 /* $Id: ml.h,v 1.6 2008/12/05 17:43:14 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.
32 typedef int (*ml_begin
)(struct md_mbuf
*, const struct md_args
*,
33 const struct tm
*, const char *, const char *,
34 const char *, const char *);
35 typedef int (*ml_end
)(struct md_mbuf
*,
36 const struct md_args
*);
37 typedef ssize_t (*ml_endtag
)(struct md_mbuf
*, void *,
38 const struct md_args
*, enum md_ns
, int);
39 typedef ssize_t (*ml_begintag
)(struct md_mbuf
*, void *,
40 const struct md_args
*, enum md_ns
, int,
41 const int *, const char **);
45 int ml_putstring(struct md_mbuf
*,
46 const char *, size_t *);
47 int ml_nputstring(struct md_mbuf
*,
48 const char *, size_t, size_t *);
49 int ml_nputs(struct md_mbuf
*,
50 const char *, size_t, size_t *);
51 int ml_puts(struct md_mbuf
*, const char *, size_t *);
52 int ml_putchars(struct md_mbuf
*,
53 char, size_t, size_t *);
55 struct md_mlg
*mlg_alloc(const struct md_args
*, void *,
56 const struct md_rbuf
*, struct md_mbuf
*,
57 ml_begintag
, ml_endtag
, ml_begin
, ml_end
);
58 int mlg_exit(struct md_mlg
*, int);
59 int mlg_line(struct md_mlg
*, char *);