summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2019-07-20 20:48:32 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2019-07-20 20:48:32 +0200
commit6d7c4b84b40c7bf9752aaefe39fae9e241520ac6 (patch)
tree15b6c15136d354da08b7774939ef61ed30146fc8
parentfd1ff68884cab0a7eb2c2d5026ee92816881e2f4 (diff)
sfeed_gph: prefix/mark "new" items with "N" too.
minor consistency fix in sfeed_html.c comment
-rw-r--r--sfeed_gph.c6
-rw-r--r--sfeed_html.c2
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("<!DOCTYPE HTML>\n"