summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2012-02-01 21:27:18 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2012-02-01 21:27:18 +1100
commit5f387c28ce716cb6991c36dd9a1e77069066f0ea (patch)
treeb6a9d0f40be39b2da86c737d898b267ad8289e4a
parent88cda7eb2677a5d36141cd4d0b94c98457213ccb (diff)
downloadrockbox-5f387c28ce716cb6991c36dd9a1e77069066f0ea.tar.gz
rockbox-5f387c28ce716cb6991c36dd9a1e77069066f0ea.zip
skin parser: skip \t characters at the begining of lines to allow for more readable skins
Change-Id: I8f3154d17807ad202fc65d462e85da2195ce605c
-rw-r--r--lib/skin_parser/skin_parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c
index c49ac12a59..7dc0fa3a2f 100644
--- a/lib/skin_parser/skin_parser.c
+++ b/lib/skin_parser/skin_parser.c
@@ -314,6 +314,9 @@ static struct skin_element* skin_parse_line_optional(const char** document,
314 return NULL; 314 return NULL;
315 retval->type = LINE; 315 retval->type = LINE;
316 retval->line = skin_line; 316 retval->line = skin_line;
317 while (*cursor == '\t')
318 cursor++;
319
317 if(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM 320 if(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM
318 && !(conditional && (*cursor == ARGLISTSEPARATESYM 321 && !(conditional && (*cursor == ARGLISTSEPARATESYM
319 || *cursor == ARGLISTCLOSESYM 322 || *cursor == ARGLISTCLOSESYM
@@ -426,6 +429,8 @@ static struct skin_element* skin_parse_sublines_optional(const char** document,
426 retval->type = LINE_ALTERNATOR; 429 retval->type = LINE_ALTERNATOR;
427 retval->next = skin_buffer_to_offset(NULL); 430 retval->next = skin_buffer_to_offset(NULL);
428 retval->line = skin_line; 431 retval->line = skin_line;
432 while (*cursor == '\t')
433 cursor++;
429 434
430 /* First we count the sublines */ 435 /* First we count the sublines */
431 while(*cursor != '\0' && *cursor != '\n' 436 while(*cursor != '\0' && *cursor != '\n'