sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 512f5f1e5494fd74cd11b5a4f5ebbadc7f51d167
parent cce2f78660bb76bd9d2e043cc30dac5da5100bd9
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 13 Dec 2014 13:02:33 +0100

xml.h: code-style, function declarations

Diffstat:
Mxml.h | 55+++++++++++++++++++++++++------------------------------
1 file changed, 25 insertions(+), 30 deletions(-)

diff --git a/xml.h b/xml.h @@ -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 *);