summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2014-05-08 12:03:22 +0000
committerHiltjo Posthuma <hiltjo@codemadness.org>2014-05-08 12:03:22 +0000
commit6e9d9b07e2066fa7cf6506a9f4924ba98b8d1c2e (patch)
tree9643ffc2906408c9f9e806b46f74e55c7e4a324d
parent90daf96a975719fbcdf65efefcd93e5a558ff881 (diff)
sfeed: style, comments above
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
-rw-r--r--sfeed.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sfeed.c b/sfeed.c
index e1ec405..f9092b4 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -74,7 +74,8 @@ static XMLParser parser; /* XML parser state */
static char *append = NULL; /* append string after each output line */
/* TODO: optimize lookup */
-static int /* unique number for parsed tag (faster comparison) */
+/* unique number for parsed tag (faster comparison) */
+static int
gettag(int feedtype, const char *name, size_t namelen) {
/* RSS, alphabetical order */
static FeedTag rsstag[] = {
@@ -277,7 +278,8 @@ cleanup(void) {
string_free(&ctx.item.author);
}
-static void /* print error message to stderr */
+/* print error message to stderr */
+static void
die(const char *s) {
fputs("sfeed: ", stderr);
fputs(s, stderr);
@@ -507,7 +509,7 @@ xml_handler_attr(XMLParser *p, const char *tag, size_t taglen,
static void
xml_handler_start_element(XMLParser *p, const char *name, size_t namelen) {
if(ctx.iscontenttag) {
- /* starts with div, handle as XML, dont convert entities */
+ /* starts with div, handle as XML, don't convert entities */
/* TODO: test properly */
if(ctx.item.feedtype == FeedTypeAtom &&
!strncmp(name, "div", strlen("div")))