sfeed

RSS and Atom parser
git clone git://git.codemadness.org/sfeed
Log | Files | Refs | README | LICENSE

commit d9c6a516765d10d0548f7cbf31caa0b37ce8c262
parent 558184631531ba033e2dc17ca928ca4d9beebb66
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 21 Sep 2025 14:43:46 +0200

sfeed_gopher: improve some comments and gopher -> Gopher

Diffstat:
MREADME | 2+-
Msfeed_gopher.c | 14+++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/README b/README @@ -367,7 +367,7 @@ advertisements, strip tracking parameters and more. awk -F '\t' 'BEGIN { OFS = "\t"; } function filterlink(s) { - # protocol must start with http, https or gopher. + # protocol must start with HTTP, HTTPS or Gopher. if (match(s, /^(http|https|gopher):\/\//) == 0) { return ""; } diff --git a/sfeed_gopher.c b/sfeed_gopher.c @@ -10,7 +10,7 @@ static char *line; static size_t linesize; static time_t comparetime; -/* Escape characters in gopher, CR and LF are ignored */ +/* Escape characters in Gopher, CR and LF are ignored */ static void gophertext(FILE *fp, const char *s) { @@ -54,14 +54,14 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) itemhost = host; itemport = port; - itemtype = 'i'; + itemtype = 'i'; /* i type (extension): informational message */ itempath = fields[FieldLink]; itemquery = ""; itemfragment = ""; if (fields[FieldLink][0]) { - itemtype = 'h'; - /* if it is a gopher URL then change it into a DirEntity */ + itemtype = 'h'; /* h type (extension): HTML or external URL */ + /* if it is a Gopher URL then change it into a DirEntity */ if (!strncmp(fields[FieldLink], "gopher://", 9) && uri_parse(fields[FieldLink], &u) != -1) { itemhost = u.host; @@ -70,7 +70,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) itempath = u.path; itemquery = u.query; itemfragment = u.fragment; - /* use the gopher type from the path if it is set */ + /* use the Gopher type from the path if it is set */ if (itempath[0] == '/') { itempath++; if (*itempath) { @@ -99,8 +99,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) gophertext(fpitems, fields[FieldTitle]); fputs("\t", fpitems); - /* Prefix non-gopher URLs with "URL:" using the h type. - This gopher extension is commonly used to link to external URLs */ + /* Prefix non-Gopher URLs with "URL:" using the h type. + This Gopher extension is commonly used to link to external URLs */ if (itemtype == 'h' && fields[FieldLink] == itempath) { fputs("URL:", fpitems); gophertext(fpitems, fields[FieldLink]);