#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.
Defines | |
| #define | dln_notimplement --->>> dln not implemented <<<--- |
| #define | dln_memerror abort |
| #define | dln_exit exit |
| #define | free(x) xfree(x) |
| #define | S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) |
| #define | MAXPATHLEN 1024 |
| #define | PATHNAME_TOO_LONG() fprintf(stderr, pathname_too_long, (int)(bp - fbuf), fbuf, fname) |
| #define | RETURN_IF(expr) if (expr) return (char *)fname; |
Functions | |
| static void | dln_loaderror (const char *format,...) |
| void * | xmalloc () |
| void * | xcalloc () |
| void * | xrealloc () |
| char * | getenv () |
| static char * | dln_find_1 (const char *fname, const char *path, char *buf, size_t size, int exe_flag) |
| char * | dln_find_exe_r (const char *fname, const char *path, char *buf, size_t size) |
| char * | dln_find_file_r (const char *fname, const char *path, char *buf, size_t size) |
| char * | dln_find_exe (const char *fname, const char *path) |
| char * | dln_find_file (const char *fname, const char *path) |
Variables | |
| static char | fbuf [MAXPATHLEN] |
| #define dln_exit exit |
Definition at line 21 of file dln_find.c.
| #define dln_memerror abort |
Definition at line 20 of file dln_find.c.
| #define dln_notimplement --->>> dln not implemented <<<--- |
Definition at line 19 of file dln_find.c.
| #define free | ( | x | ) | xfree(x) |
Definition at line 50 of file dln_find.c.
| #define MAXPATHLEN 1024 |
Definition at line 67 of file dln_find.c.
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 60 of file dln_find.c.
| static char * dln_find_1 | ( | const char * | fname, | |
| const char * | path, | |||
| char * | buf, | |||
| size_t | size, | |||
| int | exe_flag | |||
| ) | [static] |
Definition at line 124 of file dln_find.c.
References bp, CharNext, dp, eaccess(), getenv(), NULL, PATH_SEP, PATHNAME_TOO_LONG, RETURN_IF, S_ISDIR, stat, STRCASECMP, strchr(), strlcpy(), and X_OK.
Referenced by dln_find_exe_r(), and dln_find_file_r().
| char* dln_find_exe | ( | const char * | fname, | |
| const char * | path | |||
| ) |
| char* dln_find_exe_r | ( | const char * | fname, | |
| const char * | path, | |||
| char * | buf, | |||
| size_t | size | |||
| ) |
Definition at line 81 of file dln_find.c.
References dln_find_1(), free, getenv(), PATH_ENV, and strdup.
Referenced by dln_find_exe(), proc_exec_v(), rb_proc_exec(), rb_w32_aspawn(), and rb_w32_spawn().
| char* dln_find_file | ( | const char * | fname, | |
| const char * | path | |||
| ) |
| char* dln_find_file_r | ( | const char * | fname, | |
| const char * | path, | |||
| char * | buf, | |||
| size_t | size | |||
| ) |
Definition at line 103 of file dln_find.c.
References dln_find_1().
Referenced by dln_find_file(), and process_options().
| static void dln_loaderror | ( | const char * | format, | |
| ... | ||||
| ) | [static] |
| char* getenv | ( | ) |
| void* xcalloc | ( | ) |
| void* xmalloc | ( | ) |
| void* xrealloc | ( | ) |
char fbuf[MAXPATHLEN] [static] |
Definition at line 109 of file dln_find.c.
Referenced by dln_find_exe(), dln_find_file(), proc_exec_v(), process_options(), rb_proc_exec(), rb_str_format(), rb_w32_aspawn(), and rb_w32_spawn().