summaryrefslogtreecommitdiffstatshomepage
path: root/ml.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-05 19:45:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-05 19:45:15 +0000
commit04a9a9421c92d037b140f8d5d2c2b7a496b95f8f (patch)
treeea14566329e07168690b36e9665245c25dc98806 /ml.h
parent0b88f4946af1f4e8139f42758323aee89474bdc9 (diff)
downloadmandoc-04a9a9421c92d037b140f8d5d2c2b7a496b95f8f.tar.gz
mandoc-04a9a9421c92d037b140f8d5d2c2b7a496b95f8f.tar.zst
mandoc-04a9a9421c92d037b140f8d5d2c2b7a496b95f8f.zip
*** empty log message ***
Diffstat (limited to 'ml.h')
-rw-r--r--ml.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/ml.h b/ml.h
index 1994ec32..c375a671 100644
--- a/ml.h
+++ b/ml.h
@@ -1,4 +1,4 @@
-/* $Id: ml.h,v 1.6 2008/12/05 17:43:14 kristaps Exp $ */
+/* $Id: ml.h,v 1.7 2008/12/05 19:45:15 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -29,16 +29,24 @@ enum md_ns {
MD_NS_DEFAULT,
};
-typedef int (*ml_begin)(struct md_mbuf *, const struct md_args *,
- const struct tm *, const char *, const char *,
+struct ml_cbs {
+ int (*ml_begin)(struct md_mbuf *,
+ const struct md_args *,
+ const struct tm *,
+ const char *, const char *,
const char *, const char *);
-typedef int (*ml_end)(struct md_mbuf *,
+ int (*ml_end)(struct md_mbuf *,
const struct md_args *);
-typedef ssize_t (*ml_endtag)(struct md_mbuf *, void *,
- const struct md_args *, enum md_ns, int);
-typedef ssize_t (*ml_begintag)(struct md_mbuf *, void *,
- const struct md_args *, enum md_ns, int,
+ ssize_t (*ml_endtag)(struct md_mbuf *,
+ void *, const struct md_args *,
+ enum md_ns, int);
+ ssize_t (*ml_begintag)(struct md_mbuf *,
+ void *, const struct md_args *,
+ enum md_ns, int,
const int *, const char **);
+ int (*ml_alloc)(void **);
+ void (*ml_free)(void *);
+};
__BEGIN_DECLS
@@ -52,9 +60,9 @@ int ml_puts(struct md_mbuf *, const char *, size_t *);
int ml_putchars(struct md_mbuf *,
char, size_t, size_t *);
-struct md_mlg *mlg_alloc(const struct md_args *, void *,
+struct md_mlg *mlg_alloc(const struct md_args *,
const struct md_rbuf *, struct md_mbuf *,
- ml_begintag, ml_endtag, ml_begin, ml_end);
+ const struct ml_cbs *);
int mlg_exit(struct md_mlg *, int);
int mlg_line(struct md_mlg *, char *);