sfeed

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

commit 48c33285ae37dc736c5c5cd87d38e6bd43189e76
parent e7a756c2664abf6baa0da6824030b990e2825501
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  4 Apr 2014 15:24:26 +0200

sfeed_frames: fix small bug in printcontent() and cleanup

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Msfeed_frames.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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);