summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed_frames.c1
-rw-r--r--sfeed_html.c13
2 files changed, 6 insertions, 8 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c
index f6f679a..43ffcd3 100644
--- a/sfeed_frames.c
+++ b/sfeed_frames.c
@@ -61,7 +61,6 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
fprintf(fpitems, "%04d-%02d-%02d %02d:%02d ",
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min);
-
if (isnew)
fputs("<b><u>", fpitems);
if (fields[FieldLink][0]) {
diff --git a/sfeed_html.c b/sfeed_html.c
index 56d56bf..e337d40 100644
--- a/sfeed_html.c
+++ b/sfeed_html.c
@@ -21,7 +21,7 @@ printfeed(FILE *fp, struct feed *f)
char *fields[FieldLast];
struct tm *tm;
time_t parsedtime;
- unsigned int islink, isnew;
+ unsigned int isnew;
ssize_t linelen;
if (f->name[0]) {
@@ -47,8 +47,6 @@ printfeed(FILE *fp, struct feed *f)
err(1, "localtime");
isnew = (parsedtime >= comparetime) ? 1 : 0;
- islink = fields[FieldLink][0] ? 1 : 0;
-
totalnew += isnew;
f->totalnew += isnew;
f->total++;
@@ -58,14 +56,15 @@ printfeed(FILE *fp, struct feed *f)
tm->tm_hour, tm->tm_min);
if (isnew)
fputs("<b><u>", stdout);
- if (islink) {
+ if (fields[FieldLink][0]) {
fputs("<a href=\"", stdout);
xmlencode(fields[FieldLink], stdout);
fputs("\">", stdout);
- }
- xmlencode(fields[FieldTitle], stdout);
- if (islink)
+ xmlencode(fields[FieldTitle], stdout);
fputs("</a>", stdout);
+ } else {
+ xmlencode(fields[FieldTitle], stdout);
+ }
if (isnew)
fputs("</u></b>", stdout);
fputs("\n", stdout);