rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1a7a33cd32a381265b525f5547a5096948ab93ea

commit 1a7a33cd32a381265b525f5547a5096948ab93ea
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Nov 18 14:59:11 2015 +0200

    group_manager: move state_name_split to string_common
---
 src/bin/common/string_common.c          | 16 ++++++++++++++++
 src/bin/common/string_common.h          |  2 ++
 src/bin/project_manager/group_manager.c | 16 +---------------
 3 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/bin/common/string_common.c b/src/bin/common/string_common.c
index a8f8850..5be62ac 100644
--- a/src/bin/common/string_common.c
+++ b/src/bin/common/string_common.c
@@ -18,6 +18,8 @@
  */
 
 #include <string.h>
+#include <Eina.h>
+#include <assert.h>
 
 int
 sort_cb(const void *data1, const void *data2)
@@ -31,3 +33,17 @@ sort_cb(const void *data1, const void *data2)
    return strcmp(str1, str2);
 }
 
+void
+state_name_split(Eina_Stringshare *name, Eina_Stringshare **name_out, double 
*val_out)
+{
+   char **state_split;
+
+   assert(name != NULL);
+   assert(name_out != NULL || val_out != NULL);
+
+   state_split = eina_str_split(name, " ", 2);
+   if (name_out) *name_out = eina_stringshare_add(state_split[0]);
+   if (val_out) *val_out = atof(state_split[1]);
+   free(state_split[0]);
+   free(state_split);
+}
diff --git a/src/bin/common/string_common.h b/src/bin/common/string_common.h
index e46cd00..d241ae5 100644
--- a/src/bin/common/string_common.h
+++ b/src/bin/common/string_common.h
@@ -52,4 +52,6 @@
 int
 sort_cb(const void *data1, const void *data2);
 
+void
+state_name_split(Eina_Stringshare *name, Eina_Stringshare **name_out, double 
*val_out);
 #endif /* STRING_MACRO_H */
diff --git a/src/bin/project_manager/group_manager.c 
b/src/bin/project_manager/group_manager.c
index b1ec99a..1206eaf 100644
--- a/src/bin/project_manager/group_manager.c
+++ b/src/bin/project_manager/group_manager.c
@@ -20,21 +20,7 @@
 #include "group_manager.h"
 #include "alloc.h"
 #include "signals.h"
-
-static inline void
-state_name_split(Eina_Stringshare *name, Eina_Stringshare **name_out, double 
*val_out)
-{
-   char **state_split;
-
-   assert(name != NULL);
-   assert(name_out != NULL || val_out != NULL);
-
-   state_split = eina_str_split(name, " ", 2);
-   if (name_out) *name_out = eina_stringshare_add(state_split[0]);
-   if (val_out) *val_out = atof(state_split[1]);
-   free(state_split[0]);
-   free(state_split);
-}
+#include "string_common.h"
 
 static void
 _group_name_parse(Group *group)

-- 


Reply via email to