hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=0b1f5759f9bcf458f6359faf9e397941c9d48203

commit 0b1f5759f9bcf458f6359faf9e397941c9d48203
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Wed May 21 10:59:43 2014 +0900

    syntax_color - code refactoring.
    
    moved a structure var to global
---
 src/bin/syntax_color.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/bin/syntax_color.c b/src/bin/syntax_color.c
index 6a56f86..0941336 100644
--- a/src/bin/syntax_color.c
+++ b/src/bin/syntax_color.c
@@ -33,7 +33,6 @@ struct syntax_color_s
    Eina_Stringshare *col_macro;
    Eina_Stringshare *cols[COL_NUM];
    Eina_List *macros;
-   syntax_color_group *scg;
    Ecore_Thread *thread;
 
    Eina_Bool ready: 1;
@@ -41,6 +40,7 @@ struct syntax_color_s
 
 static Eet_Data_Descriptor *edd_scg = NULL;
 static Eet_Data_Descriptor *edd_color = NULL;
+static syntax_color_group *scg = NULL;
 
 static void
 hash_free_cb(void *data)
@@ -95,8 +95,8 @@ color_load(color_data *cd)
    Eet_File *ef = eet_open(buf, EET_FILE_MODE_READ);
    if (ef)
      {
-        cd->scg = eet_data_read(ef, edd_scg, "color");
-        if (!cd->scg) EINA_LOG_ERR("Failed to read syntax color group.");
+        scg = eet_data_read(ef, edd_scg, "color");
+        if (!scg) EINA_LOG_ERR("Failed to read syntax color group.");
         eet_close(ef);
      }
    else EINA_LOG_ERR("Failed to open color data file \"%s\"", buf);
@@ -111,7 +111,6 @@ color_table_init(color_data *cd)
    char *key;
    char tmp[2];
    Eina_Inarray *inarray;
-   syntax_color_group *scg = cd->scg;
 
    if (!scg) return;
 
@@ -151,7 +150,7 @@ color_table_init(color_data *cd)
      }
 
    free(scg);
-   cd->scg = NULL;
+   scg = NULL;
 }
 
 static void

-- 


Reply via email to