152 if(filename ==
NULL || filename[0] ==
'\0')
158 if((fp=fopen(filename,mode)) ==
NULL)
161 #if (unix || __unix__ || MS_WINDOWS || __unix || __MACH__ || __APPLE__)
162 if((datadir = getenv(envvar)) !=
NULL)
164 if(datadir[strlen(datadir)-1] ==
'/')
165 sprintf(buffer,
"%s%s",datadir,filename);
167 sprintf(buffer,
"%s/%s",datadir,filename);
168 fp = fopen(buffer,mode);
176 sprintf(buffer,
"%s:%s",envvar,filename);
177 fp = fopen(buffer,mode);
Port-specific defines to allow us to use things like popen() in a clean compile.
System-type variable type definitions.
FILE * blOpenFile(char *filename, char *envvar, char *mode, BOOL *noenv)