mirror of
https://github.com/rkd77/elinks.git
synced 2024-06-30 01:55:30 +00:00
Use struct dom_string for node->proc_instruction.instruction
This commit is contained in:
parent
9935bf2083
commit
0546759b4b
|
@ -427,8 +427,8 @@ get_dom_node_value(struct dom_node *node, int codepage)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DOM_NODE_PROCESSING_INSTRUCTION:
|
case DOM_NODE_PROCESSING_INSTRUCTION:
|
||||||
value = node->data.proc_instruction.instruction;
|
value = node->data.proc_instruction.instruction.string;
|
||||||
valuelen = node->data.proc_instruction.instructionlen;
|
valuelen = node->data.proc_instruction.instruction.length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DOM_NODE_CDATA_SECTION:
|
case DOM_NODE_CDATA_SECTION:
|
||||||
|
|
|
@ -160,8 +160,7 @@ struct dom_proc_instruction_node {
|
||||||
/* The target of the processing instruction (xml for '<?xml ... ?>')
|
/* The target of the processing instruction (xml for '<?xml ... ?>')
|
||||||
* is in the @string / @length members. */
|
* is in the @string / @length members. */
|
||||||
/* This holds the value to be processed */
|
/* This holds the value to be processed */
|
||||||
unsigned char *instruction;
|
struct dom_string instruction;
|
||||||
uint16_t instructionlen;
|
|
||||||
|
|
||||||
/* For fast checking of the target type */
|
/* For fast checking of the target type */
|
||||||
uint16_t type; /* enum dom_proc_instruction_type */
|
uint16_t type; /* enum dom_proc_instruction_type */
|
||||||
|
@ -276,8 +275,7 @@ add_dom_proc_instruction(struct dom_node *parent, unsigned char *string, int len
|
||||||
struct dom_node *node = add_dom_node(parent, DOM_NODE_PROCESSING_INSTRUCTION, string, length);
|
struct dom_node *node = add_dom_node(parent, DOM_NODE_PROCESSING_INSTRUCTION, string, length);
|
||||||
|
|
||||||
if (node && instruction) {
|
if (node && instruction) {
|
||||||
node->data.proc_instruction.instruction = instruction;
|
set_dom_string(&node->data.proc_instruction.instruction, instruction, instructionlen);
|
||||||
node->data.proc_instruction.instructionlen = instructionlen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
|
|
@ -559,8 +559,8 @@ render_dom_proc_instr_source(struct dom_stack *stack, struct dom_node *node, voi
|
||||||
|
|
||||||
render_dom_node_text(renderer, &renderer->styles[node->type], node);
|
render_dom_node_text(renderer, &renderer->styles[node->type], node);
|
||||||
|
|
||||||
value = node->data.proc_instruction.instruction;
|
value = node->data.proc_instruction.instruction.string;
|
||||||
valuelen = node->data.proc_instruction.instructionlen;
|
valuelen = node->data.proc_instruction.instruction.length;
|
||||||
|
|
||||||
if (!value || node->data.proc_instruction.map)
|
if (!value || node->data.proc_instruction.map)
|
||||||
return node;
|
return node;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user