mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Oops, kill_html_stack_top() -> pop_html_element()
This commit is contained in:
parent
fe10af364d
commit
5339525f1d
@ -692,7 +692,7 @@ done_html_parser_state(struct html_context *html_context,
|
|||||||
html_context->line_breax = 1;
|
html_context->line_breax = 1;
|
||||||
|
|
||||||
while (html_top != element) {
|
while (html_top != element) {
|
||||||
kill_html_stack_item(html_context, html_top);
|
pop_html_element(html_context);
|
||||||
#if 0
|
#if 0
|
||||||
/* I've preserved this bit to show an example of the Old Code
|
/* I've preserved this bit to show an example of the Old Code
|
||||||
* of the Mikulas days (I _HOPE_ it's by Mikulas, at least ;-).
|
* of the Mikulas days (I _HOPE_ it's by Mikulas, at least ;-).
|
||||||
@ -704,7 +704,7 @@ done_html_parser_state(struct html_context *html_context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
html_top->type = ELEMENT_KILLABLE;
|
html_top->type = ELEMENT_KILLABLE;
|
||||||
kill_html_stack_item(html_context, html_top);
|
pop_html_element(html_context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ html_input_format(struct html_context *html_context, unsigned char *a,
|
|||||||
case FC_HIDDEN:
|
case FC_HIDDEN:
|
||||||
INTERNAL("bad control type");
|
INTERNAL("bad control type");
|
||||||
}
|
}
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
put_chrs(html_context, " ", 1);
|
put_chrs(html_context, " ", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,7 +498,7 @@ end_parse:
|
|||||||
for (i = 0; i < max_width; i++)
|
for (i = 0; i < max_width; i++)
|
||||||
put_chrs(html_context, "_", 1);
|
put_chrs(html_context, "_", 1);
|
||||||
|
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
put_chrs(html_context, "]", 1);
|
put_chrs(html_context, "]", 1);
|
||||||
html_context->special_f(html_context, SP_CONTROL, fc);
|
html_context->special_f(html_context, SP_CONTROL, fc);
|
||||||
}
|
}
|
||||||
@ -603,7 +603,7 @@ end_parse:
|
|||||||
format.form = fc;
|
format.form = fc;
|
||||||
format.style.attr |= AT_BOLD;
|
format.style.attr |= AT_BOLD;
|
||||||
put_chrs(html_context, "[ ]", 3);
|
put_chrs(html_context, "[ ]", 3);
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
put_chrs(html_context, " ", 1);
|
put_chrs(html_context, " ", 1);
|
||||||
html_context->special_f(html_context, SP_CONTROL, fc);
|
html_context->special_f(html_context, SP_CONTROL, fc);
|
||||||
}
|
}
|
||||||
@ -709,7 +709,7 @@ pp:
|
|||||||
ln_break(html_context, 1);
|
ln_break(html_context, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
if (rows > 1)
|
if (rows > 1)
|
||||||
ln_break(html_context, 1);
|
ln_break(html_context, 1);
|
||||||
else
|
else
|
||||||
|
@ -586,7 +586,7 @@ html_hr(struct html_context *html_context, unsigned char *a,
|
|||||||
}
|
}
|
||||||
html_context->special_f(html_context, SP_NOWRAP, 0);
|
html_context->special_f(html_context, SP_NOWRAP, 0);
|
||||||
ln_break(html_context, 2);
|
ln_break(html_context, 2);
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -89,7 +89,7 @@ html_a(struct html_context *html_context, unsigned char *a,
|
|||||||
html_focusable(html_context, a);
|
html_focusable(html_context, a);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_fragment_identifier(html_context, a, "name");
|
set_fragment_identifier(html_context, a, "name");
|
||||||
@ -269,7 +269,7 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
|||||||
* If not, just exit now. */
|
* If not, just exit now. */
|
||||||
if (!options->images && !format.link) {
|
if (!options->images && !format.link) {
|
||||||
mem_free_if(src);
|
mem_free_if(src);
|
||||||
if (usemap) kill_html_stack_top(html_context);
|
if (usemap) pop_html_element(html_context);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
|||||||
|
|
||||||
put_image_label(a, label, html_context);
|
put_image_label(a, label, html_context);
|
||||||
|
|
||||||
if (ismap) kill_html_stack_top(html_context);
|
if (ismap) pop_html_element(html_context);
|
||||||
mem_free_set(&format.image, NULL);
|
mem_free_set(&format.image, NULL);
|
||||||
mem_free_set(&format.title, NULL);
|
mem_free_set(&format.title, NULL);
|
||||||
}
|
}
|
||||||
@ -341,7 +341,7 @@ html_img_do(unsigned char *a, unsigned char *object_src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mem_free_if(src);
|
mem_free_if(src);
|
||||||
if (usemap) kill_html_stack_top(html_context);
|
if (usemap) pop_html_element(html_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -369,7 +369,7 @@ put_link_line(unsigned char *prefix, unsigned char *linkname,
|
|||||||
format.style.fg = format.clink;
|
format.style.fg = format.clink;
|
||||||
put_chrs(html_context, linkname, strlen(linkname));
|
put_chrs(html_context, linkname, strlen(linkname));
|
||||||
ln_break(html_context, 1);
|
ln_break(html_context, 1);
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ start_element(struct element_info *ei,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (html_top->type == ELEMENT_WEAK) {
|
if (html_top->type == ELEMENT_WEAK) {
|
||||||
kill_html_stack_top(html_context);
|
pop_html_element(html_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We try to process nested <script> if we didn't process the parent
|
/* We try to process nested <script> if we didn't process the parent
|
||||||
|
@ -14,7 +14,7 @@ void html_stack_dup(struct html_context *html_context,
|
|||||||
|
|
||||||
void kill_html_stack_item(struct html_context *html_context,
|
void kill_html_stack_item(struct html_context *html_context,
|
||||||
struct html_element *e);
|
struct html_element *e);
|
||||||
#define kill_html_stack_top(html_context) \
|
#define pop_html_element(html_context) \
|
||||||
kill_html_stack_item(html_context, html_top)
|
kill_html_stack_item(html_context, html_top)
|
||||||
void kill_html_stack_until(struct html_context *html_context, int ls, ...);
|
void kill_html_stack_until(struct html_context *html_context, int ls, ...);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user