diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-04-04 15:24:26 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-04-04 15:24:26 +0200 |
commit | 48c33285ae37dc736c5c5cd87d38e6bd43189e76 (patch) | |
tree | c186cbd2ee1648c7c1e9cf5dd5d3e87a32223ff8 | |
parent | e7a756c2664abf6baa0da6824030b990e2825501 (diff) |
sfeed_frames: fix small bug in printcontent() and cleanup
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
-rw-r--r-- | sfeed_frames.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index f37812f..13434fe 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -45,6 +45,7 @@ static void printcontent(const char *s, FILE *fp) { const char *p; int len = 0; + for(p = s; *p; p++) { if(*p == '\\') { p++; @@ -54,6 +55,9 @@ printcontent(const char *s, FILE *fp) { fputc('\t', fp); else if(*p == 'n' && len) fputc('\n', fp); + else + fputc(p); /* unknown */ + len = 0; } else { fputc(*p, fp); len++; @@ -66,6 +70,7 @@ static size_t makepathname(char *buffer, size_t bufsiz, const char *path) { const char *p = path; size_t i = 0, r = 0; + for(; *p && i < bufsiz; p++) { if(isalpha((int)*p) || isdigit((int)*p)) { buffer[i++] = tolower((int)*p); |