diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/skin_parser/skin_parser.c | 10 |
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 @@ | |||
33 | 33 | ||
34 | /* Global variables for the parser */ | 34 | /* Global variables for the parser */ |
35 | int skin_line = 0; | 35 | int skin_line = 0; |
36 | int viewport_line = 0; | ||
36 | 37 | ||
37 | /* Auxiliary parsing functions (not visible at global scope) */ | 38 | /* Auxiliary parsing functions (not visible at global scope) */ |
38 | static struct skin_element* skin_parse_viewport(char** document); | 39 | static struct skin_element* skin_parse_viewport(char** document); |
@@ -64,6 +65,7 @@ struct skin_element* skin_parse(const char* document) | |||
64 | char* cursor = (char*)document; /*Keeps track of location in the document*/ | 65 | char* cursor = (char*)document; /*Keeps track of location in the document*/ |
65 | 66 | ||
66 | skin_line = 1; | 67 | skin_line = 1; |
68 | viewport_line = 0; | ||
67 | 69 | ||
68 | skin_clear_errors(); | 70 | skin_clear_errors(); |
69 | 71 | ||
@@ -105,6 +107,7 @@ static struct skin_element* skin_parse_viewport(char** document) | |||
105 | retval->type = VIEWPORT; | 107 | retval->type = VIEWPORT; |
106 | retval->children_count = 1; | 108 | retval->children_count = 1; |
107 | retval->line = skin_line; | 109 | retval->line = skin_line; |
110 | viewport_line = skin_line; | ||
108 | 111 | ||
109 | struct skin_element** to_write = 0; | 112 | struct skin_element** to_write = 0; |
110 | 113 | ||
@@ -631,6 +634,13 @@ static int skin_parse_tag(struct skin_element* element, char** document) | |||
631 | cursor++; | 634 | cursor++; |
632 | skin_line++; | 635 | skin_line++; |
633 | } | 636 | } |
637 | |||
638 | if((strcmp(tag->name, "Vf") == 0 || strcmp(tag->name, "Vb") == 0) | ||
639 | && *cursor == '\n' && skin_line == viewport_line) | ||
640 | { | ||
641 | *cursor++; | ||
642 | skin_line++; | ||
643 | } | ||
634 | 644 | ||
635 | *document = cursor; | 645 | *document = cursor; |
636 | 646 | ||