diff options
Diffstat (limited to 'lib/skin_parser')
-rw-r--r-- | lib/skin_parser/skin_parser.c | 4 | ||||
-rw-r--r-- | lib/skin_parser/skin_parser.h | 3 | ||||
-rw-r--r-- | lib/skin_parser/skin_scan.c | 70 | ||||
-rw-r--r-- | 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; | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | /* Auxiliary parsing functions (not visible at global scope) */ | 45 | /* Auxiliary parsing functions (not visible at global scope) */ |
46 | static struct skin_element* skin_alloc_element(void); | ||
47 | static OFFSETTYPE(struct skin_element*)* skin_alloc_children(int count); | ||
48 | static struct skin_tag_parameter* skin_alloc_params(int count); | ||
49 | |||
46 | static struct skin_element* skin_parse_viewport(const char** document); | 50 | static struct skin_element* skin_parse_viewport(const char** document); |
47 | static struct skin_element* skin_parse_line(const char** document); | 51 | static struct skin_element* skin_parse_line(const char** document); |
48 | static struct skin_element* skin_parse_line_optional(const char** document, | 52 | 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, | |||
160 | struct skin_element* skin_parse(const char* document); | 160 | struct skin_element* skin_parse(const char* document); |
161 | #endif | 161 | #endif |
162 | /* Memory management functions */ | 162 | /* Memory management functions */ |
163 | static struct skin_element* skin_alloc_element(void); | ||
164 | static OFFSETTYPE(struct skin_element*)* skin_alloc_children(int count); | ||
165 | static struct skin_tag_parameter* skin_alloc_params(int count); | ||
166 | char* skin_alloc_string(int length); | 163 | char* skin_alloc_string(int length); |
167 | 164 | ||
168 | void skin_free_tree(struct skin_element* root); | 165 | 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) | |||
41 | (*document)++; | 41 | (*document)++; |
42 | } | 42 | } |
43 | 43 | ||
44 | static 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 | |||
61 | static 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 | |||
44 | void skip_tag(const char** document) | 79 | void 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 | ||
92 | static 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 | |||
109 | static 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 | |||
127 | char* scan_string(const char** document) | 127 | char* 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 */ |
32 | void skip_tag(const char** document); | 32 | void skip_tag(const char** document); |
33 | void skip_comment(const char** document); | 33 | void skip_comment(const char** document); |
34 | static void skip_arglist(const char** document); | 34 | /* static void skip_arglist(const char** document); */ |
35 | static void skip_enumlist(const char** document); | 35 | /* static void skip_enumlist(const char** document); */ |
36 | char* scan_string(const char** document); | 36 | char* scan_string(const char** document); |
37 | int scan_int(const char** document); | 37 | int scan_int(const char** document); |
38 | int check_viewport(const char* document); /* Checks for a viewport declaration */ | 38 | int check_viewport(const char* document); /* Checks for a viewport declaration */ |