forked from enlightenment/efl
parent
37fbcbf7d7
commit
a057104399
|
@ -16,6 +16,7 @@ AC_HEADER_STDC
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AM_ENABLE_SHARED
|
AM_ENABLE_SHARED
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
AM_WITH_DMALLOC
|
||||||
|
|
||||||
dnl Add the languages which your application supports here.
|
dnl Add the languages which your application supports here.
|
||||||
|
|
||||||
|
|
|
@ -252,14 +252,14 @@ evas_common_image_store(RGBA_Image *im)
|
||||||
if (im->info.key) l2 = strlen(im->info.key);
|
if (im->info.key) l2 = strlen(im->info.key);
|
||||||
snprintf(buf, sizeof(buf), "%llx", im->timestamp);
|
snprintf(buf, sizeof(buf), "%llx", im->timestamp);
|
||||||
l3 = strlen(buf);
|
l3 = strlen(buf);
|
||||||
key = malloc(l1 + 3 + l2 + 3 + l3 +1);
|
key = malloc(l1 + 5 + l2 + 5 + l3 +1);
|
||||||
if (!key) return;
|
if (!key) return;
|
||||||
key[0] = 0;
|
key[0] = 0;
|
||||||
if (im->info.real_file) strcpy(key, im->info.real_file);
|
if (im->info.real_file) strcpy(key, im->info.real_file);
|
||||||
else if (im->info.file) strcpy(key, im->info.file);
|
else if (im->info.file) strcpy(key, im->info.file);
|
||||||
strcat(key, "/:/");
|
strcat(key, "//://");
|
||||||
if (im->info.key) strcat(key, im->info.key);
|
if (im->info.key) strcat(key, im->info.key);
|
||||||
strcat(key, "/:/");
|
strcat(key, "//://");
|
||||||
strcat(key, buf);
|
strcat(key, buf);
|
||||||
images = evas_hash_add(images, key, im);
|
images = evas_hash_add(images, key, im);
|
||||||
free(key);
|
free(key);
|
||||||
|
@ -282,14 +282,14 @@ evas_common_image_unstore(RGBA_Image *im)
|
||||||
if (im->info.key) l2 = strlen(im->info.key);
|
if (im->info.key) l2 = strlen(im->info.key);
|
||||||
snprintf(buf, sizeof(buf), "%llx", im->timestamp);
|
snprintf(buf, sizeof(buf), "%llx", im->timestamp);
|
||||||
l3 = strlen(buf);
|
l3 = strlen(buf);
|
||||||
key = malloc(l1 + 3 + l2 + 3 + l3 +1);
|
key = malloc(l1 + 5 + l2 + 5 + l3 +1);
|
||||||
if (!key) return;
|
if (!key) return;
|
||||||
key[0] = 0;
|
key[0] = 0;
|
||||||
if (im->info.real_file) strcpy(key, im->info.real_file);
|
if (im->info.real_file) strcpy(key, im->info.real_file);
|
||||||
else if (im->info.file) strcpy(key, im->info.file);
|
else if (im->info.file) strcpy(key, im->info.file);
|
||||||
strcat(key, "/:/");
|
strcat(key, "//://");
|
||||||
if (im->info.key) strcat(key, im->info.key);
|
if (im->info.key) strcat(key, im->info.key);
|
||||||
strcat(key, "/:/");
|
strcat(key, "//://");
|
||||||
strcat(key, buf);
|
strcat(key, buf);
|
||||||
images = evas_hash_del(images, key, im);
|
images = evas_hash_del(images, key, im);
|
||||||
free(key);
|
free(key);
|
||||||
|
@ -308,6 +308,7 @@ evas_common_image_find(const char *filename, const char *key, DATA64 timestamp)
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
if ((!filename) && (!key)) return NULL;
|
if ((!filename) && (!key)) return NULL;
|
||||||
|
if (!filename) return NULL;
|
||||||
real_filename = evas_file_path_resolve((char *)filename);
|
real_filename = evas_file_path_resolve((char *)filename);
|
||||||
l1 = 0;
|
l1 = 0;
|
||||||
if (real_filename) l1 = strlen(real_filename);
|
if (real_filename) l1 = strlen(real_filename);
|
||||||
|
@ -316,17 +317,18 @@ evas_common_image_find(const char *filename, const char *key, DATA64 timestamp)
|
||||||
if (key) l2 = strlen(key);
|
if (key) l2 = strlen(key);
|
||||||
sprintf(buf, "%llx", timestamp);
|
sprintf(buf, "%llx", timestamp);
|
||||||
l3 = strlen(buf);
|
l3 = strlen(buf);
|
||||||
str = malloc(l1 + 3 + l2 + 3 + l3 +1);
|
str = malloc(l1 + 5 + l2 + 5 + l3 +1);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
if (real_filename) free(real_filename);
|
if (real_filename) free(real_filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
str[0] = 0;
|
str[0] = 0;
|
||||||
if (filename) strcpy(str, filename);
|
if (real_filename) strcpy(str, real_filename);
|
||||||
strcat(str, "/:/");
|
else if (filename) strcpy(str, filename);
|
||||||
|
strcat(str, "//://");
|
||||||
if (key) strcat(str, key);
|
if (key) strcat(str, key);
|
||||||
strcat(str, "/:/");
|
strcat(str, "//://");
|
||||||
strcat(str, buf);
|
strcat(str, buf);
|
||||||
im = evas_hash_find(images, str);
|
im = evas_hash_find(images, str);
|
||||||
free(str);
|
free(str);
|
||||||
|
@ -345,12 +347,13 @@ evas_common_image_find(const char *filename, const char *key, DATA64 timestamp)
|
||||||
if (real_filename)
|
if (real_filename)
|
||||||
{
|
{
|
||||||
if ((im->info.real_file) &&
|
if ((im->info.real_file) &&
|
||||||
|
(real_filename) &&
|
||||||
(!strcmp(real_filename, im->info.real_file)))
|
(!strcmp(real_filename, im->info.real_file)))
|
||||||
ok++;
|
ok++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((filename) && (im->info.file) &&
|
if ((filename) && (im->info.file) &&
|
||||||
(!strcmp(filename, im->info.file)))
|
(!strcmp(filename, im->info.file)))
|
||||||
ok++;
|
ok++;
|
||||||
if ((!filename) && (!im->info.file))
|
if ((!filename) && (!im->info.file))
|
||||||
|
|
Loading…
Reference in New Issue