sfeed

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

commit fd4ddfbc4341a14d1a7cdcc4a5a435a65443ff13
parent d9c62a32df99cc602b95bff5eebae430c0de2e02
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  2 Jan 2015 21:11:42 +0100

Makefile: fix prerequisite rules

Diffstat:
Mutil.c | 15++++++++-------
Mxml.h | 3++-
2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/util.c b/util.c @@ -69,7 +69,8 @@ parseline(char **line, size_t *size, char **fields, prev = s + 1; } fields[i] = prev; - for(i++; i < maxfields; i++) /* make non-parsed fields empty. */ + /* make non-parsed fields empty. */ + for(i++; i < maxfields; i++) fields[i] = ""; } return i; @@ -101,10 +102,10 @@ void printutf8pad(FILE *fp, const char *s, size_t len, int pad) { wchar_t w; - size_t n = 0, i; + size_t n = 0, i; int r; - for(i = 0; *s && n < len; i++, s++) { + for(i = 0; *s && n < len; i++, s++) { if(ISUTF8(*s)) { if((r = mbtowc(&w, s, 4)) == -1) break; @@ -112,8 +113,8 @@ printutf8pad(FILE *fp, const char *s, size_t len, int pad) r = 1; n += (size_t)r; } - putc(*s, fp); - } - for(; n < len; n++) - putc(pad, fp); + putc(*s, fp); + } + for(; n < len; n++) + putc(pad, fp); } diff --git a/xml.h b/xml.h @@ -37,7 +37,8 @@ typedef struct xmlparser { char data[BUFSIZ]; /* data buffer used for tag and attribute data */ size_t readoffset; size_t readlastbytes; - unsigned char readbuf[BUFSIZ]; /* read buffer used by xmlparser_getnext */ + /* read buffer used by xmlparser_getnext */ + unsigned char readbuf[BUFSIZ]; } XMLParser; void xmlparser_init(XMLParser *, FILE *);