commit 6d7c4b84b40c7bf9752aaefe39fae9e241520ac6
parent fd1ff68884cab0a7eb2c2d5026ee92816881e2f4
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 20 Jul 2019 20:48:32 +0200
sfeed_gph: prefix/mark "new" items with "N" too.
minor consistency fix in sfeed_html.c comment
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/sfeed_gph.c b/sfeed_gph.c
@@ -75,7 +75,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
if (fields[FieldLink][0]) {
fputs("[h|", fpitems);
- fprintf(fpitems, "%04d-%02d-%02d %02d:%02d ",
+ fprintf(fpitems, "%c %04d-%02d-%02d %02d:%02d ",
+ isnew ? 'N' : ' ',
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min);
gphlink(fpitems, fields[FieldTitle], strlen(fields[FieldTitle]));
@@ -83,7 +84,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
gphlink(fpitems, fields[FieldLink], strlen(fields[FieldLink]));
fputs("|server|port]\n", fpitems);
} else {
- fprintf(fpitems, "%04d-%02d-%02d %02d:%02d %s\n",
+ fprintf(fpitems, "%c %04d-%02d-%02d %02d:%02d %s\n",
+ isnew ? 'N' : ' ',
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, fields[FieldTitle]);
}
diff --git a/sfeed_html.c b/sfeed_html.c
@@ -86,7 +86,7 @@ main(int argc, char *argv[])
err(1, "calloc");
if ((comparetime = time(NULL)) == -1)
err(1, "time");
- /* 1 day old is old news */
+ /* 1 day is old news */
comparetime -= 86400;
fputs("<!DOCTYPE HTML>\n"