From 4429fb02b784c1cf66d6f4fc13954eb7aae4ba0c Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Fri, 2 Jul 2010 08:05:03 +0000 Subject: Theme Editor: Removed some old hash code that caused viewer not to update due to hash collisions. Made Vf and Vb tags attached to viewport definition eat newline at end of line' git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27238 a1c6a512-1295-4272-9138-f99709370657 --- lib/skin_parser/skin_parser.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 5e4ef49074..2e5328637b 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c @@ -33,6 +33,7 @@ /* Global variables for the parser */ int skin_line = 0; +int viewport_line = 0; /* Auxiliary parsing functions (not visible at global scope) */ static struct skin_element* skin_parse_viewport(char** document); @@ -64,6 +65,7 @@ struct skin_element* skin_parse(const char* document) char* cursor = (char*)document; /*Keeps track of location in the document*/ skin_line = 1; + viewport_line = 0; skin_clear_errors(); @@ -105,6 +107,7 @@ static struct skin_element* skin_parse_viewport(char** document) retval->type = VIEWPORT; retval->children_count = 1; retval->line = skin_line; + viewport_line = skin_line; struct skin_element** to_write = 0; @@ -631,6 +634,13 @@ static int skin_parse_tag(struct skin_element* element, char** document) cursor++; skin_line++; } + + if((strcmp(tag->name, "Vf") == 0 || strcmp(tag->name, "Vb") == 0) + && *cursor == '\n' && skin_line == viewport_line) + { + *cursor++; + skin_line++; + } *document = cursor; -- cgit v1.2.3