diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 17:28:36 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 17:28:36 +0000 |
commit | afd3f3a3f381e6bd5e6803a730f57302dd9234d2 (patch) | |
tree | 8cc8dbdb77f13ddbce6fe2a22b8d3284143adbc5 /libmandoc.h | |
parent | 4534f390e036ac23ee5e8f0373ffb9f4d785a17d (diff) | |
download | mandoc-afd3f3a3f381e6bd5e6803a730f57302dd9234d2.tar.gz |
Unify {mdoc,man}_{alloc,reset,free}() into roff_man_{alloc,reset,free}().
Minus 80 lines of code, no functional change.
Written on the train from Koeln to Wolfsburg returning from p2k15.
Diffstat (limited to 'libmandoc.h')
-rw-r--r-- | libmandoc.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libmandoc.h b/libmandoc.h index c46fa691..f91c8042 100644 --- a/libmandoc.h +++ b/libmandoc.h @@ -40,6 +40,7 @@ struct tbl_span; struct eqn; struct roff; struct roff_man; +struct roff_node; void mandoc_msg(enum mandocerr, struct mparse *, int, int, const char *); @@ -54,21 +55,15 @@ int mandoc_eos(const char *, size_t); int mandoc_strntoi(const char *, size_t, int); const char *mandoc_a2msec(const char*); -void mdoc_free(struct roff_man *); -struct roff_man *mdoc_alloc(struct roff *, struct mparse *, - const char *, int); -void mdoc_reset(struct roff_man *); void mdoc_hash_init(void); +void mdoc_node_delete(struct roff_man *, struct roff_node *); int mdoc_parseln(struct roff_man *, int, char *, int); void mdoc_endparse(struct roff_man *); void mdoc_addspan(struct roff_man *, const struct tbl_span *); void mdoc_addeqn(struct roff_man *, const struct eqn *); -void man_free(struct roff_man *); -struct roff_man *man_alloc(struct roff *, struct mparse *, - const char *, int); -void man_reset(struct roff_man *); void man_hash_init(void); +void man_node_delete(struct roff_man *, struct roff_node *); int man_parseln(struct roff_man *, int, char *, int); void man_endparse(struct roff_man *); void man_addspan(struct roff_man *, const struct tbl_span *); @@ -81,6 +76,10 @@ int preconv_encode(struct buf *, size_t *, void roff_free(struct roff *); struct roff *roff_alloc(struct mparse *, const struct mchars *, int); void roff_reset(struct roff *); +void roff_man_free(struct roff_man *); +struct roff_man *roff_man_alloc(struct roff *, struct mparse *, + const char *, int); +void roff_man_reset(struct roff_man *); enum rofferr roff_parseln(struct roff *, int, struct buf *, int *); void roff_endparse(struct roff *); void roff_setreg(struct roff *, const char *, int, char sign); |