X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/ff990a7507fa64271846971250247ca30bd62dc5..7d393d45bdff6d0d4a4742e71d0c6997150410be:/xml.c diff --git a/xml.c b/xml.c index 16582027..8d73301b 100644 --- a/xml.c +++ b/xml.c @@ -1,4 +1,4 @@ -/* $Id: xml.c,v 1.18 2008/12/07 21:30:49 kristaps Exp $ */ +/* $Id: xml.c,v 1.23 2008/12/10 10:43:57 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -20,7 +20,6 @@ #include #include -#include "libmdocml.h" #include "private.h" #include "ml.h" @@ -44,7 +43,7 @@ static int xml_begin(struct md_mbuf *, const struct md_args *, const struct tm *, const char *, const char *, - const char *, const char *); + enum roffmsec, enum roffvol); static int xml_end(struct md_mbuf *, const struct md_args *); static ssize_t xml_printtagname(struct md_mbuf *, @@ -69,6 +68,8 @@ xml_printtagargs(struct md_mbuf *mbuf, const int *argc, if ( ! ml_nputs(mbuf, " ", 1, &res)) return(-1); + /* FIXME: should puke on some, no? */ + if ( ! ml_puts(mbuf, tokargnames[c], &res)) return(-1); if ( ! ml_nputs(mbuf, "=\"", 2, &res)) @@ -123,15 +124,15 @@ xml_printtagname(struct md_mbuf *mbuf, enum md_ns ns, int tok) static int 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) + const char *title, enum roffmsec sec, enum roffvol vol) { if ( ! ml_puts(mbuf, "\n", NULL)) return(0); return(ml_puts(mbuf, "", NULL)); } @@ -198,6 +199,7 @@ int xml_alloc(void **p) { + *p = NULL; return(1); }