From: <enl...@li...> - 2000-12-11 19:10:40
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/ebits Modified Files: Ebits_private.h ebits_main.c Log Message: errr... fix :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ebits/src/Ebits_private.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- Ebits_private.h 2000/11/25 00:02:48 1.4 +++ Ebits_private.h 2000/12/11 19:10:39 1.5 @@ -1,4 +1,7 @@ #include <Edb.h> +#ifdef WITH_DMALLOC +#include <dmalloc.h> +#endif typedef struct _Ebits_Object_Description * Ebits_Object_Description; typedef struct _Ebits_Object_State Ebits_Object_State; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ebits/src/ebits_main.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ebits_main.c 2000/11/25 00:15:53 1.9 +++ ebits_main.c 2000/12/11 19:10:39 1.10 @@ -283,6 +283,7 @@ if (state->object) { char buf[4096]; + char *st; #ifdef EDITOR if (!_ebits_image_state_saved(state, state->state)) @@ -290,9 +291,12 @@ _ebits_get_file(state->description, state->state)); else #endif - snprintf(buf, sizeof(buf), EBITS_FILE_REDIRECT, - state->o->description->file, - _ebits_get_file(state->description, state->state)); + st = _ebits_get_file(state->description, state->state); + if (strlen(st) > 2) + snprintf(buf, sizeof(buf), EBITS_FILE_REDIRECT, + state->o->description->file, st); + else + strcpy(buf, ""); evas_set_image_file(state->o->state.evas, state->object, buf); _ebits_evaluate_fill(state); } @@ -931,7 +935,7 @@ d = _ebits_find_description(file); if (!d) return NULL; - + o = ebits_new(); o->description = d; @@ -1059,11 +1063,15 @@ { Ebits_Object_Bit_State state; char buf[4096]; + char *st; state = l->data; - snprintf(buf, sizeof(buf), EBITS_FILE_REDIRECT, - state->o->description->file, - _ebits_get_file(state->description, state->state)); + st = _ebits_get_file(state->description, state->state); + if (strlen(st) > 2) + snprintf(buf, sizeof(buf), EBITS_FILE_REDIRECT, + state->o->description->file, st); + else + strcpy(buf, ""); state->object = evas_add_image_from_file(o->state.evas, buf); if ((state->o->state.evas) && (state->object)) evas_set_color(state->o->state.evas, state->object, |