Ruby  2.1.10p492(2016-04-01revision54464)
Macros | Functions | Variables
dln.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_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 EXTERNAL_PREFIX   ""
 
#define FUNCNAME_PREFIX   EXTERNAL_PREFIX"Init_"
 
#define isdirsep(x)   ((x) == '/')
 
#define init_funcname(buf, file)
 
#define translit_separator(str)   (void)(str)
 
#define DLN_ERROR()   (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
 

Functions

static void dln_loaderror (const char *format,...)
 
voidxmalloc ()
 
voidxcalloc ()
 
voidxrealloc ()
 
char * getenv ()
 
static size_t init_funcname_len (const char **file)
 
static const char * dln_strerror (void)
 
voiddln_load (const char *file)
 

Variables

static const char funcname_prefix [sizeof(FUNCNAME_PREFIX)-1] = FUNCNAME_PREFIX
 

Macro Definition Documentation

#define DLN_ERROR ( )    (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))

Referenced by dln_load().

#define dln_exit   exit

Definition at line 21 of file dln.c.

#define dln_memerror   abort

Definition at line 20 of file dln.c.

Referenced by dln_load().

#define dln_notimplement   --->>> dln not implemented <<<---

Definition at line 19 of file dln.c.

Referenced by dln_load().

#define EXTERNAL_PREFIX   ""

Definition at line 112 of file dln.c.

Referenced by dln_load().

#define free (   x)    xfree(x)

Definition at line 50 of file dln.c.

Referenced by aligned_free(), argf_inplace_mode_set(), ary_new_dim(), check_if_dir(), clear_readconv(), cmdglob(), dln_find_exe_r(), dln_load(), EVENTSINK_Destructor(), exit_handler(), fgdbm_clear(), fgdbm_empty_p(), fgdbm_length(), fgdbm_values(), filename_completion_proc_call(), find_iid(), fitpair(), folevariant_ary_aref(), folevariant_ary_aset(), folevariant_s_array(), free_stack_chunks(), freeaddrinfo(), get_addr(), get_name(), getaddrinfo(), heap_page_free(), if(), Init_heap(), Init_readline(), link(), Messaging_HandleMessage(), nsdr(), objspace_xfree(), ole_const_load(), ole_event_free(), ole_excepinfo2msg(), ole_free(), ole_val_ary2variant_ary(), ole_variant2val(), olemethod_free(), oleparam_free(), oletype_free(), oletypelib_free(), olevariable_free(), olevariant_free(), open_ifs_socket(), pipe_del_fptr(), rb_gdbm_fetch(), rb_gdbm_firstkey(), rb_gdbm_nextkey(), rb_io_fptr_finalize(), rb_objspace_free(), rb_print_backtrace(), rb_remove_history(), rb_w32_closedir(), rb_w32_cmdvector(), rb_w32_free_environ(), rb_w32_getcwd(), rb_w32_mkdir(), rb_w32_open(), rb_w32_opendir(), rb_w32_rename(), rb_w32_rmdir(), rb_w32_uchdir(), rb_w32_uchmod(), rb_w32_ulink(), rb_w32_umkdir(), rb_w32_unlink(), rb_w32_uopen(), rb_w32_uopendir(), rb_w32_urename(), rb_w32_urmdir(), rb_w32_utime(), rb_w32_uunlink(), rb_w32_uutime(), rb_w32_write_console(), readdir_internal(), readline_readline(), reg_get_val(), ruby_mimfree(), ruby_set_inplace_mode(), ruby_setenv(), sdbm_close(), sdbm_open(), sdbm_prep(), shrink_stack_chunk_cache(), sip_hash_free(), thread_free(), username_completion_proc_call(), w32_aspawn_flags(), w32_getenv(), w32_spawn(), w32_stati64(), and yaml_free().

#define FUNCNAME_PREFIX   EXTERNAL_PREFIX"Init_"

Definition at line 114 of file dln.c.

#define init_funcname (   buf,
  file 
)
Value:
do {\
const char *base = (file);\
const size_t flen = init_funcname_len(&base);\
const size_t plen = sizeof(funcname_prefix);\
char *const tmp = ALLOCA_N(char, plen+flen+1);\
if (!tmp) {\
}\
memcpy(tmp+plen, base, flen);\
tmp[plen+flen] = '\0';\
*(buf) = tmp;\
} while (0)
#define dln_memerror
Definition: dln.c:20
static const char funcname_prefix[sizeof(FUNCNAME_PREFIX)-1]
Definition: dln.c:138
tmp
Definition: enum.c:447
if(args--[1]==0)
Definition: array.c:3187
unsigned char buf[MIME_BUF_SIZE]
Definition: nkf.c:4308
#define ALLOCA_N(type, n)
memcpy(buf+1, str, len)
#define const
Definition: strftime.c:102
static size_t init_funcname_len(const char **file)
Definition: dln.c:124

Definition at line 140 of file dln.c.

Referenced by dln_load().

#define isdirsep (   x)    ((x) == '/')

Definition at line 120 of file dln.c.

Referenced by init_funcname_len().

#define MAXPATHLEN   1024

Definition at line 67 of file dln.c.

Referenced by dln_load().

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

Definition at line 60 of file dln.c.

#define translit_separator (   str)    (void)(str)

Definition at line 1246 of file dln.c.

Referenced by dln_load().

Function Documentation

void* dln_load ( const char *  file)

Definition at line 1250 of file dln.c.

Referenced by dln_load(), and load_ext().

static void dln_loaderror ( const char *  format,
  ... 
)
static

Definition at line 93 of file dln.c.

References va_end().

Referenced by dln_load().

static const char* dln_strerror ( void  )
static

Definition at line 1149 of file dln.c.

References strerror().

Referenced by dln_load().

char* getenv ( )
static size_t init_funcname_len ( const char **  file)
static

Definition at line 124 of file dln.c.

References isdirsep, NULL, and p.

void* xcalloc ( )
void* xmalloc ( )
void* xrealloc ( )

Variable Documentation

const char funcname_prefix[sizeof(FUNCNAME_PREFIX)-1] = FUNCNAME_PREFIX
static

Definition at line 138 of file dln.c.