Enlightenment CVS committal Author : raster Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/lib Modified Files: edje_calc.c edje_load.c edje_match.c Log Message: actually. these patches broke illume! aaak! revert.! =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_calc.c,v retrieving revision 1.124 retrieving revision 1.125 diff -u -3 -r1.124 -r1.125 --- edje_calc.c 3 Apr 2008 18:18:36 -0000 1.124 +++ edje_calc.c 3 Apr 2008 19:27:53 -0000 1.125 @@ -1114,61 +1114,6 @@ } } -static int -_edje_nitoa_rec(char *string, int len, unsigned int value) -{ - const char *array = "0123456789"; - int length; - int quotient; - int modulo; - - if (len <= 0) return 0; - if (value == 0) return 0; - - quotient = value / 10; - modulo = value % 10; - - length = _edje_nitoa_rec(string, len - 1, quotient); - - if (length + 1 > len) return length; - - string[length] = array[modulo]; - - return length + 1; -} - -static int -_edje_nitoa(char *string, int len, int value) -{ - int length; - - if (len <= 0) return 0; - if (len == 1) - { - *string = '\0'; - return 1; - } - - if (value < 0) - { - *string = '-'; - - ++string; - --len; - } - - if (value == 0) - { - strncpy(string, "0", len); - return 1; - } - - length = _edje_nitoa_rec(string, len, value); - string[length] = '\0'; - - return length; -} - static void _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description *chosen_desc, double pos) { @@ -1228,11 +1173,7 @@ } else { - /* Replace snprint("images/%i") == memcpy + itoa */ -#define IMAGES "images/" - memcpy(buf, IMAGES, strlen(IMAGES)); - _edje_nitoa(buf + strlen(IMAGES), sizeof(buf) - strlen(IMAGES), image_id); - + snprintf(buf, sizeof(buf), "images/%i", image_id); evas_object_image_file_set(ep->object, ed->file->path, buf); if (evas_object_image_load_error_get(ep->object) != EVAS_LOAD_ERROR_NONE) { @@ -1450,12 +1391,8 @@ (pf->color.g * pf->color.a) / 255, (pf->color.b * pf->color.a) / 255, pf->color.a); - if (!pf->visible) - { - evas_object_hide(ep->object); - break; - } - evas_object_show(ep->object); + if (pf->visible) evas_object_show(ep->object); + else evas_object_hide(ep->object); /* move and resize are needed for all previous object => no break here. */ case EDJE_PART_TYPE_SWALLOW: case EDJE_PART_TYPE_GROUP: @@ -1499,14 +1436,10 @@ // (pf->color.g * pf->color.a) / 255, // (pf->color.b * pf->color.a) / 255, // pf->color.a); - if (pf->visible) - { - evas_object_show(ep->swallowed_object); - evas_object_move(ep->swallowed_object, ed->x + pf->x, ed->y + pf->y); - evas_object_resize(ep->swallowed_object, pf->w, pf->h); - } - else - evas_object_hide(ep->swallowed_object); + evas_object_move(ep->swallowed_object, ed->x + pf->x, ed->y + pf->y); + evas_object_resize(ep->swallowed_object, pf->w, pf->h); + if (pf->visible) evas_object_show(ep->swallowed_object); + else evas_object_hide(ep->swallowed_object); } } =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_load.c,v retrieving revision 1.122 retrieving revision 1.123 diff -u -3 -r1.122 -r1.123 --- edje_load.c 3 Apr 2008 18:18:36 -0000 1.122 +++ edje_load.c 3 Apr 2008 19:27:53 -0000 1.123 @@ -1002,24 +1002,14 @@ static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source) { - Evas_Object *parent; - Edje *ed; - char new_src[4096]; /* XXX is this max reasonable? */ - int length_parent; - int length_source; + Evas_Object *parent; + Edje *ed; + char new_src[4096]; /* XXX is this max reasonable? */ parent = data; ed = _edje_fetch(obj); if (!ed) return; - /* Replace snprint("%s%c%s") == memcpy + *new_src + memcat */ - length_parent = strlen(ed->parent); - length_source = strlen(source); - if (length_source + length_parent + 2 > sizeof(new_src)) - return ; - - memcpy(new_src, ed->parent, length_parent); - new_src[length_parent] = EDJE_PART_PATH_SEPARATOR; - memcpy(new_src + length_parent + 1, source, length_source + 1); - + snprintf(new_src, sizeof(new_src), "%s%c%s", ed->parent, + EDJE_PART_PATH_SEPARATOR, source); edje_object_signal_emit(parent, signal, new_src); } =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_match.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- edje_match.c 3 Apr 2008 18:18:36 -0000 1.4 +++ edje_match.c 3 Apr 2008 19:27:53 -0000 1.5 @@ -95,7 +95,7 @@ { const size_t i = idx * (patterns_max_length + 1) + pos; - if (list->size > i && list->has[i]) return; + if (list->has[i]) return; list->has[i] = 1; } @@ -103,7 +103,6 @@ list->states[i].idx = idx; list->states[i].pos = pos; - list->has[i] = 0; ++list->size; } @@ -113,6 +112,7 @@ size_t patterns_max_length) { list->size = 0; + memset(list->has, 0, patterns_size * (patterns_max_length + 1) * sizeof (*list->has)); } /* Token manipulation. */ @@ -232,6 +232,9 @@ states->size = patterns_size; + memset(states->has, + 0, + patterns_size * (patterns_max_length + 1) * sizeof (*states->has)); for (i = 0; i < patterns_size; ++i) { states->states[i].idx = i; ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs