hermet pushed a commit to branch master.

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

commit d3ce44efe3b345fbb065956893b2d2f5931ca38a
Author: ChunEon Park <[email protected]>
Date:   Sun Mar 16 12:04:33 2014 +0900

    parser - code clean up
    
    sort the piece of the code by types.
---
 src/bin/edc_parser.c | 47 ++++++++++++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 21 deletions(-)

diff --git a/src/bin/edc_parser.c b/src/bin/edc_parser.c
index 12565a7..ab24995 100644
--- a/src/bin/edc_parser.c
+++ b/src/bin/edc_parser.c
@@ -39,6 +39,8 @@ parser_type_init(parser_data *pd)
    parser_attr *attr;
 
    //FIXME: construct from the configuration file.
+
+   //Type: Constant
    Eina_List *types = NULL;
    types = eina_list_append(types, eina_stringshare_add("RECT"));
    types = eina_list_append(types, eina_stringshare_add("TEXT"));
@@ -120,6 +122,7 @@ parser_type_init(parser_data *pd)
    attr->value.type = ATTR_VALUE_CONSTANT;
    pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
 
+   //Type: Integer
    attr = calloc(1, sizeof(parser_attr));
    attr->keyword = eina_stringshare_add("color");
    attr->value.min = 0;
@@ -128,13 +131,6 @@ parser_type_init(parser_data *pd)
    pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
 
    attr = calloc(1, sizeof(parser_attr));
-   attr->keyword = eina_stringshare_add("relative");
-   attr->value.min = 0.0;
-   attr->value.max = 1;
-   attr->value.type = ATTR_VALUE_FLOAT;
-   pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
-
-   attr = calloc(1, sizeof(parser_attr));
    attr->keyword = eina_stringshare_add("scale");
    attr->value.min = 0;
    attr->value.max = 1;
@@ -149,20 +145,6 @@ parser_type_init(parser_data *pd)
    pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
 
    attr = calloc(1, sizeof(parser_attr));
-   attr->keyword = eina_stringshare_add("aspect");
-   attr->value.min = 0.0;
-   attr->value.max = 1.0;
-   attr->value.type = ATTR_VALUE_FLOAT;
-   pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
-
-   attr = calloc(1, sizeof(parser_attr));
-   attr->keyword = eina_stringshare_add("align");
-   attr->value.min = 0.0;
-   attr->value.max = 1.0;
-   attr->value.type = ATTR_VALUE_FLOAT;
-   pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
-
-   attr = calloc(1, sizeof(parser_attr));
    attr->keyword = eina_stringshare_add("size");
    attr->value.min = 1;
    attr->value.max = 255;
@@ -190,6 +172,29 @@ parser_type_init(parser_data *pd)
    attr->value.type = ATTR_VALUE_INTEGER;
    pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
 
+   //Type: Float
+   attr = calloc(1, sizeof(parser_attr));
+   attr->keyword = eina_stringshare_add("relative");
+   attr->value.min = 0.0;
+   attr->value.max = 1;
+   attr->value.type = ATTR_VALUE_FLOAT;
+   pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
+
+   attr = calloc(1, sizeof(parser_attr));
+   attr->keyword = eina_stringshare_add("aspect");
+   attr->value.min = 0.0;
+   attr->value.max = 1.0;
+   attr->value.type = ATTR_VALUE_FLOAT;
+   pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
+
+   attr = calloc(1, sizeof(parser_attr));
+   attr->keyword = eina_stringshare_add("align");
+   attr->value.min = 0.0;
+   attr->value.max = 1.0;
+   attr->value.type = ATTR_VALUE_FLOAT;
+   pd->attrs = eina_inlist_append(pd->attrs, (Eina_Inlist *) attr);
+
+   //Type: Part
    attr = calloc(1, sizeof(parser_attr));
    attr->keyword = eina_stringshare_add("target");
    attr->instring = EINA_TRUE;

-- 


Reply via email to