From f91434cc7b4204ca47c86090928cdd454dd52606 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 5 Jan 2015 19:09:33 +0100 Subject: [PATCH] Fix yellow Change-Id: I8685198c208b5324b09b5ad59f7379502e9ed977 --- lib/skin_parser/skin_parser.c | 4 ++ lib/skin_parser/skin_parser.h | 3 -- lib/skin_parser/skin_scan.c | 70 +++++++++++++++++------------------ lib/skin_parser/skin_scan.h | 4 +- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index b5ad023d0a..e47054b06a 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c @@ -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, diff --git a/lib/skin_parser/skin_parser.h b/lib/skin_parser/skin_parser.h index c59072594f..fc15aff1be 100644 --- a/lib/skin_parser/skin_parser.h +++ b/lib/skin_parser/skin_parser.h @@ -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); diff --git a/lib/skin_parser/skin_scan.c b/lib/skin_parser/skin_scan.c index c5ce595ddd..5b795f329d 100644 --- a/lib/skin_parser/skin_scan.c +++ b/lib/skin_parser/skin_scan.c @@ -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) { diff --git a/lib/skin_parser/skin_scan.h b/lib/skin_parser/skin_scan.h index b1f842b8ce..4a054cf155 100644 --- a/lib/skin_parser/skin_scan.h +++ b/lib/skin_parser/skin_scan.h @@ -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 */