webdump

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/webdump.git
Log | Files | Refs | README | LICENSE

commit d43a011c4cd01f75ec9169ce745d6d1e13958729
parent ac91a742d386618a025609433e3e43b303272b3e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 25 Aug 2017 00:29:06 +0200

simplify a bit, add <label> inline and <div> as block for now

Diffstat:
main.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/main.c b/main.c @@ -62,6 +62,7 @@ static char *inlinetags[] = { "img", "td", "th", + "label", }; static char *blocktags[] = { @@ -82,6 +83,7 @@ static char *blocktags[] = { "table", "code", "blockquote", + "div", }; static String htmldata; @@ -314,18 +316,17 @@ startignore: return; if ((c = p->getnext()) != '/') goto startignore; - i = 0; - while ((c = p->getnext()) != EOF) { + for (i = 0; (c = p->getnext()) != EOF; i++) { if (c == '>') break; if (i + 1 >= sizeof(tmp)) goto startignore; - tmp[i++] = c; + tmp[i] = c; } tmp[i] = '\0'; /* compare against current ignored tag */ - if (!strcasecmp(cur->tag, tmp)) + if (!strcasecmp(tag, tmp)) cur->isignore = 0; return; }