include/ruby/util.h File Reference

#include "ruby/defines.h"

Go to the source code of this file.

Defines

#define RUBY_UTIL_H   1
#define scan_oct(s, l, e)   ((int)ruby_scan_oct((s),(l),(e)))
#define scan_hex(s, l, e)   ((int)ruby_scan_hex((s),(l),(e)))
#define setenv(name, val)   ruby_setenv((name),(val))
#define unsetenv(name, val)   ruby_unsetenv(name)
#define strdup(s)   ruby_strdup(s)
#define my_getcwd()   ruby_getcwd()
#define strtod(s, e)   ruby_strtod((s),(e))

Functions

unsigned long ruby_scan_oct (const char *, size_t, size_t *)
unsigned long ruby_scan_hex (const char *, size_t, size_t *)
void ruby_qsort (void *, const size_t, const size_t, int(*)(const void *, const void *, void *), void *)
void ruby_setenv (const char *, const char *)
void ruby_unsetenv (const char *)
char * ruby_strdup (const char *)
char * ruby_getcwd (void)
double ruby_strtod (const char *, char **)
void ruby_each_words (const char *, void(*)(const char *, int, void *), void *)


Define Documentation

 
#define my_getcwd (  )     ruby_getcwd()

Definition at line 70 of file util.h.

Referenced by load_path_getcwd(), path_check_0(), rb_dir_getwd(), rb_execarg_run_options(), and rb_file_expand_path_internal().

#define RUBY_UTIL_H   1

Definition at line 13 of file util.h.

#define scan_hex ( s,
l,
 )     ((int)ruby_scan_hex((s),(l),(e)))

Definition at line 52 of file util.h.

Referenced by parser_tok_hex(), parser_tokadd_utf8(), and read_escaped_byte().

#define scan_oct ( s,
l,
 )     ((int)ruby_scan_oct((s),(l),(e)))

Definition at line 50 of file util.h.

Referenced by parser_read_escape(), proc_options(), and read_escaped_byte().

#define setenv ( name,
val   )     ruby_setenv((name),(val))

Definition at line 62 of file util.h.

Referenced by ruby_setenv().

#define strdup (  )     ruby_strdup(s)

Definition at line 67 of file util.h.

Referenced by alloc_invoke_arguments(), argf_inplace_mode_set(), cState_array_nl_set(), cState_indent_set(), cState_object_nl_set(), cState_space_before_set(), cState_space_set(), dln_find_exe_r(), dln_load(), enc_dup_name(), enc_register_at(), enc_set_default_encoding(), init_env(), insert(), ip_invoke_core(), ip_ruby_cmd_receiver_const_get(), mSyslog_open(), rb_dlcfunc_initialize(), rb_dlcfunc_new(), rb_w32_cmdvector(), readline_attempted_completion_function(), ruby_set_inplace_mode(), tcl_eval(), tcl_global_eval(), yaml_strdup(), and zone_str_update().

#define strtod ( s,
 )     ruby_strtod((s),(e))

Definition at line 74 of file util.h.

Referenced by BigDecimal_to_f(), get_envparam_double(), parser_yylex(), r_object0(), and rb_cstr_to_dbl().

#define unsetenv ( name,
val   )     ruby_unsetenv(name)

Definition at line 63 of file util.h.

Referenced by ruby_setenv().


Function Documentation

void ruby_each_words ( const char *  ,
void(*)(const char *, int, void *)  ,
void *   
)

Definition at line 3767 of file util.c.

References ISSPACE, and len.

Referenced by proc_options(), and ruby_set_debug_option().

char* ruby_getcwd ( void   ) 

Definition at line 478 of file util.c.

References buf, errno, PATH_MAX, rb_sys_fail(), xfree, xmalloc, and xrealloc.

void ruby_qsort ( void *  ,
const   size_t,
const   size_t,
int(*)(const void *, const void *, void *)  ,
void *   
)

Referenced by enum_sort_by(), and rb_ary_sort_bang().

unsigned long ruby_scan_hex ( const char *  ,
size_t  ,
size_t *   
)

Definition at line 42 of file util.c.

References strchr().

Referenced by unescape_unicode_bmp(), and unescape_unicode_list().

unsigned long ruby_scan_oct ( const char *  ,
size_t  ,
size_t *   
)

Definition at line 28 of file util.c.

Referenced by parser_tokadd_escape(), and unescape_nonascii().

void ruby_setenv ( const char *  ,
const char *   
)

Definition at line 2747 of file hash.c.

References ALLOC_N, buf, check_envname(), envix(), fail, free, GET_ENVIRON, invalid_envname(), len, malloc, max(), rb_sprintf(), rb_str_resize(), rb_sys_fail_str(), REALLOC_N, RSTRING_PTR, ruby_strdup(), setenv, snprintf, strlen(), unsetenv, VALUE, and xfree.

Referenced by env_aset(), env_delete(), rb_execarg_run_options(), and ruby_unsetenv().

char* ruby_strdup ( const char *   ) 

Definition at line 457 of file util.c.

References len, strlen(), and xmalloc.

Referenced by argf_initialize_copy(), compat_init_setproctitle(), console_dev(), features_index_add_single(), load_lock(), register_init_ext(), and ruby_setenv().

double ruby_strtod ( const char *  ,
char **   
)

Definition at line 1945 of file util.c.

References Avoid_Underflow, Balloc(), Bcopy, Bfree(), Bias, Big0, Big1, bigtens, Bndry_mask, Bndry_mask1, cmp, d2b(), DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP, diff(), dval, Emin, errno, Exp_1, Exp_mask, Exp_msk1, Exp_shift, FLT_RADIX, Flt_Rounds, Frac_mask, i2b(), IEEE_Arith, ISDIGIT, Bigint::k, Log2P, LSB, lshift, match(), mult(), n_bigtens, NULL, P, pow5mult(), ratio(), rounded_product, rounded_quotient, Rounding, s2b(), Scale_Bit, Bigint::sign, strchr(), Ten_pmax, tens, Tiny0, Tiny1, ulp(), Bigint::wds, word0, word1, and Bigint::x.

void ruby_unsetenv ( const char *   ) 

Definition at line 2856 of file hash.c.

References ruby_setenv().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7