mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Fix yellow
Change-Id: I8685198c208b5324b09b5ad59f7379502e9ed977
This commit is contained in:
parent
fdd4aef340
commit
f91434cc7b
4 changed files with 41 additions and 40 deletions
|
@ -43,6 +43,10 @@ static void* callback_data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Auxiliary parsing functions (not visible at global scope) */
|
/* Auxiliary parsing functions (not visible at global scope) */
|
||||||
|
static struct skin_element* skin_alloc_element(void);
|
||||||
|
static OFFSETTYPE(struct skin_element*)* skin_alloc_children(int count);
|
||||||
|
static struct skin_tag_parameter* skin_alloc_params(int count);
|
||||||
|
|
||||||
static struct skin_element* skin_parse_viewport(const char** document);
|
static struct skin_element* skin_parse_viewport(const char** document);
|
||||||
static struct skin_element* skin_parse_line(const char** document);
|
static struct skin_element* skin_parse_line(const char** document);
|
||||||
static struct skin_element* skin_parse_line_optional(const char** document,
|
static struct skin_element* skin_parse_line_optional(const char** document,
|
||||||
|
|
|
@ -160,9 +160,6 @@ struct skin_element* skin_parse(const char* document,
|
||||||
struct skin_element* skin_parse(const char* document);
|
struct skin_element* skin_parse(const char* document);
|
||||||
#endif
|
#endif
|
||||||
/* Memory management functions */
|
/* Memory management functions */
|
||||||
static struct skin_element* skin_alloc_element(void);
|
|
||||||
static OFFSETTYPE(struct skin_element*)* skin_alloc_children(int count);
|
|
||||||
static struct skin_tag_parameter* skin_alloc_params(int count);
|
|
||||||
char* skin_alloc_string(int length);
|
char* skin_alloc_string(int length);
|
||||||
|
|
||||||
void skin_free_tree(struct skin_element* root);
|
void skin_free_tree(struct skin_element* root);
|
||||||
|
|
|
@ -41,6 +41,41 @@ void skip_comment(const char** document)
|
||||||
(*document)++;
|
(*document)++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void skip_arglist(const char** document)
|
||||||
|
{
|
||||||
|
if(**document == ARGLISTOPENSYM)
|
||||||
|
(*document)++;
|
||||||
|
while(**document && **document != ARGLISTCLOSESYM)
|
||||||
|
{
|
||||||
|
if(**document == TAGSYM)
|
||||||
|
skip_tag(document);
|
||||||
|
else if(**document == COMMENTSYM)
|
||||||
|
skip_comment(document);
|
||||||
|
else
|
||||||
|
(*document)++;
|
||||||
|
}
|
||||||
|
if(**document == ARGLISTCLOSESYM)
|
||||||
|
(*document)++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void skip_enumlist(const char** document)
|
||||||
|
{
|
||||||
|
if(**document == ENUMLISTOPENSYM)
|
||||||
|
(*document)++;
|
||||||
|
while(**document && **document != ENUMLISTCLOSESYM)
|
||||||
|
{
|
||||||
|
if(**document == TAGSYM)
|
||||||
|
skip_tag(document);
|
||||||
|
else if(**document == COMMENTSYM)
|
||||||
|
skip_comment(document);
|
||||||
|
else
|
||||||
|
(*document)++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(**document == ENUMLISTCLOSESYM)
|
||||||
|
(*document)++;
|
||||||
|
}
|
||||||
|
|
||||||
void skip_tag(const char** document)
|
void skip_tag(const char** document)
|
||||||
{
|
{
|
||||||
char tag_name[MAX_TAG_LENGTH];
|
char tag_name[MAX_TAG_LENGTH];
|
||||||
|
@ -89,41 +124,6 @@ void skip_tag(const char** document)
|
||||||
skip_enumlist(document);
|
skip_enumlist(document);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void skip_arglist(const char** document)
|
|
||||||
{
|
|
||||||
if(**document == ARGLISTOPENSYM)
|
|
||||||
(*document)++;
|
|
||||||
while(**document && **document != ARGLISTCLOSESYM)
|
|
||||||
{
|
|
||||||
if(**document == TAGSYM)
|
|
||||||
skip_tag(document);
|
|
||||||
else if(**document == COMMENTSYM)
|
|
||||||
skip_comment(document);
|
|
||||||
else
|
|
||||||
(*document)++;
|
|
||||||
}
|
|
||||||
if(**document == ARGLISTCLOSESYM)
|
|
||||||
(*document)++;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void skip_enumlist(const char** document)
|
|
||||||
{
|
|
||||||
if(**document == ENUMLISTOPENSYM)
|
|
||||||
(*document)++;
|
|
||||||
while(**document && **document != ENUMLISTCLOSESYM)
|
|
||||||
{
|
|
||||||
if(**document == TAGSYM)
|
|
||||||
skip_tag(document);
|
|
||||||
else if(**document == COMMENTSYM)
|
|
||||||
skip_comment(document);
|
|
||||||
else
|
|
||||||
(*document)++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(**document == ENUMLISTCLOSESYM)
|
|
||||||
(*document)++;
|
|
||||||
}
|
|
||||||
|
|
||||||
char* scan_string(const char** document)
|
char* scan_string(const char** document)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ extern "C"
|
||||||
/* Scanning functions */
|
/* Scanning functions */
|
||||||
void skip_tag(const char** document);
|
void skip_tag(const char** document);
|
||||||
void skip_comment(const char** document);
|
void skip_comment(const char** document);
|
||||||
static void skip_arglist(const char** document);
|
/* static void skip_arglist(const char** document); */
|
||||||
static void skip_enumlist(const char** document);
|
/* static void skip_enumlist(const char** document); */
|
||||||
char* scan_string(const char** document);
|
char* scan_string(const char** document);
|
||||||
int scan_int(const char** document);
|
int scan_int(const char** document);
|
||||||
int check_viewport(const char* document); /* Checks for a viewport declaration */
|
int check_viewport(const char* document); /* Checks for a viewport declaration */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue