summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2015-01-05 19:09:33 +0100
committerThomas Jarosch <tomj@simonv.com>2015-01-05 19:09:33 +0100
commitf91434cc7b4204ca47c86090928cdd454dd52606 (patch)
tree3cf90ce2fa0448f4e7094858734130efd0f7ea7d
parentfdd4aef34003587d7fd9ed754dd35ce901b639bf (diff)
downloadrockbox-f91434cc7b4204ca47c86090928cdd454dd52606.tar.gz
rockbox-f91434cc7b4204ca47c86090928cdd454dd52606.zip
Fix yellow
Change-Id: I8685198c208b5324b09b5ad59f7379502e9ed977
-rw-r--r--lib/skin_parser/skin_parser.c4
-rw-r--r--lib/skin_parser/skin_parser.h3
-rw-r--r--lib/skin_parser/skin_scan.c70
-rw-r--r--lib/skin_parser/skin_scan.h4
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;
43#endif 43#endif
44 44
45/* Auxiliary parsing functions (not visible at global scope) */ 45/* Auxiliary parsing functions (not visible at global scope) */
46static struct skin_element* skin_alloc_element(void);
47static OFFSETTYPE(struct skin_element*)* skin_alloc_children(int count);
48static struct skin_tag_parameter* skin_alloc_params(int count);
49
46static struct skin_element* skin_parse_viewport(const char** document); 50static struct skin_element* skin_parse_viewport(const char** document);
47static struct skin_element* skin_parse_line(const char** document); 51static struct skin_element* skin_parse_line(const char** document);
48static struct skin_element* skin_parse_line_optional(const char** document, 52static 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,
160struct skin_element* skin_parse(const char* document); 160struct skin_element* skin_parse(const char* document);
161#endif 161#endif
162/* Memory management functions */ 162/* Memory management functions */
163static struct skin_element* skin_alloc_element(void);
164static OFFSETTYPE(struct skin_element*)* skin_alloc_children(int count);
165static struct skin_tag_parameter* skin_alloc_params(int count);
166char* skin_alloc_string(int length); 163char* skin_alloc_string(int length);
167 164
168void skin_free_tree(struct skin_element* root); 165void 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)
41 (*document)++; 41 (*document)++;
42} 42}
43 43
44static void skip_arglist(const char** document)
45{
46 if(**document == ARGLISTOPENSYM)
47 (*document)++;
48 while(**document && **document != ARGLISTCLOSESYM)
49 {
50 if(**document == TAGSYM)
51 skip_tag(document);
52 else if(**document == COMMENTSYM)
53 skip_comment(document);
54 else
55 (*document)++;
56 }
57 if(**document == ARGLISTCLOSESYM)
58 (*document)++;
59}
60
61static void skip_enumlist(const char** document)
62{
63 if(**document == ENUMLISTOPENSYM)
64 (*document)++;
65 while(**document && **document != ENUMLISTCLOSESYM)
66 {
67 if(**document == TAGSYM)
68 skip_tag(document);
69 else if(**document == COMMENTSYM)
70 skip_comment(document);
71 else
72 (*document)++;
73 }
74
75 if(**document == ENUMLISTCLOSESYM)
76 (*document)++;
77}
78
44void skip_tag(const char** document) 79void skip_tag(const char** document)
45{ 80{
46 char tag_name[MAX_TAG_LENGTH]; 81 char tag_name[MAX_TAG_LENGTH];
@@ -89,41 +124,6 @@ void skip_tag(const char** document)
89 skip_enumlist(document); 124 skip_enumlist(document);
90} 125}
91 126
92static void skip_arglist(const char** document)
93{
94 if(**document == ARGLISTOPENSYM)
95 (*document)++;
96 while(**document && **document != ARGLISTCLOSESYM)
97 {
98 if(**document == TAGSYM)
99 skip_tag(document);
100 else if(**document == COMMENTSYM)
101 skip_comment(document);
102 else
103 (*document)++;
104 }
105 if(**document == ARGLISTCLOSESYM)
106 (*document)++;
107}
108
109static void skip_enumlist(const char** document)
110{
111 if(**document == ENUMLISTOPENSYM)
112 (*document)++;
113 while(**document && **document != ENUMLISTCLOSESYM)
114 {
115 if(**document == TAGSYM)
116 skip_tag(document);
117 else if(**document == COMMENTSYM)
118 skip_comment(document);
119 else
120 (*document)++;
121 }
122
123 if(**document == ENUMLISTCLOSESYM)
124 (*document)++;
125}
126
127char* scan_string(const char** document) 127char* scan_string(const char** document)
128{ 128{
129 129
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"
31/* Scanning functions */ 31/* Scanning functions */
32void skip_tag(const char** document); 32void skip_tag(const char** document);
33void skip_comment(const char** document); 33void skip_comment(const char** document);
34static void skip_arglist(const char** document); 34/* static void skip_arglist(const char** document); */
35static void skip_enumlist(const char** document); 35/* static void skip_enumlist(const char** document); */
36char* scan_string(const char** document); 36char* scan_string(const char** document);
37int scan_int(const char** document); 37int scan_int(const char** document);
38int check_viewport(const char* document); /* Checks for a viewport declaration */ 38int check_viewport(const char* document); /* Checks for a viewport declaration */