Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ruby/defines.h"
Go to the source code of this file.
Macros | |
#define | DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999) |
#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 | 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 DECIMAL_SIZE_OF_BITS | ( | n | ) | (((n) * 3010 + 9998) / 9999) |
Definition at line 50 of file util.h.
Referenced by BigMath_s_log().
#define my_getcwd | ( | ) | ruby_getcwd() |
Definition at line 73 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 scan_hex | ( | s, | |
l, | |||
e | |||
) | ((int)ruby_scan_hex((s),(l),(e))) |
Definition at line 55 of file util.h.
Referenced by parser_tok_hex(), parser_tokadd_codepoint(), and read_escaped_byte().
#define scan_oct | ( | s, | |
l, | |||
e | |||
) | ((int)ruby_scan_oct((s),(l),(e))) |
Definition at line 53 of file util.h.
Referenced by parser_read_escape(), proc_options(), and read_escaped_byte().
#define strdup | ( | s | ) | ruby_strdup(s) |
Definition at line 70 of file util.h.
Referenced by argf_inplace_mode_set(), dln_find_exe_r(), enc_dup_name(), enc_register_at(), enc_set_default_encoding(), insert(), mSyslog_open(), readline_attempted_completion_function(), ruby_set_inplace_mode(), yaml_strdup(), and zone_str_update().
#define strtod | ( | s, | |
e | |||
) | ruby_strtod((s),(e)) |
Definition at line 77 of file util.h.
Referenced by BigDecimal_to_f(), get_envparam_double(), parse_numeric(), r_object0(), and rb_cstr_to_dbl().
Definition at line 3814 of file util.c.
Referenced by proc_options(), and ruby_set_debug_option().
char* ruby_getcwd | ( | void | ) |
Definition at line 508 of file util.c.
References buf, errno, free(), NULL, PATH_MAX, rb_sys_fail(), rb_syserr_fail(), ruby_strdup(), size, 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(), rb_ary_sort_bang(), and rb_nmin_run().
unsigned long ruby_scan_hex | ( | const char * | , |
size_t | , | ||
size_t * | |||
) |
Definition at line 48 of file util.c.
References hexdigit, and strchr().
Referenced by unescape_unicode_bmp(), and unescape_unicode_list().
unsigned long ruby_scan_oct | ( | const char * | , |
size_t | , | ||
size_t * | |||
) |
Definition at line 34 of file util.c.
Referenced by parser_tokadd_escape(), and unescape_nonascii().
Definition at line 3384 of file hash.c.
References ALLOC_N, ALLOCV_END, ALLOCV_N, buf, envix(), fail, free(), GET_ENVIRON, L, len, malloc, max(), NULL, origenviron, PRIuSIZE, rb_sprintf(), rb_sys_fail_str(), REALLOC_N, ruby_strdup(), snprintf, strlen(), and xfree().
Referenced by env_aset(), env_delete(), rb_execarg_run_options(), and ruby_unsetenv().
char* ruby_strdup | ( | const char * | ) |
Definition at line 496 of file util.c.
References len, memcpy, strlen(), and xmalloc.
Referenced by argf_initialize_copy(), compat_init_setproctitle(), features_index_add_single(), getifaddrs(), load_lock(), register_init_ext(), ruby_getcwd(), and ruby_setenv().
double ruby_strtod | ( | const char * | , |
char ** | |||
) |
Definition at line 1986 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, hexdigit, i2b(), IEEE_Arith, ISDIGIT, Bigint::k, L, 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, tinytens, ulp(), Bigint::wds, word0, word1, and Bigint::x.
void ruby_unsetenv | ( | const char * | ) |
Definition at line 3528 of file hash.c.
References ruby_setenv().