=================================================================== RCS file: /cvs/mandoc/Attic/xml.c,v retrieving revision 1.11 retrieving revision 1.14 diff -u -p -r1.11 -r1.14 --- mandoc/Attic/xml.c 2008/12/03 19:21:58 1.11 +++ mandoc/Attic/xml.c 2008/12/04 23:10:51 1.14 @@ -1,4 +1,4 @@ -/* $Id: xml.c,v 1.11 2008/12/03 19:21:58 kristaps Exp $ */ +/* $Id: xml.c,v 1.14 2008/12/04 23:10:51 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -31,14 +31,21 @@ static ssize_t xml_begintag(struct md_mbuf *, const struct md_args *, enum md_ns, int, const int *, const char **); -static int xml_begin(struct md_mbuf *, - const struct md_args *); +static int xml_begin(struct md_mbuf *, + const struct md_args *, + const struct tm *, + const char *, const char *, + const char *, const char *); static int xml_end(struct md_mbuf *, const struct md_args *); +/* ARGSUSED */ static int -xml_begin(struct md_mbuf *mbuf, const struct md_args *args) +xml_begin(struct md_mbuf *mbuf, const struct md_args *args, + const struct tm *tm, const char *os, + const char *title, const char *section, + const char *vol) { size_t res; @@ -54,6 +61,7 @@ xml_begin(struct md_mbuf *mbuf, const struct md_args * } +/* ARGSUSED */ static int xml_end(struct md_mbuf *mbuf, const struct md_args *args) { @@ -67,6 +75,7 @@ xml_end(struct md_mbuf *mbuf, const struct md_args *ar } +/* ARGSUSED */ static ssize_t xml_begintag(struct md_mbuf *mbuf, const struct md_args *args, enum md_ns ns, int tok, @@ -74,6 +83,8 @@ xml_begintag(struct md_mbuf *mbuf, const struct md_arg { size_t res; + /* FIXME: doesn't print arguments! */ + res = 0; switch (ns) { @@ -97,14 +108,14 @@ xml_begintag(struct md_mbuf *mbuf, const struct md_arg break; } - if ( ! ml_nputs(mbuf, toknames[tok], - strlen(toknames[tok]), &res)) + if ( ! ml_puts(mbuf, toknames[tok], &res)) return(-1); return((ssize_t)res); } +/* ARGSUSED */ static ssize_t xml_endtag(struct md_mbuf *mbuf, const struct md_args *args, enum md_ns ns, int tok) @@ -134,8 +145,7 @@ xml_endtag(struct md_mbuf *mbuf, const struct md_args break; } - if ( ! ml_nputs(mbuf, toknames[tok], - strlen(toknames[tok]), &res)) + if ( ! ml_puts(mbuf, toknames[tok], &res)) return(-1); return((ssize_t)res);