sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 414b896c2de449718169fab200b39e0851c2742a
parent f1e17c612e33790a390c1ee1329c8433017d0c44
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Wed, 13 May 2020 19:27:14 +0200

sfeed_gopher: if a gopher url cannot be parsed then show it anyway as a "URL:"

This should never be able to happen though in practise because sfeed parses the
uri aswell.

Diffstat:
Msfeed_gopher.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sfeed_gopher.c b/sfeed_gopher.c @@ -72,9 +72,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) if (fields[FieldLink][0]) { itemtype = 'h'; - if (!strncmp(fields[FieldLink], "gopher://", 9)) { - if (parseuri(fields[FieldLink], &u, 0) == -1) - continue; + if (!strncmp(fields[FieldLink], "gopher://", 9) && + parseuri(fields[FieldLink], &u, 0) != -1) { itemhost = u.host; itemport = u.port[0] ? u.port : "70"; itemtype = '1';