|
Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "dln.h"#include <strings.h>#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>Go to the source code of this file.
Macros | |
| #define | dln_warning fprintf |
| #define | dln_warning_arg stderr, |
| #define | S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
| #define | MAXPATHLEN 1024 |
| #define | PATHNAME_TOO_LONG() |
| #define | RETURN_IF(expr) if (expr) return (char *)fname; |
Functions | |
| char * | getenv () |
| static char * | dln_find_1 (const char *fname, const char *path, char *buf, size_t size, int exe_flag DLN_FIND_EXTRA_ARG_DECL) |
| char * | dln_find_exe_r (const char *fname, const char *path, char *buf, size_t size DLN_FIND_EXTRA_ARG_DECL) |
| char * | dln_find_file_r (const char *fname, const char *path, char *buf, size_t size DLN_FIND_EXTRA_ARG_DECL) |
| #define dln_warning fprintf |
Definition at line 17 of file dln_find.c.
Referenced by dln_find_1().
| #define dln_warning_arg stderr, |
Definition at line 18 of file dln_find.c.
Referenced by dln_find_1().
| #define MAXPATHLEN 1024 |
Definition at line 55 of file dln_find.c.
| #define PATHNAME_TOO_LONG | ( | ) |
Referenced by dln_find_1().
| #define RETURN_IF | ( | expr | ) | if (expr) return (char *)fname; |
Referenced by dln_find_1().
| #define S_ISDIR | ( | m | ) | (((m) & S_IFMT) == S_IFDIR) |
Definition at line 48 of file dln_find.c.
Referenced by dln_find_1().
|
static |
Definition at line 101 of file dln_find.c.
References bp, CharNext, dln_warning, dln_warning_arg, dp, eaccess(), getenv(), NULL, PATH_SEP, PATHNAME_TOO_LONG, RETURN_IF, S_ISDIR, size, stat, STRCASECMP, strchr(), strlcpy(), strlen(), and X_OK.
Referenced by dln_find_exe_r(), and dln_find_file_r().
| char* dln_find_exe_r | ( | const char * | fname, |
| const char * | path, | ||
| char * | buf, | ||
| size_t size | DLN_FIND_EXTRA_ARG_DECL | ||
| ) |
Definition at line 70 of file dln_find.c.
References buf, dln_find_1(), DLN_FIND_EXTRA_ARG, free(), getenv(), PATH_ENV, size, and strdup.
| char* dln_find_file_r | ( | const char * | fname, |
| const char * | path, | ||
| char * | buf, | ||
| size_t size | DLN_FIND_EXTRA_ARG_DECL | ||
| ) |
Definition at line 93 of file dln_find.c.
References buf, dln_find_1(), DLN_FIND_EXTRA_ARG, and size.
| char* getenv | ( | ) |
Referenced by dln_find_1(), and dln_find_exe_r().
1.8.14