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

Make it so that the indent string used by the tree renderer needs no init

This commit is contained in:
Jonas Fonseca 2005-12-22 03:33:56 +01:00 committed by Jonas Fonseca
parent f21fcd132f
commit cb64068712

View File

@ -414,7 +414,8 @@ set_enhanced_dom_node_value(struct dom_string *string, struct dom_node *node)
string->length = string->string ? strlen(string->string) : 0; string->length = string->string ? strlen(string->string) : 0;
} }
static unsigned char indent_string[MAX_STR_LEN]; static unsigned char indent_string[] =
" ";
#define get_indent_offset(stack) \ #define get_indent_offset(stack) \
((stack)->depth < sizeof(indent_string)/2 ? (stack)->depth * 2 : sizeof(indent_string)) ((stack)->depth < sizeof(indent_string)/2 ? (stack)->depth * 2 : sizeof(indent_string))
@ -783,7 +784,6 @@ render_dom_document(struct cache_entry *cached, struct document *document,
&dom_source_renderer_context_info); &dom_source_renderer_context_info);
#ifdef DOM_TREE_RENDERER #ifdef DOM_TREE_RENDERER
memset(indent_string, ' ', sizeof(indent_string));
add_dom_stack_context(&parser->stack, &renderer, add_dom_stack_context(&parser->stack, &renderer,
&dom_tree_renderer_context_info); &dom_tree_renderer_context_info);
#endif #endif