5 "@(#)searchinpath.c 1.5 16/08/01 Copyright 1999-2016 J. Schilling";
47 #if defined(__DJGPP__) 52 #define enofile(t) ((t) == EMISSDIR || \ 57 #define enofile(t) ((t) == ENOENT || \ 82 #ifdef HAVE_GETEXECNAME 83 char *
pn = (
char *)getexecname();
114 while (np > nbuf && np[-1] !=
'/')
116 pn = &nbuf[
sizeof (
pbuf) - 1];
149 ep = &nbuf[
sizeof (
pbuf) - 1];
153 np < &nbuf[
sizeof (
pbuf) - nlen])
159 nbuf, np, ep)) !=
NULL) {
197 while (np > nbuf && np[-1] ==
'/')
209 if (np >= &nbuf[4] &&
streql(&np[-4],
"/bin"))
218 if (
stat(nbuf, &
sb) >= 0) {
219 if ((!plain_file ||
S_ISREG(
sb.st_mode)) &&
ACPI_SIZE strlen(const char *String)
GLsizei const GLchar ** path
size_t strlcpy(char *d, const char *s, size_t bufsize)
EXPORT int streql(char *a, const char *b) const
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
LOCAL char * searchonefile(char *name, int mode, BOOL plain_file, char *xn, char *nbuf, char *np, char *ep)
static UConst char sccsid[]
EXPORT int seterrno(int err)
EXPORT char * searchfileinpath(char *name, int mode, int file_mode, char *path)
EXPORT char *searchfileinpath __PR((char *name, int mode, int file_mode, char *path))
EXPORT char * get_progname()
EXPORT char * getexecpath()
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
char * strchr(const char *String, int ch)
EXPORT int eaccess(char *name, int mode) const
GLuint const GLchar * name