Ruby: dln_find.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
dln_find.c File Reference
`#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 | PATHNAME_TOO_LONG()
#define | RETURN_IF(expr) if (expr) return (char *)fname;
#define | S_ISREG(m) (((m) & S_IFMT) == S_IFREG)

## Functions
char * | getenv ()
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)

## Macro Definition Documentation

## ◆ dln_warning

#define dln_warning fprintf

Definition at line 17 of file dln_find.c.

## ◆ dln_warning_arg

#define dln_warning_arg stderr,

Definition at line 18 of file dln_find.c.

## ◆ PATHNAME_TOO_LONG

#define PATHNAME_TOO_LONG | ( |  | ) |

Value:
dln_warning(dln_warning_arg pathname_too_long, \
((bp - fbuf) > 100 ? 100 : (int)(bp - fbuf)), fbuf, \
((bp - fbuf) > 100 ? "..." : ""), \
(fnlen > 100 ? 100 : (int)fnlen), fname, \
(fnlen > 100 ? "..." : ""))
dln_warning
#define dln_warning
Definition: dln_find.c:17
dln_warning_arg
#define dln_warning_arg
Definition: dln_find.c:18
bp
#define bp()
Definition: internal.h:105

## ◆ RETURN_IF

#define RETURN_IF | ( |  | expr | ) | if (expr) return (char *)fname;

## ◆ S_ISDIR

#define S_ISDIR | ( |  | m | ) | (((m) & S_IFMT) == S_IFDIR)

Definition at line 48 of file dln_find.c.

## ◆ S_ISREG

#define S_ISREG | ( |  | m | ) | (((m) & S_IFMT) == S_IFREG)

## Function Documentation

## ◆ dln_find_exe_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 63 of file dln_find.c.

References DLN_FIND_EXTRA_ARG, free, getenv(), PATH_ENV, PATH_SEP, and strdup.

## ◆ dln_find_file_r()

char * dln_find_file_r | ( | const char * | fname,
|  | const char * | path,
|  | char * | buf,
|  | size_t size | DLN_FIND_EXTRA_ARG_DECL
| ) |  |

Definition at line 87 of file dln_find.c.

References DLN_FIND_EXTRA_ARG.

## ◆ getenv()

char * getenv | ( |  | ) |

Referenced by dln_find_exe_r().