1
0
Fork 0
forked from len0rd/rockbox

de-tabify

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30734 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2011-10-08 13:54:55 +00:00
parent 9d9de73693
commit e52600eb67

View file

@ -992,48 +992,48 @@ static int skin_parse_conditional(struct skin_element* element, const char** doc
if (children == 0) if (children == 0)
{ {
const char* emptyline= ""; const char* emptyline= "";
children = 1; children = 1;
element->children = skin_alloc_children(children); element->children = skin_alloc_children(children);
if (!element->children) if (!element->children)
return 0; return 0;
element->children_count = children; element->children_count = children;
element->children[0] = skin_parse_code_as_arg(&emptyline); element->children[0] = skin_parse_code_as_arg(&emptyline);
} }
else else
{ {
element->children = skin_alloc_children(children); element->children = skin_alloc_children(children);
if (!element->children) if (!element->children)
return 0; return 0;
element->children_count = children; element->children_count = children;
for(i = 0; i < children; i++) for(i = 0; i < children; i++)
{ {
element->children[i] = skin_parse_code_as_arg(&cursor); element->children[i] = skin_parse_code_as_arg(&cursor);
if (element->children[i] == NULL) if (element->children[i] == NULL)
return 0; return 0;
skip_whitespace(&cursor); skip_whitespace(&cursor);
#ifdef ROCKBOX #ifdef ROCKBOX
if ((element->tag->flags&FEATURE_TAG) && feature_available) if ((element->tag->flags&FEATURE_TAG) && feature_available)
cursor = conditional_end; cursor = conditional_end;
#endif #endif
if(i < children - 1 && *cursor != ENUMLISTSEPARATESYM) if(i < children - 1 && *cursor != ENUMLISTSEPARATESYM)
{ {
skin_error(SEPARATOR_EXPECTED, cursor); skin_error(SEPARATOR_EXPECTED, cursor);
return 0; return 0;
} }
else if(i == children - 1 && *cursor != ENUMLISTCLOSESYM) else if(i == children - 1 && *cursor != ENUMLISTCLOSESYM)
{ {
skin_error(CLOSE_EXPECTED, cursor); skin_error(CLOSE_EXPECTED, cursor);
return 0; return 0;
} }
else else
{ {
cursor++; cursor++;
} }
} }
} }
*document = cursor; *document = cursor;
return 1; return 1;