Compare commits

..

No commits in common. "c9091b3e6dd2de32d8827c7384638753e5460012" and "dd5666a0067f1292c4a40d7b2ebd35738e3ddbc4" have entirely different histories.

3 changed files with 3 additions and 19 deletions

View File

@ -20,14 +20,12 @@ all: config.h minrss
debug: CFLAGS += -g3
debug: config.h minrss
$(OBJ): config.h
config.h:
cp config.def.h config.h
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
config.h:
cp config.def.h config.h
minrss: $(OBJ)
$(CC) -o $@ $(OBJ) $(LIBS)

View File

@ -76,10 +76,6 @@ atomLink(itemStruct *item, xmlNodePtr node)
copyField(item, FIELD_LINK, (char *)href);
} else if (propIs(rel, "enclosure")) {
copyField(item, FIELD_ENCLOSURE_URL, (char *)href);
xmlChar *enclosure_type = xmlGetProp(node, (xmlChar *) "type");
copyField(item, FIELD_ENCLOSURE_TYPE, (char *)enclosure_type);
xmlFree(enclosure_type);
}
xmlFree(href);
@ -98,11 +94,8 @@ rssEnclosure(itemStruct *item, xmlNodePtr node)
}
copyField(item, FIELD_ENCLOSURE_URL, (char *)href);
xmlFree(href);
xmlChar *enclosure_type = xmlGetProp(node, (xmlChar *) "type");
copyField(item, FIELD_ENCLOSURE_TYPE, (char *)enclosure_type);
xmlFree(enclosure_type);
xmlFree(href);
return 0;
}
@ -163,8 +156,6 @@ outputHtml(itemStruct *item, FILE *f)
fprintf(f, "<a href=\"%s\">Link</a><br>\n", item->fields[FIELD_LINK]);
if (item->fields[FIELD_ENCLOSURE_URL])
fprintf(f, "<a href=\"%s\">Enclosure</a><br>\n", item->fields[FIELD_ENCLOSURE_URL]);
if (item->fields[FIELD_ENCLOSURE_TYPE])
fprintf(f, "Enclosure type: %s\n", item->fields[FIELD_ENCLOSURE_TYPE]);
if (item->fields[FIELD_DESCRIPTION])
fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]);
}
@ -187,10 +178,6 @@ outputJson(itemStruct *item, FILE *f)
json_object *enclosure = json_object_new_object();
json_object_object_add(enclosure, "link",
json_object_new_string(item->fields[FIELD_ENCLOSURE_URL]));
if (item->fields[FIELD_ENCLOSURE_TYPE]) {
json_object_object_add(enclosure, "type",
json_object_new_string(item->fields[FIELD_ENCLOSURE_TYPE]));
}
json_object_object_add(root, "enclosure", enclosure);
}

View File

@ -20,7 +20,6 @@ enum fields {
FIELD_LINK,
FIELD_DESCRIPTION,
FIELD_ENCLOSURE_URL,
FIELD_ENCLOSURE_TYPE,
FIELD_END
};