From 3843be25afc7d895d8cf8a06871979369f33102b Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 21 Dec 2005 00:58:22 +0100 Subject: [PATCH] Rename: struct dom_stack_callbacks -> struct dom_stack_context_info --- src/document/dom/renderer.c | 4 ++-- src/document/dom/select.c | 4 ++-- src/document/dom/stack.c | 6 +++--- src/document/dom/stack.h | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/document/dom/renderer.c b/src/document/dom/renderer.c index f21c2aae..059f69ce 100644 --- a/src/document/dom/renderer.c +++ b/src/document/dom/renderer.c @@ -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: */ { /* */ NULL, @@ -803,7 +803,7 @@ render_dom_document(struct cache_entry *cached, struct document *document, &renderer, cached->uri); 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); done_sgml_parser(parser); diff --git a/src/document/dom/select.c b/src/document/dom/select.c index 10c0728e..edf55265 100644 --- a/src/document/dom/select.c +++ b/src/document/dom/select.c @@ -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: */ { /* */ NULL, @@ -831,7 +831,7 @@ select_dom_nodes(struct dom_select *select, struct dom_node *root) select_data.select = select;; 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); diff --git a/src/document/dom/stack.c b/src/document/dom/stack.c index 327ef0bd..4cb775a3 100644 --- a/src/document/dom/stack.c +++ b/src/document/dom/stack.c @@ -71,15 +71,15 @@ done_dom_stack(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) { - struct dom_stack_callbacks **list; + struct dom_stack_context_info **list; list = mem_realloc(stack->callbacks, sizeof(*list) * (stack->callbacks_size + 1)); if (!list) return; stack->callbacks = list; - stack->callbacks[stack->callbacks_size++] = callbacks; + stack->callbacks[stack->callbacks_size++] = context_info; } enum dom_stack_action { diff --git a/src/document/dom/stack.h b/src/document/dom/stack.h index 31bd23d3..f736eaea 100644 --- a/src/document/dom/stack.h +++ b/src/document/dom/stack.h @@ -10,7 +10,7 @@ struct dom_stack; 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 pop[DOM_NODES]; }; @@ -54,7 +54,7 @@ struct dom_stack { size_t object_size; /* 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; /* 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. */ 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 */ /* If an error occurs the node is free()d and NULL is returned */