1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Remove the now unused DOM stack data member

This commit is contained in:
Jonas Fonseca 2005-12-21 03:59:46 +01:00 committed by Jonas Fonseca
parent da33827771
commit 910c51abaf
4 changed files with 6 additions and 12 deletions

View File

@ -376,7 +376,7 @@ parse_dom_select(struct dom_select *select, unsigned char *string, int length)
struct dom_select_node sel;
init_scanner(&scanner, &css_scanner_info, string, string + length);
init_dom_stack(&stack, select, 0, 1);
init_dom_stack(&stack, 0, 1);
memset(&sel, 0, sizeof(sel));
@ -868,11 +868,11 @@ select_dom_nodes(struct dom_select *select, struct dom_node *root)
select_data.select = select;;
init_dom_stack(&stack, &select_data, 0, 1);
init_dom_stack(&stack, 0, 1);
add_dom_stack_context(&stack, &select_data,
&dom_select_context_info);
init_dom_stack(&select_data.stack, &select_data, obj_size, 1);
init_dom_stack(&select_data.stack, obj_size, 1);
add_dom_stack_context(&stack, &select_data,
&dom_select_data_context_info);

View File

@ -53,14 +53,12 @@ realloc_dom_stack_state_objects(struct dom_stack *stack)
}
void
init_dom_stack(struct dom_stack *stack, void *data,
size_t object_size, int keep_nodes)
init_dom_stack(struct dom_stack *stack, size_t object_size, int keep_nodes)
{
assert(stack);
memset(stack, 0, sizeof(*stack));
stack->data = data;
stack->object_size = object_size;
stack->keep_nodes = !!keep_nodes;
}

View File

@ -65,9 +65,6 @@ struct dom_stack {
struct dom_stack_context *contexts;
size_t contexts_size;
struct dom_stack_context *current;
/* Data specific to the parser and renderer. */
void *data;
};
#define dom_stack_is_empty(stack) \
@ -124,8 +121,7 @@ search_dom_stack(struct dom_stack *stack, enum dom_node_type type,
/* The @object_size arg tells whether the stack should allocate objects for each
* state to be assigned to the state's @data member. Zero means no state data should
* be allocated. */
void init_dom_stack(struct dom_stack *stack, void *data,
size_t object_size, int keep_nodes);
void init_dom_stack(struct dom_stack *stack, size_t object_size, int keep_nodes);
void done_dom_stack(struct dom_stack *stack);
/* Add a callback collection to the stack. */

View File

@ -361,7 +361,7 @@ init_sgml_parser(enum sgml_parser_type type, enum sgml_document_type doctype,
parser->uri = get_uri_reference(uri);
parser->info = get_sgml_info(doctype);
init_dom_stack(&parser->stack, NULL, obj_size,
init_dom_stack(&parser->stack, obj_size,
type != SGML_PARSER_STREAM);
/* FIXME: Some sgml backend specific callbacks? Handle HTML script tags,
* and feed document.write() data back to the parser. */