From 6d7c4b84b40c7bf9752aaefe39fae9e241520ac6 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 20 Jul 2019 20:48:32 +0200 Subject: sfeed_gph: prefix/mark "new" items with "N" too. minor consistency fix in sfeed_html.c comment --- sfeed_gph.c | 6 ++++-- sfeed_html.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sfeed_gph.c b/sfeed_gph.c index 9993100..34c4ac2 100644 --- 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 index e337d40..8f104b7 100644 --- 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("\n" -- cgit v1.2.3