mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Drop data member from struct sgml_parser it is at stack->current->data
This commit is contained in:
parent
c524655362
commit
3374f3cbba
@ -597,8 +597,7 @@ render_dom_node_text(struct dom_renderer *renderer, struct screen_char *template
|
||||
static void
|
||||
render_dom_node_source(struct dom_stack *stack, struct dom_node *node, void *data)
|
||||
{
|
||||
struct sgml_parser *parser = stack->data;
|
||||
struct dom_renderer *renderer = parser->data;
|
||||
struct dom_renderer *renderer = stack->current->data;
|
||||
|
||||
assert(node && renderer && renderer->document);
|
||||
|
||||
@ -611,8 +610,7 @@ render_dom_node_source(struct dom_stack *stack, struct dom_node *node, void *dat
|
||||
static void
|
||||
render_dom_element_source(struct dom_stack *stack, struct dom_node *node, void *data)
|
||||
{
|
||||
struct sgml_parser *parser = stack->data;
|
||||
struct dom_renderer *renderer = parser->data;
|
||||
struct dom_renderer *renderer = stack->current->data;
|
||||
|
||||
assert(node && renderer && renderer->document);
|
||||
|
||||
@ -622,8 +620,7 @@ render_dom_element_source(struct dom_stack *stack, struct dom_node *node, void *
|
||||
static void
|
||||
render_dom_element_end_source(struct dom_stack *stack, struct dom_node *node, void *data)
|
||||
{
|
||||
struct sgml_parser *parser = stack->data;
|
||||
struct dom_renderer *renderer = parser->data;
|
||||
struct dom_renderer *renderer = stack->current->data;
|
||||
struct sgml_parser_state *pstate = data;
|
||||
struct scanner_token *token = &pstate->end_token;
|
||||
unsigned char *string = token->string;
|
||||
@ -646,8 +643,7 @@ render_dom_element_end_source(struct dom_stack *stack, struct dom_node *node, vo
|
||||
static void
|
||||
render_dom_attribute_source(struct dom_stack *stack, struct dom_node *node, void *data)
|
||||
{
|
||||
struct sgml_parser *parser = stack->data;
|
||||
struct dom_renderer *renderer = parser->data;
|
||||
struct dom_renderer *renderer = stack->current->data;
|
||||
struct screen_char *template = &renderer->styles[node->type];
|
||||
|
||||
assert(node && renderer->document);
|
||||
@ -799,8 +795,7 @@ render_dom_document(struct cache_entry *cached, struct document *document,
|
||||
else
|
||||
doctype = SGML_DOCTYPE_HTML;
|
||||
|
||||
parser = init_sgml_parser(SGML_PARSER_STREAM, doctype,
|
||||
&renderer, cached->uri);
|
||||
parser = init_sgml_parser(SGML_PARSER_STREAM, doctype, cached->uri);
|
||||
if (!parser) return;
|
||||
|
||||
add_dom_stack_context(&parser->stack, &renderer,
|
||||
|
@ -305,7 +305,7 @@ parse_sgml_document(struct dom_stack *stack, struct scanner *scanner)
|
||||
|
||||
struct sgml_parser *
|
||||
init_sgml_parser(enum sgml_parser_type type, enum sgml_document_type doctype,
|
||||
void *data, struct uri *uri)
|
||||
struct uri *uri)
|
||||
{
|
||||
size_t obj_size = sizeof(struct sgml_parser_state);
|
||||
struct sgml_parser *parser;
|
||||
@ -316,7 +316,6 @@ init_sgml_parser(enum sgml_parser_type type, enum sgml_document_type doctype,
|
||||
parser->type = type;
|
||||
parser->uri = get_uri_reference(uri);
|
||||
parser->info = get_sgml_info(doctype);
|
||||
parser->data = data;
|
||||
|
||||
init_dom_stack(&parser->stack, parser, obj_size,
|
||||
type != SGML_PARSER_STREAM);
|
||||
|
@ -29,7 +29,6 @@ struct sgml_parser {
|
||||
|
||||
struct uri *uri;
|
||||
struct dom_node *root;
|
||||
void *data;
|
||||
|
||||
struct scanner scanner;
|
||||
struct dom_stack stack;
|
||||
@ -44,7 +43,7 @@ struct sgml_parser_state {
|
||||
|
||||
struct sgml_parser *
|
||||
init_sgml_parser(enum sgml_parser_type type, enum sgml_document_type doctype,
|
||||
void *data, struct uri *uri);
|
||||
struct uri *uri);
|
||||
|
||||
void done_sgml_parser(struct sgml_parser *parser);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user