summaryrefslogtreecommitdiff
path: root/xml.h
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-09-30 11:42:07 +0100
committerKatolaZ <katolaz@freaknet.org>2020-09-30 11:42:07 +0100
commit60c249ec24ab865c4a55759c7ffde2da99530b1d (patch)
tree38494b9c66d9e915a6de57e89f3720627aaa1f6a /xml.h
parentb416c171bb34297d7f8bc4c027de7136a113d144 (diff)
several improvements and more efficient xml parser
Diffstat (limited to 'xml.h')
-rw-r--r--xml.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/xml.h b/xml.h
index 6ee18b4..a2742db 100644
--- 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>
@@ -16,9 +16,6 @@ typedef struct xmlparser {
void (*xmlcdatastart)(struct xmlparser *);
void (*xmlcdata)(struct xmlparser *, const char *, size_t);
void (*xmlcdataend)(struct xmlparser *);
- void (*xmlcommentstart)(struct xmlparser *);
- void (*xmlcomment)(struct xmlparser *, const char *, size_t);
- void (*xmlcommentend)(struct xmlparser *);
void (*xmldata)(struct xmlparser *, const char *, size_t);
void (*xmldataend)(struct xmlparser *);
void (*xmldataentity)(struct xmlparser *, const char *, size_t);
@@ -29,8 +26,9 @@ typedef struct xmlparser {
size_t, int);
#ifndef GETNEXT
- #define GETNEXT (x)->getnext
- int (*getnext)(void);
+ /* GETNEXT overridden to reduce function call overhead and
+ further context optimizations. */
+ #define GETNEXT getchar
#endif
/* current tag */