sync some small XML parser fixes - webdump - HTML to plain-text converter for webpages (HTM) git clone git://git.codemadness.org/webdump (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit c0d1a46e3d5e9d291cb731bec2f0511553d87b48 (DIR) parent 011b4885a533382d98f1aee6cb9619e280c99947 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 18 Sep 2023 19:08:01 +0200 sync some small XML parser fixes Diffstat: M xml.c | 4 ++-- M xml.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) --- (DIR) diff --git a/xml.c b/xml.c @@ -370,7 +370,7 @@ xml_parse(XMLParser *x) x->taglen = 1; x->isshorttag = isend = 0; - /* treat processing instruction as shorttag, don't strip "?" prefix. */ + /* treat processing instruction as short tag, don't strip "?" prefix. */ if (c == '?') { x->isshorttag = 1; } else if (c == '/') { @@ -399,7 +399,7 @@ xml_parse(XMLParser *x) if (x->xmltagstartparsed) x->xmltagstartparsed(x, x->tag, x->taglen, x->isshorttag); } - /* call tagend for shortform or processing instruction */ + /* call tagend for short tag or processing instruction */ if (x->isshorttag) { if (x->xmltagend) x->xmltagend(x, x->tag, x->taglen, x->isshorttag); (DIR) diff --git a/xml.h b/xml.h @@ -1,5 +1,5 @@ -#ifndef _XML_H_ -#define _XML_H_ +#ifndef XML_H +#define XML_H #include <stdio.h> @@ -36,7 +36,7 @@ typedef struct xmlparser { /* current tag */ char tag[1024]; size_t taglen; - /* current tag is in shortform ? <tag /> */ + /* current tag is in short tag ? <tag /> */ int isshorttag; /* current attribute name */ char name[1024];