diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-05-27 19:57:15 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-05-27 19:57:15 +0000 |
| commit | 8ea056db4b6c60e2e623cd0e79ccb64aea5bec51 (patch) | |
| tree | b0ae89113d95c33616b4edda0abe22f63415e0a4 /utils/themeeditor/skin_parser.c | |
| parent | deb1600bbc4d0e04f4560186fb665dc95b908e14 (diff) | |
| download | rockbox-8ea056db4b6c60e2e623cd0e79ccb64aea5bec51.zip rockbox-8ea056db4b6c60e2e623cd0e79ccb64aea5bec51.tar.gz rockbox-8ea056db4b6c60e2e623cd0e79ccb64aea5bec51.tar.bz2 rockbox-8ea056db4b6c60e2e623cd0e79ccb64aea5bec51.tar.xz | |
Theme Editor: Fixed a bug in the subline parser, added a LINE element to contain logical lines, working on data model
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26337 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
| -rw-r--r-- | utils/themeeditor/skin_parser.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c index dd061a1..a6c5ea4 100644 --- a/utils/themeeditor/skin_parser.c +++ b/utils/themeeditor/skin_parser.c @@ -151,6 +151,14 @@ struct skin_element* skin_parse_line_optional(char** document, int conditional) struct skin_element* root = NULL; struct skin_element* current = NULL; + struct skin_element* retval = NULL; + + /* A wrapper for the line */ + retval = skin_alloc_element(); + retval->type = LINE; + retval->line = skin_line; + retval->children_count = 1; + retval->children = skin_alloc_children(1); while(*cursor != '\n' && *cursor != '\0' && *cursor != MULTILINESYM && !((*cursor == ARGLISTSEPERATESYM @@ -214,7 +222,8 @@ struct skin_element* skin_parse_line_optional(char** document, int conditional) /* Moving up the calling function's pointer */ *document = cursor; - return root; + retval->children[0] = root; + return retval; } struct skin_element* skin_parse_sublines(char** document) @@ -233,6 +242,7 @@ struct skin_element* skin_parse_sublines_optional(char** document, retval = skin_alloc_element(); retval->type = SUBLINES; retval->next = NULL; + retval->line = skin_line; /* First we count the sublines */ while(*cursor != '\0' && *cursor != '\n' @@ -276,7 +286,7 @@ struct skin_element* skin_parse_sublines_optional(char** document, skin_error(MULTILINE_EXPECTED); return NULL; } - else + else if(i != sublines - 1) { cursor++; } |