summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeeyong Um <conr2d@gmail.com>2017-11-10 12:59:55 +0900
committerJeeyong Um <conr2d@gmail.com>2017-11-10 12:59:55 +0900
commit7c0f1fdd34186220ca01d6b52b02b94cf6db9962 (patch)
tree700bcbe2a732603f137e4cedd5b53ce6b3ccedeb /src
parent247d25aa99b6dd461ce82f61fa8345f86c157b0f (diff)
edje_cc: Extract function to build stack ending with wildcarddevs/jpeg/items
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc_parse.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index f3afd8a5e7..d8a7802e87 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -188,6 +188,23 @@ fill_object_statement_hashes(void)
188 } 188 }
189} 189}
190 190
191static char *
192stack_dup_wildcard(void)
193{
194 char buf[PATH_MAX] = { 0, };
195 char *end;
196
197 strncpy(buf, stack_id(), sizeof(buf) - 1);
198
199 end = strrchr(buf, '.');
200 if (end) end++;
201 else end = buf;
202
203 strcpy(end, "*");
204
205 return eina_strdup(buf);
206}
207
191static void 208static void
192new_object(void) 209new_object(void)
193{ 210{
@@ -219,17 +236,9 @@ new_object(void)
219 sh = eina_hash_find(_new_statement_short_single_hash, id); 236 sh = eina_hash_find(_new_statement_short_single_hash, id);
220 if (!sh) 237 if (!sh)
221 { 238 {
222 char buf[512] = { 0, }; 239 char *tmp = stack_dup_wildcard();
223 char *end; 240 sh = eina_hash_find(_new_statement_hash, tmp);
224 241 free(tmp);
225 strncpy(buf, id, sizeof(buf) - 1);
226 buf[sizeof(buf) - 1] = 0;
227 end = strrchr(buf, '.');
228 if (end) end++;
229 else end = buf;
230
231 strcpy(end, "*");
232 sh = eina_hash_find(_new_statement_hash, buf);
233 } 242 }
234 if ((!sh) && (!did_wildcard) && (!had_quote)) 243 if ((!sh) && (!did_wildcard) && (!had_quote))
235 { 244 {
@@ -260,17 +269,9 @@ new_statement(void)
260 } 269 }
261 else 270 else
262 { 271 {
263 char buf[512] = { 0, }; 272 char *tmp = stack_dup_wildcard();
264 char *end; 273 sh = eina_hash_find(_new_statement_hash, tmp);
265 274 free(tmp);
266 strncpy(buf, id, sizeof(buf) - 1);
267 buf[sizeof(buf) - 1] = 0;
268 end = strrchr(buf, '.');
269 if (end) end++;
270 else end = buf;
271
272 strcpy(end, "*");
273 sh = eina_hash_find(_new_statement_hash, buf);
274 275
275 if (sh) 276 if (sh)
276 { 277 {