| return imp; |
return imp; |
| } |
} |
| |
|
| /* index of last '/' or '\' in file, 0 if there is none. */ |
/* pointer to last '/' or '\' in file, 0 if there is none. */ |
| int onlypath(char *file) |
char *onlypath(char *filename) |
| { |
{ |
| return strrchr(file, DIRSEP)-file; |
return strrchr(filename, DIRSEP); |
| } |
} |
| |
|
| FILE *openimage(char *fullfilename) |
FILE *openimage(char *fullfilename) |
| if(strchr(imagename, DIRSEP)==NULL) { |
if(strchr(imagename, DIRSEP)==NULL) { |
| /* first check the directory where the exe file is in !! 01may97jaw */ |
/* first check the directory where the exe file is in !! 01may97jaw */ |
| if (onlypath(progname)) |
if (onlypath(progname)) |
| image_file=checkimage(progname, onlypath(progname), imagename); |
image_file=checkimage(progname, onlypath(progname)-progname, imagename); |
| if (!image_file) |
if (!image_file) |
| do { |
do { |
| char *pend=strchr(path, PATHSEP); |
char *pend=strchr(path, PATHSEP); |