Ruby
2.5.0dev(2017-10-22revision60238)
|
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.
#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR |
Definition at line 398 of file encoding.h.
Referenced by rb_econv_binmode().
#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR |
Definition at line 397 of file encoding.h.
Referenced by 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.
#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK |
Definition at line 386 of file encoding.h.
#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK |
Definition at line 387 of file encoding.h.
#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE |
Definition at line 388 of file encoding.h.
#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK |
Definition at line 393 of file encoding.h.
Referenced by rb_econv_binmode(), and rb_io_binmode().
#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK |
Definition at line 394 of file encoding.h.
#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK |
Definition at line 395 of file encoding.h.
#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT |
Definition at line 409 of file encoding.h.
#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK |
Definition at line 401 of file encoding.h.
#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF |
Definition at line 391 of file encoding.h.
#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK |
Definition at line 389 of file encoding.h.
#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE |
Definition at line 390 of file encoding.h.
Referenced by rb_w32_conv_from_wchar().
#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR |
Definition at line 396 of file encoding.h.
Referenced by rb_econv_binmode().
#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR |
Definition at line 400 of file encoding.h.
#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR |
Definition at line 402 of file encoding.h.
#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR |
Definition at line 399 of file encoding.h.
#define ENC_CODERANGE | ( | obj | ) | RB_ENC_CODERANGE(obj) |
Definition at line 104 of file encoding.h.
Referenced by rb_enc_str_coderange(), rb_enc_str_scrub(), rb_str_buf_append(), rb_str_concat(), rb_str_concat_literals(), and RUBY_ALIAS_FUNCTION().
#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT |
Definition at line 100 of file encoding.h.
Referenced by rb_enc_str_asciionly_p(), rb_external_str_with_enc(), rb_reg_fragment_setenc(), rb_str_buf_cat_ascii(), rb_str_comparable(), rb_str_concat(), rb_str_hash(), rb_usascii_str_new(), rb_usascii_str_new_cstr(), and RUBY_ALIAS_FUNCTION().
#define ENC_CODERANGE_AND | ( | a, | |
b | |||
) | RB_ENC_CODERANGE_AND(a, b) |
Definition at line 108 of file encoding.h.
#define ENC_CODERANGE_ASCIIONLY | ( | obj | ) | RB_ENC_CODERANGE_ASCIIONLY(obj) |
Definition at line 105 of file encoding.h.
#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN |
Definition at line 102 of file encoding.h.
Referenced by rb_enc_str_coderange(), and rb_str_coderange_scan_restartable().
#define ENC_CODERANGE_CLEAN_P | ( | cr | ) | RB_ENC_CODERANGE_CLEAN_P(cr) |
Definition at line 103 of file encoding.h.
#define ENC_CODERANGE_CLEAR | ( | obj | ) | RB_ENC_CODERANGE_CLEAR(obj) |
Definition at line 107 of file encoding.h.
Referenced by rb_file_expand_path_internal().
#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK |
Definition at line 98 of file encoding.h.
#define ENC_CODERANGE_SET | ( | obj, | |
cr | |||
) | RB_ENC_CODERANGE_SET(obj,cr) |
Definition at line 106 of file encoding.h.
Referenced by rb_str_buf_append(), and rb_str_concat().
#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN |
Definition at line 99 of file encoding.h.
Referenced by rb_enc_str_buf_cat(), rb_enc_str_coderange(), rb_enc_str_scrub(), and RUBY_ALIAS_FUNCTION().
#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID |
Definition at line 101 of file encoding.h.
Referenced by rb_str_buf_cat_ascii(), rb_str_coderange_scan_restartable(), and rb_str_concat().
#define ENCODING_CODERANGE_SET | ( | obj, | |
encindex, | |||
cr | |||
) | RB_ENCODING_CODERANGE_SET(obj, encindex, cr) |
Definition at line 109 of file encoding.h.
Referenced by rb_usascii_str_new(), and rb_usascii_str_new_cstr().
#define ENCODING_GET | ( | obj | ) | RB_ENCODING_GET(obj) |
Definition at line 58 of file encoding.h.
Referenced by rb_enc_str_coderange(), rb_reg_fragment_setenc(), 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_end_with_asciichar(), rb_str_escape(), rb_str_hash(), rb_str_inspect(), and RUBY_ALIAS_FUNCTION().
#define ENCODING_GET_INLINED | ( | obj | ) | RB_ENCODING_GET_INLINED(obj) |
Definition at line 57 of file encoding.h.
Referenced by rb_str_concat_literals().
#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX |
Definition at line 36 of file encoding.h.
#define ENCODING_IS_ASCII8BIT | ( | obj | ) | RB_ENCODING_IS_ASCII8BIT(obj) |
Definition at line 59 of file encoding.h.
Referenced by rb_reg_fragment_setenc().
#define ENCODING_MASK RUBY_ENCODING_MASK |
Definition at line 38 of file encoding.h.
#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN |
Definition at line 60 of file encoding.h.
#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.
#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 rb_enc_codepoint_len(), rb_enc_mbclen(), and rb_str_encode_ospath().
#define MBCLEN_CHARFOUND_P | ( | ret | ) | ONIGENC_MBCLEN_CHARFOUND_P(ret) |
Definition at line 185 of file encoding.h.
Referenced by rb_enc_ascget(), rb_enc_codepoint_len(), rb_enc_mbclen(), and rb_str_encode_ospath().
#define MBCLEN_INVALID_P | ( | ret | ) | ONIGENC_MBCLEN_INVALID_P(ret) |
Definition at line 187 of file encoding.h.
#define MBCLEN_NEEDMORE_LEN | ( | ret | ) | ONIGENC_MBCLEN_NEEDMORE_LEN(ret) |
Definition at line 189 of file encoding.h.
#define MBCLEN_NEEDMORE_P | ( | ret | ) | ONIGENC_MBCLEN_NEEDMORE_P(ret) |
Definition at line 188 of file encoding.h.
#define rb_enc_asciicompat | ( | enc | ) | rb_enc_asciicompat_inline(enc) |
Definition at line 239 of file encoding.h.
Referenced by rb_enc_ascget(), rb_enc_str_asciionly_p(), rb_inspect(), rb_must_asciicompat(), rb_path_to_class(), rb_reg_regsub(), rb_str_buf_cat_ascii(), rb_str_comparable(), rb_str_conv_enc_opts(), rb_str_ellipsize(), and rb_str_include_range_p().
#define rb_enc_code_to_mbclen | ( | c, | |
enc | |||
) | ONIGENC_CODE_TO_MBCLEN((enc), (c)); |
Definition at line 208 of file encoding.h.
#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 rb_str_ord().
#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.
#define rb_enc_isalnum | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_ALNUM((enc),(c)) |
Definition at line 229 of file encoding.h.
#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().
#define rb_enc_isctype | ( | c, | |
t, | |||
enc | |||
) | ONIGENC_IS_CODE_CTYPE((enc),(c),(t)) |
Definition at line 223 of file encoding.h.
#define rb_enc_isdigit | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_DIGIT((enc),(c)) |
Definition at line 232 of file encoding.h.
#define rb_enc_islower | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_LOWER((enc),(c)) |
Definition at line 226 of file encoding.h.
#define rb_enc_isprint | ( | c, | |
enc | |||
) | ONIGENC_IS_CODE_PRINT((enc),(c)) |
Definition at line 230 of file encoding.h.
#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.
#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.
#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 rb_enc_ascget(), rb_enc_codepoint_len(), and rb_str_encode_ospath().
#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 rb_enc_uint_chr(), rb_reg_quote(), rb_str_buf_cat_ascii(), and rb_str_concat().
#define rb_enc_mbmaxlen | ( | enc | ) | (enc)->max_enc_len |
Definition at line 175 of file encoding.h.
Referenced by rb_enc_strlen_cr(), and rb_str_buf_cat_ascii().
#define rb_enc_mbminlen | ( | enc | ) | (enc)->min_enc_len |
Definition at line 174 of file encoding.h.
Referenced by rb_enc_mbclen(), rb_enc_str_coderange(), rb_enc_strlen_cr(), rb_memsearch(), rb_str_ellipsize(), rb_str_end_with_asciichar(), and rb_str_plus().
#define rb_enc_name | ( | enc | ) | (enc)->name |
Definition at line 171 of file encoding.h.
Referenced by rb_enc_check(), rb_enc_codelen(), rb_enc_codepoint_len(), rb_enc_register(), rb_enc_uint_chr(), rb_must_asciicompat(), and rb_str_concat().
#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.
#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.
#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.
#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.
Referenced by rb_define_dummy_encoding(), rb_glob(), rb_reg_fragment_setenc(), rb_str_conv_enc_opts(), rb_symname_p(), and ruby_brace_glob().
int rb_char_to_option_kcode | ( | int | c, |
int * | option, | ||
int * | kcode | ||
) |
Definition at line 324 of file re.c.
References ARG_ENCODING_NONE, ENCINDEX_EUC_JP, ENCINDEX_Windows_31J, rb_ascii8bit_encindex(), and rb_utf8_encindex().
Referenced by rb_reg_fragment_setenc().
ID rb_check_id_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 984 of file symbol.c.
References rb_setup_fake_str().
Referenced by rb_deprecate_constant(), and rb_path_to_class().
VALUE rb_check_symbol_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 995 of file symbol.c.
References rb_setup_fake_str(), and sym.
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 Init_enc_set_filesystem_encoding(), rb_enc_default_external(), rb_external_str_new(), rb_external_str_new_cstr(), rb_inspect(), rb_str_export(), rb_str_quote_unprintable(), and rb_str_symname_p().
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 rb_enc_default_internal(), rb_external_str_with_enc(), rb_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_ascii8bit_encoding(), and rb_enc_replicate().
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 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, NULL, st_table::num_entries, st_data_t, st_foreach, and st_lookup.
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, and rb_econv_t::flags.
Referenced by rb_io_binmode().
void rb_econv_check_error | ( | rb_econv_t * | ec | ) |
Definition at line 4231 of file transcode.c.
Referenced by rb_econv_append().
void rb_econv_close | ( | rb_econv_t * | ec | ) |
Definition at line 1698 of file transcode.c.
References rb_econv_t::num_trans, rb_econv_t::replacement_allocated, rb_econv_t::replacement_str, and xfree().
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 rb_econv_t::started.
Referenced by rb_econv_append().
int rb_econv_decorate_at_first | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1905 of file transcode.c.
References rb_econv_t::num_trans.
int rb_econv_decorate_at_last | ( | rb_econv_t * | ec, |
const char * | decorator_name | ||
) |
Definition at line 1922 of file transcode.c.
References rb_econv_t::num_trans.
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 rb_econv_insert_output(), and rb_econv_set_replacement().
Definition at line 3172 of file transcode.c.
References Qnil.
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 encoding_equal, len, NULL, rb_econv_encoding_to_insert_output(), and rb_econv_t::started.
VALUE rb_econv_make_exception | ( | rb_econv_t * | ec | ) |
Definition at line 4225 of file transcode.c.
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 MAX_ECFLAGS_DECORATORS.
Definition at line 2033 of file transcode.c.
References rb_str_new_cstr().
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, OBJ_FROZEN, Qnil, rb_bug(), rb_hash_aref(), RB_TYPE_P, and T_HASH.
Definition at line 2524 of file transcode.c.
Referenced by rb_econv_prepare_opts().
Definition at line 2569 of file transcode.c.
References rb_econv_prepare_options().
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, rb_econv_t::num_trans, rb_transcoding::readagain_len, rb_transcoding::recognized_len, rb_econv_elem_t::tc, and TRANSCODING_READBUF.
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.
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 encoding_equal, len, MEMCPY, rb_econv_encoding_to_insert_output(), and xmalloc.
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.
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 rb_reg_quote(), and rb_str_end_with_asciichar().
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 rb_econv_append(), rb_file_expand_path_internal(), rb_reg_fragment_setenc(), rb_reg_quote(), rb_str_conv_enc_opts(), rb_str_ellipsize(), rb_str_encode_ospath(), and rb_str_initialize().
Definition at line 826 of file encoding.c.
References rb_encoding_entry::enc, rb_check_frozen, rb_eArgError, rb_enc_get_index(), rb_raise(), and SPECIAL_CONST_P.
Referenced by rb_dir_getwd(), rb_enc_associate(), rb_enc_copy(), rb_external_str_with_enc(), rb_str_concat(), and rb_utf8_str_new_cstr().
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().
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 rb_enc_uint_chr(), rb_str_buf_cat_ascii(), and rb_str_concat().
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 rb_enc_codepoint().
rb_encoding* rb_enc_compatible | ( | VALUE | , |
VALUE | |||
) |
Definition at line 962 of file encoding.c.
References rb_enc_from_index(), and rb_enc_get_index().
Referenced by rb_enc_check().
Definition at line 978 of file encoding.c.
References rb_enc_associate_index(), and rb_enc_get_index().
Referenced by rb_file_expand_path_internal(), rb_reg_quote(), and rb_str_concat_literals().
VALUE rb_enc_default_external | ( | void | ) |
Definition at line 1439 of file encoding.c.
References rb_default_external_encoding(), and rb_enc_from_encoding().
VALUE rb_enc_default_internal | ( | void | ) |
Definition at line 1519 of file encoding.c.
References rb_default_internal_encoding(), and rb_enc_from_encoding().
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.
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().
int rb_enc_find_index | ( | const char * | name | ) |
Definition at line 704 of file encoding.c.
References rb_encoding_entry::enc, and rb_enc_registered().
Referenced by Init_enc_set_filesystem_encoding(), rb_enc_find(), rb_locale_charmap(), and rb_nkf_enc_get().
VALUE rb_enc_from_encoding | ( | rb_encoding * | enc | ) |
Definition at line 117 of file encoding.c.
References ENC_TO_ENCINDEX, and Qnil.
Referenced by rb_enc_default_external(), rb_enc_default_internal(), rb_parser_encoding(), and rb_str_ellipsize().
rb_encoding* rb_enc_from_index | ( | int | idx | ) |
Definition at line 616 of file encoding.c.
Referenced by rb_default_external_encoding(), rb_default_internal_encoding(), rb_enc_compatible(), rb_enc_find(), rb_enc_get(), rb_enc_register(), rb_enc_str_coderange(), rb_encdb_set_unicode(), rb_filesystem_encoding(), rb_locale_encoding(), rb_str_buf_cat_ascii(), rb_str_comparable(), rb_str_dump(), rb_str_encode_ospath(), rb_str_end_with_asciichar(), rb_str_escape(), rb_str_inspect(), and rb_w32_conv_from_wchar().
rb_encoding* rb_enc_get | ( | VALUE | ) |
Definition at line 860 of file encoding.c.
References rb_enc_from_index(), and rb_enc_get_index().
Referenced by rb_enc_check(), rb_file_dirname(), rb_file_expand_path_internal(), rb_inspect(), rb_must_asciicompat(), rb_path_to_class(), rb_readlink(), rb_reg_check_preprocess(), rb_reg_quote(), rb_reg_regsub(), rb_str_conv_enc_opts(), and rb_str_ellipsize().
int rb_enc_get_index | ( | VALUE | obj | ) |
Definition at line 773 of file encoding.c.
References BUILTIN_TYPE, rb_sym2str, SPECIAL_CONST_P, SYMBOL_P, T_REGEXP, and T_STRING.
Referenced by rb_enc_associate_index(), rb_enc_compatible(), rb_enc_copy(), rb_enc_get(), rb_obj_encoding(), and rb_str_dump().
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.
char* rb_enc_nth | ( | const char * | , |
const char * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 2320 of file string.c.
Referenced by rb_str_ellipsize().
char* rb_enc_path_end | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
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 3109 of file file.c.
Referenced by rb_enc_path_skip_prefix().
char* rb_enc_path_skip_prefix | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
Definition at line 3123 of file file.c.
References isdirsep, and rb_enc_path_next().
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 rb_enc_ascget(), rb_enc_codepoint_len(), rb_enc_uint_chr(), rb_str_concat(), and rb_str_encode_ospath().
VALUE rb_enc_reg_new | ( | const char * | , |
long | , | ||
rb_encoding * | , | ||
int | |||
) |
int rb_enc_replicate | ( | const char * | , |
rb_encoding * | |||
) |
Definition at line 409 of file encoding.c.
Referenced by rb_define_dummy_encoding().
void rb_enc_set_default_external | ( | VALUE | encoding | ) |
Definition at line 1477 of file encoding.c.
References NIL_P, rb_eArgError, and rb_raise().
void rb_enc_set_default_internal | ( | VALUE | encoding | ) |
Definition at line 1561 of file encoding.c.
void rb_enc_set_index | ( | VALUE | obj, |
int | encindex | ||
) |
Definition at line 818 of file encoding.c.
References rb_check_frozen.
Referenced by rb_str_concat_literals().
int rb_enc_str_asciionly_p | ( | VALUE | ) |
Definition at line 641 of file string.c.
References ENC_CODERANGE_7BIT, FALSE, rb_enc_asciicompat, rb_enc_str_coderange(), STR_ENC_GET, and TRUE.
Referenced by rb_inspect(), and rb_reg_quote().
VALUE rb_enc_str_buf_cat | ( | VALUE | str, |
const char * | ptr, | ||
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 2853 of file string.c.
References ENC_CODERANGE_UNKNOWN, NULL, and rb_enc_to_index().
Referenced by rb_reg_regsub().
int rb_enc_str_coderange | ( | VALUE | ) |
Definition at line 621 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_BROKEN, ENC_CODERANGE_UNKNOWN, ENCODING_GET, rb_enc_dummy_p(), rb_enc_from_index(), and rb_enc_mbminlen.
Referenced by rb_enc_str_asciionly_p(), rb_external_str_with_enc(), rb_reg_fragment_setenc(), rb_str_comparable(), and rb_str_hash().
VALUE rb_enc_str_new | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 759 of file string.c.
References rb_str_new().
Referenced by rb_enc_uint_chr(), rb_syntax_error_append(), and rb_w32_conv_from_wchar().
VALUE rb_enc_str_new_cstr | ( | const char * | , |
rb_encoding * | |||
) |
VALUE rb_enc_str_new_static | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
long rb_enc_strlen | ( | const char * | , |
const char * | , | ||
rb_encoding * | |||
) |
int rb_enc_symname2_p | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 311 of file symbol.c.
Referenced by rb_enc_symname_p().
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_symname_p().
VALUE rb_enc_uint_chr | ( | unsigned int | code, |
rb_encoding * | enc | ||
) |
Definition at line 3283 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 rb_io_ungetc().
VALUE rb_enc_vsprintf | ( | rb_encoding * | , |
const char * | , | ||
va_list | |||
) |
Definition at line 1400 of file sprintf.c.
Referenced by rb_enc_raise(), 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 1008 of file string.c.
References rb_ascii8bit_encindex(), rb_enc_to_index(), and rb_usascii_encindex().
Referenced by 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 rb_filesystem_encoding(), 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 rb_dir_getwd(), rb_file_expand_path_internal(), rb_filesystem_str_new(), and rb_filesystem_str_new_cstr().
rb_encoding* rb_find_encoding | ( | VALUE | ) |
Definition at line 253 of file encoding.c.
ID rb_intern3 | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 554 of file symbol.c.
References OBJ_FREEZE, rb_setup_fake_str(), and sym.
Referenced by rb_intern2().
ID rb_interned_id_p | ( | const char * | , |
long | , | ||
rb_encoding * | |||
) |
Definition at line 90 of file localeinit.c.
References name, Qnil, rb_enc_find_index(), and rb_usascii_str_new_cstr().
int rb_locale_encindex | ( | void | ) |
Definition at line 1352 of file encoding.c.
References 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 rb_default_external_encoding(), rb_loaderror(), rb_loaderror_with_path(), rb_locale_str_new(), rb_locale_str_new_cstr(), and rb_str_export_locale().
long rb_memsearch | ( | const void * | , |
long | , | ||
const void * | , | ||
long | , | ||
rb_encoding * | |||
) |
Definition at line 244 of file re.c.
References LIKELY, memcmp(), rb_enc_mbminlen, and SIZEOF_VALUE.
Definition at line 992 of file encoding.c.
References rb_enc_get_index(), rb_eTypeError, and rb_raise().
long rb_str_coderange_scan_restartable | ( | const char * | , |
const char * | , | ||
rb_encoding * | , | ||
int * | |||
) |
Definition at line 531 of file string.c.
References ENC_CODERANGE_BROKEN, ENC_CODERANGE_VALID, rb_ascii8bit_encindex(), and rb_enc_to_index().
VALUE rb_str_conv_enc | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to | ||
) |
Definition at line 1002 of file string.c.
References Qnil, and rb_str_conv_enc_opts().
Referenced by rb_dir_getwd(), rb_external_str_with_enc(), rb_str_encode_ospath(), rb_str_export(), rb_str_export_locale(), and rb_str_export_to_enc().
VALUE rb_str_conv_enc_opts | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to, | ||
int | ecflags, | ||
VALUE | ecopts | ||
) |
Definition at line 885 of file string.c.
References is_ascii_string, len, RString::ptr, rb_ascii8bit_encoding(), rb_enc_asciicompat, rb_enc_associate(), rb_enc_get(), rb_str_dup(), RSTRING_GETMEM, and STR_ENC_GET.
Referenced by rb_str_conv_enc(), and rb_w32_conv_from_wchar().
Definition at line 2884 of file transcode.c.
Referenced by rb_str_ellipsize().
VALUE rb_str_export_to_enc | ( | VALUE | , |
rb_encoding * | |||
) |
Definition at line 1103 of file string.c.
References rb_str_conv_enc(), and STR_ENC_GET.
rb_encoding* rb_to_encoding | ( | VALUE | ) |
Definition at line 246 of file encoding.c.
int rb_to_encoding_index | ( | VALUE | ) |
Definition at line 198 of file encoding.c.
rb_encoding* rb_usascii_encoding | ( | void | ) |
Definition at line 1335 of file encoding.c.
Referenced by rb_intern2(), rb_reg_fragment_setenc(), rb_reg_quote(), and rb_sym_intern_ascii().
rb_encoding* rb_utf8_encoding | ( | void | ) |
Definition at line 1320 of file encoding.c.
Referenced by rb_str_encode_ospath().
const char* ruby_enc_find_basename | ( | const char * | name, |
long * | baselen, | ||
long * | alllen, | ||
rb_encoding * | enc | ||
) |
Definition at line 4172 of file file.c.
References f, isdirsep, name, skipprefix, strlen(), and strrdirsep.
const char* ruby_enc_find_extname | ( | const char * | name, |
long * | len, | ||
rb_encoding * | enc | ||
) |
RUBY_EXTERN VALUE rb_cEncoding |
Definition at line 287 of file encoding.h.