summaryrefslogtreecommitdiff
path: root/utils/themeeditor/skin_parser.c
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-01 16:44:52 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-01 16:44:52 +0000
commit0a054b288b4ac71f384a18f7c9f8835863fe3751 (patch)
treef842db8e178d622b0c9226616abd6a436308e5a5 /utils/themeeditor/skin_parser.c
parent2267bd37b275879ec43e39df5d21ce44a91c742c (diff)
downloadrockbox-0a054b288b4ac71f384a18f7c9f8835863fe3751.tar.gz
rockbox-0a054b288b4ac71f384a18f7c9f8835863fe3751.zip
Committing FS#11345 by JdGordon. Theme editor parser now includes full tag information in the skin_element struct
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26448 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
-rw-r--r--utils/themeeditor/skin_parser.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c
index 74ba7bd71d..4f7acf90fb 100644
--- a/utils/themeeditor/skin_parser.c
+++ b/utils/themeeditor/skin_parser.c
@@ -347,6 +347,7 @@ int skin_parse_tag(struct skin_element* element, char** document)
347 347
348 char tag_name[3]; 348 char tag_name[3];
349 char* tag_args; 349 char* tag_args;
350 struct tag_info *tag;
350 351
351 int num_args = 1; 352 int num_args = 1;
352 int i; 353 int i;
@@ -361,12 +362,12 @@ int skin_parse_tag(struct skin_element* element, char** document)
361 tag_name[2] = '\0'; 362 tag_name[2] = '\0';
362 363
363 /* First we check the two characters after the '%', then a single char */ 364 /* First we check the two characters after the '%', then a single char */
364 tag_args = find_tag(tag_name); 365 tag = find_tag(tag_name);
365 366
366 if(!tag_args) 367 if(!tag)
367 { 368 {
368 tag_name[1] = '\0'; 369 tag_name[1] = '\0';
369 tag_args = find_tag(tag_name); 370 tag = find_tag(tag_name);
370 cursor++; 371 cursor++;
371 } 372 }
372 else 373 else
@@ -374,7 +375,7 @@ int skin_parse_tag(struct skin_element* element, char** document)
374 cursor += 2; 375 cursor += 2;
375 } 376 }
376 377
377 if(!tag_args) 378 if(!tag)
378 { 379 {
379 skin_error(ILLEGAL_TAG); 380 skin_error(ILLEGAL_TAG);
380 return 0; 381 return 0;
@@ -382,7 +383,8 @@ int skin_parse_tag(struct skin_element* element, char** document)
382 383
383 /* Copying basic tag info */ 384 /* Copying basic tag info */
384 element->type = TAG; 385 element->type = TAG;
385 strcpy(element->name, tag_name); 386 element->tag = tag;
387 tag_args = tag->params;
386 element->line = skin_line; 388 element->line = skin_line;
387 389
388 /* Checking for the * flag */ 390 /* Checking for the * flag */