=================================================================== RCS file: /cvs/mandoc/Attic/ml.h,v retrieving revision 1.5 retrieving revision 1.10 diff -u -p -r1.5 -r1.10 --- mandoc/Attic/ml.h 2008/12/05 11:28:17 1.5 +++ mandoc/Attic/ml.h 2008/12/08 12:46:28 1.10 @@ -1,4 +1,4 @@ -/* $Id: ml.h,v 1.5 2008/12/05 11:28:17 kristaps Exp $ */ +/* $Id: ml.h,v 1.10 2008/12/08 12:46:28 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -29,16 +29,30 @@ enum md_ns { MD_NS_DEFAULT, }; -typedef 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 *, +struct ml_cbs { + int (*ml_begin)(struct md_mbuf *, + const struct md_args *, + const struct tm *, + const char *, const char *, + enum roffmsec, const char *); + int (*ml_end)(struct md_mbuf *, const struct md_args *); -typedef ssize_t (*ml_endtag)(struct md_mbuf *, - const struct md_args *, enum md_ns, int); -typedef ssize_t (*ml_begintag)(struct md_mbuf *, - const struct md_args *, enum md_ns, int, + ssize_t (*ml_beginstring)(struct md_mbuf *, + const struct md_args *, + const char *, size_t); + ssize_t (*ml_endstring)(struct md_mbuf *, + const struct md_args *, + const char *, size_t); + 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 @@ -51,10 +65,13 @@ int ml_nputs(struct md_mbuf *, int ml_puts(struct md_mbuf *, const char *, size_t *); int ml_putchars(struct md_mbuf *, char, size_t, size_t *); +char *ml_literal(int, const int *, + const char **, const char **); +char *ml_section(enum roffmsec); 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 *);