small optimization: use the new DisplayType DisplayInput - webdump - HTML to pl… | |
git clone git://git.codemadness.org/webdump | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 0626e06482426d2fe329fd9df5b1f6fb3b946e2a | |
parent 630f76162a192327a3eecd4fc0adcb9b31cd4504 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 8 Sep 2023 15:33:44 +0200 | |
small optimization: use the new DisplayType DisplayInput | |
This reduces a string comparison for each node. | |
Diffstat: | |
M webdump.c | 4 +--- | |
1 file changed, 1 insertion(+), 3 deletions(-) | |
--- | |
diff --git a/webdump.c b/webdump.c | |
@@ -1893,9 +1893,7 @@ xmltagstartparsed(XMLParser *p, const char *t, size_t tl,… | |
} | |
} | |
skipinitialws = 0; | |
- } | |
- | |
- if (!tagcmp(cur->tag.name, "input")) { | |
+ } else if (cur->tag.displaytype & DisplayInput) { | |
if (!attr_type.len) { | |
hprintf("[%-15s]", attr_value.len ? attr_value.data : … | |
} else if (!strcasecmp(attr_type.data, "button") || |