summaryrefslogtreecommitdiff
path: root/src/bin/edje/edje_cc_handlers.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-29 17:00:57 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-30 10:12:13 +0900
commitfc36eedadd1670cbe7b65b781bb53e45436ace42 (patch)
treec143eda7f98082807aab727c84193a0da018c1d9 /src/bin/edje/edje_cc_handlers.c
parent3648b0e25203a2ce269b586b4a499468fa07bbda (diff)
Edje: Replace index() by strchr()
Thanks vtorri for pointing out the build break on windows and that index() is deprecated.
Diffstat (limited to '')
-rw-r--r--src/bin/edje/edje_cc_handlers.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 0c14255880..762b7139c9 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -4318,7 +4318,7 @@ st_collections_group_data_item(void)
4318 that can then be referred to in a @ref sec_collections_group_parts_description_filter "Text.Filter" 4318 that can then be referred to in a @ref sec_collections_group_parts_description_filter "Text.Filter"
4319 or @ref collections_group_parts_description_filter "Image.Filter" statement. 4319 or @ref collections_group_parts_description_filter "Image.Filter" statement.
4320 4320
4321 In a similar way to the @ref sec_collections_group_data "Group.Data" blocks, 4321 In a similar way to the toplevel @ref sec_toplevel_data "Data" section,
4322 it is possible to embed filters from a external file inside the final EDJ. 4322 it is possible to embed filters from a external file inside the final EDJ.
4323 4323
4324 Please also refer to @ref evasfiltersref "Evas filters reference". 4324 Please also refer to @ref evasfiltersref "Evas filters reference".
@@ -11796,11 +11796,11 @@ st_collections_group_parts_part_description_filter_source(void)
11796 Edje_Part_Description_Spec_Filter *filter; 11796 Edje_Part_Description_Spec_Filter *filter;
11797 Edje_Part_Collection *pc; 11797 Edje_Part_Collection *pc;
11798 char *name, *part, *str; 11798 char *name, *part, *str;
11799 size_t sn = 0, sp; 11799 size_t sn = 0, sp, k;
11800 int *part_key; 11800 int *part_key;
11801 int args; 11801 int args;
11802 11802
11803 static const char *allowed_name_chars = 11803 static const char allowed_name_chars[] =
11804 "abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ0123456789_"; 11804 "abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ0123456789_";
11805 11805
11806 if (current_part->type == EDJE_PART_TYPE_TEXT) 11806 if (current_part->type == EDJE_PART_TYPE_TEXT)
@@ -11826,7 +11826,7 @@ st_collections_group_parts_part_description_filter_source(void)
11826 if (name) sn = strlen(name); 11826 if (name) sn = strlen(name);
11827 if (!name || (strspn(name, allowed_name_chars) != sn)) 11827 if (!name || (strspn(name, allowed_name_chars) != sn))
11828 { 11828 {
11829 ERR("parse error %s:%i. invalid name for a filter buffer: %s", 11829 ERR("parse error %s:%i. invalid name for a filter buffer: '%s'",
11830 file_in, line - 1, name); 11830 file_in, line - 1, name);
11831 exit(-1); 11831 exit(-1);
11832 } 11832 }
@@ -11841,12 +11841,11 @@ st_collections_group_parts_part_description_filter_source(void)
11841 if (!name) 11841 if (!name)
11842 { 11842 {
11843 // name = part so we replace all invalid chars by '_' 11843 // name = part so we replace all invalid chars by '_'
11844 size_t k;
11845 name = strdup(part); 11844 name = strdup(part);
11846 sn = strlen(name); 11845 sn = strlen(name);
11847 for (k = 0; k < sn; k++) 11846 for (k = 0; k < sn; k++)
11848 { 11847 {
11849 if (!index(allowed_name_chars, name[k])) 11848 if (!strchr(allowed_name_chars, name[k]))
11850 name[k] = '_'; 11849 name[k] = '_';
11851 } 11850 }
11852 } 11851 }