summaryrefslogtreecommitdiff
path: root/sfeed_web.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-06-21 00:25:45 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-06-21 00:25:45 +0200
commit7bd3894befb8033ebdc252103fd0d689e655f127 (patch)
tree749e36f19cd200f48d1dd62fb2a1708ed3e904ae /sfeed_web.c
parent7e575e13c0cdcc4341fa2f0b6dcb90cb4bd3cd71 (diff)
improvements
Diffstat (limited to 'sfeed_web.c')
-rw-r--r--sfeed_web.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sfeed_web.c b/sfeed_web.c
index 2824ab6..9a96959 100644
--- a/sfeed_web.c
+++ b/sfeed_web.c
@@ -11,6 +11,15 @@ static unsigned int isbase = 0, islink = 0, isfeedlink = 0, found = 0;
static char feedlink[4096] = "", basehref[4096] = "", feedtype[256] = "";
static void
+printfeedtype(const char *s, FILE *fp)
+{
+ for(; *s; s++) {
+ if(!isspace((int)*s))
+ fputc(*s, fp);
+ }
+}
+
+static void
xmltagstart(XMLParser *p, const char *tag, size_t taglen)
{
(void)p;
@@ -34,7 +43,7 @@ xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort)
if(isfeedlink) {
if(*feedtype) {
- printfeednameid(feedtype, stdout);
+ printfeedtype(feedtype, stdout);
putchar(' ');
}
printlink(feedlink, basehref, stdout);
@@ -75,7 +84,6 @@ main(int argc, char *argv[])
{
XMLParser parser;
- /* base href */
if(argc > 1)
strlcpy(basehref, argv[1], sizeof(basehref));