diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-01-02 21:11:42 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-01-02 21:11:42 +0100 |
commit | fd4ddfbc4341a14d1a7cdcc4a5a435a65443ff13 (patch) | |
tree | fbe7ff1f18982bc3c2de2f66eb3facf6e6088451 | |
parent | d9c62a32df99cc602b95bff5eebae430c0de2e02 (diff) |
Makefile: fix prerequisite rules
-rw-r--r-- | util.c | 15 | ||||
-rw-r--r-- | xml.h | 3 |
2 files changed, 10 insertions, 8 deletions
@@ -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); } @@ -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 *); |