1
0
Fork 0
forked from len0rd/rockbox

Correct spelling of 'seperate' in the skin parsing code - FS#11724 by Alexander Levin

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28485 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2010-11-05 09:51:19 +00:00
parent 41910a04b7
commit fffbdcc996
5 changed files with 24 additions and 24 deletions

View file

@ -85,14 +85,14 @@ void skin_error(enum skin_errorcode error, const char* cursor)
case DECIMAL_EXPECTED: case DECIMAL_EXPECTED:
error_message = "Expected decimal"; error_message = "Expected decimal";
break; break;
case SEPERATOR_EXPECTED: case SEPARATOR_EXPECTED:
error_message = "Expected argument seperator"; error_message = "Expected argument separator";
break; break;
case CLOSE_EXPECTED: case CLOSE_EXPECTED:
error_message = "Expected list close"; error_message = "Expected list close";
break; break;
case MULTILINE_EXPECTED: case MULTILINE_EXPECTED:
error_message = "Expected subline seperator"; error_message = "Expected subline separator";
break; break;
}; };

View file

@ -261,7 +261,7 @@ static struct skin_element* skin_parse_line(const char**document)
/* /*
* If conditional is set to true, then this will break upon encountering * If conditional is set to true, then this will break upon encountering
* SEPERATESYM. This should only be used when parsing a line inside a * SEPARATESYM. This should only be used when parsing a line inside a
* conditional, otherwise just use the wrapper function skin_parse_line() * conditional, otherwise just use the wrapper function skin_parse_line()
*/ */
static struct skin_element* skin_parse_line_optional(const char** document, static struct skin_element* skin_parse_line_optional(const char** document,
@ -280,9 +280,9 @@ static struct skin_element* skin_parse_line_optional(const char** document,
retval->type = LINE; retval->type = LINE;
retval->line = skin_line; retval->line = skin_line;
if(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM if(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM
&& !(conditional && (*cursor == ARGLISTSEPERATESYM && !(conditional && (*cursor == ARGLISTSEPARATESYM
|| *cursor == ARGLISTCLOSESYM || *cursor == ARGLISTCLOSESYM
|| *cursor == ENUMLISTSEPERATESYM || *cursor == ENUMLISTSEPARATESYM
|| *cursor == ENUMLISTCLOSESYM))) || *cursor == ENUMLISTCLOSESYM)))
{ {
retval->children_count = 1; retval->children_count = 1;
@ -313,9 +313,9 @@ static struct skin_element* skin_parse_line_optional(const char** document,
#endif #endif
while(*cursor != '\n' && *cursor != '\0' && *cursor != MULTILINESYM while(*cursor != '\n' && *cursor != '\0' && *cursor != MULTILINESYM
&& !((*cursor == ARGLISTSEPERATESYM && !((*cursor == ARGLISTSEPARATESYM
|| *cursor == ARGLISTCLOSESYM || *cursor == ARGLISTCLOSESYM
|| *cursor == ENUMLISTSEPERATESYM || *cursor == ENUMLISTSEPARATESYM
|| *cursor == ENUMLISTCLOSESYM) || *cursor == ENUMLISTCLOSESYM)
&& conditional) && conditional)
&& !(check_viewport(cursor) && cursor != *document)) && !(check_viewport(cursor) && cursor != *document))
@ -390,9 +390,9 @@ static struct skin_element* skin_parse_sublines_optional(const char** document,
/* First we count the sublines */ /* First we count the sublines */
while(*cursor != '\0' && *cursor != '\n' while(*cursor != '\0' && *cursor != '\n'
&& !((*cursor == ARGLISTSEPERATESYM && !((*cursor == ARGLISTSEPARATESYM
|| *cursor == ARGLISTCLOSESYM || *cursor == ARGLISTCLOSESYM
|| *cursor == ENUMLISTSEPERATESYM || *cursor == ENUMLISTSEPARATESYM
|| *cursor == ENUMLISTCLOSESYM) || *cursor == ENUMLISTCLOSESYM)
&& conditional) && conditional)
&& !(check_viewport(cursor) && cursor != *document)) && !(check_viewport(cursor) && cursor != *document))
@ -565,7 +565,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
{ {
skip_arglist(&cursor); skip_arglist(&cursor);
} }
else if(*cursor == ARGLISTSEPERATESYM) else if(*cursor == ARGLISTSEPARATESYM)
{ {
num_args++; num_args++;
cursor++; cursor++;
@ -753,9 +753,9 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
skip_whitespace(&cursor); skip_whitespace(&cursor);
if(*cursor != ARGLISTSEPERATESYM && i < num_args - 1) if(*cursor != ARGLISTSEPARATESYM && i < num_args - 1)
{ {
skin_error(SEPERATOR_EXPECTED, cursor); skin_error(SEPARATOR_EXPECTED, cursor);
return 0; return 0;
} }
else if(*cursor != ARGLISTCLOSESYM && i == num_args - 1) else if(*cursor != ARGLISTCLOSESYM && i == num_args - 1)
@ -801,7 +801,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document)
/* /*
* If the conditional flag is set true, then parsing text will stop at an * If the conditional flag is set true, then parsing text will stop at an
* ARGLISTSEPERATESYM. Only set that flag when parsing within a conditional * ARGLISTSEPARATESYM. Only set that flag when parsing within a conditional
*/ */
static int skin_parse_text(struct skin_element* element, const char** document, static int skin_parse_text(struct skin_element* element, const char** document,
int conditional) int conditional)
@ -814,9 +814,9 @@ static int skin_parse_text(struct skin_element* element, const char** document,
/* First figure out how much text we're copying */ /* First figure out how much text we're copying */
while(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM while(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM
&& *cursor != COMMENTSYM && *cursor != COMMENTSYM
&& !((*cursor == ARGLISTSEPERATESYM && !((*cursor == ARGLISTSEPARATESYM
|| *cursor == ARGLISTCLOSESYM || *cursor == ARGLISTCLOSESYM
|| *cursor == ENUMLISTSEPERATESYM || *cursor == ENUMLISTSEPARATESYM
|| *cursor == ENUMLISTCLOSESYM) || *cursor == ENUMLISTCLOSESYM)
&& conditional)) && conditional))
{ {
@ -932,7 +932,7 @@ static int skin_parse_conditional(struct skin_element* element, const char** doc
break; break;
cursor++; cursor++;
} }
else if(*cursor == ENUMLISTSEPERATESYM) else if(*cursor == ENUMLISTSEPARATESYM)
{ {
children++; children++;
cursor++; cursor++;
@ -984,9 +984,9 @@ static int skin_parse_conditional(struct skin_element* element, const char** doc
cursor = conditional_end; cursor = conditional_end;
#endif #endif
if(i < children - 1 && *cursor != ENUMLISTSEPERATESYM) if(i < children - 1 && *cursor != ENUMLISTSEPARATESYM)
{ {
skin_error(SEPERATOR_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)
@ -1048,7 +1048,7 @@ static struct skin_element* skin_parse_code_as_arg(const char** document)
/* Checking for sublines */ /* Checking for sublines */
while(*cursor != '\n' && *cursor != '\0' while(*cursor != '\n' && *cursor != '\0'
&& *cursor != ENUMLISTSEPERATESYM && *cursor != ARGLISTSEPERATESYM && *cursor != ENUMLISTSEPARATESYM && *cursor != ARGLISTSEPARATESYM
&& *cursor != ENUMLISTCLOSESYM && *cursor != ARGLISTCLOSESYM) && *cursor != ENUMLISTCLOSESYM && *cursor != ARGLISTCLOSESYM)
{ {
if(*cursor == MULTILINESYM) if(*cursor == MULTILINESYM)

View file

@ -58,7 +58,7 @@ enum skin_errorcode
INSUFFICIENT_ARGS, INSUFFICIENT_ARGS,
INT_EXPECTED, INT_EXPECTED,
DECIMAL_EXPECTED, DECIMAL_EXPECTED,
SEPERATOR_EXPECTED, SEPARATOR_EXPECTED,
CLOSE_EXPECTED, CLOSE_EXPECTED,
MULTILINE_EXPECTED MULTILINE_EXPECTED
}; };

View file

@ -101,7 +101,7 @@ char* scan_string(const char** document)
char* buffer = NULL; char* buffer = NULL;
int i; int i;
while(*cursor != ARGLISTSEPERATESYM && *cursor != ARGLISTCLOSESYM && while(*cursor != ARGLISTSEPARATESYM && *cursor != ARGLISTCLOSESYM &&
*cursor != '\0') *cursor != '\0')
{ {
if(*cursor == COMMENTSYM) if(*cursor == COMMENTSYM)

View file

@ -36,8 +36,8 @@ extern "C"
#define MULTILINESYM ';' #define MULTILINESYM ';'
#define ARGLISTOPENSYM '(' #define ARGLISTOPENSYM '('
#define ARGLISTCLOSESYM ')' #define ARGLISTCLOSESYM ')'
#define ARGLISTSEPERATESYM ',' #define ARGLISTSEPARATESYM ','
#define ENUMLISTSEPERATESYM '|' #define ENUMLISTSEPARATESYM '|'
#define ENUMLISTOPENSYM '<' #define ENUMLISTOPENSYM '<'
#define ENUMLISTCLOSESYM '>' #define ENUMLISTCLOSESYM '>'
#define DEFAULTSYM '-' #define DEFAULTSYM '-'