1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Rename: struct dom_stack_callbacks -> struct dom_stack_context_info

This commit is contained in:
Jonas Fonseca 2005-12-21 00:58:22 +01:00 committed by Jonas Fonseca
parent f632b2dfa4
commit 3843be25af
4 changed files with 10 additions and 10 deletions

View File

@ -733,7 +733,7 @@ render_dom_attribute_source(struct dom_stack *stack, struct dom_node *node, void
} }
} }
static struct dom_stack_callbacks dom_source_renderer_callbacks = { static struct dom_stack_context_info dom_source_renderer_context_info = {
/* Push: */ /* Push: */
{ {
/* */ NULL, /* */ NULL,
@ -803,7 +803,7 @@ render_dom_document(struct cache_entry *cached, struct document *document,
&renderer, cached->uri); &renderer, cached->uri);
if (!parser) return; if (!parser) return;
add_dom_stack_callbacks(&parser->stack, &dom_source_renderer_callbacks); add_dom_stack_callbacks(&parser->stack, &dom_source_renderer_context_info);
root = parse_sgml(parser, buffer); root = parse_sgml(parser, buffer);
done_sgml_parser(parser); done_sgml_parser(parser);

View File

@ -784,7 +784,7 @@ dom_select_push_text(struct dom_stack *stack, struct dom_node *node, void *data)
} }
} }
static struct dom_stack_callbacks dom_select_callbacks = { static struct dom_stack_context_info dom_select_context_info = {
/* Push: */ /* Push: */
{ {
/* */ NULL, /* */ NULL,
@ -831,7 +831,7 @@ select_dom_nodes(struct dom_select *select, struct dom_node *root)
select_data.select = select;; select_data.select = select;;
init_dom_stack(&stack, &select_data, 0, 1); init_dom_stack(&stack, &select_data, 0, 1);
add_dom_stack_callbacks(&stack, &dom_select_callbacks); add_dom_stack_callbacks(&stack, &dom_select_context_info);
init_dom_stack(&select_data.stack, &select_data, obj_size, 1); init_dom_stack(&select_data.stack, &select_data, obj_size, 1);

View File

@ -71,15 +71,15 @@ done_dom_stack(struct dom_stack *stack)
void void
add_dom_stack_callbacks(struct dom_stack *stack, add_dom_stack_callbacks(struct dom_stack *stack,
struct dom_stack_callbacks *callbacks) struct dom_stack_context_info *context_info)
{ {
struct dom_stack_callbacks **list; struct dom_stack_context_info **list;
list = mem_realloc(stack->callbacks, sizeof(*list) * (stack->callbacks_size + 1)); list = mem_realloc(stack->callbacks, sizeof(*list) * (stack->callbacks_size + 1));
if (!list) return; if (!list) return;
stack->callbacks = list; stack->callbacks = list;
stack->callbacks[stack->callbacks_size++] = callbacks; stack->callbacks[stack->callbacks_size++] = context_info;
} }
enum dom_stack_action { enum dom_stack_action {

View File

@ -10,7 +10,7 @@ struct dom_stack;
typedef void (*dom_stack_callback_T)(struct dom_stack *, struct dom_node *, void *); typedef void (*dom_stack_callback_T)(struct dom_stack *, struct dom_node *, void *);
struct dom_stack_callbacks { struct dom_stack_context_info {
dom_stack_callback_T push[DOM_NODES]; dom_stack_callback_T push[DOM_NODES];
dom_stack_callback_T pop[DOM_NODES]; dom_stack_callback_T pop[DOM_NODES];
}; };
@ -54,7 +54,7 @@ struct dom_stack {
size_t object_size; size_t object_size;
/* Callbacks which should be called for the pushed and popped nodes. */ /* Callbacks which should be called for the pushed and popped nodes. */
struct dom_stack_callbacks **callbacks; struct dom_stack_context_info **callbacks;
size_t callbacks_size; size_t callbacks_size;
/* Data specific to the parser and renderer. */ /* Data specific to the parser and renderer. */
@ -121,7 +121,7 @@ void done_dom_stack(struct dom_stack *stack);
/* Add a callback collection to the stack. */ /* Add a callback collection to the stack. */
void add_dom_stack_callbacks(struct dom_stack *stack, void add_dom_stack_callbacks(struct dom_stack *stack,
struct dom_stack_callbacks *callbacks); struct dom_stack_context_info *context_info);
/* Decends down to the given node making it the current parent */ /* Decends down to the given node making it the current parent */
/* If an error occurs the node is free()d and NULL is returned */ /* If an error occurs the node is free()d and NULL is returned */