sfeed

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

commit 665ce267d994f7feb090c0c695c8462ae2d87a50
parent 49d22d1256498c449b44a80901887bc58b67148c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 20 Mar 2022 13:19:12 +0100

check write errors on the output stream after each feed

This will detect write errors sooner.

Diffstat:
Msfeed_atom.c | 1+
Msfeed_html.c | 1+
Msfeed_mbox.c | 1+
Msfeed_plain.c | 1+
Msfeed_twtxt.c | 1+
5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sfeed_atom.c b/sfeed_atom.c @@ -150,6 +150,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_html.c b/sfeed_html.c @@ -119,6 +119,7 @@ main(int argc, char *argv[]) err(1, "fopen: %s", argv[i]); printfeed(fp, &feeds[i - 1]); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_mbox.c b/sfeed_mbox.c @@ -172,6 +172,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_plain.c b/sfeed_plain.c @@ -78,6 +78,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_twtxt.c b/sfeed_twtxt.c @@ -63,6 +63,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } }