5 "@(#)searchinpath.c 1.5 16/08/01 Copyright 1999-2016 J. Schilling";
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)
char * strchr(const char *String, int ch)
size_t strlcpy(char *d, const char *s, size_t bufsize)
EXPORT int eaccess(char *name, int mode) const
EXPORT char * getexecpath()
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
EXPORT char * get_progname()
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static UConst char sccsid[]
LOCAL char * searchonefile(char *name, int mode, BOOL plain_file, char *xn, char *nbuf, char *np, char *ep)
EXPORT char * searchfileinpath(char *name, int mode, int file_mode, char *path)
EXPORT int seterrno(int err)
EXPORT int streql(char *a, const char *b) const