diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-09-30 11:42:07 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2020-09-30 11:42:07 +0100 |
commit | 60c249ec24ab865c4a55759c7ffde2da99530b1d (patch) | |
tree | 38494b9c66d9e915a6de57e89f3720627aaa1f6a /xml.h | |
parent | b416c171bb34297d7f8bc4c027de7136a113d144 (diff) |
several improvements and more efficient xml parser
Diffstat (limited to 'xml.h')
-rw-r--r-- | xml.h | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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 */ |