Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "encindex.h"
#include "regenc.h"
#include <ctype.h>
#include "ruby/util.h"
#include "ruby_assert.h"
Go to the source code of this file.
Data Structures | |
struct | rb_encoding_entry |
struct | default_encoding |
Typedefs | |
typedef OnigEncodingType | rb_raw_encoding |
Variables | |
static ID | id_encoding |
VALUE | rb_cEncoding |
static VALUE | rb_encoding_list |
struct { | |
struct rb_encoding_entry * list | |
int count | |
int size | |
st_table * names | |
} | enc_table |
static const rb_data_type_t | encoding_data_type |
static struct default_encoding | default_external = {0} |
static struct default_encoding | default_internal = {-2} |
Definition at line 22 of file encoding.c.
#define enc_autoload_p | ( | enc | ) | (!rb_enc_mbmaxlen(enc)) |
Definition at line 76 of file encoding.c.
Referenced by check_encoding(), enc_autoload(), enc_inspect(), load_encoding(), must_encindex(), rb_enc_find_index(), and rb_enc_register().
#define ENC_DEBUG 0 |
Definition at line 20 of file encoding.c.
#define ENC_DUMMY_FLAG (1<<24) |
Definition at line 61 of file encoding.c.
#define ENC_DUMMY_P | ( | enc | ) | ((enc)->ruby_encoding_index & ENC_DUMMY_FLAG) |
Definition at line 65 of file encoding.c.
Referenced by enc_dummy_p(), enc_inspect(), rb_enc_dummy_p(), rb_enc_register(), and set_base_encoding().
#define ENC_INDEX_MASK (~(~0U<<24)) |
Definition at line 62 of file encoding.c.
Referenced by enc_autoload(), must_encindex(), rb_enc_from_index(), and rb_obj_encoding().
#define ENC_REGISTER | ( | enc | ) | enc_register_at(ENCINDEX_##enc, rb_enc_name(&OnigEncoding##enc), &OnigEncoding##enc) |
Referenced by rb_enc_init().
#define ENC_SET_DUMMY | ( | enc | ) | ((enc)->ruby_encoding_index |= ENC_DUMMY_FLAG) |
Definition at line 66 of file encoding.c.
Referenced by rb_define_dummy_encoding(), rb_enc_set_dummy(), rb_encdb_dummy(), and set_base_encoding().
#define ENC_TO_ENCINDEX | ( | enc | ) | (int)((enc)->ruby_encoding_index & ENC_INDEX_MASK) |
Definition at line 64 of file encoding.c.
Referenced by enc_autoload(), must_encindex(), rb_enc_from_encoding(), and rb_enc_to_index().
#define ENCDB_REGISTER | ( | name, | |
enc | |||
) | enc_register_at(ENCINDEX_##enc, name, NULL) |
Referenced by rb_enc_init().
#define ENCODING_COUNT ENCINDEX_BUILTIN_MAX |
Definition at line 70 of file encoding.c.
Referenced by rb_enc_init().
#define ENCODING_NAMELEN_MAX 63 |
Definition at line 73 of file encoding.c.
Referenced by set_encoding_const().
#define is_data_encoding | ( | obj | ) | (RTYPEDDATA_P(obj) && RTYPEDDATA_TYPE(obj) == &encoding_data_type) |
Definition at line 86 of file encoding.c.
Referenced by enc_capable(), enc_inspect(), rb_data_is_encoding(), and rb_enc_get_index().
#define is_obj_encoding | ( | obj | ) | (RB_TYPE_P((obj), T_DATA) && is_data_encoding(obj)) |
Definition at line 87 of file encoding.c.
Referenced by enc_check_encoding(), and enc_find().
#define MUST_STRING | ( | str | ) | (ENC_ASSERT(RB_TYPE_P(str, T_STRING)), str) |
Definition at line 23 of file encoding.c.
Referenced by rb_enc_check_str().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by rb_enc_get_index().
#define UNSPECIFIED_ENCODING INT_MAX |
Definition at line 71 of file encoding.c.
Referenced by enc_find(), enc_set_default_encoding(), and rb_enc_find_index().
#define valid_encoding_name_p | ( | name | ) | ((name) && strlen(name) <= ENCODING_NAMELEN_MAX) |
Definition at line 74 of file encoding.c.
Referenced by enc_alias(), and enc_register_at().
typedef OnigEncodingType rb_raw_encoding |
Definition at line 29 of file encoding.c.
|
static |
Definition at line 140 of file encoding.c.
References enc_autoload(), enc_autoload_p, rb_enc_from_index(), and rb_enc_to_index().
Referenced by enc_check_encoding().
|
static |
Definition at line 548 of file encoding.c.
References enc_alias_internal(), rb_enc_from_index(), set_encoding_const(), and valid_encoding_name_p.
Referenced by rb_enc_alias(), and rb_encdb_alias().
|
static |
Definition at line 541 of file encoding.c.
References enc_dup_name(), enc_table, st_data_t, and st_insert2().
Referenced by enc_alias(), enc_set_default_encoding(), and rb_locale_encindex().
Definition at line 516 of file encoding.c.
References must_encoding(), Qfalse, Qtrue, and rb_enc_asciicompat.
Referenced by Init_Encoding().
|
static |
Definition at line 678 of file encoding.c.
References rb_encoding_entry::base, enc_autoload_p, ENC_INDEX_MASK, enc_register_at(), enc_table, ENC_TO_ENCINDEX, load_encoding(), rb_enc_name, and OnigEncodingTypeST::ruby_encoding_index.
Referenced by check_encoding(), must_encindex(), rb_enc_dummy_p(), and rb_enc_find_index().
|
inlinestatic |
Definition at line 736 of file encoding.c.
References BUILTIN_TYPE, FALSE, is_data_encoding, SPECIAL_CONST_P, SYMBOL_P, T_DATA, T_FILE, T_REGEXP, T_STRING, T_SYMBOL, and TRUE.
Referenced by enc_compatible_p().
|
static |
Definition at line 367 of file encoding.c.
References rb_eArgError, rb_enc_registered(), and rb_raise().
Referenced by rb_enc_alias(), and rb_enc_replicate().
|
static |
Definition at line 152 of file encoding.c.
References check_encoding(), rb_encoding_entry::enc, is_obj_encoding, NORETURN(), not_encoding(), and RDATA.
Referenced by must_encoding(), rb_enc_get_index(), rb_find_encoding(), rb_to_encoding(), and rb_to_encoding_index().
|
static |
Definition at line 890 of file encoding.c.
References ENC_CODERANGE_7BIT, ENCINDEX_US_ASCII, rb_enc_asciicompat, rb_enc_from_index(), rb_enc_str_asciionly_p(), rb_enc_str_coderange(), RB_TYPE_P, RSTRING_LEN, and T_STRING.
Referenced by enc_compatible_str(), and rb_enc_compatible().
Definition at line 1263 of file encoding.c.
References rb_encoding_entry::enc, enc_capable(), Qnil, rb_enc_compatible(), and rb_enc_from_encoding().
Referenced by Init_Encoding().
|
static |
Definition at line 945 of file encoding.c.
References enc_compatible_latter(), enc_get_index_str(), and rb_enc_from_index().
Referenced by rb_enc_check_str(), and rb_enc_get().
Definition at line 500 of file encoding.c.
References ENC_DUMMY_P, must_encoding(), Qfalse, and Qtrue.
Referenced by Init_Encoding().
Definition at line 1284 of file encoding.c.
References enc_name(), and rb_check_arity.
Referenced by Init_Encoding().
Definition at line 531 of file encoding.c.
References st_data_t, and strdup.
Referenced by enc_alias_internal().
Definition at line 1228 of file encoding.c.
References rb_encoding_entry::enc, is_obj_encoding, Qnil, rb_enc_from_encoding_index(), str_to_encindex(), and UNSPECIFIED_ENCODING.
Referenced by enc_m_loader(), and Init_Encoding().
|
static |
Definition at line 760 of file encoding.c.
References ENCODING_GET_INLINED, ENCODING_INLINE_MAX, NUM2INT, rb_id_encoding(), and rb_ivar_get().
Referenced by enc_compatible_str(), and rb_enc_get_index().
Definition at line 1115 of file encoding.c.
References DATA_PTR, rb_encoding_entry::enc, enc_autoload_p, ENC_DUMMY_P, is_data_encoding, not_encoding(), PRIsVALUE, rb_enc_from_index(), rb_enc_name, rb_enc_sprintf(), rb_enc_to_index(), rb_eTypeError, rb_obj_class(), rb_raise(), and rb_usascii_encoding().
Referenced by Init_Encoding().
Definition at line 1198 of file encoding.c.
References rb_ary_new2, rb_ary_replace(), and rb_encoding_list.
Referenced by Init_Encoding().
Definition at line 1292 of file encoding.c.
Referenced by Init_Encoding().
Definition at line 1142 of file encoding.c.
References DATA_PTR, rb_enc_name, and rb_fstring_cstr().
Referenced by enc_dump(), ibf_dump_object_string(), Init_Encoding(), ole_cp2encoding(), and proc_options().
Definition at line 1169 of file encoding.c.
References enc_names_i(), enc_table, rb_ary_new2, rb_to_encoding_index(), st_data_t, and st_foreach.
Referenced by Init_Encoding().
Definition at line 1148 of file encoding.c.
References OBJ_FREEZE, rb_ary_push(), rb_usascii_str_new2, and ST_CONTINUE.
Referenced by enc_names().
|
static |
Definition at line 96 of file encoding.c.
References rb_cEncoding, and TypedData_Wrap_Struct.
Referenced by enc_register_at(), and Init_Encoding().
|
static |
Definition at line 320 of file encoding.c.
References enc_register_at(), enc_table, enc_table_expand(), rb_encoding_entry::name, rb_enc_registered(), and set_encoding_const().
Referenced by enc_replicate_with_index(), rb_enc_register(), rb_enc_replicate(), rb_encdb_alias(), rb_encdb_declare(), and rb_encdb_replicate().
|
static |
Definition at line 284 of file encoding.c.
References rb_encoding_entry::enc, enc_new(), enc_table, if(), list, rb_encoding_entry::name, OnigEncodingTypeST::name, NIL_P, rb_ary_entry(), rb_ary_store(), rb_encoding_list, OnigEncodingTypeST::ruby_encoding_index, st_data_t, st_insert, STRCASECMP, strdup, valid_encoding_name_p, and xmalloc.
Referenced by enc_autoload(), enc_register(), enc_replicate_with_index(), and rb_enc_register().
Definition at line 430 of file encoding.c.
References rb_enc_from_encoding_index(), rb_enc_replicate(), rb_to_encoding(), and StringValueCStr.
Referenced by Init_Encoding().
|
static |
Definition at line 438 of file encoding.c.
References enc_register(), enc_register_at(), rb_enc_from_index(), set_base_encoding(), and set_encoding_const().
Referenced by rb_encdb_dummy(), and rb_encdb_replicate().
Definition at line 1276 of file encoding.c.
References Qnil, and rb_undefined_alloc().
Referenced by Init_Encoding().
|
static |
Definition at line 1398 of file encoding.c.
References default_encoding::enc, enc_alias_internal(), enc_table, FALSE, default_encoding::index, Init_enc_set_filesystem_encoding(), NIL_P, rb_enc_to_index(), rb_to_encoding(), st_data_t, st_insert, strdup, TRUE, and UNSPECIFIED_ENCODING.
Referenced by rb_enc_set_default_external(), and rb_enc_set_default_internal().
|
static |
Definition at line 807 of file encoding.c.
References ENCODING_INLINE_MAX, ENCODING_SET_INLINED, INT2NUM, rb_id_encoding(), and rb_ivar_set().
Referenced by rb_enc_associate_index(), and rb_enc_set_index().
|
static |
Definition at line 268 of file encoding.c.
References count, enc_table, and realloc.
Referenced by enc_register(), and rb_enc_init().
Definition at line 1471 of file encoding.c.
References rb_enc_default_external().
Referenced by Init_Encoding().
Definition at line 1555 of file encoding.c.
References rb_enc_default_internal().
Referenced by Init_Encoding().
void Init_Encoding | ( | void | ) |
Definition at line 1917 of file encoding.c.
References CLASS_OF, enc_ascii_compatible_p(), enc_compatible_p(), enc_dummy_p(), enc_dump(), enc_find(), enc_inspect(), enc_list(), enc_load(), enc_m_loader(), enc_name(), enc_names(), enc_new(), enc_replicate(), enc_s_alloc(), enc_table, get_default_external(), get_default_internal(), list, NULL, Qnil, rb_ary_new2, rb_ary_push(), rb_cEncoding, rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_method(), rb_define_singleton_method(), rb_enc_aliases(), rb_enc_name_list(), rb_encoding_list, rb_gc_register_mark_object(), rb_locale_charmap(), rb_marshal_define_compat(), rb_undef_method(), RBASIC_CLEAR_CLASS, set_default_external(), and set_default_internal().
|
static |
Definition at line 647 of file encoding.c.
References debug, enc_autoload_p, enc_table, FL_TAINT, FL_UNSET, ISALNUM, ISUPPER, OBJ_FREEZE, Qfalse, rb_enc_registered(), rb_errinfo(), rb_require_internal(), rb_safe_level(), rb_set_errinfo(), rb_sprintf(), RSTRING_END, RSTRING_PTR, ruby_debug, ruby_verbose, and TOLOWER.
Referenced by enc_autoload(), and rb_enc_find_index().
|
static |
Definition at line 179 of file encoding.c.
References rb_encoding_entry::enc, enc_autoload(), enc_autoload_p, ENC_INDEX_MASK, ENC_TO_ENCINDEX, rb_eEncodingError, rb_enc_from_index(), rb_enc_name, rb_loaderror(), and rb_raise().
Referenced by rb_enc_associate_index(), rb_enc_get_from_index(), and rb_enc_set_index().
|
static |
Definition at line 169 of file encoding.c.
References DATA_PTR, enc_check_encoding(), and not_encoding().
Referenced by enc_ascii_compatible_p(), and enc_dummy_p().
NORETURN | ( | static void | not_encodingVALUE enc | ) |
Referenced by enc_check_encoding().
|
static |
Definition at line 162 of file encoding.c.
References PRIsVALUE, rb_eTypeError, rb_obj_class(), and rb_raise().
Referenced by enc_check_encoding(), enc_inspect(), and must_encoding().
int rb_ascii8bit_encindex | ( | void | ) |
Definition at line 1314 of file encoding.c.
References ENCINDEX_ASCII.
Referenced by code_page(), coderange_scan(), pack_unpack_internal(), parser_regx_options(), rb_char_to_option_kcode(), rb_external_str_with_enc(), rb_str_coderange_scan_restartable(), rb_str_dump(), and transcode_io().
rb_encoding* rb_ascii8bit_encoding | ( | void | ) |
Definition at line 1305 of file encoding.c.
References enc_table, ENCINDEX_ASCII, and rb_enc_init().
Referenced by convert_encoding(), do_writeconv(), get_actual_encoding(), int_chr(), io_ascii8bit_binmode(), load_file_internal(), make_writeconv(), parser_here_document(), parser_str_new(), push_glob(), rb_define_dummy_encoding(), rb_encdb_dummy(), rb_file_open_internal(), rb_glob(), rb_gzreader_ungetc(), rb_gzwriter_write(), rb_io_ext_int_to_encs(), rb_io_extract_modeenc(), rb_io_s_binread(), rb_reg_fragment_setenc(), rb_reg_initialize(), rb_reg_initialize_m(), rb_reg_initialize_str(), rb_reg_new(), rb_reg_prepare_enc(), rb_reg_preprocess_dregexp(), rb_reg_s_union(), rb_str_conv_enc_opts(), rb_strftime_with_timespec(), rb_symname_p(), ruby_brace_glob(), ruby_glob(), ruby_init_loadpath_safe(), strio_binmode(), strio_read(), strio_ungetc(), and strio_write().
int rb_data_is_encoding | ( | VALUE | obj | ) |
Definition at line 90 of file encoding.c.
References is_data_encoding.
Referenced by ibf_dump_object_data().
rb_encoding* rb_default_external_encoding | ( | void | ) |
Definition at line 1425 of file encoding.c.
References default_encoding::enc, default_encoding::index, rb_enc_from_index(), and rb_locale_encoding().
Referenced by argf_external_encoding(), argf_internal_encoding(), external_str_new_cstr(), gzfile_init(), Init_enc_set_filesystem_encoding(), io_read_encoding(), ole_init_cp(), rb_enc_default_external(), rb_enc_reg_error_desc(), rb_external_str_new(), rb_external_str_new_cstr(), rb_inspect(), rb_io_ext_int_to_encs(), rb_reg_desc(), rb_str_export(), rb_str_inspect(), rb_str_quote_unprintable(), rb_str_symname_p(), require_libraries(), strio_init(), strio_set_encoding(), and validate_enc_binmode().
rb_encoding* rb_default_internal_encoding | ( | void | ) |
Definition at line 1510 of file encoding.c.
References default_encoding::enc, default_encoding::index, and rb_enc_from_index().
Referenced by file_path_convert(), int_chr(), ole_init_cp(), parse(), process_options(), push_pattern(), rb_enc_default_internal(), rb_enc_reg_error_desc(), rb_external_str_with_enc(), rb_inspect(), rb_io_ext_int_to_encs(), rb_reg_desc(), rb_str_inspect(), rb_str_quote_unprintable(), and rb_str_symname_p().
int rb_define_dummy_encoding | ( | const char * | name | ) |
Definition at line 466 of file encoding.c.
References rb_encoding_entry::enc, ENC_SET_DUMMY, enc_table, rb_ascii8bit_encoding(), and rb_enc_replicate().
Referenced by make_dummy_encoding(), ole_cp2encoding(), rb_nkf_enc_get(), and str_transcode0().
Definition at line 557 of file encoding.c.
References enc_alias(), enc_check_duplication(), enc_table, rb_enc_find_index(), and rb_enc_init().
Definition at line 1707 of file encoding.c.
References enc_table, rb_ary_new(), rb_enc_aliases_enc_i(), rb_hash_new(), st_data_t, and st_foreach.
Referenced by Init_Encoding().
Definition at line 1671 of file encoding.c.
References rb_encoding_entry::enc, key, NIL_P, OBJ_FREEZE, rb_ary_entry(), rb_ary_store(), rb_enc_from_index(), rb_enc_name, rb_fstring_cstr(), rb_hash_aset(), rb_usascii_str_new2, ST_CONTINUE, and STRCASECMP.
Referenced by rb_enc_aliases().
int rb_enc_ascget | ( | const char * | p, |
const char * | e, | ||
int * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 1032 of file encoding.c.
References ISASCII, MBCLEN_CHARFOUND_P, rb_enc_asciicompat, rb_enc_isascii, rb_enc_mbc_to_codepoint, and rb_enc_precise_mbclen().
Referenced by check_pipe_command(), chomp_newline(), chompped_length(), chopped_length(), rb_reg_expr_str(), rb_reg_quote(), rb_str_casecmp(), rb_str_enumerate_lines(), rb_str_split_m(), rmext(), str_end_with_asciichar(), swallow(), tr_setup_table(), tr_trans(), and trnext().
VALUE rb_enc_associate | ( | VALUE | obj, |
rb_encoding * | enc | ||
) |
Definition at line 854 of file encoding.c.
References rb_enc_associate_index(), and rb_enc_to_index().
Referenced by append_fspath(), append_wstr(), dsymbol_alloc(), econv_primitive_convert(), econv_putback(), enc_subseq(), fole_missing(), gzfile_getc(), gzfile_newstr(), intern_str(), io_enc_str(), io_shift_cbuf(), lex_getline(), load_file_internal(), locale_path(), ospath_new(), parser_nextline(), parser_str_new(), preserve_original_state(), process_options(), rb_ary_join(), rb_econv_append(), rb_enc_reg_error_desc(), rb_enc_str_new(), rb_enc_vsprintf(), rb_file_expand_path_internal(), rb_file_join(), rb_nkf_convert(), rb_realpath_internal(), rb_reg_desc(), rb_reg_fragment_setenc(), rb_reg_initialize(), rb_reg_preprocess(), rb_reg_preprocess_dregexp(), rb_reg_quote(), rb_reg_s_union(), rb_reg_to_s(), rb_str_conv_enc_opts(), rb_str_ellipsize(), rb_str_encode_ospath(), rb_str_force_encoding(), rb_str_format(), rb_str_init(), rb_str_inspect(), rb_str_intern(), rb_str_justify(), rb_str_sub_bang(), rb_str_subpat_set(), rb_str_update(), reg_set_source(), require_libraries(), ruby__sfvextra(), str_cat_conv_enc_opts(), str_gsub(), str_shared_replace(), strio_binmode(), strio_read(), strio_set_encoding(), time_zone_name(), and tr_trans().
Definition at line 826 of file encoding.c.
References rb_encoding_entry::enc, ENC_CODERANGE_ASCIIONLY, ENC_CODERANGE_CLEAR, enc_set_index(), must_encindex(), rb_check_frozen, rb_eArgError, rb_enc_asciicompat, rb_enc_from_index(), rb_enc_get_index(), rb_enc_mbminlen, rb_raise(), rb_str_change_terminator_length(), RB_TYPE_P, SPECIAL_CONST_P, and T_STRING.
Referenced by copy_home_path(), encoded_dup(), ibf_load_object_string(), make_econv_exception(), optimized_unescape(), parser_set_encode(), r_ivar(), r_symreal(), rb_dir_getwd(), rb_enc_associate(), rb_enc_copy(), rb_external_str_with_enc(), rb_find_file_ext_safe(), rb_find_file_safe(), rb_realpath_internal(), rb_str_concat(), rb_str_dump(), rb_utf8_str_new(), rb_utf8_str_new_cstr(), str_encode_associate(), str_encode_bang(), and str_new_static().
rb_encoding* rb_enc_check | ( | VALUE | str1, |
VALUE | str2 | ||
) |
Definition at line 879 of file encoding.c.
References rb_encoding_entry::enc, rb_eEncCompatError, rb_enc_compatible(), rb_enc_get(), rb_enc_name, and rb_raise().
Referenced by append_fspath(), chompped_length(), rb_file_expand_path_internal(), rb_file_join(), rb_str_count(), rb_str_delete_bang(), rb_str_end_with(), rb_str_enumerate_lines(), rb_str_format(), rb_str_index_m(), rb_str_justify(), rb_str_rindex(), rb_str_split_m(), rb_str_squeeze_bang(), rb_str_start_with(), rb_str_update(), rb_strseq_index(), readline_attempted_completion_function(), realpath_rec(), str_upto_each(), and tr_trans().
rb_encoding* rb_enc_check_str | ( | VALUE | str1, |
VALUE | str2 | ||
) |
Definition at line 868 of file encoding.c.
References rb_encoding_entry::enc, enc_compatible_str(), MUST_STRING, rb_eEncCompatError, rb_enc_get(), rb_enc_name, and rb_raise().
Referenced by rb_str_plus(), and rb_str_subpat_set().
int rb_enc_code_to_mbclen | ( | int | code, |
rb_encoding * | enc | ||
) |
Definition at line 1088 of file encoding.c.
References ONIGENC_CODE_TO_MBCLEN.
int rb_enc_codelen | ( | int | c, |
rb_encoding * | enc | ||
) |
Definition at line 1077 of file encoding.c.
References ONIGENC_CODE_TO_MBCLEN, rb_eArgError, rb_enc_name, and rb_raise().
Referenced by parser_tokaddmbc(), rb_enc_uint_chr(), rb_str_buf_cat_ascii(), rb_str_concat(), rb_str_format(), rb_str_to_s(), strio_ungetc(), and tr_trans().
unsigned int rb_enc_codepoint | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 1071 of file encoding.c.
References rb_enc_codepoint_len().
unsigned int rb_enc_codepoint_len | ( | const char * | p, |
const char * | e, | ||
int * | len_p, | ||
rb_encoding * | enc | ||
) |
Definition at line 1056 of file encoding.c.
References MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, rb_eArgError, rb_enc_mbc_to_codepoint, rb_enc_name, rb_enc_precise_mbclen(), and rb_raise().
Referenced by lstrip_offset(), rb_enc_codepoint(), rb_str_count(), rb_str_delete_bang(), rb_str_enumerate_codepoints(), rb_str_format(), rb_str_split_m(), rb_str_squeeze_bang(), readline_attempted_completion_function(), rmext(), strio_each_codepoint(), tr_trans(), and trnext().
rb_encoding* rb_enc_compatible | ( | VALUE | str1, |
VALUE | str2 | ||
) |
Definition at line 962 of file encoding.c.
References enc_compatible_latter(), rb_enc_from_index(), and rb_enc_get_index().
Referenced by enc_compatible_p(), file_s_fnmatch(), literal_concat0(), location_format(), rb_enc_check(), rb_file_s_basename(), rb_str_casecmp(), rb_str_casecmp_p(), rb_str_sub_bang(), and ruby__sfvextra().
Definition at line 978 of file encoding.c.
References rb_enc_associate_index(), and rb_enc_get_index().
Referenced by ary_join_0(), ary_join_1(), date_s__parse_internal(), date_s__strptime_internal(), date_strftime_internal(), inspect_ary(), inspect_i(), rb_file_dirname(), rb_file_expand_path_internal(), rb_file_join(), rb_file_s_basename(), rb_reg_desc(), rb_reg_quote(), rb_reg_s_union(), rb_reg_to_s(), rb_str_concat_multi(), rb_str_format(), rb_str_prepend_multi(), rb_str_times(), str_new(), str_new_empty(), and strio_read().
VALUE rb_enc_default_external | ( | void | ) |
Definition at line 1439 of file encoding.c.
References rb_default_external_encoding(), and rb_enc_from_encoding().
Referenced by get_default_external().
VALUE rb_enc_default_internal | ( | void | ) |
Definition at line 1519 of file encoding.c.
References rb_default_internal_encoding(), and rb_enc_from_encoding().
Referenced by get_default_internal(), and str_transcode0().
int rb_enc_dummy_p | ( | rb_encoding * | enc | ) |
Definition at line 132 of file encoding.c.
References enc_autoload(), and ENC_DUMMY_P.
Referenced by enc_str_scrub(), gzfile_getc(), gzfile_newstr(), opt_enc_index(), rb_enc_asciicompat_inline(), rb_enc_str_coderange(), rb_reg_initialize(), and rb_str_check_dummy_enc().
int rb_enc_fast_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 1002 of file encoding.c.
References ONIGENC_MBC_ENC_LEN, and UChar.
Referenced by enc_strlen(), rb_str_enumerate_chars(), rb_str_reverse(), rb_str_split_m(), scan_once(), and str_gsub().
rb_encoding* rb_enc_find | ( | const char * | name | ) |
Definition at line 728 of file encoding.c.
References rb_enc_find_index(), and rb_enc_from_index().
Referenced by econv_get_replacement(), econv_insert_output(), ibf_load_object_data(), make_encoding(), make_replacement(), and transcode_loop().
int rb_enc_find_index | ( | const char * | name | ) |
Definition at line 704 of file encoding.c.
References rb_encoding_entry::enc, enc_autoload(), enc_autoload_p, load_encoding(), rb_eArgError, rb_enc_from_index(), rb_enc_registered(), rb_raise(), rb_warn(), and UNSPECIFIED_ENCODING.
Referenced by enc_find_index(), ibf_load_object_string(), Init_enc_set_filesystem_encoding(), make_econv_exception(), ole_cp2encoding(), opt_enc_index(), parse_mode_enc(), parser_set_encode(), rb_econv_open0(), rb_enc_alias(), rb_enc_find(), rb_nkf_enc_get(), rb_to_encoding_index(), str_find_encindex(), sym2encidx(), transcode_io(), and transcode_string().
void rb_enc_foreach_name | ( | int(*)(st_data_t name, st_data_t idx, st_data_t arg) | func, |
st_data_t | arg | ||
) |
Definition at line 1964 of file encoding.c.
References enc_table, func, and st_foreach.
Referenced by Init_w32_codepage(), and remove_invalid_alternative_data().
VALUE rb_enc_from_encoding | ( | rb_encoding * | encoding | ) |
Definition at line 117 of file encoding.c.
References ENC_TO_ENCINDEX, Qnil, and rb_enc_from_encoding_index().
Referenced by argf_external_encoding(), argf_internal_encoding(), do_writeconv(), econv_destination_encoding(), econv_insert_output(), econv_s_asciicompat_encoding(), econv_source_encoding(), enc_compatible_p(), gettable_gen(), ibf_load_object_data(), Init_nkf(), io_set_encoding_by_bom(), load_file_internal(), make_econv_exception(), make_encobj(), process_options(), rb_enc_default_external(), rb_enc_default_internal(), rb_gzreader_external_encoding(), rb_io_external_encoding(), rb_io_extract_encoding_option(), rb_io_getline_0(), rb_io_internal_encoding(), rb_nkf_guess(), rb_parser_encoding(), rb_reg_to_s(), rb_str_ellipsize(), rb_str_enumerate_lines(), readline_attempted_completion_function(), set_encoding_const(), and strio_external_encoding().
|
static |
Definition at line 102 of file encoding.c.
References rb_encoding_entry::enc, list, NIL_P, rb_ary_entry(), rb_bug(), and rb_encoding_list.
Referenced by enc_find(), enc_replicate(), rb_enc_from_encoding(), and rb_obj_encoding().
rb_encoding* rb_enc_from_index | ( | int | index | ) |
Definition at line 616 of file encoding.c.
References ENC_INDEX_MASK, enc_table, and rb_enc_init().
Referenced by check_encoding(), copy_home_path(), dump_object(), econv_args(), enc_alias(), enc_arg(), enc_compatible_latter(), enc_compatible_str(), enc_inspect(), enc_replicate_with_index(), encoding_name(), file_path_convert(), get_actual_encoding(), ibf_dump_object_string(), io_set_encoding_by_bom(), load_file_internal(), make_dummy_encoding(), make_econv_exception(), must_encindex(), ole_cp2encoding(), opt_enc_index(), parse_mode_enc(), parser_set_encode(), process_options(), rb_default_external_encoding(), rb_default_internal_encoding(), rb_econv_open0(), rb_enc_aliases_enc_i(), rb_enc_associate_index(), rb_enc_compatible(), rb_enc_find(), rb_enc_find_index(), rb_enc_get(), rb_enc_register(), rb_enc_replicate(), rb_enc_set_base(), rb_enc_str_coderange(), rb_encdb_declare(), rb_encdb_replicate(), rb_encdb_set_unicode(), rb_filesystem_encoding(), rb_find_encoding(), rb_io_extract_encoding_option(), rb_locale_encoding(), rb_nkf_enc_get(), rb_str_buf_cat_ascii(), rb_str_comparable(), rb_str_dump(), rb_str_encode_ospath(), rb_str_escape(), rb_str_inspect(), rb_w32_conv_from_wchar(), rb_w32_write_console(), RUBY_ALIAS_FUNCTION(), str_encode_associate(), str_end_with_asciichar(), str_to_encoding(), and str_transcode_enc_args().
rb_encoding* rb_enc_get | ( | VALUE | obj | ) |
Definition at line 860 of file encoding.c.
References enc_compatible_str(), rb_enc_from_index(), and rb_enc_get_index().
Referenced by attrsetname_to_attr_id(), check_dirname(), check_getline_args(), check_path_encoding(), check_pipe_command(), chompped_length(), convert_encoding(), do_writeconv(), dsymbol_check(), econv_set_replacement(), file_s_fnmatch(), fnmatch_brace(), get_env_cstr(), io_encoding_set(), literal_concat0(), must_be_ascii_compatible(), must_not_be_anonymous(), ole_vstr2wc(), optimized_unescape_html(), parser_prepare(), parser_yyerror(), path_check_0(), path_sub_ext(), preserve_original_state(), push_glob(), rb_econv_open_opts(), rb_econv_prepare_options(), rb_enc_check(), rb_enc_check_str(), rb_file_dirname(), rb_file_expand_path_internal(), rb_file_join(), rb_file_s_basename(), rb_file_s_extname(), rb_gzreader_ungetc(), rb_gzwriter_write(), rb_home_dir_of(), rb_inspect(), rb_io_extract_encoding_option(), rb_io_extract_modeenc(), rb_mod_const_defined(), rb_mod_const_get(), rb_must_asciicompat(), rb_path_to_class(), rb_push_glob(), rb_readlink(), rb_realpath_internal(), rb_reg_check_preprocess(), rb_reg_desc(), rb_reg_error_desc(), rb_reg_initialize_m(), rb_reg_initialize_str(), rb_reg_prepare_enc(), rb_reg_preprocess_dregexp(), rb_reg_quote(), rb_reg_regsub(), rb_reg_s_union(), rb_reg_to_s(), rb_str_cat_conv_enc_opts(), rb_str_conv_enc_opts(), rb_str_ellipsize(), rb_str_enumerate_chars(), rb_str_enumerate_lines(), rb_str_format(), rb_str_intern(), rb_str_symname_type(), rb_string_value_cstr(), rb_thread_setname(), rb_to_encoding_index(), realpath_rec(), reg_enc_error(), reg_fragment_enc_error(), reg_named_capture_assign_gen(), reg_set_source(), ruby__sfvextra(), str_find_encindex(), strio_ungetc(), strio_write(), strscan_aref(), strscan_getch(), sym_check_asciionly(), time_strftime(), transcode_loop(), and update_char_offset().
rb_encoding* rb_enc_get_from_index | ( | int | index | ) |
Definition at line 628 of file encoding.c.
References must_encindex().
Referenced by get_actual_encoding(), and str_new_static().
int rb_enc_get_index | ( | VALUE | obj | ) |
Definition at line 773 of file encoding.c.
References BUILTIN_TYPE, enc_check_encoding(), enc_get_index_str(), is_data_encoding, NIL_P, rb_funcallv, rb_intern, rb_sym2str, SPECIAL_CONST_P, SYMBOL_P, T_DATA, T_FILE, T_REGEXP, and T_STRING.
Referenced by encoding_name(), ibf_dump_object_string(), optimized_unescape(), rb_enc_associate_index(), rb_enc_compatible(), rb_enc_copy(), rb_enc_get(), rb_obj_encoding(), rb_str_dump(), str_transcode_enc_args(), sym2encidx(), and transcode_string().
void rb_enc_init | ( | void | ) |
Definition at line 589 of file encoding.c.
References ASCII, ENC_REGISTER, enc_table, enc_table_expand(), ENCDB_REGISTER, ENCINDEX_BUILTIN_MAX, ENCODING_COUNT, EUC_JP, st_init_strcasetable(), UTF8_MAC, UTF_16, UTF_16BE, UTF_16LE, UTF_32, UTF_32BE, UTF_32LE, and UTF_8.
Referenced by rb_ascii8bit_encoding(), rb_enc_alias(), rb_enc_from_index(), rb_usascii_encoding(), and rb_utf8_encoding().
int rb_enc_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 1008 of file encoding.c.
References MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, ONIGENC_PRECISE_MBC_ENC_LEN, rb_enc_mbminlen, and UChar.
Referenced by bracket(), enc_strlen(), gzfile_getc(), io_getc(), is_special_global_name(), rb_enc_symname_type(), rb_str_casecmp(), rb_str_enumerate_chars(), rb_str_enumerate_lines(), rb_str_format(), rb_str_reverse(), str_nth_len(), str_null_char(), strio_getc(), and strscan_getch().
Definition at line 1663 of file encoding.c.
References enc_table, rb_ary_new2, rb_enc_name_list_i(), st_data_t, and st_foreach.
Referenced by Init_Encoding().
Definition at line 1640 of file encoding.c.
References rb_ary_push(), rb_fstring_cstr(), and ST_CONTINUE.
Referenced by rb_enc_name_list().
int rb_enc_precise_mbclen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 1020 of file encoding.c.
References ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE, ONIGENC_PRECISE_MBC_ENC_LEN, and UChar.
Referenced by coderange_scan(), enc_pred_char(), enc_str_scrub(), enc_succ_char(), fnmatch_helper(), gzreader_charboundary(), io_getc(), make_econv_exception(), parser_precise_mbclen(), rb_enc_ascget(), rb_enc_codepoint_len(), rb_enc_strlen_cr(), rb_enc_uint_chr(), rb_io_each_codepoint(), rb_io_getline_0(), rb_reg_expr_str(), rb_str_coderange_scan_restartable(), rb_str_concat(), rb_str_dump(), rb_str_encode_ospath(), rb_str_escape(), rb_str_inspect(), rb_str_setbyte(), str_succ(), sym_printable(), unescape_escaped_nonascii(), and unescape_nonascii().
int rb_enc_register | ( | const char * | name, |
rb_encoding * | encoding | ||
) |
Definition at line 333 of file encoding.c.
References enc_autoload_p, ENC_DUMMY_P, enc_register(), enc_register_at(), rb_eArgError, rb_enc_from_index(), rb_enc_name, rb_enc_registered(), rb_raise(), set_encoding_const(), and STRCASECMP.
int rb_enc_registered | ( | const char * | name | ) |
Definition at line 634 of file encoding.c.
References enc_table, st_data_t, and st_lookup.
Referenced by enc_check_duplication(), enc_register(), load_encoding(), rb_enc_find_index(), rb_enc_register(), rb_enc_set_base(), rb_encdb_alias(), rb_encdb_declare(), rb_encdb_dummy(), rb_encdb_replicate(), rb_filesystem_encindex(), and rb_locale_encindex().
int rb_enc_replicate | ( | const char * | name, |
rb_encoding * | encoding | ||
) |
Definition at line 409 of file encoding.c.
References enc_check_duplication(), enc_register(), rb_enc_from_index(), set_base_encoding(), and set_encoding_const().
Referenced by enc_replicate(), and rb_define_dummy_encoding().
Definition at line 389 of file encoding.c.
References rb_enc_from_index(), rb_enc_registered(), and set_base_encoding().
void rb_enc_set_default_external | ( | VALUE | encoding | ) |
Definition at line 1477 of file encoding.c.
References enc_set_default_encoding(), NIL_P, rb_eArgError, and rb_raise().
Referenced by process_options(), and set_default_external().
void rb_enc_set_default_internal | ( | VALUE | encoding | ) |
Definition at line 1561 of file encoding.c.
References enc_set_default_encoding().
Referenced by process_options(), and set_default_internal().
int rb_enc_set_dummy | ( | int | index | ) |
Definition at line 400 of file encoding.c.
References rb_encoding_entry::enc, ENC_SET_DUMMY, and enc_table.
void rb_enc_set_index | ( | VALUE | obj, |
int | idx | ||
) |
Definition at line 818 of file encoding.c.
References enc_set_index(), must_encindex(), and rb_check_frozen.
Referenced by pack_pack(), rb_str_concat_literals(), and str_enc_copy().
int rb_enc_to_index | ( | rb_encoding * | enc | ) |
Definition at line 126 of file encoding.c.
References ENC_TO_ENCINDEX.
Referenced by check_encoding(), code_page(), coderange_scan(), dir_path(), enc_inspect(), enc_set_default_encoding(), enc_str_scrub(), Init_enc_set_filesystem_encoding(), optimized_unescape(), push_glob(), rb_dir_getwd(), rb_enc_associate(), rb_enc_str_buf_cat(), rb_enc_str_new_static(), rb_external_str_with_enc(), rb_realpath_internal(), rb_setup_fake_str(), rb_str_coderange_scan_restartable(), rb_str_concat(), rb_str_plus(), rb_w32_conv_from_wchar(), and rb_w32_readdir().
int rb_enc_tolower | ( | int | c, |
rb_encoding * | enc | ||
) |
Definition at line 1100 of file encoding.c.
References ONIGENC_ASCII_CODE_TO_LOWER_CASE, and ONIGENC_IS_ASCII_CODE.
int rb_enc_toupper | ( | int | c, |
rb_encoding * | enc | ||
) |
Definition at line 1094 of file encoding.c.
References ONIGENC_ASCII_CODE_TO_UPPER_CASE, and ONIGENC_IS_ASCII_CODE.
Referenced by bracket(), fnmatch_helper(), and rb_str_format().
int rb_enc_unicode_p | ( | rb_encoding * | enc | ) |
Definition at line 525 of file encoding.c.
References ONIGENC_IS_UNICODE, and st_data_t.
Referenced by rb_reg_expr_str(), rb_str_escape(), and rb_str_inspect().
Definition at line 572 of file encoding.c.
References enc_alias(), enc_register(), and rb_enc_registered().
Referenced by Init_enc(), and Init_enc_set_filesystem_encoding().
void rb_encdb_declare | ( | const char * | name | ) |
Definition at line 357 of file encoding.c.
References enc_register(), rb_enc_from_index(), rb_enc_registered(), and set_encoding_const().
Referenced by Init_enc(), and Init_enc_set_filesystem_encoding().
int rb_encdb_dummy | ( | const char * | name | ) |
Definition at line 476 of file encoding.c.
References rb_encoding_entry::enc, enc_replicate_with_index(), ENC_SET_DUMMY, enc_table, rb_ascii8bit_encoding(), and rb_enc_registered().
Definition at line 454 of file encoding.c.
References enc_register(), enc_replicate_with_index(), rb_enc_from_index(), and rb_enc_registered().
void rb_encdb_set_unicode | ( | int | index | ) |
Definition at line 583 of file encoding.c.
References ONIGENC_FLAG_UNICODE, and rb_enc_from_index().
int rb_filesystem_encindex | ( | void | ) |
Definition at line 1376 of file encoding.c.
References ENCINDEX_ASCII, and rb_enc_registered().
Referenced by copy_home_path(), file_path_convert(), rb_filesystem_encoding(), rb_realpath_internal(), and rb_str_encode_ospath().
rb_encoding* rb_filesystem_encoding | ( | void | ) |
Definition at line 1385 of file encoding.c.
References rb_enc_from_index(), and rb_filesystem_encindex().
Referenced by dir_initialize(), env_encoding_for(), etc_systmpdir(), push_glob(), rb_default_home_dir(), rb_dir_getwd(), rb_file_expand_path_internal(), rb_filesystem_str_new(), rb_filesystem_str_new_cstr(), rb_home_dir_of(), and rb_w32_special_folder().
rb_encoding* rb_find_encoding | ( | VALUE | enc | ) |
Definition at line 253 of file encoding.c.
References enc_check_encoding(), NULL, rb_enc_from_index(), RDATA, and str_find_encindex().
Referenced by find_encoding().
void rb_gc_mark_encodings | ( | void | ) |
Definition at line 263 of file encoding.c.
Referenced by gc_mark_roots().
ID rb_id_encoding | ( | void | ) |
Definition at line 753 of file encoding.c.
References CONST_ID, and id_encoding.
Referenced by dir_initialize(), enc_get_index_str(), enc_set_index(), Init_IO(), rb_str_init(), and w_encoding().
int rb_locale_charmap_index | ( | void | ) |
Definition at line 92 of file localeinit.c.
References enc_find_index(), and locale_charmap().
Referenced by rb_locale_encindex(), and rb_usascii_encindex().
int rb_locale_encindex | ( | void | ) |
Definition at line 1352 of file encoding.c.
References enc_alias_internal(), ENCINDEX_ASCII, Init_w32_codepage(), rb_enc_registered(), and rb_locale_charmap_index().
Referenced by rb_locale_encoding().
rb_encoding* rb_locale_encoding | ( | void | ) |
Definition at line 1370 of file encoding.c.
References rb_enc_from_index(), and rb_locale_encindex().
Referenced by env_encoding_for(), env_str_new(), etc_getlogin(), load_file_internal(), locale_path(), process_options(), rb_default_external_encoding(), rb_loaderror(), rb_loaderror_with_path(), rb_locale_str_new(), rb_locale_str_new_cstr(), rb_str_export_locale(), rb_strftime_with_timespec(), readline_attempted_completion_function(), syserr_initialize(), and time_zone_name().
Definition at line 992 of file encoding.c.
References ENC_INDEX_MASK, rb_enc_from_encoding_index(), rb_enc_get_index(), rb_eTypeError, and rb_raise().
Referenced by Init_Regexp(), Init_String(), str_transcode0(), and sym_encoding().
rb_encoding* rb_to_encoding | ( | VALUE | enc | ) |
Definition at line 246 of file encoding.c.
References enc_check_encoding(), RDATA, and str_to_encoding().
Referenced by decorate_convpath(), dir_initialize(), enc_replicate(), enc_set_default_encoding(), ibf_dump_object_data(), int_chr(), optimized_unescape(), rb_io_extract_encoding_option(), rb_str_force_encoding(), rb_str_init(), and strio_set_encoding().
int rb_to_encoding_index | ( | VALUE | enc | ) |
Definition at line 198 of file encoding.c.
References enc_check_encoding(), NIL_P, rb_check_string_type(), rb_enc_asciicompat, rb_enc_find_index(), rb_enc_get(), and StringValueCStr.
Referenced by econv_args(), enc_arg(), enc_names(), rb_io_extract_encoding_option(), and transcode_io().
int rb_usascii_encindex | ( | void | ) |
Definition at line 1344 of file encoding.c.
References ENCINDEX_US_ASCII, and rb_locale_charmap_index().
Referenced by code_page(), encoding_name(), pack_pack(), rb_external_str_with_enc(), rb_find_file_ext_safe(), rb_find_file_safe(), rb_str_escape(), rb_usascii_str_new(), rb_usascii_str_new_cstr(), sym2encidx(), and transcode_io().
rb_encoding* rb_usascii_encoding | ( | void | ) |
Definition at line 1335 of file encoding.c.
References enc_table, ENCINDEX_US_ASCII, and rb_enc_init().
Referenced by d_lite_to_s(), enc_inspect(), Init_id(), Init_op_tbl(), intern_str(), mk_inspect(), name_err_mesg_to_str(), of2str(), parser_here_document(), parser_str_new(), rb_ary_join(), rb_file_open_internal(), rb_intern2(), rb_nkf_convert(), rb_reg_desc(), rb_reg_fragment_setenc(), rb_reg_initialize(), rb_reg_prepare_enc(), rb_reg_quote(), rb_reg_to_s(), rb_str_inspect(), rb_str_intern(), rb_strftime_with_timespec(), rb_sym_intern_ascii(), str_upto_each(), time_asctime(), time_to_s(), time_zone_name(), and unescape_nonascii().
int rb_utf8_encindex | ( | void | ) |
Definition at line 1329 of file encoding.c.
References ENCINDEX_UTF_8.
Referenced by code_page(), enc_str_scrub(), encoding_name(), io_strip_bom(), pack_pack(), parse(), rb_char_to_option_kcode(), rb_str_dump(), rb_utf8_str_new(), rb_utf8_str_new_cstr(), sym2encidx(), transcode_io(), and transcode_string().
rb_encoding* rb_utf8_encoding | ( | void | ) |
Definition at line 1320 of file encoding.c.
References enc_table, ENCINDEX_UTF_8, and rb_enc_init().
Referenced by alias(), append_utf8(), convert_encoding(), enc_strlen(), etc_getlogin(), etc_systmpdir(), get_env_cstr(), Init_nkf(), load_file_internal(), make_econv_exception(), parser_here_document(), parser_initialize(), parser_prepare(), parser_str_new(), parser_tokadd_codepoint(), process_options(), push_glob(), rb_file_expand_path_internal(), rb_home_dir_of(), rb_memsearch(), rb_str_downcase_bang(), rb_str_encode_ospath(), rb_str_subpos(), rb_str_upcase_bang(), scalar(), start_document(), start_mapping(), start_sequence(), transcode_string(), and writer().
|
static |
Definition at line 375 of file encoding.c.
References rb_encoding_entry::base, rb_encoding_entry::enc, ENC_DUMMY_P, ENC_SET_DUMMY, and enc_table.
Referenced by enc_replicate_with_index(), rb_enc_replicate(), and rb_enc_set_base().
Definition at line 1500 of file encoding.c.
References rb_enc_set_default_external(), and rb_warning().
Referenced by Init_Encoding().
Definition at line 1581 of file encoding.c.
References rb_enc_set_default_internal(), and rb_warning().
Referenced by Init_Encoding().
|
static |
Definition at line 1589 of file encoding.c.
References ALLOCA_N, ENCODING_NAMELEN_MAX, ISALNUM, ISDIGIT, ISLOWER, ISUPPER, len, MEMCPY, rb_encoding_entry::name, ONIGENC_ASCII_CODE_TO_UPPER_CASE, rb_cEncoding, rb_define_const(), rb_enc_from_encoding(), and strlen().
Referenced by enc_alias(), enc_register(), enc_replicate_with_index(), rb_enc_register(), rb_enc_replicate(), and rb_encdb_declare().
|
static |
Definition at line 217 of file encoding.c.
References rb_eArgError, rb_enc_asciicompat, rb_enc_find_index(), rb_enc_get(), rb_raise(), StringValue, and StringValueCStr.
Referenced by rb_find_encoding(), and str_to_encindex().
|
static |
Definition at line 230 of file encoding.c.
References PRIsVALUE, rb_eArgError, rb_raise(), and str_find_encindex().
Referenced by enc_find(), and str_to_encoding().
|
static |
Definition at line 240 of file encoding.c.
References rb_enc_from_index(), and str_to_encindex().
Referenced by rb_to_encoding().
int count |
Definition at line 56 of file encoding.c.
Referenced by asn1time_to_time(), clock_gettime(), constat_apply(), enc_table_expand(), EVENTSINK_Invoke(), ffi_closure_SYSV(), ffi_prep_args(), ffi_prep_cif_machdep(), find_coclass(), find_iid(), lazy_zip_arrays_func(), nogvl_copy_stream_wait_write(), ole_const_load(), ole_types_from_typelib(), oleclass_from_typelib(), olerecord_set_ivar(), ossl_ocspbres_get_responses(), ossl_ocspbres_get_status(), ossl_ocspreq_get_certid(), ossl_ocspsres_get_extensions(), ossl_x509_get_extensions(), ossl_x509attr_get_value(), ossl_x509crl_get_extensions(), ossl_x509req_get_attributes(), ossl_x509revoked_get_extensions(), rb_big_divrem_normal(), rb_big_mul_toom3(), rb_ivar_count(), rb_read_internal(), rb_write_internal(), rb_write_internal2(), read_num(), recordinfo_from_itypelib(), str2big_karatsuba(), typeinfo_from_ole(), update_coverage(), and waitpid().
|
static |
Definition at line 1395 of file encoding.c.
|
static |
Definition at line 1507 of file encoding.c.
struct { ... } enc_table |
Referenced by enc_alias_internal(), enc_autoload(), enc_names(), enc_register(), enc_register_at(), enc_set_default_encoding(), enc_table_expand(), Init_Encoding(), load_encoding(), rb_ascii8bit_encoding(), rb_define_dummy_encoding(), rb_enc_alias(), rb_enc_aliases(), rb_enc_foreach_name(), rb_enc_from_index(), rb_enc_init(), rb_enc_name_list(), rb_enc_registered(), rb_enc_set_dummy(), rb_encdb_dummy(), rb_usascii_encoding(), rb_utf8_encoding(), and set_base_encoding().
|
static |
Definition at line 80 of file encoding.c.
|
static |
Definition at line 44 of file encoding.c.
Referenced by rb_id_encoding().
struct rb_encoding_entry* list |
Definition at line 55 of file encoding.c.
Referenced by add_modules(), compile_dstr_fragments(), debug_deadlock_check(), debug_option(), dump_option(), enc_register_at(), fc_i(), feature_option(), gc_mark_roots(), get_destination_insn(), get_next_insn(), get_prev_insn(), glob_free_pattern(), glob_make_pattern(), ibf_dump_iseq_list(), ibf_dump_object_list(), Init_Encoding(), INSERT_LIST(), iseq_compile_each(), iseq_insns_unification(), iseq_optimize(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), libyaml_version(), list_append_gen(), mix_id_table_insert(), new_regexp_gen(), node_extended_grapheme_cluster(), numeric_getaddrinfo(), onigenc_with_ascii_strnicmp(), pipe_add_fptr(), pipe_del_fptr(), rb_enc_from_encoding_index(), rb_objspace_call_finalizer(), rb_objspace_free(), rb_set_end_proc(), recursive_list_access(), require_libraries(), ruby_glob0(), select_internal(), sock_s_unpack_sockaddr_in(), struct_make_members_list(), thread_join(), and verify_list().
st_table* names |
Definition at line 58 of file encoding.c.
Referenced by make_hostent_internal(), match_inspect(), and sock_s_gethostbyaddr().
VALUE rb_cEncoding |
Definition at line 45 of file encoding.c.
Referenced by enc_new(), Init_Encoding(), Init_Exception(), InitVM_transcode(), and set_encoding_const().
|
static |
Definition at line 46 of file encoding.c.
Referenced by enc_list(), enc_register_at(), Init_Encoding(), and rb_enc_from_encoding_index().
int size |
Definition at line 57 of file encoding.c.
Referenced by add_code_range_to_buf0(), allocate_to_register_or_stack(), allocate_to_stack(), argf_memsize(), backtrace_each(), backtrace_to_location_ary(), backtrace_to_str_ary(), BSD_vfprintf(), change_mparam(), check_machine_stack_size(), closure_memsize(), compile_data_alloc(), console_echo_p(), cont_capture(), cont_memsize(), cont_restore_thread(), cont_save_machine_stack(), date_strftime_alloc(), dlmallopt(), dln_find_exe_r(), dln_find_file_r(), dln_strerror(), dump_node(), each_cons_i(), each_slice_i(), enum_cycle_size(), enum_each_cons(), enum_each_cons_size(), enum_each_slice(), enum_each_slice_size(), enum_size_over_p(), ffi_call(), ffi_check_struct_type(), ffi_closure_call_SYSV(), ffi_closure_helper(), ffi_closure_helper_SYSV(), ffi_closure_osf_inner(), ffi_closure_sparc_inner_v8(), ffi_closure_sparc_inner_v9(), ffi_closure_SYSV_inner(), ffi_closure_unix_inner(), ffi_prep_args(), ffi_prep_args_VFP(), ffi_prep_cif_machdep(), ffi_prep_cif_sysv_core(), ffi_prep_closure_inner(), ffi_prep_incoming_args_VFP(), fiber_memsize(), finish_overlapped(), finish_overlapped_socket(), flush_icache(), flush_range(), fmt_setup(), function_memsize(), gc_mark_roots(), get_line_info(), getifaddrs(), gzfile_memsize(), heap_pages_expand_sorted_to(), ialloc(), ibf_dump_id_list(), ibf_dump_iseq_list(), ibf_dump_local_table(), ibf_dump_memsize(), ibf_dump_object_list(), ibf_load_catch_table(), ibf_load_local_table(), id2key(), internal_memalign(), io_fread(), iseq_memsize(), iseq_optimize(), iseq_set_local_table(), iseq_specialized_instruction(), limit_by_enum_size(), make_readconv(), mark_stack_size(), memsize_dbm(), mmrot3_(), mmswap_(), new_callinfo(), obj_memsize_of(), objspace_malloc_fixup(), objspace_malloc_prepare(), objspace_xcalloc(), ole_cp2encoding(), ole_rec2variant(), ole_wc2mb_alloc(), olerecord_size(), onig_memsize(), onig_region_memsize(), onig_set_match_stack_limit_size(), onigenc_with_ascii_strnicmp(), overlapped_socket_io(), param_keyword_size(), parser_memsize(), rb_alloc_tmp_buffer2(), rb_ary_initialize(), rb_big2str_generic(), rb_econv_memsize(), rb_exec_async_signal_safe(), rb_file_expand_path_internal(), rb_hash_hash(), rb_hash_keys(), rb_hash_values(), rb_io_memsize(), rb_iseq_disasm(), rb_node_memsize(), rb_objspace_reachable_objects_from_root(), rb_readlink(), rb_stat_s(), rb_str_justify(), rb_struct_new(), rb_thread_priority_set(), rb_transcoding_memsize(), rb_vmdebug_thread_dump_state(), rb_w32_read(), rb_w32_reparse_symlink_p(), rb_w32_write(), rb_zstream_set_avail_out(), recvmsg(), reg_get_val(), release_unused_segments(), remove_invalid_alternative_data(), replace_to_long_name(), ruby_getcwd(), ruby_qsort(), sendmsg(), st_general_keys(), st_general_values(), State_memsize(), thread_memsize(), unset_addr_list_add(), unset_addr_list_init(), vm_memsize(), w32_readlink(), wlstati64(), wmap_aset_update(), wmap_final_func(), wmap_finalize(), wmap_memsize(), wstati64(), yaml_emitter_set_output_string(), yaml_malloc(), yaml_parser_set_input_string(), yaml_parser_update_buffer(), yaml_realloc(), yaml_string_read_handler(), and yaml_string_write_handler().