diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-12-13 13:02:33 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-12-13 13:02:33 +0100 |
commit | 512f5f1e5494fd74cd11b5a4f5ebbadc7f51d167 (patch) | |
tree | e7e6224c6925f8bd337a5bfe5c194cfd41c3e79f | |
parent | cce2f78660bb76bd9d2e043cc30dac5da5100bd9 (diff) |
xml.h: code-style, function declarations
-rw-r--r-- | xml.h | 55 |
1 files changed, 25 insertions, 30 deletions
@@ -1,36 +1,31 @@ #include <stdio.h> -#include <string.h> #include <stdlib.h> +#include <string.h> typedef struct xmlparser { /* handlers */ - void (*xmltagstart)(struct xmlparser *p, const char *tag, size_t taglen); - void (*xmltagstartparsed)(struct xmlparser *p, const char *tag, - size_t taglen, int isshort); - void (*xmltagend)(struct xmlparser *p, const char *tag, size_t taglen, - int isshort); - void (*xmldatastart)(struct xmlparser *p); - void (*xmldata)(struct xmlparser *p, const char *data, size_t datalen); - void (*xmldataend)(struct xmlparser *p); - void (*xmldataentity)(struct xmlparser *p, const char *data, - size_t datalen); - void (*xmlattrstart)(struct xmlparser *p, const char *tag, size_t taglen, - const char *name, size_t namelen); - void (*xmlattr)(struct xmlparser *p, const char *tag, size_t taglen, - const char *name, size_t namelen, const char *value, - size_t valuelen); - void (*xmlattrend)(struct xmlparser *p, const char *tag, size_t taglen, - const char *name, size_t namelen); - void (*xmlattrentity)(struct xmlparser *p, const char *tag, size_t taglen, - const char *name, size_t namelen, const char *value, - size_t valuelen); - void (*xmlcdatastart)(struct xmlparser *p); - void (*xmlcdata)(struct xmlparser *p, const char *data, size_t datalen); - void (*xmlcdataend)(struct xmlparser *p); - void (*xmlcommentstart)(struct xmlparser *p); - void (*xmlcomment)(struct xmlparser *p, const char *comment, - size_t commentlen); - void (*xmlcommentend)(struct xmlparser *p); + void (*xmltagstart)(struct xmlparser *, const char *, size_t); + void (*xmltagstartparsed)(struct xmlparser *, const char *, + size_t, int); + void (*xmltagend)(struct xmlparser *, const char *, size_t, int); + void (*xmldatastart)(struct xmlparser *); + void (*xmldata)(struct xmlparser *, const char *, size_t); + void (*xmldataend)(struct xmlparser *); + void (*xmldataentity)(struct xmlparser *, const char *, size_t); + void (*xmlattrstart)(struct xmlparser *, const char *, size_t, + const char *, size_t); + void (*xmlattr)(struct xmlparser *, const char *, size_t, + const char *, size_t, const char *, size_t); + void (*xmlattrend)(struct xmlparser *, const char *, size_t, + const char *, size_t); + void (*xmlattrentity)(struct xmlparser *, const char *, size_t, + const char *, size_t, const char *, size_t); + 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 *); FILE *fp; /* file stream to read from */ @@ -45,5 +40,5 @@ typedef struct xmlparser { unsigned char readbuf[BUFSIZ]; /* read buffer used by xmlparser_getnext */ } XMLParser; -void xmlparser_init(XMLParser *x, FILE *fp); -void xmlparser_parse(XMLParser *x); +void xmlparser_init(XMLParser *, FILE *); +void xmlparser_parse(XMLParser *); |