summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2013-05-20 19:28:20 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2013-05-20 19:28:20 +0200
commited133b0000e8b8cdabf038bf40e457fac2cc428c (patch)
tree561a8becc82ca425ea79f7d3d585a024929eb2a7
parentb9904cc297144ceadfc3dea11120ad3968423153 (diff)
add common header
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
-rw-r--r--common.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..68b5f90
--- /dev/null
+++ b/common.h
@@ -0,0 +1,18 @@
+/* Feed info. */
+struct feed {
+ char *name; /* feed name */
+ unsigned long totalnew; /* amount of new items per feed */
+ unsigned long total; /* total items */
+ struct feed *next; /* linked list */
+};
+
+enum { FieldUnixTimestamp = 0, FieldTimeFormatted, FieldTitle, FieldLink,
+ FieldContent, FieldContentType, FieldId, FieldAuthor, FieldFeedType,
+ FieldFeedName, FieldFeedUrl, FieldBaseSiteUrl, FieldLast };
+
+char * afgets(char **p, size_t *size, FILE *fp);
+void feedsfree(struct feed *f);
+unsigned int parseline(char **line, size_t *size, char **fields, unsigned int maxfields, int separator, FILE *fp);
+void printfeednameid(const char *s, FILE *fp);
+void printhtmlencoded(const char *s, FILE *fp);
+void printlink(const char *link, const char *baseurl, FILE *fp);