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.

Defines

#define dln_warning   fprintf
#define dln_warning_arg   stderr,
#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 Documentation

#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 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 ? "..." : ""))

Referenced by dln_find_1().

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

Referenced by dln_find_1().


Function Documentation

static char * dln_find_1 ( const char *  fname,
const char *  path,
char *  buf,
size_t  size,
int exe_flag  DLN_FIND_EXTRA_ARG_DECL 
) [static]
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 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 dln_find_1(), DLN_FIND_EXTRA_ARG, and size.

char* getenv (  ) 

Generated on 18 May 2020 for Ruby by  doxygen 1.6.1