1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

Simplify tests.

This commit is contained in:
Laurent MONIN 2005-12-08 16:25:22 +01:00 committed by Laurent MONIN
parent d9f0de82f8
commit 1f7aa841aa

View File

@ -411,12 +411,11 @@ abort:
goto end_parse; goto end_parse;
} }
if (closing_tag && !strlcasecmp(name, namelen, "OPTION", 6)) { if (!strlcasecmp(name, namelen, "OPTION", 6)) {
if (closing_tag) {
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi); add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
goto see; goto see;
} } else {
if (!closing_tag && !strlcasecmp(name, namelen, "OPTION", 6)) {
unsigned char *value, *label; unsigned char *value, *label;
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi); add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
@ -441,15 +440,14 @@ abort:
} }
goto see; goto see;
} }
}
if ((!closing_tag && !strlcasecmp(name, namelen, "OPTGROUP", 8)) if (!strlcasecmp(name, namelen, "OPTGROUP", 8)) {
|| (closing_tag && !strlcasecmp(name, namelen, "/OPTGROUP", 9))) {
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi); add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
if (group) new_menu_item(&lnk_menu, NULL, -1, 0), group = 0; if (group) new_menu_item(&lnk_menu, NULL, -1, 0), group = 0;
}
if (!closing_tag && !strlcasecmp(name, namelen, "OPTGROUP", 8)) { if (!closing_tag) {
unsigned char *label; unsigned char *label;
label = get_attr_val(t_attr, "label", html_context->options); label = get_attr_val(t_attr, "label", html_context->options);
@ -461,6 +459,8 @@ abort:
new_menu_item(&lnk_menu, label, -1, 0); new_menu_item(&lnk_menu, label, -1, 0);
group = 1; group = 1;
} }
}
goto see; goto see;