Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Typedefs | |
typedef const OnigEncodingType | rb_encoding |
typedef struct rb_econv_t | rb_econv_t |
Variables | |
RUBY_EXTERN VALUE | rb_cEncoding |
#define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT |
Definition at line 410 of file encoding.h.
Referenced by econv_primitive_convert(), gzfile_getc(), InitVM_transcode(), more_char(), rb_econv_convert0(), rb_trans_conv(), and trans_sweep().
#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR |
Definition at line 398 of file encoding.h.
Referenced by decorator_names(), econv_description(), econv_opts(), InitVM_transcode(), and rb_econv_binmode().
#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR |
Definition at line 397 of file encoding.h.
Referenced by decorator_names(), econv_description(), econv_opts(), InitVM_transcode(), and rb_econv_binmode().
#define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK |
Definition at line 392 of file encoding.h.
#define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR |
Definition at line 403 of file encoding.h.
Referenced by argf_next_argv(), pipe_open(), prep_stdio(), rb_io_extract_modeenc(), and rb_io_s_pipe().
#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK |
Definition at line 386 of file encoding.h.
Referenced by make_writeconv(), and rb_econv_open().
#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK |
Definition at line 387 of file encoding.h.
Referenced by InitVM_transcode(), rb_econv_convert(), and str_transcode0().
#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE |
Definition at line 388 of file encoding.h.
Referenced by append_wstr(), econv_opts(), InitVM_transcode(), rb_econv_convert(), rb_strftime_with_timespec(), rb_w32_write_console(), ruby__sfvextra(), and str_transcode0().
#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK |
Definition at line 393 of file encoding.h.
Referenced by argf_next_argv(), decorator_names(), do_writeconv(), econv_description(), econv_opts(), rb_econv_binmode(), rb_io_binmode(), str_transcode0(), and validate_enc_binmode().
#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK |
Definition at line 394 of file encoding.h.
Referenced by make_writeconv().
#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK |
Definition at line 395 of file encoding.h.
Referenced by make_readconv().
#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT |
Definition at line 409 of file encoding.h.
Referenced by do_writeconv(), econv_convert(), econv_primitive_convert(), fill_cbuf(), gzfile_getc(), gzfile_newstr(), InitVM_transcode(), rb_econv_convert0(), rb_trans_conv(), trans_sweep(), transcode_loop(), transcode_restartable(), and transcode_restartable0().
#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK |
Definition at line 401 of file encoding.h.
Referenced by make_writeconv().
#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF |
Definition at line 391 of file encoding.h.
Referenced by econv_opts(), InitVM_transcode(), and rb_econv_convert().
#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK |
Definition at line 389 of file encoding.h.
Referenced by InitVM_transcode(), and rb_econv_convert().
#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE |
Definition at line 390 of file encoding.h.
Referenced by append_wstr(), econv_opts(), InitVM_transcode(), rb_econv_convert(), rb_strftime_with_timespec(), rb_w32_conv_from_wchar(), rb_w32_write_console(), ruby__sfvextra(), and str_transcode0().
#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR |
Definition at line 396 of file encoding.h.
Referenced by decorator_names(), econv_description(), econv_opts(), InitVM_transcode(), pipe_open(), prep_stdio(), rb_econv_binmode(), rb_io_extract_modeenc(), and rb_io_s_pipe().
#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR |
Definition at line 400 of file encoding.h.
Referenced by decorator_names(), econv_description(), econv_opts(), InitVM_transcode(), and str_transcode0().
#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR |
Definition at line 402 of file encoding.h.
Referenced by decorator_names(), econv_description(), econv_opts(), InitVM_transcode(), and str_transcode0().
#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR |
Definition at line 399 of file encoding.h.
Referenced by decorator_names(), econv_description(), econv_opts(), InitVM_transcode(), and str_transcode0().
#define ENC_CODERANGE | ( | obj | ) | RB_ENC_CODERANGE(obj) |
Definition at line 104 of file encoding.h.
Referenced by enc_str_scrub(), optimized_unescape(), rb_enc_cr_str_copy_for_substr(), rb_enc_cr_str_exact_copy(), rb_enc_str_coderange(), rb_enc_str_scrub(), rb_str_buf_append(), rb_str_chomp_string(), rb_str_chop_bang(), rb_str_concat(), rb_str_concat_literals(), rb_str_downcase_bang(), rb_str_enumerate_chars(), rb_str_justify(), rb_str_plus(), rb_str_reverse(), rb_str_scrub(), rb_str_setbyte(), rb_str_sub_bang(), rb_str_sublen(), rb_str_subpos(), rb_str_upcase_bang(), rb_str_update(), RUBY_ALIAS_FUNCTION(), single_byte_optimizable(), str_byte_substr(), str_coderange(), str_modify_keep_cr(), str_shared_replace(), str_strlen(), and tr_trans().
#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT |
Definition at line 100 of file encoding.h.
Referenced by check_getline_args(), coderange_scan(), enc_compatible_latter(), enc_str_scrub(), fnmatch_brace(), io_getc(), pack_pack(), parse_ident(), parser_here_document(), parser_str_new(), rb_enc_cr_str_copy_for_substr(), rb_enc_str_asciionly_p(), rb_enc_strlen_cr(), rb_external_str_with_enc(), rb_file_expand_path_internal(), rb_reg_fragment_setenc(), rb_reg_initialize_str(), rb_reg_prepare_enc(), rb_reg_preprocess_dregexp(), rb_str_buf_cat_ascii(), rb_str_chomp_string(), rb_str_chop_bang(), rb_str_clear(), rb_str_coderange_scan_restartable(), rb_str_comparable(), rb_str_concat(), rb_str_delete_bang(), rb_str_downcase_bang(), rb_str_dump(), rb_str_escape(), rb_str_format(), rb_str_hash(), rb_str_is_ascii_only_p(), rb_str_reverse(), rb_str_setbyte(), rb_str_sub_bang(), rb_str_upcase_bang(), rb_usascii_str_new(), rb_usascii_str_new_cstr(), RUBY_ALIAS_FUNCTION(), single_byte_optimizable(), str_byte_substr(), str_compat_and_valid(), str_gsub(), str_new0(), str_transcode0(), sym_check_asciionly(), tr_trans(), and w_symbol().
#define ENC_CODERANGE_AND | ( | a, | |
b | |||
) | RB_ENC_CODERANGE_AND(a, b) |
Definition at line 108 of file encoding.h.
Referenced by rb_str_justify(), rb_str_plus(), and rb_str_update().
#define ENC_CODERANGE_ASCIIONLY | ( | obj | ) | RB_ENC_CODERANGE_ASCIIONLY(obj) |
Definition at line 105 of file encoding.h.
Referenced by rb_enc_associate_index().
#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN |
Definition at line 102 of file encoding.h.
Referenced by coderange_scan(), io_getc(), rb_econv_prepare_options(), rb_enc_str_coderange(), rb_enc_strlen_cr(), rb_io_getline_fast(), rb_reg_prepare_enc(), rb_str_coderange_scan_restartable(), rb_str_format(), rb_str_justify(), rb_str_setbyte(), rb_str_sub_bang(), rb_str_update(), rb_str_valid_encoding_p(), read_all(), str_compat_and_valid(), str_modify_keep_cr(), sym_check_asciionly(), and tr_trans().
#define ENC_CODERANGE_CLEAN_P | ( | cr | ) | RB_ENC_CODERANGE_CLEAN_P(cr) |
Definition at line 103 of file encoding.h.
Referenced by enc_str_scrub(), enc_strlen(), optimized_unescape(), rb_reg_expr_str(), rb_str_enumerate_chars(), and RUBY_ALIAS_FUNCTION().
#define ENC_CODERANGE_CLEAR | ( | obj | ) | RB_ENC_CODERANGE_CLEAR(obj) |
Definition at line 107 of file encoding.h.
Referenced by rb_enc_associate_index(), rb_file_expand_path_internal(), rb_str_b(), rb_str_chomp_string(), rb_str_chop_bang(), rb_str_drop_bytes(), rb_str_force_encoding(), rb_str_init(), rb_str_modify(), rb_str_modify_expand(), rb_str_resize(), rb_str_setbyte(), and str_modify_keep_cr().
#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK |
Definition at line 98 of file encoding.h.
Referenced by str_duplicate().
#define ENC_CODERANGE_SET | ( | obj, | |
cr | |||
) | RB_ENC_CODERANGE_SET(obj,cr) |
Definition at line 106 of file encoding.h.
Referenced by enc_str_scrub(), io_getc(), optimized_unescape(), rb_enc_cr_str_copy_for_substr(), rb_enc_cr_str_exact_copy(), rb_enc_str_coderange(), rb_io_getline_fast(), rb_str_buf_append(), rb_str_clear(), rb_str_concat(), rb_str_delete_bang(), rb_str_dump(), rb_str_format(), rb_str_justify(), rb_str_reverse(), rb_str_setbyte(), rb_str_sub_bang(), rb_str_update(), read_all(), str_byte_substr(), str_encode_associate(), str_gsub(), str_new0(), str_shared_replace(), str_strlen(), and tr_trans().
#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN |
Definition at line 99 of file encoding.h.
Referenced by optimized_unescape(), parse_ident(), parser_here_document(), rb_enc_str_buf_cat(), rb_enc_str_coderange(), rb_enc_str_scrub(), rb_enc_strlen(), rb_reg_expr_str(), rb_str_coderange_scan_restartable(), rb_str_format(), rb_str_reverse(), rb_str_setbyte(), rb_str_sub_bang(), RUBY_ALIAS_FUNCTION(), str_byte_substr(), str_coderange(), and str_strlen().
#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID |
Definition at line 101 of file encoding.h.
Referenced by coderange_scan(), enc_str_scrub(), enc_strlen(), io_getc(), pack_unpack_internal(), rb_enc_cr_str_copy_for_substr(), rb_enc_strlen_cr(), rb_str_buf_cat_ascii(), rb_str_clear(), rb_str_coderange_scan_restartable(), rb_str_concat(), rb_str_delete_bang(), rb_str_reverse(), rb_str_setbyte(), rb_str_sub_bang(), rb_str_subpos(), RUBY_ALIAS_FUNCTION(), str_byte_substr(), str_encode_associate(), str_gsub(), and tr_trans().
#define ENCODING_CODERANGE_SET | ( | obj, | |
encindex, | |||
cr | |||
) | RB_ENCODING_CODERANGE_SET(obj, encindex, cr) |
Definition at line 109 of file encoding.h.
Referenced by enc_str_scrub(), pack_pack(), pack_unpack_internal(), rb_str_escape(), rb_str_plus(), rb_usascii_str_new(), rb_usascii_str_new_cstr(), and RUBY_ALIAS_FUNCTION().
#define ENCODING_GET | ( | obj | ) | RB_ENCODING_GET(obj) |
Definition at line 58 of file encoding.h.
Referenced by dump_object(), file_path_convert(), fstr_update_callback(), fstring_cmp(), get_encoding(), rb_enc_str_coderange(), rb_file_expand_path_internal(), rb_reg_equal(), rb_reg_fragment_setenc(), rb_reg_regcomp(), rb_str_buf_append(), rb_str_buf_cat_ascii(), rb_str_cmp(), rb_str_comparable(), rb_str_concat_literals(), rb_str_encode_ospath(), rb_str_escape(), rb_str_hash(), rb_str_inspect(), rb_w32_write_console(), RUBY_ALIAS_FUNCTION(), str_enc_copy(), str_end_with_asciichar(), and str_new_frozen().
#define ENCODING_GET_INLINED | ( | obj | ) | RB_ENCODING_GET_INLINED(obj) |
Definition at line 57 of file encoding.h.
Referenced by enc_get_index_str(), and rb_str_concat_literals().
#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX |
Definition at line 36 of file encoding.h.
Referenced by enc_get_index_str(), and enc_set_index().
#define ENCODING_IS_ASCII8BIT | ( | obj | ) | RB_ENCODING_IS_ASCII8BIT(obj) |
Definition at line 59 of file encoding.h.
Referenced by dump_object(), rb_reg_fragment_setenc(), and RUBY_ALIAS_FUNCTION().
#define ENCODING_MASK RUBY_ENCODING_MASK |
Definition at line 38 of file encoding.h.
Referenced by str_duplicate().
#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN |
Definition at line 60 of file encoding.h.
Referenced by parse_mode_enc().
#define ENCODING_SET | ( | obj, | |
i | |||
) | RB_ENCODING_SET(obj,i) |
Definition at line 56 of file encoding.h.
Referenced by rb_reg_fragment_setenc().
#define ENCODING_SET_INLINED | ( | obj, | |
i | |||
) | RB_ENCODING_SET_INLINED(obj,i) |
Definition at line 55 of file encoding.h.
Referenced by enc_set_index(), and setup_fake_str().
#define ENCODING_SHIFT RUBY_ENCODING_SHIFT |
Definition at line 37 of file encoding.h.
#define MBCLEN_CHARFOUND_LEN | ( | ret | ) | ONIGENC_MBCLEN_CHARFOUND_LEN(ret) |
Definition at line 186 of file encoding.h.
Referenced by coderange_scan(), enc_pred_char(), enc_str_scrub(), enc_succ_char(), gzreader_charboundary(), io_getc(), make_econv_exception(), rb_enc_codepoint_len(), rb_enc_mbclen(), rb_enc_strlen_cr(), rb_io_each_codepoint(), rb_reg_expr_str(), rb_str_coderange_scan_restartable(), rb_str_dump(), rb_str_encode_ospath(), rb_str_escape(), rb_str_inspect(), rb_str_setbyte(), sym_printable(), and unescape_nonascii().
#define MBCLEN_CHARFOUND_P | ( | ret | ) | ONIGENC_MBCLEN_CHARFOUND_P(ret) |
Definition at line 185 of file encoding.h.
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_mbclen(), rb_enc_strlen_cr(), rb_io_each_codepoint(), rb_reg_expr_str(), rb_str_coderange_scan_restartable(), rb_str_dump(), rb_str_encode_ospath(), rb_str_escape(), rb_str_inspect(), rb_str_setbyte(), sym_printable(), and unescape_nonascii().
#define MBCLEN_INVALID_P | ( | ret | ) | ONIGENC_MBCLEN_INVALID_P(ret) |
Definition at line 187 of file encoding.h.
Referenced by enc_pred_char(), enc_str_scrub(), enc_succ_char(), io_getc(), rb_io_each_codepoint(), rb_str_coderange_scan_restartable(), and unescape_escaped_nonascii().
#define MBCLEN_NEEDMORE_LEN | ( | ret | ) | ONIGENC_MBCLEN_NEEDMORE_LEN(ret) |
Definition at line 189 of file encoding.h.
Referenced by gzreader_charboundary(), and rb_io_each_codepoint().
#define MBCLEN_NEEDMORE_P | ( | ret | ) | ONIGENC_MBCLEN_NEEDMORE_P(ret) |
Definition at line 188 of file encoding.h.
Referenced by enc_str_scrub(), gzreader_charboundary(), io_getc(), rb_io_each_codepoint(), rb_io_getline_0(), and unescape_escaped_nonascii().
#define rb_enc_asciicompat | ( | enc | ) | rb_enc_asciicompat_inline(enc) |
Definition at line 239 of file encoding.h.
Referenced by check_getline_args(), check_path_encoding(), coderange_scan(), do_writeconv(), enc_ascii_compatible_p(), enc_compatible_latter(), enc_str_scrub(), enc_strlen(), fnmatch_brace(), get_env_cstr(), io_encoding_set(), io_getc(), must_be_ascii_compatible(), must_not_be_anonymous(), parser_here_document(), parser_set_encode(), parser_str_new(), rb_enc_ascget(), rb_enc_associate_index(), rb_enc_cr_str_copy_for_substr(), rb_enc_str_asciionly_p(), rb_enc_strlen_cr(), rb_enc_symname_type(), rb_inspect(), rb_io_getline_0(), rb_mod_const_defined(), rb_mod_const_get(), rb_must_asciicompat(), rb_path_to_class(), rb_reg_desc(), rb_reg_expr_str(), rb_reg_prepare_enc(), rb_reg_preprocess(), rb_reg_regsub(), rb_reg_s_union(), rb_reg_to_s(), rb_str_buf_cat_ascii(), rb_str_clear(), rb_str_coderange_scan_restartable(), rb_str_comparable(), rb_str_conv_enc_opts(), rb_str_count(), rb_str_delete_bang(), rb_str_dump(), rb_str_ellipsize(), rb_str_enumerate_lines(), rb_str_escape(), rb_str_include_range_p(), rb_str_inspect(), rb_str_reverse(), rb_str_split_m(), rb_str_squeeze_bang(), rb_thread_setname(), rb_to_encoding_index(), RUBY_ALIAS_FUNCTION(), str_byte_substr(), str_encode_associate(), str_find_encindex(), str_gsub(), str_nth_len(), str_succ(), str_transcode0(), sym_check_asciionly(), and validate_enc_binmode().
#define rb_enc_code_to_mbclen | ( | c, | |
enc | |||
) | ONIGENC_CODE_TO_MBCLEN((enc), (c)); |
Definition at line 208 of file encoding.h.
Referenced by enc_pred_char(), and enc_succ_char().
#define rb_enc_codepoint | ( | p, | |
e, | |||
enc | |||
) | rb_enc_codepoint_len((p),(e),0,(enc)) |
Definition at line 201 of file encoding.h.
Referenced by bracket(), fnmatch_helper(), rb_io_each_codepoint(), rb_str_inspect(), rb_str_ord(), and rstrip_offset().
#define RB_ENC_CODERANGE | ( | obj | ) | ((int)RBASIC(obj)->flags & RUBY_ENC_CODERANGE_MASK) |
Definition at line 78 of file encoding.h.
#define RB_ENC_CODERANGE_AND | ( | a, | |
b | |||
) |
Definition at line 86 of file encoding.h.
#define RB_ENC_CODERANGE_ASCIIONLY | ( | obj | ) | (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT) |
Definition at line 79 of file encoding.h.
#define RB_ENC_CODERANGE_CLEAN_P | ( | cr | ) | rb_enc_coderange_clean_p(cr) |
Definition at line 77 of file encoding.h.
#define RB_ENC_CODERANGE_CLEAR | ( | obj | ) | RB_ENC_CODERANGE_SET((obj),0) |
Definition at line 83 of file encoding.h.
#define RB_ENC_CODERANGE_SET | ( | obj, | |
cr | |||
) |
Definition at line 80 of file encoding.h.
#define rb_enc_is_newline | ( | p, | |
end, | |||
enc | |||
) | ONIGENC_IS_MBC_NEWLINE((enc),(UChar*)(p),(UChar*)(end)) |
Definition at line 221 of file encoding.h.
Referenced by chomp_newline(), chompped_length(), and rb_str_enumerate_lines().
#define rb_enc_isalnum | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_ALNUM((enc),(c)) |
Definition at line 229 of file encoding.h.
Referenced by parse_percent(), and parse_qmark().
#define rb_enc_isalpha | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_ALPHA((enc),(c)) |
Definition at line 225 of file encoding.h.
#define rb_enc_isascii | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_ASCII(c) |
Definition at line 224 of file encoding.h.
Referenced by rb_enc_ascget(), rb_str_downcase_bang(), rb_str_escape(), rb_str_inspect(), and rb_str_upcase_bang().
#define rb_enc_isctype | ( | c, | |
t, | |||
enc | |||
) | ONIGENC_IS_CODE_CTYPE((enc),(c),(t)) |
Definition at line 223 of file encoding.h.
Referenced by enc_succ_alnum_char().
#define rb_enc_isdigit | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_DIGIT((enc),(c)) |
Definition at line 232 of file encoding.h.
Referenced by get_num().
#define rb_enc_islower | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_LOWER((enc),(c)) |
Definition at line 226 of file encoding.h.
Referenced by reg_named_capture_assign_iter().
#define rb_enc_isprint | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_PRINT((enc),(c)) |
Definition at line 230 of file encoding.h.
Referenced by rb_reg_expr_str(), rb_str_format(), rb_str_inspect(), and sym_printable().
#define rb_enc_ispunct | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_PUNCT((enc),(c)) |
Definition at line 228 of file encoding.h.
#define rb_enc_isspace | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_SPACE((enc),(c)) |
Definition at line 231 of file encoding.h.
Referenced by parse_qmark(), and rb_reg_expr_str().
#define rb_enc_isupper | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_UPPER((enc),(c)) |
Definition at line 227 of file encoding.h.
#define rb_enc_left_char_head | ( | s, | |
p, | |||
e, | |||
enc | |||
) | ((char *)onigenc_get_left_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) |
Definition at line 216 of file encoding.h.
Referenced by chompped_length(), gzreader_charboundary(), rb_io_getline_0(), rb_reg_to_s(), rb_str_end_with(), rb_str_index_m(), rb_str_setbyte(), realpath_rec(), and rmext().
#define rb_enc_mbc_to_codepoint | ( | p, | |
e, | |||
enc | |||
) | ONIGENC_MBC_TO_CODE((enc),(UChar*)(p),(UChar*)(e)) |
Definition at line 202 of file encoding.h.
Referenced by enc_pred_char(), enc_succ_alnum_char(), enc_succ_char(), make_econv_exception(), rb_enc_ascget(), rb_enc_codepoint_len(), rb_reg_expr_str(), rb_str_dump(), rb_str_encode_ospath(), rb_str_escape(), rb_str_inspect(), and sym_printable().
#define rb_enc_mbcput | ( | c, | |
buf, | |||
enc | |||
) | ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf)) |
Definition at line 211 of file encoding.h.
Referenced by enc_pred_char(), enc_succ_char(), optimized_unescape_html(), parser_tokaddmbc(), rb_enc_uint_chr(), rb_reg_quote(), rb_str_buf_cat_ascii(), rb_str_concat(), rb_str_delete_bang(), rb_str_format(), rb_str_squeeze_bang(), rb_str_to_s(), strio_ungetc(), and tr_trans().
#define rb_enc_mbmaxlen | ( | enc | ) | (enc)->max_enc_len |
Definition at line 175 of file encoding.h.
Referenced by enc_str_scrub(), enc_strlen(), gzfile_getc(), gzreader_gets(), rb_enc_strlen_cr(), rb_str_buf_cat_ascii(), rb_str_downcase_bang(), rb_str_subpos(), rb_str_upcase_bang(), single_byte_optimizable(), str_nth_len(), tr_trans(), unescape_escaped_nonascii(), and update_char_offset().
#define rb_enc_mbminlen | ( | enc | ) | (enc)->min_enc_len |
Definition at line 174 of file encoding.h.
Referenced by chompped_length(), enc_pred_char(), enc_str_scrub(), enc_strlen(), enc_succ_char(), mustnot_wchar(), rb_enc_asciicompat_inline(), rb_enc_associate_index(), rb_enc_mbclen(), rb_enc_str_coderange(), rb_enc_str_new(), rb_enc_str_new_cstr(), rb_enc_strlen_cr(), rb_enc_vsprintf(), rb_memsearch(), rb_str_ellipsize(), rb_str_enumerate_lines(), rb_str_escape(), rb_str_init(), rb_str_inspect(), rb_str_justify(), rb_str_lstrip_bang(), rb_str_plus(), rb_str_rstrip_bang(), rb_str_setbyte(), rb_str_strip_bang(), rb_str_subpos(), rb_string_value_cstr(), str_compat_and_valid(), str_end_with_asciichar(), str_new_static(), str_nth_len(), str_shared_replace(), str_succ(), swallow(), and tr_trans().
#define rb_enc_name | ( | enc | ) | (enc)->name |
Definition at line 171 of file encoding.h.
Referenced by append_wstr(), check_getline_args(), check_path_encoding(), decorate_convpath(), do_writeconv(), dump_object(), econv_args(), econv_set_replacement(), enc_arg(), enc_autoload(), enc_inspect(), enc_name(), encoding_name(), get_env_cstr(), ibf_dump_object_data(), ibf_dump_object_string(), literal_concat0(), make_readconv(), make_writeconv(), must_encindex(), mustnot_broken(), mustnot_wchar(), ole_vstr2wc(), optimized_unescape_html(), parser_set_encode(), rb_econv_open_opts(), rb_econv_prepare_options(), rb_enc_aliases_enc_i(), rb_enc_check(), rb_enc_check_str(), rb_enc_codelen(), rb_enc_codepoint_len(), rb_enc_register(), rb_enc_uint_chr(), rb_enc_vsprintf(), rb_io_each_codepoint(), rb_must_asciicompat(), rb_reg_prepare_enc(), rb_reg_preprocess_dregexp(), rb_reg_s_union(), rb_str_check_dummy_enc(), rb_str_concat(), rb_str_sub_bang(), rb_thread_setname(), rb_w32_write_console(), reg_enc_error(), reg_fragment_enc_error(), RUBY_ALIAS_FUNCTION(), str_compat_and_valid(), str_transcode_enc_args(), sym_check_asciionly(), and transcode_loop().
#define rb_enc_prev_char | ( | s, | |
p, | |||
e, | |||
enc | |||
) | ((char *)onigenc_get_prev_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) |
Definition at line 214 of file encoding.h.
Referenced by chomp_newline(), chopped_length(), parser_yyerror(), rb_str_subpos(), rstrip_offset(), str_rindex(), and str_succ().
#define rb_enc_right_char_head | ( | s, | |
p, | |||
e, | |||
enc | |||
) | ((char *)onigenc_get_right_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e))) |
Definition at line 217 of file encoding.h.
Referenced by rb_str_enumerate_lines(), rb_str_format(), rb_str_split_m(), rb_strseq_index(), and strio_getline().
#define rb_enc_step_back | ( | s, | |
p, | |||
e, | |||
n, | |||
enc | |||
) | ((char *)onigenc_step_back((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n))) |
Definition at line 218 of file encoding.h.
Referenced by rb_str_ellipsize().
#define rb_enc_str_asciicompat_p | ( | str | ) | rb_enc_asciicompat(rb_enc_get(str)) |
Definition at line 251 of file encoding.h.
Referenced by cgiesc_escape(), cgiesc_escape_html(), cgiesc_unescape(), cgiesc_unescape_html(), date_s__parse_internal(), date_s__strptime_internal(), date_strftime_internal(), time_strftime(), and utc_offset_arg().
#define RB_ENCODING_CODERANGE_SET | ( | obj, | |
encindex, | |||
cr | |||
) |
Definition at line 91 of file encoding.h.
#define RB_ENCODING_GET | ( | obj | ) |
Definition at line 48 of file encoding.h.
#define RB_ENCODING_GET_INLINED | ( | obj | ) | (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT) |
Definition at line 46 of file encoding.h.
#define RB_ENCODING_IS_ASCII8BIT | ( | obj | ) | (RB_ENCODING_GET_INLINED(obj) == 0) |
Definition at line 53 of file encoding.h.
#define RB_ENCODING_SET | ( | obj, | |
i | |||
) | rb_enc_set_index((obj), (i)) |
Definition at line 44 of file encoding.h.
#define RB_ENCODING_SET_INLINED | ( | obj, | |
i | |||
) |
Definition at line 40 of file encoding.h.
typedef struct rb_econv_t rb_econv_t |
Definition at line 301 of file encoding.h.
typedef const OnigEncodingType rb_encoding |
Definition at line 111 of file encoding.h.
enum rb_econv_result_t |
Enumerator | |
---|---|
econv_invalid_byte_sequence | |
econv_undefined_conversion | |
econv_destination_buffer_full | |
econv_source_buffer_empty | |
econv_finished | |
econv_after_output | |
econv_incomplete_input |
Definition at line 291 of file encoding.h.
enum ruby_coderange_type |
Enumerator | |
---|---|
RUBY_ENC_CODERANGE_UNKNOWN | |
RUBY_ENC_CODERANGE_7BIT | |
RUBY_ENC_CODERANGE_VALID | |
RUBY_ENC_CODERANGE_BROKEN | |
RUBY_ENC_CODERANGE_MASK |
Definition at line 62 of file encoding.h.
enum ruby_econv_flag_type |
Definition at line 355 of file encoding.h.
enum ruby_encoding_consts |
Enumerator | |
---|---|
RUBY_ENCODING_INLINE_MAX | |
RUBY_ENCODING_SHIFT | |
RUBY_ENCODING_MASK | |
RUBY_ENCODING_MAXNAMELEN |
Definition at line 28 of file encoding.h.
CONSTFUNC | ( | int | rb_enc_toupperint c, rb_encoding *enc | ) |
CONSTFUNC | ( | int | rb_ascii8bit_encindexvoid | ) |
PRINTF_ARGS | ( | VALUE | rb_enc_sprintfrb_encoding *, const char *,..., |
2 | , | ||
3 | |||
) |
PRINTF_ARGS | ( | NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char *,...)) | , |
3 | , | ||
4 | |||
) |
PUREFUNC | ( | int | rb_enc_dummy_prb_encoding *enc | ) |
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_char_to_option_kcode | ( | int | c, |
int * | option, | ||
int * | kcode | ||
) |
Definition at line 332 of file re.c.
References ARG_ENCODING_FIXED, ARG_ENCODING_NONE, char_to_option(), ENCINDEX_EUC_JP, ENCINDEX_Windows_31J, rb_ascii8bit_encindex(), and rb_utf8_encindex().
Referenced by parser_regx_options(), and rb_reg_fragment_setenc().
ID rb_check_id_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 992 of file symbol.c.
References lookup_str_id(), rb_setup_fake_str(), and sym_check_asciionly().
Referenced by rb_deprecate_constant(), rb_mod_const_defined(), rb_mod_const_get(), and rb_path_to_class().
VALUE rb_check_symbol_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 1003 of file symbol.c.
References FUNC_MINIMIZED(), len, lookup_str_sym(), NOINLINE, RString::ptr, Qnil, rb_setup_fake_str(), rb_sym_intern(), rb_sym_intern_ascii(), rb_sym_intern_ascii_cstr(), rb_sym_intern_cstr(), sym, and sym_check_asciionly().
Referenced by rb_str_format().
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 * | ) |
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().
VALUE rb_econv_append | ( | rb_econv_t * | ec, |
const char * | bytesrc, | ||
long | bytesize, | ||
VALUE | dst, | ||
int | flags | ||
) |
Definition at line 1809 of file transcode.c.
References rb_econv_t::destination_encoding, dp, econv_destination_buffer_full, rb_econv_t::last_tc, len, LONG_MAX, rb_transcoder::max_output, NIL_P, rb_eArgError, rb_econv_check_error(), rb_econv_convert(), rb_enc_associate(), rb_raise(), rb_str_buf_new(), rb_str_capacity(), rb_str_resize(), rb_str_set_len(), RSTRING_LEN, RSTRING_PTR, and rb_transcoding::transcoder.
Referenced by append_wstr(), and rb_econv_substr_append().
Definition at line 1782 of file transcode.c.
References asciicompat_encoding_t::ascii_compat_name, asciicompat_encoding_t::ascii_incompat_name, asciicompat_encoding_i(), NULL, st_table::num_entries, st_data_t, st_foreach, and st_lookup.
Referenced by econv_s_asciicompat_encoding(), and make_writeconv().
void rb_econv_binmode | ( | rb_econv_t * | ec | ) |
Definition at line 1939 of file transcode.c.
References ECONV_CR_NEWLINE_DECORATOR, ECONV_CRLF_NEWLINE_DECORATOR, ECONV_NEWLINE_DECORATOR_MASK, ECONV_UNIVERSAL_NEWLINE_DECORATOR, rb_econv_t::elems, rb_econv_t::flags, get_transcoder_entry(), rb_econv_t::num_trans, rb_econv_elem_t::out_buf_start, rb_transcoding_close(), rb_econv_elem_t::tc, rb_transcoding::transcoder, transcoder_entry_t::transcoder, and xfree().
Referenced by rb_io_binmode().
void rb_econv_check_error | ( | rb_econv_t * | ec | ) |
Definition at line 4231 of file transcode.c.
References make_econv_exception(), NIL_P, and rb_exc_raise().
Referenced by fill_cbuf(), gzfile_getc(), and rb_econv_append().
void rb_econv_close | ( | rb_econv_t * | ec | ) |
Definition at line 1698 of file transcode.c.
References rb_econv_t::elems, rb_econv_t::in_buf_start, rb_econv_t::num_trans, rb_econv_elem_t::out_buf_start, rb_transcoding_close(), rb_econv_t::replacement_allocated, rb_econv_t::replacement_str, rb_econv_elem_t::tc, and xfree().
Referenced by allocate_converted_string(), append_wstr(), clear_readconv(), clear_writeconv(), econv_free(), gzfile_reset(), io_ascii8bit_binmode(), rb_econv_open(), rb_econv_open_by_transcoder_entries(), rb_econv_open_opts(), str_cat_conv_enc_opts(), and transcode_loop().
rb_econv_result_t rb_econv_convert | ( | rb_econv_t * | ec, |
const unsigned char ** | source_buffer_ptr, | ||
const unsigned char * | source_buffer_end, | ||
unsigned char ** | destination_buffer_ptr, | ||
unsigned char * | destination_buffer_end, | ||
int | flags | ||
) |
Definition at line 1442 of file transcode.c.
References econv_incomplete_input, econv_invalid_byte_sequence, ECONV_INVALID_MASK, ECONV_INVALID_REPLACE, ECONV_UNDEF_HEX_CHARREF, ECONV_UNDEF_MASK, ECONV_UNDEF_REPLACE, econv_undefined_conversion, rb_econv_t::flags, output_hex_charref(), output_replacement_character(), rb_econv_convert0(), and rb_econv_t::started.
Referenced by allocate_converted_string(), econv_primitive_convert(), fill_cbuf(), finish_writeconv(), gzfile_getc(), rb_econv_append(), str_cat_conv_enc_opts(), and transcode_loop().
int rb_econv_decorate_at_first | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1905 of file transcode.c.
References asciicompat_decoder, rb_transcoder::asciicompat_type, DECORATOR_P, rb_transcoder::dst_encoding, rb_econv_t::elems, rb_econv_t::num_trans, rb_econv_decorate_at(), rb_transcoder::src_encoding, rb_econv_elem_t::tc, and rb_transcoding::transcoder.
int rb_econv_decorate_at_last | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1922 of file transcode.c.
References asciicompat_encoder, rb_transcoder::asciicompat_type, DECORATOR_P, rb_transcoder::dst_encoding, rb_econv_t::elems, rb_econv_t::num_trans, rb_econv_decorate_at(), rb_transcoder::src_encoding, rb_econv_elem_t::tc, and rb_transcoding::transcoder.
Referenced by rb_econv_open().
const char* rb_econv_encoding_to_insert_output | ( | rb_econv_t * | ec | ) |
Definition at line 1499 of file transcode.c.
References asciicompat_encoder, rb_transcoder::asciicompat_type, rb_transcoder::dst_encoding, rb_econv_t::last_tc, NULL, rb_transcoder::src_encoding, and rb_transcoding::transcoder.
Referenced by econv_insert_output(), make_replacement(), rb_econv_insert_output(), and rb_econv_set_replacement().
Definition at line 3172 of file transcode.c.
References Qnil, RTEST, search_convpath_i(), and transcode_search_path().
Referenced by rb_w32_write_console().
int rb_econv_insert_output | ( | rb_econv_t * | ec, |
const unsigned char * | str, | ||
size_t | len, | ||
const char * | str_encoding | ||
) |
Definition at line 1583 of file transcode.c.
References allocate_converted_string(), asciicompat_encoder, rb_transcoder::asciicompat_type, buf, rb_econv_t::elems, encoding_equal, fail, rb_econv_t::in_buf_end, rb_econv_t::in_buf_start, rb_econv_t::in_data_end, rb_econv_t::in_data_start, len, memcpy, MEMMOVE, NULL, rb_econv_t::num_trans, rb_econv_elem_t::out_buf_end, rb_econv_elem_t::out_buf_start, rb_econv_elem_t::out_data_end, rb_econv_elem_t::out_data_start, rb_econv_encoding_to_insert_output(), rb_transcoding::readagain_len, rb_transcoding::recognized_len, rb_econv_t::started, rb_econv_elem_t::tc, rb_transcoding::transcoder, TRANSCODING_READBUF, xfree(), xmalloc, and xrealloc.
Referenced by econv_insert_output(), output_hex_charref(), output_replacement_character(), and transcode_loop().
VALUE rb_econv_make_exception | ( | rb_econv_t * | ec | ) |
Definition at line 4225 of file transcode.c.
References make_econv_exception().
Referenced by fill_cbuf(), and finish_writeconv().
rb_econv_t* rb_econv_open | ( | const char * | source_encoding, |
const char * | destination_encoding, | ||
int | ecflags | ||
) |
Definition at line 1063 of file transcode.c.
References decorator_names(), ECONV_ERROR_HANDLER_MASK, rb_econv_t::flags, MAX_ECFLAGS_DECORATORS, NULL, rb_econv_close(), rb_econv_decorate_at_last(), and rb_econv_open0().
Referenced by allocate_converted_string(), append_wstr(), and rb_econv_open_opts().
Definition at line 2033 of file transcode.c.
References econv_description(), rb_eConverterNotFoundError, rb_exc_new3, rb_str_cat2(), and rb_str_new_cstr().
Referenced by econv_init(), econv_s_search_convpath(), make_readconv(), make_writeconv(), and transcode_loop().
rb_econv_t* rb_econv_open_opts | ( | const char * | source_encoding, |
const char * | destination_encoding, | ||
int | ecflags, | ||
VALUE | ecopts | ||
) |
Definition at line 2575 of file transcode.c.
References NIL_P, NULL, OBJ_FROZEN, Qnil, rb_bug(), rb_econv_close(), rb_econv_open(), rb_econv_set_replacement(), rb_enc_get(), rb_enc_name, rb_hash_aref(), RB_TYPE_P, RSTRING_LEN, RSTRING_PTR, sym_replace, and T_HASH.
Referenced by econv_init(), gzfile_reset(), make_readconv(), make_writeconv(), rb_gzfile_ecopts(), str_cat_conv_enc_opts(), and transcode_loop().
Definition at line 2524 of file transcode.c.
References econv_opts(), ENC_CODERANGE_BROKEN, NIL_P, Qnil, rb_check_hash_type(), rb_eArgError, rb_enc_get(), rb_enc_name, rb_enc_str_coderange(), rb_hash_aref(), rb_hash_aset(), rb_hash_freeze(), rb_hash_new(), rb_obj_is_method(), rb_obj_is_proc(), rb_raise(), rb_respond_to(), rb_str_dump(), rb_str_new_frozen(), StringValue, StringValueCStr, sym_aref, sym_fallback, and sym_replace.
Referenced by io_encoding_set(), rb_econv_prepare_opts(), and rb_io_extract_modeenc().
Definition at line 2569 of file transcode.c.
References rb_econv_prepare_options().
Referenced by econv_args(), rb_gzfile_ecopts(), and str_transcode().
void rb_econv_putback | ( | rb_econv_t * | ec, |
unsigned char * | p, | ||
int | n | ||
) |
Definition at line 1749 of file transcode.c.
References rb_econv_t::elems, memcpy, rb_econv_t::num_trans, rb_transcoding::readagain_len, rb_transcoding::recognized_len, rb_econv_elem_t::tc, and TRANSCODING_READBUF.
Referenced by econv_putback(), and fill_cbuf().
int rb_econv_putbackable | ( | rb_econv_t * | ec | ) |
Definition at line 1738 of file transcode.c.
References rb_econv_t::elems, rb_econv_t::num_trans, rb_transcoding::readagain_len, and rb_econv_elem_t::tc.
Referenced by econv_putback(), and fill_cbuf().
int rb_econv_set_replacement | ( | rb_econv_t * | ec, |
const unsigned char * | str, | ||
size_t | len, | ||
const char * | encname | ||
) |
Definition at line 2195 of file transcode.c.
References allocate_converted_string(), encoding_equal, len, MEMCPY, NULL, rb_econv_encoding_to_insert_output(), rb_econv_t::replacement_allocated, rb_econv_t::replacement_enc, rb_econv_t::replacement_len, rb_econv_t::replacement_str, xfree(), and xmalloc.
Referenced by econv_set_replacement(), and rb_econv_open_opts().
VALUE rb_econv_str_append | ( | rb_econv_t * | ec, |
VALUE | src, | ||
VALUE | dst, | ||
int | flags | ||
) |
Definition at line 1862 of file transcode.c.
References rb_econv_substr_append(), and RSTRING_LEN.
VALUE rb_econv_str_convert | ( | rb_econv_t * | ec, |
VALUE | src, | ||
int | flags | ||
) |
Definition at line 1874 of file transcode.c.
References Qnil, rb_econv_substr_append(), and RSTRING_LEN.
Referenced by do_writeconv(), and gzfile_newstr().
VALUE rb_econv_substr_append | ( | rb_econv_t * | ec, |
VALUE | src, | ||
long | byteoff, | ||
long | bytesize, | ||
VALUE | dst, | ||
int | flags | ||
) |
Definition at line 1852 of file transcode.c.
References OBJ_INFECT_RAW, rb_econv_append(), RB_GC_GUARD, rb_str_new_frozen(), and RSTRING_PTR.
Referenced by rb_econv_str_append(), rb_econv_str_convert(), and rb_econv_substr_convert().
VALUE rb_econv_substr_convert | ( | rb_econv_t * | ec, |
VALUE | src, | ||
long | byteoff, | ||
long | bytesize, | ||
int | flags | ||
) |
Definition at line 1868 of file transcode.c.
References Qnil, and rb_econv_substr_append().
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().
|
inlinestatic |
Definition at line 235 of file encoding.h.
References rb_enc_dummy_p(), and rb_enc_mbminlen.
VALUE rb_enc_associate | ( | VALUE | , |
rb_encoding * | |||
) |
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().
int rb_enc_casefold | ( | char * | to, |
const char * | p, | ||
const char * | e, | ||
rb_encoding * | enc | ||
) |
rb_encoding* rb_enc_check | ( | VALUE | , |
VALUE | |||
) |
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().
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 | code, |
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, | ||
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().
|
inlinestatic |
Definition at line 73 of file encoding.h.
References RUBY_ENC_CODERANGE_7BIT.
rb_encoding* rb_enc_compatible | ( | VALUE | , |
VALUE | |||
) |
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_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().
VALUE rb_enc_from_encoding | ( | rb_encoding * | enc | ) |
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().
rb_encoding* rb_enc_from_index | ( | int | idx | ) |
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 | ) |
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().
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().
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().
char* rb_enc_nth | ( | const char * | , |
const char * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 2238 of file string.c.
References str_nth_len().
Referenced by rb_str_ellipsize(), and rb_str_format().
char* rb_enc_path_end | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 3102 of file file.c.
References chompdirsep(), Inc, isADS, isdirsep, istrailinggarbage, and last.
Referenced by check_dirname().
char* rb_enc_path_last_separator | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
char* rb_enc_path_next | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 3020 of file file.c.
Referenced by rb_enc_path_skip_prefix(), and realpath_rec().
char* rb_enc_path_skip_prefix | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 3034 of file file.c.
References isdirsep, and rb_enc_path_next().
Referenced by check_dirname(), and ruby_glob0().
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().
VALUE rb_enc_reg_new | ( | const char * | , |
long | , | ||
rb_encoding * | , | ||
int | |||
) |
Definition at line 2830 of file re.c.
References err, NULL, rb_enc_reg_raise(), rb_enc_str_new(), rb_fstring(), RB_OBJ_WRITE, rb_reg_alloc(), rb_reg_initialize(), RREGEXP, and RRegexp::src.
Referenced by rb_reg_new().
int rb_enc_replicate | ( | const char * | , |
rb_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().
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().
void rb_enc_set_index | ( | VALUE | obj, |
int | encindex | ||
) |
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_str_asciionly_p | ( | VALUE | ) |
Definition at line 640 of file string.c.
References ENC_CODERANGE_7BIT, FALSE, rb_enc_asciicompat, rb_enc_str_coderange(), STR_ENC_GET, and TRUE.
Referenced by enc_compatible_latter(), file_path_convert(), fnmatch_brace(), get_env_cstr(), r_symreal(), rb_file_expand_path_internal(), rb_inspect(), rb_realpath_internal(), rb_reg_quote(), rb_reg_s_union(), and time_zone_name().
VALUE rb_enc_str_buf_cat | ( | VALUE | str, |
const char * | ptr, | ||
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 2771 of file string.c.
References ENC_CODERANGE_UNKNOWN, NULL, and rb_enc_to_index().
Referenced by parser_here_document(), rb_reg_regsub(), rb_str_to_s(), str_gsub(), and strio_write().
int rb_enc_str_coderange | ( | VALUE | ) |
Definition at line 620 of file string.c.
References coderange_scan(), ENC_CODERANGE, ENC_CODERANGE_BROKEN, ENC_CODERANGE_SET, ENC_CODERANGE_UNKNOWN, ENCODING_GET, get_actual_encoding(), rb_enc_dummy_p(), rb_enc_from_index(), rb_enc_mbminlen, RSTRING_LEN, and RSTRING_PTR.
Referenced by check_getline_args(), enc_compatible_latter(), optimized_unescape(), parser_str_new(), rb_econv_prepare_options(), rb_enc_str_asciionly_p(), rb_external_str_with_enc(), rb_file_expand_path_internal(), rb_reg_fragment_setenc(), rb_str_comparable(), rb_str_hash(), rb_str_is_ascii_only_p(), rb_str_valid_encoding_p(), RUBY_ALIAS_FUNCTION(), str_coderange(), str_compat_and_valid(), str_succ(), str_transcode0(), sym_check_asciionly(), and w_symbol().
VALUE rb_enc_str_new | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 758 of file string.c.
References rb_cString, rb_enc_associate(), rb_enc_mbminlen, rb_str_new(), and str_new0().
Referenced by buffer_size_check(), check_getline_args(), do_opendir(), econv_get_replacement(), enc_str_scrub(), io_getc(), match_named_captures_iter(), ole_alloc_vstr(), ospath_new(), parser_str_new(), rb_enc_reg_new(), rb_enc_str_new_cstr(), rb_enc_uint_chr(), rb_intern3(), rb_io_getline_0(), rb_push_glob(), rb_readlink(), rb_strftime(), rb_strftime_timespec(), rb_syntax_error_append(), rb_tainted_str_new_with_enc(), rb_w32_conv_from_wchar(), reg_names_iter(), register_static_symid(), str_upto_each(), strio_init(), sym_inspect(), time_strftime(), transcode_loop(), warn_vsprintf(), and writer().
VALUE rb_enc_str_new_cstr | ( | const char * | , |
rb_encoding * | |||
) |
Definition at line 793 of file string.c.
References must_not_null(), rb_eArgError, rb_enc_mbminlen, rb_enc_str_new(), rb_raise(), and strlen().
Referenced by join_path(), and syserr_initialize().
VALUE rb_enc_str_new_static | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 847 of file string.c.
References rb_cString, rb_enc_to_index(), and str_new_static().
long rb_enc_strlen | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 1646 of file string.c.
References ENC_CODERANGE_UNKNOWN, and enc_strlen().
Referenced by rb_str_format(), and update_char_offset().
int rb_enc_symname2_p | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 311 of file symbol.c.
References IDSET_ATTRSET_FOR_SYNTAX, and rb_enc_symname_type().
Referenced by rb_enc_symname_p(), and reg_named_capture_assign_iter().
int rb_enc_symname_p | ( | const char * | , |
rb_encoding * | |||
) |
Definition at line 196 of file symbol.c.
References rb_enc_symname2_p(), and strlen().
Referenced by rb_str_symname_p(), and rb_symname_p().
VALUE rb_enc_uint_chr | ( | unsigned int | code, |
rb_encoding * | enc | ||
) |
Definition at line 3268 of file numeric.c.
References ONIGERR_INVALID_CODE_POINT_VALUE, ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, rb_enc_codelen(), rb_enc_mbcput, rb_enc_name, rb_enc_precise_mbclen(), rb_enc_str_new(), rb_eRangeError, rb_raise(), RSTRING_END, and RSTRING_PTR.
Referenced by int_chr(), rb_io_ungetc(), and strio_ungetc().
VALUE rb_enc_vsprintf | ( | rb_encoding * | , |
const char * | , | ||
va_list | |||
) |
Definition at line 1388 of file sprintf.c.
References __SSTR, __SWR, BSD_vfprintf(), f, rb_cString, rb_eArgError, rb_enc_associate(), rb_enc_mbminlen, rb_enc_name, rb_raise(), rb_str_buf_new(), rb_str_resize(), RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, result, RSTRING_PTR, ruby__sfvextra(), ruby__sfvwrite(), and rb_printf_buffer_extra::value.
Referenced by enc_raise(), rb_enc_raise(), rb_enc_sprintf(), rb_loaderror(), rb_loaderror_with_path(), and rb_vsprintf().
VALUE rb_external_str_new_with_enc | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | |||
) |
Definition at line 998 of file string.c.
References rb_external_str_with_enc(), and rb_tainted_str_new_with_enc().
Referenced by dir_each(), dir_read(), env_enc_str_new(), etc_getlogin(), push_pattern(), rb_external_str_new(), rb_external_str_new_cstr(), rb_filesystem_str_new(), rb_filesystem_str_new_cstr(), rb_locale_str_new(), and rb_locale_str_new_cstr().
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 | ) |
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().
ID rb_intern3 | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 554 of file symbol.c.
References intern_str(), lookup_str_sym(), OBJ_FREEZE, rb_enc_str_new(), rb_setup_fake_str(), rb_sym2id(), and sym.
Referenced by rb_intern2().
ID rb_interned_id_p | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 80 of file localeinit.c.
References locale_charmap(), Qnil, and rb_usascii_str_new_cstr().
Referenced by Init_Encoding().
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().
long rb_memsearch | ( | const void * | , |
long | , | ||
const void * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 252 of file re.c.
References LIKELY, memcmp(), rb_enc_mbminlen, rb_memsearch_qchar(), rb_memsearch_qs(), rb_memsearch_qs_utf8(), rb_memsearch_ss(), rb_memsearch_wchar(), rb_utf8_encoding(), and SIZEOF_VALUE.
Referenced by rb_str_enumerate_lines(), rb_str_split_m(), and rb_strseq_index().
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().
long rb_str_coderange_scan_restartable | ( | const char * | , |
const char * | , | ||
rb_encoding * | , | ||
int * | |||
) |
Definition at line 530 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, ENC_CODERANGE_UNKNOWN, ENC_CODERANGE_VALID, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, MBCLEN_INVALID_P, rb_ascii8bit_encindex(), rb_enc_asciicompat, rb_enc_precise_mbclen(), rb_enc_to_index(), and search_nonascii().
Referenced by fnmatch_brace(), parser_here_document(), rb_io_getline_fast(), rb_reg_expr_str(), rb_str_format(), read_all(), and str_encode_associate().
VALUE rb_str_conv_enc | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to | ||
) |
Definition at line 992 of file string.c.
References Qnil, and rb_str_conv_enc_opts().
Referenced by append_fspath(), convert_encoding(), file_path_convert(), get_env_cstr(), process_options(), push_pattern(), rb_external_str_with_enc(), rb_gzreader_ungetc(), rb_gzwriter_write(), rb_home_dir_of(), rb_str_encode_ospath(), rb_str_export(), rb_str_export_locale(), rb_str_export_to_enc(), realpath_rec(), strio_ungetc(), and strio_write().
VALUE rb_str_conv_enc_opts | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to, | ||
int | ecflags, | ||
VALUE | ecopts | ||
) |
Definition at line 884 of file string.c.
References is_ascii_string, len, NIL_P, OBJ_INFECT, RString::ptr, rb_ascii8bit_encoding(), rb_enc_asciicompat, rb_enc_associate(), rb_enc_get(), rb_str_buf_new(), rb_str_dup(), RSTRING_GETMEM, str_cat_conv_enc_opts(), and STR_ENC_GET.
Referenced by gzfile_newstr(), rb_str_conv_enc(), rb_strftime_with_timespec(), rb_w32_conv_from_wchar(), rb_w32_write_console(), and ruby__sfvextra().
Definition at line 2884 of file transcode.c.
References argc, argv, encoded_dup(), and str_transcode0().
Referenced by do_writeconv(), econv_insert_output(), rb_io_getline_0(), rb_reg_to_s(), rb_str_ellipsize(), and rb_str_enumerate_lines().
VALUE rb_str_export_to_enc | ( | VALUE | , |
rb_encoding * | |||
) |
Definition at line 1068 of file string.c.
References rb_str_conv_enc(), and STR_ENC_GET.
Referenced by alias(), scalar(), start_document(), start_mapping(), start_sequence(), and transcode_string().
rb_encoding* rb_to_encoding | ( | VALUE | ) |
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 | ) |
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().
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().
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().
const char* ruby_enc_find_basename | ( | const char * | name, |
long * | baselen, | ||
long * | alllen, | ||
rb_encoding * | enc | ||
) |
Definition at line 4034 of file file.c.
References chompdirsep(), f, Inc, isdirsep, name, skipprefix, strlen(), and strrdirsep.
Referenced by rb_file_s_basename().
const char* ruby_enc_find_extname | ( | const char * | name, |
long * | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 4232 of file file.c.
References Inc, isADS, isdirsep, istrailinggarbage, last, len, name, strlen(), and strrdirsep.
Referenced by path_sub_ext(), and rb_file_s_extname().
RUBY_EXTERN VALUE rb_cEncoding |
Definition at line 287 of file encoding.h.