Fix yellow

Change-Id: I8685198c208b5324b09b5ad59f7379502e9ed977
This commit is contained in:
Thomas Jarosch 2015-01-05 19:09:33 +01:00
parent fdd4aef340
commit f91434cc7b
4 changed files with 41 additions and 40 deletions

View file

@ -43,6 +43,10 @@ static void* callback_data;
#endif
/* 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_line(const char** document);
static struct skin_element* skin_parse_line_optional(const char** document,

View file

@ -160,9 +160,6 @@ struct skin_element* skin_parse(const char* document,
struct skin_element* skin_parse(const char* document);
#endif
/* 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);
void skin_free_tree(struct skin_element* root);

View file

@ -41,6 +41,41 @@ void skip_comment(const char** 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)
{
char tag_name[MAX_TAG_LENGTH];
@ -89,41 +124,6 @@ void skip_tag(const char** 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)
{

View file

@ -31,8 +31,8 @@ extern "C"
/* Scanning functions */
void skip_tag(const char** document);
void skip_comment(const char** document);
static void skip_arglist(const char** document);
static void skip_enumlist(const char** document);
/* static void skip_arglist(const char** document); */
/* static void skip_enumlist(const char** document); */
char* scan_string(const char** document);
int scan_int(const char** document);
int check_viewport(const char* document); /* Checks for a viewport declaration */