summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-02 08:05:03 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-02 08:05:03 +0000
commit4429fb02b784c1cf66d6f4fc13954eb7aae4ba0c (patch)
treecf4b6df5d4425c745cbf49101ec5140c742fbbff /lib
parent3f4dfe5c03fd15c6753408eaf5608fd6b62e106a (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/skin_parser/skin_parser.c10
1 files changed, 10 insertions, 0 deletions
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;