summaryrefslogtreecommitdiff
path: root/sfeed_html.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-05-27 12:32:41 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-05-27 12:35:00 +0200
commit02b590f6a23ab775535ab96614eb467156e8abe6 (patch)
tree28531f4a2c73b8c46f1781b923620cd55a5df778 /sfeed_html.c
parent1a90add12ed8ab5b8b2117fd4f079749865211e4 (diff)
sfeed_frames/sfeed_html: show the total counts and improve the title format
This title format now matches the one with sfeed_curses. It shows the count to the most left and makes it more readable imho. It also works better when the titlebar is small.
Diffstat (limited to 'sfeed_html.c')
-rw-r--r--sfeed_html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfeed_html.c b/sfeed_html.c
index d1e1b63..9a03901 100644
--- a/sfeed_html.c
+++ b/sfeed_html.c
@@ -12,7 +12,7 @@ static struct feed *feeds;
static int showsidebar;
static char *line;
static size_t linesize;
-static unsigned long totalnew;
+static unsigned long totalnew, total;
static time_t comparetime;
static void
@@ -55,6 +55,7 @@ printfeed(FILE *fp, struct feed *f)
fputs(" ", stdout);
}
f->total++;
+ total++;
if (fields[FieldLink][0]) {
fputs("<a href=\"", stdout);
@@ -147,8 +148,8 @@ main(int argc, char *argv[])
fputs("\t\t</ul>\n\t</div>\n", stdout);
}
- fprintf(stdout, "\t</body>\n\t<title>Newsfeed (%lu)</title>\n</html>\n",
- totalnew);
+ fprintf(stdout, "\t</body>\n\t<title>(%lu/%lu) - Newsfeed</title>\n</html>\n",
+ totalnew, total);
return 0;
}