forked from old/legacy-imlib2
parent
d9dedd7ea6
commit
b55b892198
|
@ -81,17 +81,15 @@ load (ImlibImage *im, ImlibProgressFunction progress,
|
||||||
char file[4096], key[4096], *ptr;
|
char file[4096], key[4096], *ptr;
|
||||||
DATA32 *ret;
|
DATA32 *ret;
|
||||||
DATA32 *body;
|
DATA32 *body;
|
||||||
|
|
||||||
if (im->data)
|
if (im->data)
|
||||||
return 0;
|
return 0;
|
||||||
if (!im->file)
|
if (!im->file)
|
||||||
return 0;
|
return 0;
|
||||||
strcpy(file, im->file);
|
strcpy(file, im->file);
|
||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
if ( (isalpha((int)file[0])) && (file[1]==':') &&
|
ptr = strrchr(file, ':');
|
||||||
((file[2]=='\\') || (file[2]=='/')))
|
/* if colon is chars 0, 1, or 2 it might be a drive letter for os/2 */
|
||||||
ptr = strchr(file, ':');
|
if ((ptr) && (ptr - file) < 3) ptr=strrchr(++ptr, ':');
|
||||||
if (ptr) ptr=strrchr(++ptr, ':');
|
|
||||||
#else
|
#else
|
||||||
ptr = strrchr(file, ':');
|
ptr = strrchr(file, ':');
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,7 +104,6 @@ load (ImlibImage *im, ImlibProgressFunction progress,
|
||||||
db = e_db_open_read(file);
|
db = e_db_open_read(file);
|
||||||
if (!db)
|
if (!db)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = e_db_data_get(db, key, &size);
|
ret = e_db_data_get(db, key, &size);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
|
@ -284,10 +281,9 @@ save (ImlibImage *im, ImlibProgressFunction progress,
|
||||||
return 0;
|
return 0;
|
||||||
strcpy(file, im->file);
|
strcpy(file, im->file);
|
||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
if ( (isalpha((int)file[0])) && (file[1]==':') &&
|
cp = strrchr(file, ':');
|
||||||
((file[2]=='\\') || (file[2]=='/')))
|
/* if colon is chars 0, 1, or 2 it might be a drive letter for os/2 */
|
||||||
cp = strchr(file, ':');
|
if ((cp) && (cp - file) < 3) cp = strrchr(++cp, ':');
|
||||||
if (cp) cp=strrchr(++cp, ':');
|
|
||||||
#else
|
#else
|
||||||
cp = strrchr(file, ':');
|
cp = strrchr(file, ':');
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -62,7 +62,11 @@ xpm_parse_color(char *color, int *r, int *g, int *b)
|
||||||
}
|
}
|
||||||
/* look in rgb txt database */
|
/* look in rgb txt database */
|
||||||
if (!rgb_txt)
|
if (!rgb_txt)
|
||||||
|
#ifndef __EMX__
|
||||||
rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r");
|
rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r");
|
||||||
|
#else
|
||||||
|
rgb_txt = fopen(__XOS2RedirRoot("/XFree86/lib/X11/rgb.txt"), "rt");
|
||||||
|
#endif
|
||||||
if (!rgb_txt)
|
if (!rgb_txt)
|
||||||
return;
|
return;
|
||||||
fseek(rgb_txt, 0, SEEK_SET);
|
fseek(rgb_txt, 0, SEEK_SET);
|
||||||
|
|
Loading…
Reference in New Issue