X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=blobdiff_plain;f=src%2Fttrss_model.c;h=2c80c9e73588a377082d8301e0ef5725eb52f732;hp=c65a71072818418e0faf5bcbe69dae6009c46cc1;hb=4e8c884a282bcf16f486d06164ee187faa8a2610;hpb=9e8f000157c9c09742b5cc55f768782e16db240c diff --git a/src/ttrss_model.c b/src/ttrss_model.c index c65a710..2c80c9e 100644 --- a/src/ttrss_model.c +++ b/src/ttrss_model.c @@ -100,6 +100,7 @@ struct headline *headline_new(int id, const char *url, const char *title) h->id = id; h->url = strdup(url); h->title = strdup(title); + h->unread = -1; h->excerpt = NULL; h->content = NULL; @@ -120,6 +121,21 @@ void headlines_free(struct headline **headlines) } } +struct feed *feed_new(int id, const char *url, const char *title) +{ + struct feed *f; + + f = malloc(sizeof(struct feed)); + + f->id = id; + f->url = strdup(url); + f->title = strdup(title); + f->unread = -1; + f->headlines = NULL; + + return f; +} + void feed_free(struct feed *feed) { if (feed) {